GithubHelp home page GithubHelp logo

mglantz / ansible_agnostic_deployer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhat-cop/agnosticd

0.0 3.0 0.0 521 KB

Ansible Deployer for multiple Cloud Deployers

License: GNU General Public License v3.0

Python 90.12% Shell 9.84% JavaScript 0.04%

ansible_agnostic_deployer's Introduction

OpenShift Ansible AWS Provisioner

Prerequisites

There are several prerequisites for using this repository, scripted and detailed instructions for usage are available in the following the Preparing Your Workstation document. [estimated effort 5-10 minutes]

Standard Configurations

  • Several "Standard Configurations" are included in this repository.

  • A "Standard Configurations" or "Config" are a predefined deployment examples that can be used or copied and modified by anyone.

  • A "Config" will include all the files, templates, pre and post playbooks that a deployment example requires to be deployed.

  • "Config" specific Variable files will be included in the "Config" directory as well.

Note
Until we implement using Ansible Vault, each "Config" has two vars files _vars and _secret_vars. The example_secret_vars file shows the format for what to put in your CONFIGNAME_secret_vars file.

Running the Ansible Playbooks

Once you have installed your prerequisites and have configured all settings and files, simply run Ansible like so:

ansible-playbook -i 127.0.0.1 ansible/main.yml -e "env_type=config-name" -e "aws_region=ap-southeast-2" -e "guid=youruniqueidentifier"
Note
Be sure to exchange guid for a sensible prefix of your choosing.

For "opentlc-shared" standard config, check out the README file

Cleanup

  • S3 Bucket

    • An S3 bucket is used to back the Docker registry. AWS will not let you delete a non-empty S3 bucket, so you must do this manually. The aws CLI makes this easy:

      aws s3 rm s3://bucket-name --recursive
    • Your bucket name is named {{ env_type }}-{{ guid }}. So, in the case of a bu-workshop environment where you provided the guid of "Atlanta", your S3 bucket is called bu-workshop-atlanta.

  • CloudFormation Template

    • Just go into your AWS account to the CloudFormation section in the region where you provisioned, find the deployed stack, and delete it.

  • SSH config

    • This Ansible script places entries into your ~/.ssh/config. It is recommended that you remove them once you are done with your environment.

Troubleshooting

Information will be added here as problems are solved. So far it’s pretty vanilla, but quite slow. Expect at least an hour for deployment, if not two or more if you are far from the system(s).

EC2 instability

It has been seen that, on occasion, EC2 is generally unstable. This manifests in various ways:

  • The autoscaling group for the nodes takes an extremely long time to deploy, or will never complete deploying

  • Individual EC2 instances may have terrible performance, which can result in nodes that seem to be "hung" despite being reachable via SSH.

There is not much that can be done in this circumstance besides starting over (in a different region).

Re-Running

While Ansible is idempotent and supports being re-run, there are some known issues with doing so. Specifically:

  • You should skip the tag nfs_tasks with the --skip-tags option if you re-run the playbook after the NFS server has been provisioned and configured. The playbook is not safe for re-run and will fail.

  • You may also wish to skip the tag bastion_proxy_config when re-running, as the tasks associated with this play will re-write the same entries to your SSH config file, which could result in hosts becoming unexpectedly unreachable.

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.