This commit is contained in:
Richin Jain 2017-11-07 14:23:10 -05:00 коммит произвёл GitHub
Родитель 984babde86
Коммит c86b261eba
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 8 добавлений и 10 удалений

Просмотреть файл

@ -38,11 +38,7 @@ On the landing page, click on the new project icon to create a project for your
![VSTS New Project](images/vsts-newproject.PNG?raw=true)
Go to your project homepage and click on "Build and Releases tab" from the menu. To create a new Build Definition click on the "+ New" icon on top right.
![VSTS New Build Definition](images/vsts-newbuilddef.PNG?raw=true)
We will start from an empty process and add tasks for our build process. Notice here that VSTS provides some well definied build definition process for commonly used stack like ASP .Net
Go to your project homepage and click on "Build and Releases tab" from the menu. To create a new Build Definition click on the "+ New" icon on top right. We will start from an empty process and add tasks for our build process. Notice here that VSTS provides some well definied build definition process for commonly used stack like ASP .Net
![VSTS Empty Process Definition](images/vsts-emptyprocess.PNG?raw=true)
@ -117,7 +113,7 @@ Release Definition
Hover over the the Build and Releases tab on the top and select **Releases**. Click the "+" and select Create New definition option to create a new release definition. You can add multiple environments like Integration, Staging and Prod depending on your devOps needs but to keep it simple we will just create one environment and call it production. While creating a new environment VSTS gives you an option for selecting a template, select Deploy to Kubernetes cluster and hit apply.
![VSTS Deploy to Kubernetes template](images/vsts-deployToKubernetes.PNG?raw=true)
![VSTS Deploy to Kubernetes template](images/VSTS-deployToKubernetes.PNG?raw=true)
Before you fill in the details for the Deploy to Kubernetes task in the Production environment, lets also add the artifact that we published as part of the build phase.
@ -125,16 +121,18 @@ Before you fill in the details for the Deploy to Kubernetes task in the Producti
You can also select how often do you want your release pipeline to run. You can set a schedule (nightly, weekly etc.) or have continuos deployment where each build gets released in production. To enable continous deployment, select the lighting sign in the artifacts and enable CD.
![VSTS Copy files](images/vsts-releasecdtrigger.PNG?raw=true)
![VSTS Trigger for CD](images/vsts-releasecdtrigger.PNG?raw=true)
In the environments box, click on task and it will open a new screen. For Kubernetes service connection, click on New and it will open a new dialog. Add the necessary information in order to connect to the Kubernetes cluster. First, give a connection name. Then, you need to get the Server URL. You can get it either from the Azure Portal under overview as Master FQDN or try running “kubectl cluster-info” at your command prompt and get the URL of Kubernetes master. Finally, paste the entire content of your Kubernetes configuration file in the “Kubeconfig” field. Config file can be found under the .kube folder inside your home directory. For more details on how to get credentials for your ACS cluster, you can refer to the [documentation](https://docs.microsoft.com/en-us/azure/container-service/kubernetes/container-service-tutorial-kubernetes-deploy-cluster) from ACS team. Click OK to save the connection.
![VSTS Copy files](images/vsts-vsts-releasek8conn.PNG?raw=true)
![VSTS Creating ACS connection](images/vsts-releasek8conn.PNG?raw=true)
In the Arguments section use the deploy flag and give it the deploy file name. In the Working directory, select your working directory from the linked artifacts that you created in previous step.
![VSTS Copy files](images/vsts-releasekubectlapply.PNG?raw=true)
![VSTS KubeCTL Apply](images/vsts-releasekubectlapply.PNG?raw=true)
Hit save, you now have an end to end pipeline for Continous Integration and Continous Delivery.