Skip to main content

Deploy to multiple container platforms/PAAS using docker-compose files

Project description

compose-paas

https://img.shields.io/pypi/v/compose-paas.svg https://img.shields.io/travis/bidhan-a/compose-paas.svg Updates

Deploy to multiple container platforms/PAAS using docker-compose files

Installation

compose-paas is available on PyPI. You can use pip to install it

$ pip install compose-paas

Usage

Once you have it installed, you can use it from the command line

$ compose-paas -c docker-compose.yml -s api -o docker-compose.dev.yml -f true -p singularity

compose-paas supports five arguments:

  • -c or --config : The name of the base compose file

  • -s or --service : The name of the service to be deployed

  • -o or --override: The name of the compose file which overrides the base file

  • -f or --forcepull: Flag to enforce image pull (overrides the configuration in the compose file)

  • -p or --platform: Platform to deploy to (currently, only singularity and marathon are supported)

Note: You would use docker-compose with the above mentioned files as given below:

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

Options

compose-paas uses the x-compose-paas extension field in the docker-compose file to read platform-specific as well as other general options. The following example contains all the supported options:

x-compose-paas:
  resources:
    cpus: '0.1'
    memory: '1024'
  singularity:
    admin_email: 'admin@mail.com'
    endpoint: 'http://prd.net/singularity/api'
    slave_placement: ''
    cron_schedule: ''
  marathon:
    endpoint: 'http://prd.net/marathon/v2'
    fetch:
      uri: 'file:///etc/docker.tar.gz'
      resource_roles:
        - '*'
    id: '/service/name'
  docker:
    params:
      entrypoint: 'run_web_api.sh'
      ulimit: 'nofile=10240:10240'
    forcepull: 'false'

References

History

0.1.0 (2018-02-22)

  • First release on PyPI.

0.1.1 (2018-02-23)

  • Include resources in labels

0.1.2 (2018-02-26)

  • Change labels format

0.1.3 (2018-03-08)

  • Add flag to enforce image pull

0.1.4 (2018-04-17)

  • Use different fields for command and arguments

1.0.1 (2018-04-27)

  • Rename package to compose-paas from singularity-compose

  • Add support for Marathon

1.0.2 (2018-04-27)

  • Fix setup.py (add sub-package to packages list)

1.0.3 (2018-05-14)

  • Add support for volumes mode

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compose-paas-1.0.3.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

compose_paas-1.0.3-py2.py3-none-any.whl (8.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file compose-paas-1.0.3.tar.gz.

File metadata

File hashes

Hashes for compose-paas-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c899005598d54017bc5a6b5387296fb4b8e50a0c3eb5378fb9e9022c367046a8
MD5 6c52b051a52daf17ee24d8e7a5f1e873
BLAKE2b-256 6d7e2c03429e9b0e1e560cda5e0a85708e7d48bba910eb05fa1125681bbf660e

See more details on using hashes here.

File details

Details for the file compose_paas-1.0.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for compose_paas-1.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6cf25df796e7d6c67d45d25523087ed052f157ce4fdc83cc8729a926bd7a5abd
MD5 364af81a0c51a80872d5fc4164b50b0c
BLAKE2b-256 f507bd1f42b7dcaf847e6f23f63290a22db66341b2f072654cc4c7da62294761

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page