ashay-maheshwari / abclearn-devops-practice-questions

Some description
0 stars 0 forks source link

Practice Session 2 #2

Open ashay-maheshwari opened 5 years ago

ashay-maheshwari commented 5 years ago

As a part of practice questions, please achieve the following -

  1. Create an ansible script to launch an instance in EC2 (next if this is done)
  2. Write an ansible script to stop ec2 instances

3.Write an ansible script to terminal ec2 instance

4.Write an ansible script to restart ec2 instances

ashay-maheshwari commented 5 years ago

Steps to create an EC2 instance using Ansbile. -

a. Login to ansbile and create a user with Programmatic access, EC2FUllACCESS. Download keys.

b. Change region to Virginia c. Manually create an ubuntu EC2 Instance d. Manually create an AMI and copy AMI ID e. Install Boto in. ubuntu 16.04 f. Install AWSCLI in ubuntu 16.04 g. Configure AWS CLI.

h. Place the values of region, keys, ami id, etc in ansible script.