i try to upgrade stack by calling '/v1/projects/proj_id/environments/env_id/?action=upgrade' ,but it seems not work.
i want to modify the dockerCompose port from 8000 to 8002, and modify the rancherCompose scale from 1 to 2.
here is the request:
HTTP/1.1 POST /v1/projects/1a5/environments/1e37/?action=upgrade
docker-compose config
node-examle:
restart: always
image: "path/to/your/node-example"
ipc: host
privileged: true
ports:
- 8002:3000
rancher-compose config
node-examle:
scale:2
however, only dockerCompose upgrade success ,the port update to 8002, but the rancherCompose scale not change ,it is still 1.
| Useful | Info |
| :-- | :-- |
| Versions | Rancher v1.0.1
Cattle: v0.159.7
UI: v1.0.5
|
| Access | Disabled
|
| Route | environment.code
|
@danlanxiaohei to update the scale of the service, you have to execute this command:
rancher-compose -p stack1 scale service1=3
Upgrade command is meant to handle only container specific changes such as image update, port change, etc.
Please refer to the doc for more info:
@alena1108 If we can scale service by the upgrade api , It will keep the stack with the config in the codebase.
Shouldn't there be a way to access this functionality through the API? Preferably without having to parse out the rancher-compose file ourselves and make API calls for each service.
Most helpful comment
@alena1108 If we can scale service by the upgrade api , It will keep the stack with the config in the codebase.