aztfmod / rover

The rover is a docker container in charge of the deployment of the Terraform platform engineering for Azure
MIT License
171 stars 142 forks source link

Using Azure DevOps rover agent #280

Open dsfrederic opened 1 year ago

dsfrederic commented 1 year ago

So I've been trying to get the Azure DevOps self hosted build agent up and running but didn't succeed yet.

What I did?

  1. Created an Azure Container instance with the following configurations: image

This seems to run properly (despite the lack of documentation).

image

What I expected?

I expected to use the agents as it was a self hosted agent.

What didn't work as expected? image

For certain tasks I'm always getting this error:

##[error]This step requires a node version that does not exist in the agent filesystem. Path: /home/vscode/agent/externals/node10/bin/node

I cannot even use the - script task

    - script: | 
        sudo apt-get install curl
        curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
        sudo apt-get install nodejs
        node -v 
dsfrederic commented 1 year ago

@LaurentLesle I'm adding you this thread as a SME. Can you help me along?

LaurentLesle commented 1 year ago

Hi @dsfrederic thanks for opening this issue. By default the rover base image does not have the nodejs installed. You need to install a supported version. On top of my head only version 14 and above are supported with our base Ubuntu image

Can you try:

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version
dsfrederic commented 1 year ago

@LaurentLesle The problem is that even to run this this task I'm getting the error...

LaurentLesle commented 1 year ago

Ok get it. We had to remove node10 as it was raising some security issues and is not supported anymore. This is not something the CAF Terraform landingzone has dependency on but to cover your use case we will have to add node again. We are tracking this draft PR (https://github.com/microsoft/azure-pipelines-agent/pull/3879 and issue https://github.com/microsoft/azure-pipelines-agent/issues/3834). When released the agent will bring back node16.

dsfrederic commented 1 year ago

@LaurentLesle any news on this issue?

dsfrederic commented 1 year ago

or can you provide me with a workaround?

dsfrederic commented 1 year ago

@LaurentLesle I can see the PR is merged and that there have been a few github actions that've ran succesfully. Although I cannot seem to find the newest azdo release in DockerHub. Do you have an ETA for this?

I'm excited to start using this methods, but this is a blocker for me.

dsfrederic commented 1 year ago

@LaurentLesle @arnaudlh Can you provide me with a solution please?

aminniktash2010 commented 1 year ago

@LaurentLesle @arnaudlh we used the Starter repo for our CAF Terraform project and looks like since you guys move all the initial steps to rover ignite, we have no Azure DevOps pipeline as part of launchpad and also the ignite just providing the level0-level1-level2 of the CAF, so wondering if there is any update regarding this? How we need to have Level 3 and level 4 up and running? looks more we short on documentation.?

Here is the video I was following up with:

https://youtu.be/KK7ubueGR_k