-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathdeploy.sh
42 lines (33 loc) · 1.56 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Running terraform scripts with storing required files in GCS bucket
# bash deploy.sh mm2-binaries-bucket
BUCKET_NAME=$1
mkdir -p binaries
# kafka
curl -fSL https://downloads.apache.org/kafka/3.7.1/kafka_2.13-3.7.1.tgz --output ./binaries/kafka_2.13-3.7.1.tgz
# Prometheus
# wget https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.13.0/jmx_prometheus_javaagent-0.13.0.jar
curl -fSL https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.13.0/jmx_prometheus_javaagent-0.13.0.jar --output ./binaries/jmx_prometheus_javaagent-0.13.0.jar
# Java
curl -fSL https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz --output ./binaries/openjdk-11.0.2_linux-x64_bin.tar.gz
# Copying resource folder to GCS bucket
gsutil cp -r ./binaries/* gs://"$BUCKET_NAME"/binaries
# # terraform initialization
# terraform init
# # terraform plan to check the resources being created
# terraform plan
# # deploy the resources
# terraform apply