LeanKit-Labs / cowpoke

A service to handle configurable Rancher service upgrade patterns
MIT License
9 stars 5 forks source link

Preform a stack upgrade without having to go to Github #88

Open shawnHartsell opened 7 years ago

shawnHartsell commented 7 years ago

This is current process for preforming a stack upgrade

We can eliminate the first step entirely if we leverage Rancher's catalog API. Below is the proposed implementation. The order in which the steps are done can be reorder to whatever is the most efficient:

  1. Update the PATCH /stack endpoint so that it accepts something like the following:
{
   "catalog": "name of the catalog in Rancher",
    "catalogTemplate": "the template that is going to be upgraded",
    "catalogVersion": "the template version that the service should upgrade to
}
  1. Leverage Rancher's Catalog API and do the following:

/v1-catalog/templates/catalog-name:catalog-template

  1. Determine the environments that the stack can be upgraded in

  2. Compare the externalId of the stack and the id of the template version to determine if the stack can be upgraded. The existing rules would still apply here.

  3. Preform the upgrade with the rancher and docker compose data

I have validated the following:

ferhimedamine commented 7 years ago

+1