Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mlabouardy/nexususerconference-2019
Building a CI/CD Platform with K8S on GCP
https://github.com/mlabouardy/nexususerconference-2019
ci-cd docker gcp golang kubernetes packer terraform
Last synced: 5 days ago
JSON representation
Building a CI/CD Platform with K8S on GCP
- Host: GitHub
- URL: https://github.com/mlabouardy/nexususerconference-2019
- Owner: mlabouardy
- Created: 2019-06-03T12:04:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-12T12:52:49.000Z (over 5 years ago)
- Last Synced: 2023-08-27T07:33:34.885Z (about 1 year ago)
- Topics: ci-cd, docker, gcp, golang, kubernetes, packer, terraform
- Language: HCL
- Homepage:
- Size: 109 KB
- Stars: 10
- Watchers: 4
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Building a CI/CD Platform with K8S on GCP
## Configure Nexus credentials
```
kubectl create secret generic nexus --from-file=.dockerconfigjson=/home/mohamed_labouardy/.docker/config.json --type=kubernetes.io/dockerconfigjson
```## Create Deployment
```
kubectl apply -f deployment.yml
```## Create Service
```
kubectl apply -f service.yml
```## Continuous Deployment
```
- id: 'configure kubectl'
name: 'gcr.io/cloud-builders/gcloud'
env:
- 'CLOUDSDK_COMPUTE_ZONE=${_CLOUDSDK_COMPUTE_ZONE}'
- 'CLOUDSDK_CONTAINER_CLUSTER=${_CLOUDSDK_CONTAINER_CLUSTER}'
- 'KUBECONFIG=/kube/config'
entrypoint: 'sh'
args:
- '-c'
- |
gcloud container clusters get-credentials "$${CLOUDSDK_CONTAINER_CLUSTER}" --zone "$${CLOUDSDK_COMPUTE_ZONE}"
volumes:
- name: 'kube'
path: /kube- id: 'deploy to k8s'
name: 'gcr.io/cloud-builders/gcloud'
env:
- 'KUBECONFIG=/kube/config'
entrypoint: 'sh'
args:
- '-c'
- |
kubectl set image deployment/app app=registry.serverlessmovies.com/mlabouardy/app:$SHORT_SHA
volumes:
- name: 'kube'
path: /kube
```## Maintainer
Mohamed Labouardy