-
Notifications
You must be signed in to change notification settings - Fork 164
/
Copy pathinitialize-runtime-gke.sh
executable file
·76 lines (54 loc) · 1.99 KB
/
initialize-runtime-gke.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
# Copyright 2020 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.
set -e
QUICKSTART_ROOT="$( cd "$(dirname "$0")" || exit >/dev/null 2>&1 ; pwd -P )"
export QUICKSTART_ROOT
source "$QUICKSTART_ROOT/steps.sh"
# enables all required GCP APIs
enable_all_apis
# configure installation
set_config_params
# ask for confirmation (skip with QUIET_INSTALL=true)
ask_confirm
# create an Apigee organization with the same name as the GCP project
create_apigee_org
# create an Apigee environment
create_apigee_env "$ENV_NAME"
# create an Apigee environment group
create_apigee_envgroup "$ENV_GROUP_NAME"
# attach an Apigee environment to an environment group
add_env_to_envgroup "$ENV_NAME" "$ENV_GROUP_NAME"
# # configure an ingress IP and DNS entry for the env group hostname
configure_network "$ENV_GROUP_NAME"
# create a minimal GKE cluster with a single node pool
create_gke_cluster
# install certmanager
install_certmanager
# download the Apigeectl utility
download_apigee_ctl
# configure the Apigee override parameters
prepare_resources
# create certificate for env group hostname
create_cert "$ENV_GROUP_NAME"
# create all required service accounts and prepare workload identities
create_sa
# configure the Apigee runtime
configure_runtime "$ENV_NAME" "$ENV_GROUP_NAME"
# install the Apigee runtime
install_runtime "$ENV_NAME" "$ENV_GROUP_NAME"
# enable distributed trace
enable_trace "$ENV_NAME"
# deploy an example proxy to the given environment
deploy_example_proxy "$ENV_NAME" "$ENV_GROUP_NAME"