Skip to content

nhumrich/step-deploy-to-rancher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

No longer maintained

This script is no longer maintained. I wrote a more feature filled one in python found here: https://github.com/nhumrich/deploy-to-rancher Please use that one for future support. It does require python 3.5, and isnt an official "wercker-step", but its more generic and works great with wercker pipelines.

wercker statusLicense

step-deploy-to-rancher

Does a rolling update to rancher

You will need to create an API access token and secret for rancher

The rancher URL needs to be your full url including project id. You will get the url on your api key page. Make sure you are using the environment you want to use. Do not include http/s in the url. There is an option for https.

If I wanted to deploy billybob/awesome:3.0 I would use docker_org: billybob, docker_image: awesome, and tag: 3.0.

If your tag is unique each deploy, you should set use_tag to true. But it you always deploy the same tag (i.e. latest) you should set use_tag to false. use_tag just sets the rancher service name to include the tag, for example awesome-3.0 -> awesome-3.1. But if your tag is not unique, then a random number will be generated for you. Rancher enforces that the service has to have a new unique name on every deploy.

Example:

deploy:
  steps:
    - nhumrich/deploy-to-rancher:
        access_key: $RANCHER_ACCESS_KEY
        secret_key: $RANCHER_SECRET_KEY
        rancher_url: $RANCHER_URL
        https: false # should https protocol be used?
        tag: latest  # docker tag for the `image:` section in docker-compose
        stack_name: my-awesome-stack  # Rancher stack name
        service_name: awesome  # Name of service in rancher
        docker_org: billybob  # name of organaztion
        docker_image: awesome
        use_tag: false
        inplace: false

Inplace upgrades added in 8.0. Just add the inplace: true section to the yaml

About

A wercker deployment step that does a rolling update to a rancher service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages