ansible-marathon is an Ansible module for deploying applications to Marathon.
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.
$ pip install --user ansible-marathon
$ ansible-playbook -i inventory.ini -M ~/.local/lib/python2.7/site-packages/ansible_marathon playbook.yml
To release a new version of ansible-marathon:
-
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
-
Update the version number in setup.py
-
Commit all changes
-
Add a version tag to git:
git tag 0.1
-
Publish to PyPI:
python setup.py sdist upload -r pypi