https://github.com/mlabouardy/alldaydevops-2020
AllDayDevOps Spring Break Edition 2020
https://github.com/mlabouardy/alldaydevops-2020
azure container devops docker jenkins k8s packer terraform
Last synced: about 2 months ago
JSON representation
AllDayDevOps Spring Break Edition 2020
- Host: GitHub
- URL: https://github.com/mlabouardy/alldaydevops-2020
- Owner: mlabouardy
- Created: 2020-04-14T18:33:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-17T11:58:51.000Z (about 6 years ago)
- Last Synced: 2025-04-12T20:52:55.024Z (about 1 year ago)
- Topics: azure, container, devops, docker, jenkins, k8s, packer, terraform
- Language: HCL
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## AllDayDevOps Spring Break Edition 2020
Cloud Native Jenkins cluster deployment on Azure with Terraform & Packer. Plus, setup of CI/CD pipeline on Jenkins with Pipeline as Code.
## Jenkins Workers Resource Identity
- Create Managed Identity called JenkinsWorker:
```
az identity create --resource-group $resourceGroup --name JenkinsWorker
```
- Assign JenkinsWorker identity to VMs
- Get JenkinsWorker Principal ID:
```
principalId=$(az identity show --resource-group $resourceGroup --name JenkinsWorker --query principalId --output tsv)
```
- Assign the desired role the managed identity:
```
containerId=$(az container show --resource-group $resourceGroup --name application-sandbox|staging|production --query id --output tsv)
az role assignment create --assignee $principalId --scope $containerId --role Contributor
```
## Author
Mohamed Labouardy