Skip to content
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

Remove omsagent from build image #1732

Merged

Conversation

craddm
Copy link
Contributor

@craddm craddm commented Feb 6, 2024

✅ Checklist

  • You have given your pull request a meaningful title (e.g. Enable foobar integration rather than 515 foobar).
  • You are targeting the appropriate branch. If you're not certain which one this is, it should be develop.
  • Your branch is up-to-date with the target branch (it probably was when you started, but it may have changed since then).
  • You have marked this pull request as a draft and added '[WIP]' to the title if needed (if you're not yet ready to merge).
  • You have formatted your code using appropriate automated tools (for example ./tests/AutoFormat_Powershell.ps1 -TargetPath <path to file or directory> for Powershell).

⤴️ Summary

Adds a step to the VM image building process to remove omsagent before the deprovisioning and generalizing of the image. Leaving the omsagent in place prevents its proper use on VMs deployed using the image. As per Microsoft's instructions, a shell script is downloaded and used to uninstall the agent.

VMs deployed using the images can now be successfully connected to the Log Analytics workspace.

This PR also adds a system dependency required for the use of the R package igraph - libglpk-dev.

🌂 Related issues

Closes 2 issues related to update management and one other issue with the VM build image
Closes #1403
Closes #1372
Closes #1730

🔬 Tests

Built a new image, deployed a VM based on this image and validated that it is successfully connected to the Log Analytics workspace:
Screenshot 2024-02-06 at 10 51 02

Copy link
Member

@jemrobinson jemrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A thought about executing a downloaded script. I don't want this to be a blocker though.

Copy link
Member

@jemrobinson jemrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with this unless @JimMadge thinks otherwise.

@JimMadge
Copy link
Member

JimMadge commented Feb 9, 2024

Great work identifying this @craddm.

That is a lot of issue fixed at once! 🎉

@@ -405,6 +405,12 @@ runcmd:
# Run installation tests
- python3 /opt/build/check_installation.py || die "Installation check failed!";

# Remove Linux omsagent before generalising the image
- echo ">=== $(date +%s) Removing Linux omsagent ===<"
- wget https://raw.githubusercontent.com/Microsoft/OMS-Agent-for-Linux/c7e1a8f923844f989c8aa7957cee0e89708d821f/installer/scripts/onboard_agent.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts @craddm @JimMadge ?

…image-ubuntu-2004.mustache.yaml

Co-authored-by: James Robinson <[email protected]>
@jemrobinson jemrobinson merged commit 8938620 into alan-turing-institute:develop Feb 14, 2024
11 checks passed
@craddm craddm deleted the omsagent-change-workspace branch February 14, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants