0

I'm using Google cloud, I have a linux VM up and ready for use, I have an ASP.net core web app on Azure devops. I have configured the build pipeline for this webapp, now I want to automate its deployment on my Linux server, but I don't know how to do that.

I have 2 options I tried:

  • Building a docker container with my app and deploy on google container registry, but I couldn't find a way to later trigger the docker pull of my container on my linux VM to run it there, or run it with a docker compose.
  • Building a self contained package of the ASP.net core app, but I can't find a way of carrying the package and deploying it to my VM instance.

There are several tutorials about deploying to Google app engine, GKE and Cloud Run. But I can't find one that shows how to do what I want with my linux VM.

Any help to overcome this?

1 Answer 1

0

You need to develop some way of deploying your build into the Google Cloud VM. Your solution will vary depending on how you are hosting the asp.net:

If you are running it as a container on the VM, then you'll need some way of stopping the container, pulling the new one from a registry that the VM has access to, and restarting it. One way to achieve this would be to have your Azure DevOps pipeline execute a script local to the GCP VM that does these steps.

If you are using nginx or another webserver, you will need to copy the build artifacts to the new server. You'll need to use a protocol such as SSH to establish a connection from your Azure DevOps instance to the GCP Linux VM.

1
  • Thanks for your answer, but my problem is what way is there to accomplish authomatically via an azure pipeline, what you noted in both scenarios. Dec 20, 2022 at 9:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.