Skip to content

Conversation

rswrz
Copy link
Member

@rswrz rswrz commented Jul 14, 2025

Description

Changes include disabling the automatic upgrade mode and setting a scale-in policy to the oldest VM. Additionally, new variables for upgrade modes and policies have been introduced, along with sorting of VMSS parameters and removal of unnecessary custom data for instance upgrades.

This change prepares the Launchpad for a two-stage upgrade process. Together with upcoming changes in our IaCv3 deployment workflows, this enables safer and more controlled VMSS upgrades.

  1. The VMSS will be configured with upgrade_mode = "Manual" by default (handled by this PR). This prevents automatic replacement of VMSS instances during configuration changes.

  2. VMSS instances will be upgraded manually via az CLI. This will be handled by our IaCv3 deployment workflows.

    Example CLI for upgrading outdated VMSS instances:

     rg=rg-launchpad-01
     vmss=vmss-launchpad-prd-gwc
    
     outdated_instance_ids=$(az vmss list-instances \
       --name "$vmss" \
       --resource-group "$rg" \
       --query "[?latestModelApplied==\`false\`].instanceId" \
       --output tsv)
    
     for id in $outdated_instance_ids; do
       az vmss update-instances \
         --name "$vmss" \
         --resource-group "$rg" \
         --instance-ids "$id"
     done

PR Checklist

  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added documentation written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have checked for a proper tag for this PR: breaking-change, feature, fix, other, ignore-release
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.

Motivation and Context

Closes #19.

Breaking Changes

No breaking changes. Existing deployments must explicitly set var.upgrade_mode, var.rolling_upgrade_policy, and var.automatic_os_upgrade_policy to avoid Terraform drift causing a recreation of the VMSS resource.

rswrz added 5 commits July 11, 2025 23:39
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
@rswrz rswrz requested a review from lixhunter as a code owner July 14, 2025 08:27
@rswrz rswrz linked an issue Jul 14, 2025 that may be closed by this pull request
2 tasks
@rswrz rswrz added the feature label Jul 14, 2025
rswrz added 3 commits July 15, 2025 11:20
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
Signed-off-by: Roman Schwarz <rs@cloudeteer.de>
@rswrz rswrz force-pushed the 19-bug-launchpad-can-not-upgrade-itself branch from 591eb51 to eef08bc Compare July 15, 2025 11:59
@rswrz rswrz added the don't merge yet Do not merge this yet label Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

don't merge yet Do not merge this yet feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Launchpad can not upgrade itself

2 participants