Git Product home page Git Product logo

tonykay.envy's Introduction

Ansible Collection - tonykay.envy

Ansible Envy (ENVironments in Yaml) collection - single system ansible centric container orchestration biased towards labs, workshops, PoCs, and development. Need 5 Linux machines to test you latest idea or code - use envy.

Installing this collection

Currently Envy is not released as a full Ansible collection and cannot be downloaded from Ansible Galaxy

Pre-Requisites

It is assumed that you already have installed:

  • Ansible 2.9 or greater (yum | dnf | brew install ansible)
  • Docker
  • Git

Installing manually

$ ansible-galaxy collection install community.docker
$ mkdir -p ~/.ansible/collections/ansible_collections/tonykay/envy
$ git clone https://github.com/tonykay/tonykay.envy.git \
      ~/.ansible/collections/ansible_collections/tonykay/envy
$ pip install docker       
$ ansible-playbook ~/.ansible/collections/ansible_collections/tonykay/envy/playbooks/setup.yml \
       --become-method sudo --ask-become-pass

NOTE

The --become-method sudo --ask-become-pass on the final, setup, command may well be redundant but on many Mac setups passwordless sudo is not the norm.


Verifying your installation

Verify you can execute the nv command

$ nv
USAGE: nv <action> <object> <extras>

nv add <environment> <addon>            Add extra instance(s)
nv clean                                Clean up old resources
nv deploy <environment>                 Deploy an Environment
nv delete <environment>                 Delete an Environment
nv fromfile <filename>                  Deploy an Environments from file
nv list                                 List running infrastructure
nv login <target>                       Login to any instance with bash shell
nv redeploy <environment>               Destroy and Redeploy an Environment
nv remove <environment>  <target>       Remove an instance from a config
nv replace <environment>  <target>      Destroy and Redeploy an Environment
nv setup                                Reconfigure nv

Verify you can deploy a docker based Environment

This will deploy a simple multi-node environment to your local system.


NOTE This is based on publicly available images being pulled from dockerhub.io or quay.io so first launch may take a few minutes. (nv preload is coming which will allow images to be pulled at install time)

$ nv deploy multi
$ nv list

You know have access to all those instances with ssh <instance-name>. Each instance has ssh access to all the others.

Updating envy

As envy is currently a git repo and not installed from galaxy updates are a simple but 2 phase process.

$ cd ~/.ansible/collections/ansible_collections/tonykay/envy
$ git pull --rebase
$ ansible-playbook ~/.ansible/collections/ansible_collections/tonykay/envy/playbooks/setup.yml \
       --become-method sudo --ask-become-pass

tonykay.envy's People

Contributors

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