Skip to content
This repository was archived by the owner on May 7, 2025. It is now read-only.

Commit 9d50b9a

Browse files
author
Mathieu Benoit
committed
fix small frictions with the config controller setup section
1 parent cea32e7 commit 9d50b9a

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

content/config-controller/create-config-controller.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ echo "export CONFIG_CONTROLLER_PROJECT_ID=acm-workshop-${RANDOM_SUFFIX}" >> ~/ac
1717
echo "export BILLING_ACCOUNT_ID=${BILLING_ACCOUNT_ID}" >> ~/acm-workshop-variables.sh
1818
echo "export ORG_OR_FOLDER_ID=${ORG_OR_FOLDER_ID}" >> ~/acm-workshop-variables.sh
1919
echo "export LOCAL_IP_ADDRESS=$(curl ifconfig.co)" >> ~/acm-workshop-variables.sh
20+
echo "export CONFIG_CONTROLLER_NAME=configcontroller" >> ~/acm-workshop-variables.sh
21+
echo "export CONFIG_CONTROLLER_LOCATION=us-east1" >> ~/acm-workshop-variables.sh
2022
source ~/acm-workshop-variables.sh
2123
```
24+
{{% notice info %}}
25+
Just `us-east1` or `us-central1` are supported region for Config Controller for now.
26+
{{% /notice %}}
2227

2328
## Create Config Controller's GCP project
2429

@@ -59,8 +64,6 @@ Create the Config Controller instance:
5964
```Bash
6065
gcloud services enable krmapihosting.googleapis.com \
6166
cloudresourcemanager.googleapis.com
62-
CONFIG_CONTROLLER_NAME=configcontroller
63-
CONFIG_CONTROLLER_LOCATION=us-east1 # or us-central1 are supported for now
6467
gcloud anthos config controller create $CONFIG_CONTROLLER_NAME \
6568
--location $CONFIG_CONTROLLER_LOCATION \
6669
--man-block $LOCAL_IP_ADDRESS/32

content/config-controller/set-up-config-controller-git-repo.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:
5050
EOF
5151
```
5252
{{% notice info %}}
53-
We explicitly set the Policy Controller's `templateLibraryInstalled` field to `false`. Throughout this workshop, we will create our own `ConstraintTemplate` resources when needed. It will have two main benefits: first you will learn about how to create your own `ConstraintTemplate` (with OPA rego) and second, you we will be able to validate our Kubernetes resources against this . But be aware of this [default library of `ConstraintTemplate` resources](https://cloud.google.com/anthos-config-management/docs/reference/constraint-template-library) you could leverage as-is if you set this field to `true`.
53+
We explicitly set the Policy Controller's `templateLibraryInstalled` field to `false`. Throughout this workshop, we will create our own `ConstraintTemplate` resources when needed. It will have two main benefits: first you will learn about how to create your own `ConstraintTemplate` (with OPA rego) and second, you we will be able to validate our Kubernetes resources against the `Constraint` without interacting with the Kubernetes Server API. But be aware of this [default library of `ConstraintTemplate` resources](https://cloud.google.com/anthos-config-management/docs/reference/constraint-template-library) that you could leverage as-is if you set this field to `true`.
5454
{{% /notice %}}
5555

5656
Let's wait for the multi-repositories configs to be deployed:
@@ -63,6 +63,7 @@ kubectl wait --for condition=established crd rootsyncs.configsync.gke.io
6363
Create a dedicated private GitHub repository to store any Kubernetes manifests associated to the GCP Organization:
6464
```Bash
6565
cd ~
66+
gh auth login
6667
gh repo create $WORKSHOP_ORG_DIR_NAME --public --clone --template https://github.com/mathieu-benoit/config-sync-template-repo
6768
cd ~/$WORKSHOP_ORG_DIR_NAME
6869
git pull
@@ -78,7 +79,6 @@ ssh-keygen -t rsa -b 4096 \
7879
-C "${ORG_REPO_NAME_WITH_OWNER}@github" \
7980
-N '' \
8081
-f ./tmp/github-org-repo
81-
kubectl create ns config-management-system && \
8282
kubectl create secret generic git-creds \
8383
--namespace=config-management-system \
8484
--from-file=ssh=./tmp/github-org-repo
@@ -136,6 +136,9 @@ git add .
136136
git commit -m "Billing API in Config Controller project"
137137
git push origin main
138138
```
139+
{{% notice info %}}
140+
Because it's the first `git commit` of this workshop, if you don't have your own environment set up with `git`, you may be prompted to properly set up `git config --global user.email "[email protected]"` and `git config --global user.name "Your Name"`.
141+
{{% /notice %}}
139142

140143
## Check deployments
141144

content/gke-project/create-gke-project.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ _{{< param description >}}_
88
Define variables:
99
```Bash
1010
source ~/acm-workshop-variables.sh
11-
echo "export GKE_PROJECT_ID=acm-workshop-${RANDOM_SUFFIX}-gke" >> ~/acm-workshop-variables.sh
11+
GKE_PROJECT_ID=acm-workshop-${RANDOM_SUFFIX}-gke
12+
echo "export GKE_PROJECT_ID=${GKE_PROJECT_ID}" >> ~/acm-workshop-variables.sh
1213
echo "export GKE_PROJECT_SA_EMAIL=${GKE_PROJECT_ID}@${CONFIG_CONTROLLER_PROJECT_ID}.iam.gserviceaccount.com" >> ~/acm-workshop-variables.sh
1314
source ~/acm-workshop-variables.sh
1415
```

0 commit comments

Comments
 (0)