Giter VIP home page Giter VIP logo

ansible-tower-workshop's Introduction

Ansible Tower Workshop

ansible

Ansible_Tower_Workshop is a ansible playbook to provision Ansible Tower in AWS. This playbook uses Ansible to wrap Terraform, for provisioning AWS infrastructure and nodes. To find more info about Terraform check here

These modules all require that you have AWS API keys available to use to provision AWS resources. You also need to have IAM permissions set to allow you to create resources within AWS. There are several methods for setting up you AWS environment on you local machine.

Export the AWS API Keys by hand;

export AWS_ACCESS_KEY_ID='****************WFQ'
export AWS_SECRET_ACCESS_KEY='****************TFHJw'

This repo also requires that you have Ansible installed on your local machine. For the most upto date methods of installing Ansible for your operating system check here.

This repo also requires that Terraform be installed if you are using the aws.infra.terraform role. For the most upto data methods of installing Terraform for your operating system check here.

If you are only doing an Ansible workshop, subscribing the nodes is not necessary, so you may edit the following file: roles/ansible.tower/tasks/main.yml Comment out the line that includes the RH subscriptions.

AWS Infrastructure Roles

roles/aws.infra.terraform

To create infrastructure and a Ansible Tower instance via Terraform

brew install terraform

Then edit group_vars/all and fill in the vars with your AWS api info. This role can also provide easy domain name mapping to all the instances if you have a domain registered in AWS Route 53.

#####################################################
# Domain Name you own
#####################################################
domain_name: ""
zone_id: ""

#####################################################
# AWS API Keys for terraform.tfvars file
#####################################################
aws_access_key: ""
aws_secret_key: ""
ansible-playbook -i inventory 1_aws_infra.yml

To destroy

cd /tmp/terraform
terraform destroy

Configure Ansible Tower

roles/ansible.tower

The ansible.tower role configures the instance with the tower-cli. By default the ansible.tower role installs 15 student accounts and associates them with a default Lab Team & Lab Organization.

To target the newly created EC2 instance use the ec2.py module located in the /inventory/ folder. The ec2.py is a dynamic script that queries Amazon for your instances.

ansible-playbook -i inventory 2_aws_ec2.yml

Login to Ansible Tower

browse to the public ip of the EC2 instance and enter the admin password located in roles/ansible.tower/vars/main.yml.

Login

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.