Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.3 KB

README.adoc

File metadata and controls

53 lines (39 loc) · 1.3 KB

Three Tier App

Review the Env_Type variable file

  • This file ./env_vars.yml contains all the variables you need to define to control the deployment of your environment.

Running Ansible Playbook

You can run the playbook with the following arguments to overwrite the default variable values:

REGION=ap-southeast-2
KEYNAME=ocpkey
GUID=praktest2
ENVTYPE="three-tier-app"
CLOUDPROVIDER=ec2
HOSTZONEID='Z3IHLWJZOU9SRT'
BASESUFFIX='.example.opentlc.com'

ansible-playbook \
     ansible/main.yml  \
      -e "guid=${GUID}" \
      -e "env_type=${ENVTYPE}" \
      -e "key_name=${KEYNAME}" \
      -e "subdomain_base_suffix=${BASESUFFIX}" \
        -e "cloud_provider=${CLOUDPROVIDER}" \
        -e "aws_region=${REGION}" \
        -e "HostedZoneId=${HOSTZONEID}" \
        -e "[email protected]" \
        -e "output_dir=/opt/workdir" \
         -e@../secret.yml -vv

To Delete an environment

REGION=ap-southeast-2
KEYNAME=ocpkey
GUID=praktest1
ENVTYPE="three-tier-app"
CLOUDPROVIDER=ec2

ansible-playbook ./ansible/configs/${ENVTYPE}/destroy_env.yml \
 -e "guid=${GUID}" -e "env_type=${ENVTYPE}"  -e "cloud_provider=${CLOUDPROVIDER}" -e "aws_region=${REGION}"  \
 -e "key_name=${KEYNAME}"  -e "subdomain_base_suffix=${BASESUFFIX}"    -e@../secret.yml -vv