Passer la navigation

Blue-green Deployment to Virtual Machine ScaleSet with Jenkins

Dernière mise à jour : 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.

Ce modèle ARM (Azure Resource Manager) a été créé par un membre de la communauté et non par Microsoft. Chaque modèle ARM vous est concédé sous licence sous un contrat de licence par son propriétaire, et non par Microsoft. Microsoft ne peut pas être tenu responsable des modèles ARM fournis et concédés sous licence par les membres de la communauté, ni ne vérifie leur sécurité, leur compatibilité ou leurs performances. Les modèles ARM de la communauté ne sont pris en charge par aucun programme ou service de support Microsoft. Ils sont rendus disponibles EN L'ÉTAT sans garantie d'aucune sorte.

Paramètres

Nom du paramètre Description
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.

Utiliser le modèle

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
Installer et configurer Azure PowerShell

Ligne de commande

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
Installer et configurer l'interface de ligne de commande multiplateforme Azure