Omitir navegación

Blue-green Deployment to Virtual Machine ScaleSet with Jenkins

Última actualización: 18/04/2018

This template allows you to do blue/green deployment to a VMSS cluster using Jenkins. It provisions a Jenkins master on a VM running on Azure, configures a DevOps pipeline to bake a managed OS image with Tomcat 7 or 8 installed and deploys it to the VMSS. It is an example to demonstrate how we can use Jenkins pipeline to do blue/green deployment on VMSS.

Esta plantilla de Azure Resource Manager (ARM) la creó un miembro de la comunidad, no Microsoft. Su propietario (no Microsoft) le permite usar las plantillas de ARM con arreglo a un contrato de licencia. Microsoft no se responsabiliza de ninguna plantilla de ARM que le proporcionen los miembros de la comunidad (o cuya licencia le otorguen) en cuanto a su seguridad, compatibilidad ni rendimiento. Las plantillas de ARM de la comunidad no reciben ningún tipo de soporte en ningún servicio ni programa de soporte de Microsoft. Dichas plantillas se proporcionan TAL CUAL, sin garantía de ningún tipo.

Parámetros

Nombre del parámetro Descripción
resourceNamePrefix Prefix for the resource names.
adminUsername User name for the Virtual Machine hosting the Jenkins and the Virtual Machines in VMSS.
sshPublicKey Configure all linux machines with the SSH public key string, for example 'ssh-rsa AAAAB...snip...UcyupgH azureuser@linuxvm'
virtualMachineSize The virutal machine size to use. See https://docs.microsoft.com/en-us/azure/virtual-machines/linux/sizes
jenkinsDNSPrefix Unique DNS name prefix for the public IP used to access the Jenkins service.
tomcatDNSPrefix Unique DNS name prefix for the public IP used to access the Tomcat service.
servicePrincipalAppId Service Principal App ID (also called Client ID) that has contributor rights to the subscription used for this deployment. It is used to manage related Azure resources, e.g., bake OS image, check resource status, update VMSS image, etc.
servicePrincipalAppKey Service Principal App Key (also called Client Secret) that has contributor rights to the subscription used for this deployment. It is used to manage related Azure resources, e.g., bake OS image, check resource status, update VMSS image, etc.
_artifactsLocation The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated.
_artifactsLocationSasToken The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated.
location Location for all resources.

Uso de la plantilla

PowerShell

New-AzureRmResourceGroupDeployment -Name <deployment-name> -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/301-jenkins-vmss-blue-green/azuredeploy.json
Instalar y configurar PowerShell de Azure

Línea de comandos

azure config mode arm
azure group deployment create <my-resource-group> <my-deployment-name> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/301-jenkins-vmss-blue-green/azuredeploy.json
Instalación y configuración de la interfaz de línea de comandos multiplataforma de Azure