I am using Azure DevOps on cloud for my test microservice app. So I am using my own machine as an agent to build operations. And I created a kubernetes cluster on minikube with a hyperv driver. So I want to create a release pipeline and deploy to my local kubernetes. Is this possible?
As per your question, it is possible to create a release pipeline and you can deploy to your local kubernetes by referring to link1 and link2 .
According to your description, you can try to create a new Kubernetes service connection in your project with the "KubeConfig" or "Service Account" option. It should be from your Kubernetes cluster.
After the service connection created, you can use the "Kubectl" task in the release pipeline to deploy your local kubernetes.
For more information, you could refer to: Kubernetes service connection.
Related
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".
I am trying to install and configure spinnaker on azure kubernetes. I don't find any documentation clearly explaining the process.
Is there any documentation available on installing and configuring spinnaker on azure kubernetes?
Azure quickstart templates contains spinnaker Continuous Deployment to Kubernetes template that
allows you to deploy and configure a DevOps pipeline from an Azure
Container Registry to a Kubernetes cluster. It deploys an instance of
Jenkins on a Linux Ubuntu 14.04 LTS VM and an instance of Spinnaker on
the same Kubernetes cluster that your pipeline will target.
The Jenkins instance will include a basic pipeline that checks out a
user-provided git repository, builds the Docker container based on the
Dockerfile at the root of the repo, and pushes the image to the
provisioned Azure Container Registry. The Spinnaker instance will
include a basic pipeline that is triggered by any new tag in the
registry and deploys the image to the provisioned Kubernetes cluster.
also check spinnaker on azure kubernetes service
Deploying a multi-container application to Azure Kubernetes Services without using Azure DevOps
We have use case with Java Application (Spring ) with oracle Database as two containers .
We have to try the same in AKS ( Not using Azure DevOps).
Both App (8080) and DB (1521) runs on different Ports
Let me know if you have similar use case implemented.
The point of discussion here might be that whether you want to use a CI/CD Tool other than Azure Devops or not?
If yes, you'll need to setup a pipeline, write some Kubernetes Templates, Build Code, Push Image, and then deploy.
You can always refer Kubernetes Official Docs for more in depth knowledge of Multi-Container Pods, and Jenkins Official Docs for understanding CI/CD Process
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
I'm trying to figure out the steps to setup CI/CD for an Asp.Net Core web application using AKS with VSTS. Are the steps described in https://learn.microsoft.com/en-us/vsts/build-release/apps/cd/azure/deploy-container-kubernetes valid for what I'm trying to do? Are windows container supported in AKS?
If your application is in ASP.Net Core, then you can host it in Linux as your code is platform independent. I have done this using Docker-file where your container is a self hosted app running on AKS.
VSTS provides a Inbuilt task to deploy to your AKS cluster in your build pipeline.
Windows support on k8s is better with Windows Server version 1709 which needs Kubernetes v1.9 (bleeding edge stable). See https://kubernetes.io/docs/getting-started-guides/windows/
Unfortunately, at this time, AKS preview only supports up to 1.8.2.
Frosty, if you can create a docker image out of your Windows machine, it can be pushed to the container registry and then deployed to Kubernetes cluster. Here are some links for reference:
Building and Pushing Windows container images: https://blog.docker.com/2016/09/build-your-first-docker-windows-server-container/
Install Azure CLI: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
Create Kubernetes cluster in AKS: https://coderise.io/kubernetes-cluster-on-azure-container-service/
Windows containers are in private preview in AKS (reference); you can sign up using this form.. You can run hybrid clusters (Linux+Windows, up to 1803) using acs-engine today.
The VSTS walkthrough you linked is valid; check also this one and this one.
Update: Windows support for AKS is still a work in progress.
Currently Windows container are only in private preview, and you need to enable it using Azure CLI do some steps, please refer this official docs: https://learn.microsoft.com/en-us/azure/aks/windows-container-cli. After you enable it, then you can check the 'Windows Container' option when you create node pool in your azure kubernete service account.