11# asm-workshop
22
3+ ## About the content of this lab
4+
35Put this https://alwaysupalwayson.com/asm-security as a workshop.
46
571 . [ ] Create a GKE cluster
@@ -20,9 +22,11 @@ Further considerations:
2022- Multi-cluster?
2123- MCP (control/data plane)?
2224- Integrate CRfA in there? Or do another similar crfa-workshop?
25+ - Do a Neos tutorial based on this? Qwiklabs or Codelabs?
2326
27+ ## Developer setup
2428
25- ## Build and run this static web site locally
29+ ### Build and run this static web site locally
2630
2731```
2832git clone --recurse-submodules https://github.com/mathieu-benoit/asm-workshop
@@ -31,6 +35,37 @@ docker build -t asm-workshop .
3135docker run -d -p 8080:8080 asm-workshop
3236```
3337
34- ## Configure GitHub action
38+ ### Configure GitHub action
39+
40+ ```
41+ projectId=FIXME
42+ gcloud config set project $projectId
43+
44+ # Setup Service account
45+ saName=asm-workshop-gha-cr-push
46+ saId=$saName@$projectId.iam.gserviceaccount.com
47+ gcloud iam service-accounts create $saName \
48+ --display-name=$saName
49+ gcloud iam service-accounts keys create ~/tmp/$saName.json \
50+ --iam-account $saId
51+
52+ # Setup Artifact Registry
53+ artifactRegistryName=FIXME
54+ artifactRegistryLocation=FIXME
55+ gcloud artifacts repositories add-iam-policy-binding $artifactRegistryName \
56+ --project $projectId \
57+ --location $artifactRegistryLocation \
58+ --member "serviceAccount:$saId" \
59+ --role roles/artifactregistry.writer
60+ gcloud projects add-iam-policy-binding $projectId \
61+ --member=serviceAccount:$saId \
62+ --role=roles/ondemandscanning.admin
3563
36- FIXME
64+ # Setup GitHub actions variables
65+ gh auth login --web
66+ gh secret set CONTAINER_REGISTRY_PUSH_PRIVATE_KEY < ~/tmp/$saName.json
67+ rm ~/tmp/$saName.json
68+ gh secret set CONTAINER_REGISTRY_PROJECT_ID -b"${projectId}"
69+ gh secret set CONTAINER_REGISTRY_NAME -b"${artifactRegistryName}"
70+ gh secret set CONTAINER_REGISTRY_HOST_NAME -b"${artifactRegistryLocation}-docker.pkg.dev"
71+ ```
0 commit comments