Git Product home page Git Product logo

ansible_advance_homework's Introduction

Homework Automation

Prepare Envniorment

  • Order Ansible Tower Lab

    • Services → Catalogs → OPENTLC Automation → Ansible Tower Lab

  • Order Openstack Lab Enviorment

    • Services → Catalogs → OPENTLC Automation → Openstack for Ansible

  • Wait for the envs to be up.

Playbook for homework

  • Run site-homework.yml to complete homework

    • Playbook will do the following

      1. Prepare workstation-{{osp_GUID}}}.rhpds.opentlc.com

        1. Setup ssh keys for cloud-user

        2. Install shade library

        3. Create clouds.yaml file for connecting to api of OSP

      2. Install Ansible Tower on 3 nodes

      3. Install Ansible Tower Isolated node on workstation-{{osp_GUID}}}.rhpds.opentlc.com

      4. Connfigure tower:

        1. Install tower-cli

        2. Create Project

        3. Create required credentials

        4. Create job templates

        5. Create workflow template

export TOWER_GUID=<Tower guid from mail>
export OSP_GUID=<OSP GUID from mail>
export SSO_LOGIN=<username-company.com>
export SSO_KEY=~/.ssh/key.pem
export WORKDIR=/Users/<username>/homework-assignment-automation/
export SSO_PASSWORD=<your openlc account password>
exxport JQ_REPO_BASE=http://www.opentlc.com/download/ansible_bootcamp

###### Create local inventory

# mkdir ${WORKDIR}/inventory

# cat << EOF > ${WORKDIR}/inventory/inventory_local
[bastion_tower]
bastion.${TOWER_GUID}.example.opentlc.com

[workstation]
workstation-${OSP_GUID}.rhpds.opentlc.com

[all:vars]
ansible_user=${SSO_LOGIN}
ansible_ssh_private_key_file=${SSO_KEY}
ansible_ssh_common_args='-o StrictHostKeyChecking=no'

EOF

# ansible-playbook  site-homework.yml -e tower_GUID=${TOWER_GUID} -e osp_GUID=${OSP_GUID} -e sso_login=${SSO_LOGIN} -e path_to_sso_key=${SSO_KEY} -e workdir=${WORKDIR} -e param_repo_base=${JQ_REPO_BASE} -e sso_password=${SSO_PASSWORD} --ask-vault-pass

ansible_advance_homework's People

Contributors

prakhar1985 avatar vicperdana avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.