forked from redhat-cop/agnosticd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding sample-vars.yml to three-tier-app, ans-tower-lab, and just-som…
…e-nodes-example
- Loading branch information
Showing
6 changed files
with
92 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ From the `ansible_agnostic_deployer/ansible` directory run | |
[source,bash] | ||
---- | ||
ENVTYPE=ans-tower-lab | ||
GUID=test01 | ||
GUID=test02 | ||
BASESUFFIX='.example.opentlc.com' | ||
CLOUDPROVIDER=ec2 | ||
REGION=us-east-1 | ||
|
@@ -31,48 +31,48 @@ ansible-playbook main.yml \ | |
-e "HostedZoneId=${HOSTZONEID}" \ | ||
-e "[email protected]" \ | ||
-e "output_dir=/tmp/workdir" \ | ||
-e @path_to/aws_credentials.yml | ||
-e @~/secret.yml | ||
---- | ||
== Running Ansible Playbook for Homework Assignment | ||
|
||
You can run the playbook with the following arguments to overwrite the default variable values: | ||
[source,bash] | ||
---- | ||
REGION=ap-southeast-2 | ||
REGION=us-east-1 | ||
KEYNAME=testkey | ||
GUID=praktest9 | ||
GUID=test02 | ||
ENVTYPE=ans-tower-lab | ||
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@~/secrets.yml -vv \ | ||
-e "deploy_tower_homework=true" | ||
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=/opt/workdir" \ | ||
-e@~/secrets.yml \ | ||
-e "deploy_tower_homework=true" | ||
---- | ||
|
||
|
||
|
||
=== To Delete an environment | ||
---- | ||
REGION=ap-southeast-2 | ||
REGION=us-east-1 | ||
KEYNAME=ocpkey | ||
GUID=praktest1 | ||
ENVTYPE="three-tier-app" | ||
GUID=test02 | ||
ENVTYPE=ans-tower-lab | ||
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 | ||
ansible-playbook 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 | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
|
||
guid: test01 | ||
env_type: ans-tower-lab | ||
key_name: ocpkey | ||
subdomain_base_suffix: .example.opentlc.com' | ||
cloud_provider: ec2 | ||
aws_region: us-east-1 | ||
HostedZoneId: Z3IHLWJZOU9SRT | ||
email: [email protected] | ||
output_dir: /tmp/workdir" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
# 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: guid01 # Your Global UNIQUE Identifier | ||
subdomain_base_suffix: .example.opentlc.com # Your domain used in FQDN | ||
|
||
# Path to yum repos | ||
|
||
own_repo_path: http://admin.na.shared.opentlc.com/repos/ocp/3.6/ | ||
|
||
# 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: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,16 @@ | |
# | ||
# 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: three-tier-app # Name of config to deploy | ||
env_type: just-some-nodes-example # 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: jsn00 # Unique string used in FQDN | ||
subdomain_base_suffix: example.com # Your domain used in FQDN | ||
guid: guid02 # Unique string used in FQDN | ||
subdomain_base_suffix: .example.opentlc.com # Your domain used in FQDN | ||
|
||
# Path to yum repos | ||
own_repo_path: http://admin.na.shared.opentlc.com/repos/ocp/3.6/ | ||
|
||
# Cloud specfic settings - example given here for AWS | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,44 +27,22 @@ 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 | ||
== Deploying the Three Tier App Config | ||
|
||
You can run the playbook with the following arguments, from the `ansible` directory, to overwrite the default variable values: | ||
[source,bash] | ||
---- | ||
REGION=us-east-1 | ||
KEYNAME=ocpkey | ||
GUID=guidtest1 | ||
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 @~/.aws/credentials.yml | ||
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 | ||
---- | ||
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 | ||
ansible-playbook -e @configs/three-tier-app/sample_vars.yml \ | ||
configs/three-tier-app/destroy_env.yml | ||
---- | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,12 @@ 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 | ||
guid: guid01 # Your Global UNIQUE Identifier | ||
subdomain_base_suffix: .example.opentlc.com # Your domain used in FQDN | ||
|
||
# Path to yum repos | ||
|
||
own_repo_path: http://admin.na.shared.opentlc.com/repos/ocp/3.6/ | ||
|
||
# Cloud specfic settings - example given here for AWS | ||
|
||
|