8. Upgrade

Test case 5: the East-West cluster moves from FortiOS 7.6.7 to 7.6.8 by replacing its members, with traffic running.

What you will see

How the upgrade works

Each cluster pins its FortiGate image by AMI ID in config/regions/<region>.yaml. A new ID changes the launch template, and the apply starts an instance refresh. The group launches a new member before it removes an old one, so capacity never drops. Each new member onboards to FortiManager, turns healthy and serves for 15 minutes before an old member drains. FGSP and the GWLB carry the flows of each removed member to the others.

8.1 Check the running version

  1. On your laptop, over SSH to any East-West member, read the version:

    get system status | grep Version
    

    It shows 7.6.7. FortiManager, Device Manager, shows the same per member.

  2. In the repository, fgt.ew.ami_id is the 7.6.7 image: config/regions/eu-west-1.yaml, line 44 or config/regions/ap-southeast-1.yaml, line 44.

8.2 Start traffic

  1. In CloudShell, make sure your PROD instance may reach QA:

    aws ec2 create-tags --resources $PROD_ID --tags Key=Allow-To-QA,Value=local
    
  2. In the PROD session, probe QA once a second, and keep it running through the refresh. <qa-ip> is the QA address from lab 4:

    QA_IP=<qa-ip>
    while true; do printf '%s ' "$(date +%T)"; curl -s -o /dev/null -m 2 -w '%{http_code}\n' http://$QA_IP/; sleep 1; done
    

    Each line ends in 200.

8.3 Change the pin

  1. On your laptop, in the clone, create a branch:

    git switch main && git pull
    git switch -c upgrade/<region>-ew
    
  2. Open your region file at line 44 and replace the East-West ami_id. Only the line under ew: changes; the ns: block keeps 7.6.7.

    Attendee 1, config/regions/eu-west-1.yaml, line 44:

      ew:
        instance_type: c6gn.large
        ami_id: ami-0474fbc3c69b888d2
    

    Attendee 2, config/regions/ap-southeast-1.yaml, line 44:

      ew:
        instance_type: c6gn.large
        ami_id: ami-03910d898031db4f0
    
  3. Commit and push:

    git add config/regions/
    git commit -m "feat: upgrade <region> east-west to fortios 7.6.8"
    git push -u origin upgrade/<region>-ew
    
  4. Open the link that git push prints and create the pull request. The plan comment shows the launch template and Auto Scaling group of your region's East-West cluster, and nothing else.

  5. After approval and merge, the deploy.yml run applies it and starts the refresh.

8.4 Watch the refresh

  1. In EC2, Auto Scaling groups, <prefix>-ew-fgt, Instance refresh, follow the refresh and its percentage.

  2. In Activity, a new member launches, then an old one terminates, about every 15 minutes.

  3. In the PROD session, the probe keeps answering 200.

  4. At the end of the day, check that every member runs 7.6.8. The refresh takes about an hour.

If time allows, upgrade the North-South cluster the same way: the same AMI on the ami_id line under ns:, line 28 of your region file.

Check

Limits

Where to look

What Where
Pins config/regions/<region>.yaml, fgt.ew.ami_id, fgt.ns.ami_id
Refresh EC2, Auto Scaling groups, <prefix>-ew-fgt, Instance refresh
Firmware FortiManager, Device Manager
Background probes CloudWatch, CloudCanaries-Region-<region>
← 7. Policy as code9. Summary →