YannickRe / azuredevops-buildagents

Generate self-hosted build agents for Azure DevOps, just like Microsoft does.
MIT License
153 stars 90 forks source link

Updated pipelines and script to work with new packer settings from actions/runner-images repo #62

Closed erik-de-bont closed 1 year ago

erik-de-bont commented 1 year ago

Due to the modification of the packer settings in de actions/runner-images repo a managed image will now be created straight away instead of a vhd image. This means that the step of converting the vhd into a managed image is now obsolete and needed to be removed to be able to build runner images again.

I have updated the pipelines and scripts, so that everything should work again.

image

@YannickRe are you able to the update-vmss part of the repo ? I have adjusted that variables similar to the create-gallery-vmimageversion.ps1 script, but I am not able to test it myself.

erik-de-bont commented 1 year ago

In a future release is should be possible that packer also places the Managed Image straight into the gallery, so an additional stage to do this is not required. I left it in for now, so that "Update VM Scaleset" stage still can be used.

jvanegmond commented 1 year ago

I've tested this in my environment and it works great with galleryvm option. Thanks!

System-Admins-ath commented 1 year ago

Seems to work.

YannickRe commented 1 year ago

@erik-de-bont thanks for the work, it's again very much appreciated! I will look through it next week (just finishing up a very hectic go-live week). In the meantime, people can use your fork if they are blocked.

@jvanegmond @System-Admins-ath thanks for testing and validating that it works! I will get to the merging asap, and sorry for taking longer than is ideal :(

erik-de-bont commented 1 year ago

Also correct the code for cleanup gallery script. I noticed there was a bug in de sorting of the gallery vm.

sander110419 commented 1 year ago

Can confirm this fixes the issues, images are able to be generated and deployed

System-Admins-ath commented 1 year ago

Any news on the pull reqeust approval?

YannickRe commented 1 year ago

I merged this for now in to the v2.0.0 branch, so I can further test and validate (especially the part where we update the vmss directly).

YannickRe commented 1 year ago

It needed some tiny changes on variable usage, but besides that this PR was magnificent. Thanks @erik-de-bont !!

cc: @sander110419 @System-Admins-ath @jvanegmond

jvanegmond commented 1 year ago

Thanks a lot @erik-de-bont @YannickRe !