Giter VIP home page Giter VIP logo

cicd-project's Introduction

TASK-1

Instruction to run playbook, in creating Ec2 instance and to list the instance using python script Step 1: In AWS management console

Step 2: Go to IAM.

  • Create a new role and provide the Ec2 Access
  • Create a new user and download the credentials file

Step 3: Go to Ec2

  • Create a new Ec2 instance
  • Login into the putty using ssh keys

Step 4: In the Linux server,

  • Write YAML playbook and save it as Filename.YAML
  • Write python script and save it as Filename.py

Prerequisites to run the above playbook and the filename In the server,

  • Run the below commands to run above files

    o sudo yum update o sudo yum install python-pip o pip –version o pip list o sudo pip install boto3 o sudo pip install boto o sudo pip install ansible

  • Configure the IAM credential details and check the same in .aws folder

    o aws configure

       	Please access key ID and secret access key	
    
  • Configure the below files to run playbook

    o Create a static host file or use dynamic inventory to get connect with slave machine o Get the ansible.cfg file from the below path

       	sudo wget https://raw.githubusercontent.com/ansible/ansible/devel/examples/ansible.cfg
    

    o Run the playbook with below command

      	ansible-playbook -i host.txt -m filename.yaml
    
  • Run the python script as per the below command to list the instance running in AWS console

    o python filename.py

cicd-project's People

Contributors

sasikumargt avatar

Watchers

 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.