ansible-marathon

An Ansible module for deploying applications to Mesos through Marathon


License
Other
Install
pip install ansible-marathon==0.2.0

Documentation

ansible-marathon is an Ansible module for deploying applications to Marathon.

Example

inventory.ini:

localhost ansible_connection=local

playbook.yml:

- name: Deploy to Marathon
  marathon:
    marathon_uri: https://localhost:8080/
    app_id: nodejs-rest-api
    app_json: "{{ lookup('file', '/path/to/app.json') }}"

app.json:

See examples/nodejs-rest-api/nodejs-rest-api-v1.json from capgemini:Apollo.

Usage

$ pip install --user ansible-marathon
$ ansible-playbook -i inventory.ini -M ~/.local/lib/python2.7/site-packages/ansible_marathon playbook.yml

Development

To release a new version of ansible-marathon:

  1. Configure ~/.pypirc:

    [server-login]
    username: YOUR_PYPI_USERNAME
    password: YOUR_PYPI_PASSWORD
    
    [pypi]
    repository: https://pypi.python.org/pypi
    
    [pypitest]
    repository: https://testpypi.python.org/pypi
    
  2. Update the version number in setup.py

  3. Commit all changes

  4. Add a version tag to git: git tag 0.1

  5. Publish to PyPI: python setup.py sdist upload -r pypi