Giter Club home page Giter Club logo

automation-job's Introduction

# automation-job repository

SUMMARY OF THE REPOSITORY:

Repository for creating EC2 Instance in AWS and installing Apache server over it using Ansible. The repo will first lunch the EC2 instance and then it will do ssh into the instance and then install apache web server onto it. It then tests and validates the installation of the apache web server to make sure that it is installed and running, and it also checks for the port it is listening on. The whole process is automated.

Below is the directory structure:
.
├── README.md
├── ansible.cfg
├── aws_keys
├── hosts
├── main.yml
├── roles
│   └── automation
│       ├── tasks
│       │   ├── apache_config_changes.yml
│       │   ├── apache_service_validation.yml
│       │   └── install_apache_service.yml
│       └── vars
└── vars.yml

STEPS TO RUN THE PLAYBOOK:

- First you need to export two environment variables AWS_ACCESS_KEY and SECRET_ACCESS_KEY. You should use your own AWS account user keys. 
- Then you need to create a new keypair in the region where you want to craete the EC2 machine (if you already have a keypair, you can use the existing one also). Then you will add this keypair file name in the vars.yml file (without the .pem or ppk extension).

- After completing the above steps you can execute the following command:

$ ansible-playbook main.yml

- The above command will give the output of the play which will launch an ec2 instance, ssh into it, installs python and apache2 server and tests/validates the configuration.

To MAKE THE CONFIGURATION CHANGES IN THE APACHE SERVER:

- There is a role which will do 2 configuration changes in the Apache server config file (It will change the port that apache server listens to and also it will change the LogLevel).

- To run this playbook, you can execute the below commands:

$ansible-playbook apache_config_changes.yml -i /Users/ashima/automation-job/hosts

automation-job's People

Contributors

ashimakaushik03 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.