Skip to content
This repository was archived by the owner on Aug 19, 2021. It is now read-only.

Deploy the Software Stack

mawinkler edited this page Jan 28, 2020 · 17 revisions

Deploy the Software Stack with ansible-playbook

Google Cloud

$ ansible-playbook --vault-password-file ../.vault-pass.txt \
    -i gcp_inventory.gcp.yml --extra-vars="type=gcp" deploy.yml

Amazon AWS

$ ansible-playbook --vault-password-file ../.vault-pass.txt \
    -i ec2.py --extra-vars="type=aws" deploy.yml

Microsoft Azure (future)

$ ansible-playbook --vault-password-file ../.vault-pass.txt \
    -i azure_rm.py --extra-vars="type=azure" deploy.yml

VMware ESXi

$ ansible-playbook --vault-password-file ../.vault-pass.txt \
    -i hosts --extra-vars="type=esx" deploy.yml

Deploy the Software Stack with the Menu

$ ./menu.sh
Please choose the target environment:
1) gcp
2) aws
3) esx
4) site_secrets

Choose 1-3

Please choose the playbook:
1) site                  7) deploy_gitlab
2) deploy                8) jenkins_create_credentials
3) deploy_endpoints      9) patch_docker
4) deploy_deepsecurity  10) pause
5) deploy_smartcheck    11) resume
6) deploy_jenkins       12) terminate

Choose 2

The ./site_<type>-directory

During the deployment, a directory called ./site_<type> is created and populated with information on how to access your environment including setup logs. Example:

$ cat site_gcp/jenkins.log
NAME:   jenkins
LAST DEPLOYED: Sat Oct 26 10:38:54 2019
NAMESPACE: jenkins
STATUS: DEPLOYED

RESOURCES:
==> v1/ConfigMap
NAME           DATA  AGE
jenkins        6     1s
jenkins-tests  1     1s

==> v1/Deployment
NAME     READY  UP-TO-DATE  AVAILABLE  AGE
jenkins  0/1    1           0          1s

==> v1/PersistentVolumeClaim
NAME     STATUS  VOLUME                                    CAPACITY  ACCESS MODES  STORAGECLASS     AGE
jenkins  Bound   pvc-cefb4273-f7dc-11e9-8699-42010a9c0018  8Gi       RWO           rook-ceph-block  1s

==> v1/Pod(related)
NAME                      READY  STATUS   RESTARTS  AGE
jenkins-7447ddf9db-2pfdv  0/1    Pending  0         0s
...
$ cat site_gcp/jenkins.txt
URL: http://10.154.0.5:30013
URL: http://jenkins.34.89.46.70.nip.io
Username: admin
Password: XXXXXXXXX

Use this info to access the services or to troubleshoot.

Note: The k8s master is tainted, which means that it does not run Kubernetes workload (which is best practice).

For that reason, services Rook-Ceph will initialize themselves only after workers did join the cluster. Therefore, the deploy.yml waits for the following condition to be met:

Number of rook-ceph-osd-#- pods equal count of worker nodes in the cluster

That typically takes in between two to three minutes. The deployment of Smart Check, Jenkins, etc. will take place after that initial initialization process.

Next Step (optional)

Clone this wiki locally