Deploy ShinyProxy and an application with Azure DevOps - azure

I'm trying to deploy a ShinyProxy in a Docker container to Azure. Also, I have the ShinyApp repositories in Azure DevOps. Every time a developer updates the code in a repository, I want to the CD/CI deploy the new code creating a Docker container to Azure.
Also, I think, I have to create an internal Docker network between the ShinyProxy and the app.
How can I create this process? Is there any tutorial how to setup a pipeline in Azure DevOps and run a ShinyProxy on Azure?

After a lot of research and study, I found how to create a full end-to-end deployment. I have created a complete step-by-step guide in my blog.
I hope it could help other guys.

Do you want to deploy your app to Azure Container Registry?
If so, below are the main steps you need to do:
Create a container registry on the Azure Portal.
Create a Docker registry service connection on the project settings to enable your pipeline to push images into the container registry.
Create the pipeline that gets source from your repository.
Add the Docker task in the pipeline,
select the Docker registry service connection created in above step as the 'Container registry'.
select 'buildAndPush' as the 'command'.
To view more details, you can reference to "Build and push to Azure Container Registry".

Related

Azure DevOps -- using Docker-Compose task to deploy to Azure Container Instances

I am trying to create a CI/CD pipeline for a multi-container solution implemented via docker-compose.yml. The goal is to run a container group in Azure Container Instances.
I went with this task DockerCompose#0 for the release pipeline, and the steps to build containers and to deploy them to Azure Container Registry are straighforward.
But, I cannot figure out if it's possible to configure this task to deploy and run containers in ACI. There is an option to Run the Images, but the images are run on the agent's docker host:
How do I instruct this task that the containers to be run in ACI? I know there is a way to do that via Docker CLI with a step to connect to the ACI context, but I can't figure out how to switch to the ACI context from the DevOps pipeline.
How do I instruct this task that the containers to be run in ACI?
Ans:
The new release pipeline needs to start with an empty job and provide a name for the release definition. Next, we need to add artefacts to our application. Since all we want to deploy is a Docker image located in the ACR, select the artefact type as the Azure Container Registry (ACR).
Here is the blog tutorial to Configure CI/CD for Azure Container Instances using Azure / Azure DevOps Pipelines given by #mohitgoyal.

How to get Docker Images from Azure container registry and run onpremise servers using docker-compose?

I am using azure devops for CI/CD pipelines and one thing I couldn't find out, getting images from Azure container registry and run those images inside of my onpremise debian server. (I build and pushed the images to ACR already).
On release pipeline section:
I set Azure Container repository as source type and selected the latest artifact from there
then created a dev stage
Added a Command line tool to execute some scripts on server
-->This is the step where I lost<-- I need somehow to get these image from repository and fire compose up command in the server.
Extra info: you cannot use your docker-compose.yml(which mine is inside of the azure repo in same project) because you are using ACR as source type, not the build itself or source code.
*in my humble opinion this is a good case to enrich a content. Because there is lack of docs and videos on internet.
thanks,

How to create Azure pipeline CICD for docker container to linux on premises server?

I have a containerized app's image that builds on master push and ends up in azure container registry. I need to setup the next step where this image ends up on my linux on prem server.
I have established the connection with the server using a deployment group agent, which claims is healthy.
I have created a pipeline which takes the built image artifact as input but I am completely failing to grasp and create the step in which the artifact is being pulled on / pushed to the server (and ideally run too).
I am looking at the tasks in the pipelines > task section in Azure Devops but I cannot find a place to add some specific steps neither I am very sure what steps to add.
I would very much appreciate any tip on how to deploy a container from acr to on premises linux server using azure devops pipelines. Thank you in advance.
You can check this link which shows how to create Azure Pipeline CI/CD for docker container ,make sure all these steps are followed:
https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops

Azure DevOps - on prem deployment pipeline

I am going to create CI/CD pipeline in Azure DevOps for .Net core web app.
I need to have below procedure:
CI : Visual Studio -> Azure repo -> Build on hosted agent -> create a Docker image and push it to Azure container registry
CD: Deploy created image to on-prem docker swarm cluster
Now, I have 2 questions:
1- how can I deploy to docker swarm cluster
2- I have to deploy directly from build agent to swarm cluster without internet access.
I would appreciate if you can help me.
For your requirement, I'd suggest that you could setup a private agent for Release Pipeline (CD) to deploy created image to on-prem docker swarm cluster.
For CI pipeline, you could use Microsoft Hosted agent.
Regarding that private agent, it should able to connect to internet, but you could restrict it just can connect to Azure DevOps by adding white-list: Allowed address lists and network connections
Regarding deploy to on-prem docker swarm cluster, you could call command through Command Line task.
Deploy a stack to a swarm
Apply rolling updates to a service

Create a pipeline on azure devops to deploy a docker container on azure app service?

I have a docker image in my Azure Container Registry and a Web App For Containers(Linux). Now, I want to create a release pipeline which should be able to deploy that container for Azure Container Registry to Web App For Container. I know I can do this manually but I need to Automate this process through Azure DevOps.
I was trying to make a release pipeline to deploy docker image on Azure web app for container and I made that pipeline by following this tutorial.
https://learn.microsoft.com/en-us/azure/devops/pipelines/apps/cd/deploy-docker-webapp?view=azdevops&viewFallbackFrom=vsts
I hope this can help others as well. Thank you

Resources