Skip to content

Commit

Permalink
Updates to config READMEs and creation of sample_vars.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tonykay committed Dec 8, 2018
1 parent 3df7b4e commit 5dc7685
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 19 deletions.
17 changes: 9 additions & 8 deletions ansible/configs/ans-tower-lab/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@
== Running Ansible Playbook

You can run the playbook with the following arguments to overwrite the default variable values:
From the `ansible_agnostic_deployer/ansible` directory run
`
[source,bash]
----
REGION=ap-southeast-2
KEYNAME=ocpkey
GUID=praktest4
ENVTYPE=ans-tower-lab
GUID=test01
BASESUFFIX='.example.opentlc.com'
CLOUDPROVIDER=ec2
REGION=us-east-1
HOSTZONEID='Z3IHLWJZOU9SRT'
BASESUFFIX='.example.opentlc.com'
KEYNAME=ocpkey
ansible-playbook \
ansible/main.yml \
ansible-playbook main.yml \
-e "guid=${GUID}" \
-e "env_type=${ENVTYPE}" \
-e "key_name=${KEYNAME}" \
Expand All @@ -29,8 +30,8 @@ ansible-playbook \
-e "aws_region=${REGION}" \
-e "HostedZoneId=${HOSTZONEID}" \
-e "[email protected]" \
-e "output_dir=/opt/workdir" \
-e @~/secrets.yml -vv
-e "output_dir=/tmp/workdir" \
-e @path_to/aws_credentials.yml
----
== Running Ansible Playbook for Homework Assignment

Expand Down
5 changes: 3 additions & 2 deletions ansible/configs/just-some-nodes-example/sample_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
#
# Ideally keep your copy OUTSIDE your repo, especially if using Cloud Credentials

env_type: just-some-nodes-example # Name of config to deploy
#env_type: just-some-nodes-example # Name of config to deploy
env_type: three-tier-app # Name of config to deploy
output_dir: /tmp/workdir # Writable working scratch directory
node_instance_count: 2 # Number of nodes to deploy
email: [email protected] # User info for notifications

guid: my_global_unique_identifier # Unique string used in FQDN
guid: jsn00 # Unique string used in FQDN
subdomain_base_suffix: example.com # Your domain used in FQDN

# Cloud specfic settings - example given here for AWS
Expand Down
12 changes: 3 additions & 9 deletions ansible/configs/three-tier-app/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ image::topology.png[width=100%]

== Supported Cloud Providers


* AWS
* Azure

Expand All @@ -28,16 +27,14 @@ These can be over-ridden at `ansible-playbook` runtime via `-e` options or perha

For further information on customizing images consult the link:../../../docs/Creating_a_config.adoc[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:
[source,bash]
----
REGION=ap-southeast-2
REGION=us-east-1
KEYNAME=ocpkey
GUID=praktest2
GUID=guidtest1
ENVTYPE="three-tier-app"
CLOUDPROVIDER=ec2
HOSTZONEID='Z3IHLWJZOU9SRT'
Expand All @@ -53,10 +50,7 @@ ansible-playbook main.yml \
-e "HostedZoneId=${HOSTZONEID}" \
-e "[email protected]" \
-e "output_dir=/tmp/workdir" \
-e@../secret.yml -vv
-e @~/.aws/credentials.yml
----

Expand Down
29 changes: 29 additions & 0 deletions ansible/configs/three-tier-app/sample_vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
# sample configuration file
#
# Usage: ansible-playbook main.yml -e @configs/just-some-nodes-example/sample.yml
#
# Ideally keep your copy OUTSIDE your repo, especially if using Cloud Credentials

env_type: three-tier-app # Name of config to deploy
output_dir: /tmp/workdir # Writable working scratch directory
email: [email protected] # User info for notifications

guid: jsn01 # Unique string used in FQDN
subdomain_base_suffix: example.opentlc.com # Your domain used in FQDN

# Cloud specfic settings - example given here for AWS

cloud_provider: ec2 # Which AgnosticD Cloud Provider to use
aws_region: us-east-1 # AWS Region to deploy in
HostedZoneId: Z3IHLWJZOU9SRT # You will need to change this
key_name: ocpkey # Keyname must exist in AWS

# AWS Credentials. These are required (don't sync them to your fork)
#
# Alternatively consider keeping these in an external file and including:
# $ ansible-playbook main.yml -e @configs/three-tier-app/sample.yml -e @~/secret.yml
#
# aws_access_key_id:
# aws_secret_access_key:
...

0 comments on commit 5dc7685

Please sign in to comment.