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

Hosted pipeline agent #8

Closed
McAdamz opened this issue Jul 13, 2021 · 7 comments
Closed

Hosted pipeline agent #8

McAdamz opened this issue Jul 13, 2021 · 7 comments

Comments

@McAdamz
Copy link

McAdamz commented Jul 13, 2021

Hello, the documentation mentioned the initial run could be run on the Hosted Pipeline, and then switched to the custom image, but this isn't the case, as the Hosted Pipelines have a 6 hour maximum run time.

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml

image

@YannickRe
Copy link
Owner

I never noticed that limitation, and I ran my first image on a paid Microsoft hosted agent with success.
Have you tried it and did it fail?

@sagoo33
Copy link

sagoo33 commented Jul 14, 2021

Hi @YannickRe, yes, I tried it twice using the MS Hosted Agent, both times failed at 6 hours 15minutes.

image

I got the scripts to work by creating a self hosted agent with a temporary VM, and then manually installing chocolaty, packer and the latest Powershell.
It took a number of failed attempts before I found the required packages needed to run the scripts fully.

Thank you for your time in putting this together, but I thought it would be useful to update your readme to mention the Hosted Agent has timeout of 6hours and would not be able to create a windows image using it.

@YannickRe
Copy link
Owner

Thank you for informing me! Feel free to submit the PR, but otherwise I'll keep this open until I get to adjusting the readme myself.

Probably this would work too: Hosted Agent to build a Linux Agent, and then use the Linux Agent to build your Windows Agent. Not sure what would be quicker: this extra step with the Linux agent or you trying to create a minimal image to create the full image 😀

Glad you made it work, and again: thank you!

@CurlyBytes
Copy link
Contributor

image

yes this is a bummer, im trying to create a vmss with Linux first then will run the CICD scripts using the vmss agent to create windows image

CurlyBytes added a commit to CurlyBytes/azuredevops-buildagents that referenced this issue Aug 6, 2021
@spoelstraethan
Copy link

Microsoft is looking to change their scripts to only install the LATEST of each .NET runtime, which should drop the end to end runtime a huge amount, this change is going to take place September 6 I believe.

The crazy thing is running the same scripts on our own hosted agent only took 5 hours, but depending on when you try to run it in the public pipelines you might run into "noisy neighbors" where all the other people using public pipelines slow down the build due to I/O or network contention.

@Marcus-James-Adams
Copy link

Marcus-James-Adams commented Aug 10, 2021 via email

@YannickRe
Copy link
Owner

@CurlyBytes thank you for the PR, I merged it and made some other README updates too
@spoelstraethan thank you for the heads up, that would help a lot for sure
@Marcus-James-Adams they mention the change here: actions/runner-images#3809

Given that the README is updated regarding the original issue, I will now close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants