Link to these links: https://git.io/vKSVZ
Module 1:
- Run jenkins from war file:
jenkins -jar jenkins.war - Run jenkins from docker:
docker run -d \
--restart unless-stopped \
--name jenkins \| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| annotations: | |
| service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp | |
| service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "3600" | |
| service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*' | |
| service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-1:199155926715:certificate/badfabf7-0dbe-4578-a3af-f8be8fba1be0 | |
| service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https | |
| labels: |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: nginx-ingress | |
| spec: | |
| type: LoadBalancer | |
| ports: | |
| - port: 80 | |
| name: http | |
| - port: 443 |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: default | |
| namespace: default | |
| annotations: | |
| service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp" | |
| service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*" | |
| spec: | |
| type: LoadBalancer |
| #!/bin/bash | |
| sudo apt-get update | |
| sudo apt-get install python3 python3-pip postgresql postgresql-contrib nginx virtualenv | |
| mkdir ~/cp3 | |
| cd ~/cp3 | |
| virtualenv --python=python3 venv | |
| git clone https://github.com/code-sleuth/yummy-recipes-api.git yummy-api | |
| cd yummy-api | |
| touch .env |
| <?xml version='1.0' encoding='UTF-8'?> | |
| <project> | |
| <actions/> | |
| <description></description> | |
| <keepDependencies>false</keepDependencies> | |
| <properties/> | |
| <scm class="hudson.plugins.git.GitSCM" plugin="git@2.5.2"> | |
| <configVersion>2</configVersion> | |
| <userRemoteConfigs> | |
| <hudson.plugins.git.UserRemoteConfig> |
Link to these links: https://git.io/vKSVZ
Module 1:
jenkins -jar jenkins.wardocker run -d \
--restart unless-stopped \
--name jenkins \| # This assumes you have some role that can read some secret at secret/foo. | |
| export VAULT_ADDR="http://my_vault_address.com" | |
| export GCE_ROLE = "my-gce-role" | |
| apt-get update | |
| apt-get install -y jq | |
| # Curl out to metadata server to get token | |
| JWT=$(curl -H "Metadata-Flavor: Google" -G \ |