-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update VMSS resource, and preserve the current instance count? (in ARM template) #70
Comments
I would also like an answer to this question. I am deploying to a scale set which is managed by an external tool and I need to be able to update the base image without removing machines in use. |
Any updates here? |
Solution (workaround)
Notes
|
The workaround does not work. sku object does not accept -1 value for capacity. |
I assure you this is what we run in production (~500 VMSS clusters) ever since this post was published. You're invited to publish your template here so we can figure it out. The -1 is not assigned as the final value, it is used as a hint for the inner template to decide on the SKU object (you assign null to the SKU object as a whole) |
We are also using workaround now, but would be super helpful if VMSS team could support natively not setting capacity (especially if autoscale is also there). One possibly implementation is to support an initialCapacity parameter that is required for new vmss, but will be ignored for existing clusters which may have autoscale or been manually set for capacity. |
@johnib, when we tried the solution above to remove sku property, we noticed that updated scripts in custom script extension + new environment variables doesn't run on new VMs or re-imaged VMs. Do you know if that's a known side effect of the solution above? |
Show me where you configure the environment variables and scripts, it doesn't make sense to me, although it's not part of my use case. |
Hello,
The context is ongoing VMSS provisioning/updating using ARM templates.
We use ARM template to manage all our ARM resources, in an Infra-as-Code manner (IoC).
When running in IoC, there are frequent ARM deployments, with incremental changes to our resource definitions.
In practice, I might have several ARM deployments a day, that usually do not change anything in the VMSS definition, but change other resources.
Additional information, is that on top of my VMSS clusters, I have configured auto-scale rules, that add/remove instances on an ongoing basis.
The scenario below, becomes problematic:
sku.capacity
is 5 by default.sku.capacity
is not being updated in the code every time the auto-scale changes the instance count (of course.. right? :) )sku.capacity
tonull
instead of the default value 5. However, is not accepted by ARM due to:I'm looking for a way to indicate VMSS RP, to ignore the
sku.capacity
and preserve the existing instance count, without knowing it beforehandPlease advise, thank you!
The text was updated successfully, but these errors were encountered: