Coder Social home page Coder Social logo

ansible-supervisord's Introduction

Supervisor for Ansible

A role for deploying and configuring Supervisor and extensions on unix hosts using Ansible.

It can additionally be used as a playbook for quickly provisioning hosts.

Vagrant machines are provided to produce VMs for integration testing.

Supports

Supported Supervisor versions:

  • Supervisor 3+

Supported targets:

  • Ubuntu 14.04 LTS "Trusty Tahr"
  • Ubuntu 12.04 LTS "Precise Pangolin"
  • Debian (untested)
  • RedHat (untested)

Installation methods:

  • Binary packages from the system repos.

Usage

Clone this repo into your roles directory:

$ git clone https://github.com/zenoamaro/ansible-supervisord.git roles/supervisord

And add it to your play's roles:

- hosts: ...
  roles:
    - supervisord
    - ...

This roles comes preloaded with almost every available default. You can override each one in your hosts/group vars, in your inventory, or in your play. See the annotated defaults in defaults/main.yml for help in configuration. All provided variables start with supervisord_ or supervisorctl_.

You can also use the role as a playbook. You will be asked which hosts to provision, and you can further configure the play by using --extra-vars.

$ ansible-playbook -i inventory --extra-vars='{...}' main.yml

Run the tests by provisioning the appropriate VM:

$ vagrant up test-ubuntu-trusty

At the moment, the following test boxes are available:

  • test-ubuntu-precise
  • test-ubuntu-trusty

Still to do

  • Add tasks for quickly creating supervisor programs
  • Support for fastcgi programs, event listeners, ...

Changelog

0.3.2

  • The package list is not being updated in playbooks anymore.

0.3.1

  • Fixed missing newlines for some configuration variables.
  • Added warning for auto-generated files.
  • Updated provisioning to use the new Vagrant private keys.

0.3.0

  • Revised the INIT script's restart sequence.
  • Added a test box for Ubuntu Trusty 14.04.
  • Sleep time between daemon restarts is now configurable.

0.2.0

  • Delegated installation of supervisord to the OS package manager.

0.1.0

Initial version.

License

The MIT License (MIT)

Copyright (c) 2015, zenoamaro [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ansible-supervisord's People

Contributors

mt avatar zenoamaro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ansible-supervisord's Issues

replacement of supervisord_inet_password in supervisord.conf

port = {{supervisord_inet_address}}:{{supervisord_inet_port}}
{% if supervisord_inet_authenticated %}
username = {{supervisord_inet_username}}
password = {{supervisord_inet_username}}
{% endif %}
{% endif %}

should be

port = {{supervisord_inet_address}}:{{supervisord_inet_port}}
{% if supervisord_inet_authenticated %}
username = {{supervisord_inet_username}}
password = {{supervisord_inet_password}}
{% endif %}
{% endif %}

restart supervisord handler sometimes fails with a weird error

Here's my run output:

NOTIFIED: [zenoamaro.supervisord | restart supervisord] ***********************
failed: [default] => {"failed": true}
msg: Error: Another program is already listening on a port that one of our HTTP servers is configured to use.  Shut this program down first before starting supervisord.
For help, use /usr/bin/supervisord -h

I tracked the issue to this: http://serverfault.com/questions/114477/supervisor-http-server-port-issue

Obviously this looks like a weird supervisor issue, but I found that it works if instead of restarting, we stop and start as two separate steps.

Create tag

Can you tag this so I can lock down my dependencies?
I'd like to do:

sudo ansible-galaxy install zenoamaro.supervisord,v1.0.0

Thanks for creating this!

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.