The Azure Quickstart templates are currently available in English

Blue-green Deployment to Virtual Machine ScaleSet with Jenkins

Última atualização: 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.

Este modelo de Gestor de Recursos do Azure (Azure Resource Manager, ARM) foi criado por um membro da comunidade e não pela Microsoft. Cada modelo de ARM está licenciado para si ao abrigo de um contrato de licença pelo respetivo proprietário e não pela Microsoft. A Microsoft não é responsável por modelos de ARM fornecidos e licenciados por membros da comunidade e não os analisa quanto a a segurança, compatibilidade ou desempenho. Os modelos de ARM da comunidade não são suportados ao abrigo de nenhum programa de suporte ou serviço da Microsoft e são disponibilizados TAL COMO ESTÃO sem qualquer tipo de garantia.

Parâmetros

Nome do Parâmetro Descrição
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.

Utilizar o modelo

PowerShell

New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/301-jenkins-vmss-blue-green/azuredeploy.json
Instalar e configurar o PowerShell para Azure

Linha de comandos

az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/301-jenkins-vmss-blue-green/azuredeploy.json
Instalar e Configurar a Interface de Linha de Comandos para Várias Plataformas do Azure