Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rancher-Deploy
- ==============
- rancher-deploy is a cli utility to deploy to rancher.
- It is available in the effidock/rancher-deploy image, and it's designed to be used with CI.
- Parameters
- ==========
- - ``--rancher-url``
- - The URL for the rancher server. **You can also set RANCHER_URL env
- var instead of specifying this.**
- - ``--rancher-key``
- - The environment or account API key. **You can also set
- RANCHER_ACCESS_KEY env var instead of specifying this.**
- - ``--rancher-secret``
- - The secret for the access API key. **You can also set
- RANCHER_SECRET_KEY env var instead of specifying this.**
- - ``--environment``
- - The name of the environment to work on. *only needed if using an
- account API key instead of an environment API key*
- - ``--stack``
- - The name of the stack to be created or upgraded.
- - ``--upgrade``/``--no-upgrade``
- - Whether or not it should upgrade a stack if already exists,
- defaults to ``--upgrade``
- - ``--wait``/``--no-wait``
- - Whether or not it should wait for the upgrade to finish before
- continuing. defaults to ``--wait``
- - ``--timeout``
- - The timeout before aborting in seconds. Defaults to 300 seconds (5
- minutes)
- - ``--service service_name [new_image]``
- - Upgrades the service *service_name,* using the *new_image* if
- defined.
- - Multiple services can be defined.
- - ``--docker-compose path/to/docker-compose.yml``
- - ``--docker-rancher path/to/rancher-compose.yml``
- - The docker/rancher compose file of the stack to deploy.
- - The files can use environment variables. Env vars that not defined
- **will not be replaced by an empty string.**
- - If the stack already exists, it will only be replaced if *no*
- ``--service`` *parameters are passed*
- - ``--loadbalancer lb_stack lb_service target_service hostname src_port dst_port``
- - Creates an entry in the load balancer ``lb_service`` that’s in the
- ``lb_stack``
- - Target service must be in the stack previously defined with
- ``--stack``
- - Multiple entries can be specified be repeating this parameter
- Examples
- ========
- 1. Add/upgrade a stack. Add load balancer entries for 2 of its services
- ::
- $ rancher-deploy
- --stack new_stack
- --docker-compose ci/docker-compose.yml
- --rancher-compose ci/rancher-compose.yml
- --loadbalancer main load-balancer service1 "service1.example.com" 80 8000
- --loadbalancer main load-balancer service2 "service2.example.com" 80 8000
- 2. Upgrade service1 and service2 in an existing stack
- ::
- $ rancher-deploy
- --stack old_stack
- --service service1
- --service service2 user/new_image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement