Git Product home page Git Product logo

test's Introduction

Solution

The solution for both first and second problem are written as individual roles and combined them to run single ansible play book.

Below are the description of each role.

  1. configure - Parses input from servers.txt under glassdoor hosts group and configures the config.yaml (problem 1)
  2. Java - Install's the required version of Java and places the secret
  3. tomcat - Install's the required version of the tomcat
  4. deploy - Searches for the WAR file from nexus and places it the given application directory

All the developer attributes and inputs for both the problems can be defined in appvars/main.yml or could be passed as --extra-vars. Below are vars that are used and most of them are self explanatory.

  • application_directory - Web application deployment directory, nexus_group, nexus_name, nexus_version, nexus_ext: "war", nexus_url, java_version, tomcat_version, http_port: 8080, https_port: 443, username, password, Environment, application_name, Deployment_ID

Note: As I'm unsure how the application reads the secrets, I have only restricted file permissions. I would prefer using ansible-vault for encryption based on application's usage.

Assumptions

  1. All the required yum repo's have been pre configured in the server for installing neccessary packages.
  2. The servers have to be grouped under glassdoor hosts group for the playbook to identify list of hosts
  3. The server names are of the same format for the both the problems <env>-<deployment_id>-<application_name>-<instance_num>.glassdoor.local.
  4. Ansible installed with version higher than >=2.4.0. (Tested in ansible 2.7.5)
  5. Tomcat version needs to be a string. Split() functionality has been used to identify versions.

Command to Run the playbook

ansible-playbook -i ./servers.txt playbook.yml --extra-vars "@appvars/main.yml"

test's People

Contributors

srinivasanramaraju avatar srinivasan-ramaraju 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.