Giter VIP home page Giter VIP logo

juju-ansible's Introduction

juju-ansible

A simple Ansible plug-in for Juju environments. juju-ansible allows you to use Ansible modules and playbooks with machines you have deployed with Juju.

Why?

Juju is unmatched at orchestrating services with complex configuration inter-dependencies that just work.

Ansible is a simple and powerful tool for distributing ad-hoc, low-level system administration tasks to a large number of machines over ubiquitous SSH.

With their powers combined, you can have opinionated deployments that just work, and then easily go customize and administer them.

Install

Juju and Ansible both need to be installed on your system and in your $PATH.

Then copy 'juju-ansible' into your $PATH.

For playbook support, make a symbolic link 'juju-ansible-playbook' to 'juju-ansible'.

Usage

juju-ansible builds a dynamic inventory from the status of your current Juju environment. All other arguments are passed on to Ansible:

$ juju ansible <group> [ansible arguments...]
$ juju ansible-playbook [ansible-playbook arguments...]

Or use juju-ansible as a dynamic inventory script:

$ ansible all -i /path/to/juju-ansible ...

Groups are currently defined for each service and series.

Example

Let's say I have a wordpress and mysql service deployed with Juju in my current environment. I can run Ansible modules like:

$ juju ansible all -m ping
$ juju ansible all -m shell -a "uptime"
$ juju ansible mysql -m shell -a "mysqladmin extended-status"

Or run a playbook (if I created the juju-ansible-playbook symlink above) with:

$ juju ansible-playbook sched-maint.yml -vvv --sudo

Caveats

I've only tested juju-ansible with an OpenStack Juju environment. YMMV, but let me know how it goes if you try something else.

TODO

More groups (by unit, distribution, interface, etc.) and hostvars from charm configuration parameters. Iterating on your much appreciated feedback. What else?

License

GPLv3. Copyright (c) 2013, Canonical Ltd.

juju-ansible's People

Contributors

cmars avatar mcameron 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.