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

Resume the Environment

mawinkler edited this page Jan 28, 2020 · 11 revisions

Resume the Environment with ansible-playbook

Resuming the environment from a paused state restarts your virtual instances. Since MOADSD-NG is self-healing, everything should come up within a few minutes.

Note: When using services like GitLab or Jenkins which require Docker-in-Docker and therefore write access to the docker.sock, you need to "repatch" docker after resuming the environment.

Google Cloud

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

Amazon AWS

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

You either need to wait 5 minutes after running this playbook or refresh the dynamic inventory for AWS by executing the following command:

./ec2.py --refresh-cache

Microsoft Azure (future)

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

Resume the Environment with the Menu

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

Choose 1-2

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 11

If you chose aws as the target environment you either need to wait 5 minutes after running this playbook or refresh the dynamic inventory for AWS by executing the following command:

./ec2.py --refresh-cache

Reenable Docker-in-Docker

This is required if you are using Jenkins / Gitlab

After resuming your environment, wait until all instances are up and running again. Then either run

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

or

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

or

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

Choose 1-2

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 9

Next Step (optional)

Clone this wiki locally