-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapigee-hybrid-setup
85 lines (69 loc) · 2.42 KB
/
apigee-hybrid-setup
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
77
78
79
80
81
82
83
TOKEN=$(gcloud auth print-access-token)
export PROJECT_ID="teodlh-hybrid-319313"
export ORG_NAME=$PROJECT_ID
ORG_DISPLAY_NAME="teodlh-hybrid"
ORGANIZATION_DESCRIPTION="Hybrid org"
export ANALYTICS_REGION="us-east1"
export RUNTIMETYPE=HYBRID
export ENV_NAME="eval"
ENV_DISPLAY_NAME="teodlh-hybrid"
ENV_DESCRIPTION="Hybrid org"
export DOMAIN="nip.io"
export ENV_GROUP="eval-env-group"
gcloud config set project $PROJECT_ID
gcloud services enable \
apigee.googleapis.com \
apigeeconnect.googleapis.com \
dns.googleapis.com \
pubsub.googleapis.com \
cloudresourcemanager.googleapis.com \
compute.googleapis.com \
container.googleapis.com --project $PROJECT_ID
curl -H "Authorization: Bearer $TOKEN" -X POST -H "content-type:application/json" \
-d '{
"name":"'"$ORG_NAME"'",
"displayName":"'"$ORG_DISPLAY_NAME"'",
"description":"'"$ORGANIZATION_DESCRIPTION"'",
"runtimeType":"'"$RUNTIMETYPE"'",
"analyticsRegion":"'"$ANALYTICS_REGION"'"
}' \
"https://apigee.googleapis.com/v1/organizations?parent=projects/$PROJECT_ID"
\\grab long running op ID from reponse above
export LONG_RUNNING_OPERATION_ID="c09c19c3-e531-4086-bc37-92ac28472a89"
curl -H "Authorization: Bearer $TOKEN" \
"https://apigee.googleapis.com/v1/organizations/$ORG_NAME/operations/$LONG_RUNNING_OPERATION_ID"
gcloud compute addresses create hybrid-ip \
--global \
--ip-version IPV4
\\GKE Setup
export PROJECT_ID="teodlh-hybrid-319313"
export CLUSTER_NAME=apiegeex-hybrid
export CLUSTER_REGION=us-east1
export NODE_LOCATION=us-east1-b
\\configure console with default values
gcloud init
//Create cluster
gcloud container clusters create $CLUSTER_NAME \
--region $CLUSTER_REGION \
--node-locations $NODE_LOCATION \
--release-channel stable
//Install Cert Manager
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.2.0/cert-manager.yaml
//Validate install
./install_asm \
--project_id $PROJECT_ID \
--cluster_name $CLUSTER_NAME \
--cluster_location $NODE_LOCATION \
--mode install \
--output_dir . \
--only_validate
//Customize /asm/istio/istio-operator.yaml
https://cloud.google.com/apigee/docs/hybrid/v1.5/install-asm#text-to-copy_1
//Install using custom overlay
./install_asm \
--project_id $PROJECT_ID \
--cluster_name $CLUSTER_NAME \
--cluster_location $NODE_LOCATION \
--mode install \
--enable_apis \
--custom_overlay ~/asm/istio/istio-operator.yaml