Azure / DevOps-For-AI-Apps

This repository contains code samples for building a continuous integration pipeline for an AI application using Azure.
MIT License
63 stars 94 forks source link

Azure CICD Build Pipeline failing after agent Hosted Linux Preview Pool deprecation #19

Open parag-gurjar02 opened 5 years ago

parag-gurjar02 commented 5 years ago

Hi, I am following below document for CICD pipeline using Azure DevOps.

https://github.com/Azure/DevOps-For-AI-Apps/blob/master/Tutorial.md

The CICD pipeline works fine. But from 01 Dec 'Hosted Linux Preview Pool' agent which was suggested in tutorial has been deprecated. As per below recommendation from Microsoft, we replaced 'Hosted Linux Preview Pool' with 'Microsoft-hosted agent - Ubuntu 16.04 '.

https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=vsts&tabs=yaml#hosted-linux-preview-pool-deprecation

After doing this, the step 'Starting Model Container' step is failing.

Original Code - _BUILD_CONTAINER_ID=$(docker ps --format "{{.ID}}") docker run -d --network container:$BUILD_CONTAINERID acrforblog.azurecr.io/model-api:$(Build.BuildId)

Replaced with - docker run -d crrq51278013.azurecr.io/model-api:$(Build.BuildId)

[Above changes were done as per recommendation on Microsoft site - that Ubuntu 16.04 agent does not run as container]

Post this, step 'Simple API test' is failing and API service is not returning anything now. Code in this Simple API test -

echo "Waiting...." sleep 10

Simple API Test

echo "Testing API" reply=$(curl -s $(MODEL_API_URL)/) echo "reply value" echo $reply

expected="Healthy" echo $expected

if [[ $reply == $expected ]]; then echo -e "Successfully validated version API call" else echo "Basic API call Fail" exit 1 fi

Please suggest how code in step 'Starting Model Container' should be changed in case of 'Microsoft-hosted agent - Ubuntu 16.04', so container can be started and API service can be tested.

Regards, Parag Gurjar

/cc @MicahMcKittrick-MSFT

mimckitt commented 5 years ago

@jainr @msalvaris could either or you assist on this?

msalvaris commented 5 years ago

@jainr Can you take a look if you get a chance?

ashishrajsrivastava commented 5 years ago

i have updated steps to make it compatible with ubuntu host agent, if you want i can create a PR with screenshots and required changes in tutorial.md.

jainr commented 5 years ago

Go ahead @ashishrajsrivastava, thanks for your contribution

ashishrajsrivastava commented 5 years ago

Added commit to my existing PR with updated tutorial screenshot showing tasks for Ubuntu Hosted agent.