Skip to content

miteshget/ansible_advance_homework_solve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Tower Config

  • From the cloned repo run site-config-tower.yml playbook to create job templates and workflow template.

laptop]# scp -i /home/<username>/.ssh/your-key.pem /home/<username>/.ssh/your-key.pem username-company.name@bastion.<GUID>.example.com:/tmp
laptop]# ssh -i /home/<username>/.ssh/your-key.pem  username-company.name@bastion.<GUID>.example.com
bastion]$  sudo -i
bastion]# cp /tmp/<your-key.pem>  /root/.ssh/mykey.pem
bastion]# git clone https://github.com/miteshrh/ansible_advance_homework_solve.git
bastion]# cd ansible_advance_homework)_solve
bastion]# cat 00_rc
    TOWER_GUID=<bastion env GUID>
    OSP_GUID=<openstack env GUID>
    PRIVATE_KEY=~/.ssh/mykey.pem
    OPENTLC_LOGIN=<opentlc-username>
    OPENTLC_PASSWORD=<password>
    GITHUB_REPO=https://github.com/miteshrh/ansible_advance_homework_solve.git
    JQ_REPO_BASE=http://www.opentlc.com/download/ansible_bootcamp
    REGION=us-east-1
    RH_MAIL_ID=<[email protected]>
    GLOBAL_VARS="
        OSP_GUID=${OSP_GUID}
        GUID=${TOWER_GUID}
        ansible_user=${OPENTLC_LOGIN}
        ansible_ssh_private_key_file=${PRIVATE_KEY}
        opentlc_login=${OPENTLC_LOGIN}
        opentlc_password=${OPENTLC_PASSWORD}
        param_repo_base=${GITHUB_REPO}
        tower_GUID=${TOWER_GUID}
        path_to_opentlc_key=${PRIVATE_KEY}
        github_repo=${GITHUB_REPO}
        osp_GUID=${OSP_GUID}
        REGION_NAME=${REGION}
        EMAIL=${RH_MAIL_ID}
        “
bastion]# source 00_rc

bastion]# ansible-playbook   00_main_playbook.yml -e "${GLOBAL_VARS}"
Table 1. List of Playbooks
Files or dir Purpose

00_rc

Run command file to setup variables

01_site-setup-workstation.yml

Playbook to call role

02_site-install-isolated-node.yml

Playbook to install isolated node

03_site-setup-openstack.yml

setup openstack env

04_site-config-tower.yml

Playbook to call role config-tower

site-osp-instances.yml

Playbook to call role

site-3tier-app.yml

Playbook to deploy three tier app

site-osp-delete.yml

Playbook to call role

site-smoke-osp.yml

Playbook to test three tier app on OSP

site-smoketest-aws.yml

Playbook to test three tier app on AWS

roles/config-tower/vars/main.yml

Very important file to review. All the variable values are set there. Please do not make any changes in the file

aws_creds.yml

Fetch GUIDkey.pem from bastion of Three tier application env and create machine credential to connect to AWS instances

aws_provision.yml

Use order_svc.sh script to provision env

aws_status_check.yml

Check aws instances are up or not

grading-script.yml

Self grading script

roles/config-tower/tasks/ec2_dynamic.yml

For creating Dynamic inventory in Ansible tower. Use AWS Access Key for credential

roles/config-tower/tasks/job_template.yml

For creating job templates

roles/config-tower/tasks/pre-config-tower.yml

Any pre config tasks needed

roles/config-tower/tasks/workflow_template.yml

genrate workflow from workflow.yml file

roles/config-tower/tasks/post-config-tower.yml

any post config jobs

ssh.cfg

ssh proxy configuration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published