-
Notifications
You must be signed in to change notification settings - Fork 178
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
Update VMSS to Mariner with FIPS enabled #3741
Conversation
36529ee
to
3863fee
Compare
azp run ci,e2e |
cceea5c
to
53d5d25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lot to review here. Thank you in advance for humoring my questions 🙇🏻
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes mostly LGTM - @kimorris27 covered most of the suggestions I have, and I'd like to see a deployment of this change in a non-dev environment.
8e6db08
to
374af12
Compare
@cadenmarchese We could manually apply updates ourselves. I think that would require creating a pipeline to do so, which would give us more control. That's a topic I think is worth discussion amongst the team. For them to be automatically applied, we have no real insight or control. The OS updates are re-provisioning the instance with an updated OS image. I believe that means our custom script will have to run after this each time. That would mean we'd see two reboots before the update is completed. One for the updated OS re-image, our custom script runs, reboots post completion, then it's back to responding to requests. You can read their documentation here: Automatic Guest VM Patching |
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
b7cc458
to
08003b3
Compare
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
08003b3
to
f5debe1
Compare
…ly Configured FIPS Mode System Changes: Remove lvm disk resize, Mariner does not use lvm, the disk is automatically grown to the full size specified. Remove semanage, Mariner Linux does not have selinux configured. Remove gateway log rotation config Log rotation for the podman level driver log was not the correct approach. The podman log driver is now journald, so all logs will be shipped to journald rather than a ctr.log file. fips mode is manually configured following the example code at https://eng.ms/docs/products/azure-linux/features/security/fips SKU cbl-mariner-2-gen2-fips does not support Automatic OS Updates, therefore we are switching to cbl-mariner-2-gen2, manually configuring fips mode, to allow for Automatic OS Updates. Script Changes: Restructure VMSS bootstrap bash scripts for increased reliability, and easier debugging Move all shared code into a commonly shared file to be sourced by all bootstrapping scripts. This allows for code reuse, minimal duplication. Fix mdm mdsd certificate download script During mdm and mdsd setup, I've added wait steps for the download scripts to complete getting certificates. Without this, the download scripts run in a subshell and fixing up the certificates fails. Add firewalld configuration, required for podman networking Add podman aro network creation to isolate RP containers from possible interaction on the default podman network. Package Changes: Install Azure Security Monitor via VMSS Extension Remove RHUI and Microsoft repo configuration, add Mariner Extended repo config Increase rpm retry time to 30 minutes total, every 30 seconds.
This is to reduce the amount of type conversions needed.
f5debe1
to
169f42c
Compare
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My remaining outstanding comments are small things, so they can be addressed in a follow-up PR 👍🏻
* Update RP and Gateway vmss OS image to cbl-mariner-2-gen2 with Manually Configured FIPS Mode System Changes: Remove lvm disk resize, Mariner does not use lvm, the disk is automatically grown to the full size specified. Remove semanage, Mariner Linux does not have selinux configured. Remove gateway log rotation config Log rotation for the podman level driver log was not the correct approach. The podman log driver is now journald, so all logs will be shipped to journald rather than a ctr.log file. fips mode is manually configured following the example code at https://eng.ms/docs/products/azure-linux/features/security/fips SKU cbl-mariner-2-gen2-fips does not support Automatic OS Updates, therefore we are switching to cbl-mariner-2-gen2, manually configuring fips mode, to allow for Automatic OS Updates. Script Changes: Restructure VMSS bootstrap bash scripts for increased reliability, and easier debugging Move all shared code into a commonly shared file to be sourced by all bootstrapping scripts. This allows for code reuse, minimal duplication. Fix mdm mdsd certificate download script During mdm and mdsd setup, I've added wait steps for the download scripts to complete getting certificates. Without this, the download scripts run in a subshell and fixing up the certificates fails. Add firewalld configuration, required for podman networking Add podman aro network creation to isolate RP containers from possible interaction on the default podman network. Package Changes: Install Azure Security Monitor via VMSS Extension Remove RHUI and Microsoft repo configuration, add Mariner Extended repo config Increase rpm retry time to 30 minutes total, every 30 seconds. * Embed scripts as strings rather than []byte This is to reduce the amount of type conversions needed.
Which issue this PR addresses:
Covers improving bootstrap scripts in : ARO-6773
Covers move to Mariner OS for FIPS in: ARO-8989
Fixes
What this PR does / why we need it:
This moves our RP and Gateway VMSS instances to Mariner OS, which is compatible with FIPS.
This is also needed for a resilient to failure RP deployment.
Our current implementation has shown some faults over time with RP deployments, and need improvements in general.
Move all shared code into a commonly shared file to be sourced by all
bootstrapping scripts. This allows for code reuse, minimal duplication.
Change VMSS OS to Mariner with FIPS enabled by default.
Firewalls are configured at the Azure vnet level. I did not configure
firewalld
, because in my testing Mariner OS does not supportfirewalld
out of the box.Test plan for issue:
Local Full Service Dev RP Testing
Tested during development by deploying a full service development RP environment.
Further testing will be done by deploying to INT. I will update with the successful INT deployment once completed.
Deployment to Canary Sector
Successfully deployed to Canary sector in pipeline run
Example Log Output
Abort
Log
Is there any documentation that needs to be updated for this PR?
No
How do you know this will function as expected in production?
Per testing mentioned in the test plan.