Skip to content

Latest commit

 

History

History
 
 

just-a-bunch-of-nodes

Just Some Nodes Example

Overview

Three Tier App config whilst originally intended for the deployment of a three tier app is perhaps better described as "5 un-configured RHEL machines all exposed to the internet". It is worth noting, despite its name, that no application is actually deployed. It makes an ideal base infrastructure to build on and can easily be extended via it’s env_vars.yml to less or more machines and also to different operating system images.

topology

Supported Cloud Providers

  • AWS

  • Azure

Review the Env_Type variable file

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

This includes the ability to:

  • Change the number of machines deployed

  • Changed the operating system image (e.g. Ansible AMI or similar)

  • Change the tags carried by any instances

  • Change the base packages installed

  • Change/set the ansible_user and remote_user

These can be over-ridden at ansible-playbook runtime via -e options or perhaps more compactly by overriding vars in your own var file and invoking via -e @my_env_vars.yml

For further information on customizing images consult the Creating a Config Guide

Running Ansible Playbook

You can run the playbook with the following arguments, from the ansible directory, 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 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=/tmp/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

Environment Overview

This environment is used to deploy any number of RHEL nodes for generic use. It is also used as an example for new contributors to Agnostic D as an example

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.

Deploying the Three Tier App Config

You can deploy this config by running the following command from the ansible directory. You will have to provide credentials and adjust settings to your own environment.

ansible-playbook -e @configs/three-tier-app/sample_vars.yml main.yml

To Delete an environment

ansible-playbook -e @configs/three-tier-app/sample_vars.yml \
  configs/three-tier-app/destroy_env.yml