compose-paas

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


Keywords
compose-paas
License
BSD-3-Clause
Install
pip install compose-paas==1.0.3

Documentation

compose-paas

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