Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. Rancher-Deploy
  2. ==============
  3.  
  4. rancher-deploy is a cli utility to deploy to rancher.
  5.  
  6. It is available in the effidock/rancher-deploy image, and it's designed to be used with CI.
  7.  
  8. Parameters
  9. ==========
  10.  
  11. - ``--rancher-url``
  12.  
  13. - The URL for the rancher server. **You can also set RANCHER_URL env
  14. var instead of specifying this.**
  15.  
  16. - ``--rancher-key``
  17.  
  18. - The environment or account API key. **You can also set
  19. RANCHER_ACCESS_KEY env var instead of specifying this.**
  20.  
  21. - ``--rancher-secret``
  22.  
  23. - The secret for the access API key. **You can also set
  24. RANCHER_SECRET_KEY env var instead of specifying this.**
  25.  
  26. - ``--environment``
  27.  
  28. - The name of the environment to work on. *only needed if using an
  29. account API key instead of an environment API key*
  30.  
  31. - ``--stack``
  32.  
  33. - The name of the stack to be created or upgraded.
  34.  
  35. - ``--upgrade``/``--no-upgrade``
  36.  
  37. - Whether or not it should upgrade a stack if already exists,
  38. defaults to ``--upgrade``
  39.  
  40. - ``--wait``/``--no-wait``
  41.  
  42. - Whether or not it should wait for the upgrade to finish before
  43. continuing. defaults to ``--wait``
  44.  
  45. - ``--timeout``
  46.  
  47. - The timeout before aborting in seconds. Defaults to 300 seconds (5
  48. minutes)
  49.  
  50. - ``--service service_name [new_image]``
  51.  
  52. - Upgrades the service *service_name,* using the *new_image* if
  53. defined.
  54. - Multiple services can be defined.
  55.  
  56. - ``--docker-compose path/to/docker-compose.yml``
  57. - ``--docker-rancher path/to/rancher-compose.yml``
  58.  
  59. - The docker/rancher compose file of the stack to deploy.
  60. - The files can use environment variables. Env vars that not defined
  61. **will not be replaced by an empty string.**
  62. - If the stack already exists, it will only be replaced if *no*
  63. ``--service`` *parameters are passed*
  64.  
  65. - ``--loadbalancer lb_stack lb_service target_service hostname src_port dst_port``
  66.  
  67. - Creates an entry in the load balancer ``lb_service`` that’s in the
  68. ``lb_stack``
  69. - Target service must be in the stack previously defined with
  70. ``--stack``
  71. - Multiple entries can be specified be repeating this parameter
  72.  
  73. Examples
  74. ========
  75.  
  76. 1. Add/upgrade a stack. Add load balancer entries for 2 of its services
  77.  
  78. ::
  79.  
  80. $ rancher-deploy
  81. --stack new_stack
  82. --docker-compose ci/docker-compose.yml
  83. --rancher-compose ci/rancher-compose.yml
  84. --loadbalancer main load-balancer service1 "service1.example.com" 80 8000
  85. --loadbalancer main load-balancer service2 "service2.example.com" 80 8000
  86.  
  87. 2. Upgrade service1 and service2 in an existing stack
  88.  
  89. ::
  90.  
  91. $ rancher-deploy
  92. --stack old_stack
  93. --service service1
  94. --service service2 user/new_image
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement