Giter Site home page Giter Site logo

bstoop-github / sitecore-azure-quickstart-templates Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sitecore/sitecore-azure-quickstart-templates

0.0 2.0 0.0 108 KB

This repo contains all currently available Azure Resource Manager templates for Sitecore

License: MIT License

sitecore-azure-quickstart-templates's Introduction

Sitecore-Azure-Quickstart-Templates

This repo contains all currently available Azure Resource Manager templates for Sitecore

Documentation

You can read all about Sitecore Azure AppService integration and ARM Template deployment at Sitecore Documentation Site

Compatibility

Choose the compatible templates for your Sitecore version:

Templates Folder Compatible Product versions
Sitecore 8.2.1 Sitecore 8.2 Update-1 and Update-2
Sitecore 8.2.3 Sitecore 8.2 Update-3
Sitecore 8.2.4 Sitecore 8.2 Update-4
Sitecore 8.2.5 Sitecore 8.2 Update-5
WFFM 8.2.3 Web Forms For Marketers 8.2 Update-3, Update-4 and Update-5
AD 1.3.0 Active Directory 1.3
EXM 3.5.0 Email Experience Manager 3.5.0
SXA 1.3.1 Sitecore Experience Accelerator 1.3 Update-1 and 1.4 for Sitecore 8.2

Pre-deployment Checklist

  1. Ensure you have the latest Azure PowerShell SDK installed
  2. Ensure you have uploaded your Sitecore Web Deploy packages to a blob storage location
  3. Ensure you have a cloud-hosted instance of MongoDB for Experience Database in XP and XP0 configurations.
  4. Download and update the parameter values in the azuredeploy.parameters.json file

Sample PowerShell Script

Below is a sample PowerShell script that can help you to get up and running quickly with the ARM Templates. There is also a Sitecore PowerShell CmdLet available for download at Sitecore Downloads Site that makes the deployment even easier.

$ArmTemplateUrl = "AZUREDEPLOY_JSON_URL";
$ArmParametersPath = ".\xp\azuredeploy.parameters.json";

# read the contents of your Sitecore license file
$licenseFileContent = Get-Content -Raw -Encoding UTF8 -Path ".\license.xml" | Out-String;
$Name = "RESOURCE_GROUP_NAME";
$location = "AZURE_DATA_CENTER_NAME";
$AzureSubscriptionId = "AZURE_SUBSCRIPTION_ID";

#region Create Params Object
# license file needs to be secure string and adding the params as a hashtable is the only way to do it
$additionalParams = New-Object -TypeName Hashtable;

$params = Get-Content $ArmParametersPath -Raw | ConvertFrom-Json;

if ($params.parameters -ne $null) {
    $params = $params.parameters
}

foreach($p in $params | Get-Member -MemberType *Property)
{
    $additionalParams.Add($p.Name, $params.$($p.Name).value);
}

$additionalParams.Set_Item('licenseXml', $licenseFileContent);
$additionalParams.Set_Item('deploymentId', $Name);

#endregion

#region Service Principle Details

# By default this script will prompt you for your Azure credentials but you can update the script to use an Azure Service Principal instead by following the details at the link below and updating the four variables below once you are done.
# https://azure.microsoft.com/en-us/documentation/articles/resource-group-authenticate-service-principal/

$UseServicePrincipal = $false;
$TenantId = "SERVICE_PRINCIPAL_TENANT_ID";
$ApplicationId = "SERVICE_PRINCIPAL_APPLICATION_ID";
$ApplicationPassword = "SERVICE_PRINCIPAL_APPLICATION_PASSWORD";

#endregion

try {
   	Write-Host "Setting Azure RM Context..."

 	if($UseServicePrincipal -eq $true)
	{
		#region Use Service Principle
		$secpasswd = ConvertTo-SecureString $ApplicationPassword -AsPlainText -Force
		$mycreds = New-Object System.Management.Automation.PSCredential ($ApplicationId, $secpasswd)
		Login-AzureRmAccount -ServicePrincipal -Tenant $TenantId -Credential $mycreds
		
		Set-AzureRmContext -SubscriptionID $AzureSubscriptionId -TenantId $TenantId;
		#endregion
	}
	else
	{
		#region Use Manual Login
		try 
		{
			Write-Host "inside try"
			Set-AzureRmContext -SubscriptionID $AzureSubscriptionId
		}
		catch 
		{
			Write-Host "inside catch"
			Login-AzureRmAccount
			Set-AzureRmContext -SubscriptionID $AzureSubscriptionId
		}
		#endregion		
	}
	
 	Write-Host "Check if resource group already exists..."
	$notPresent = Get-AzureRmResourceGroup -Name $Name -ev notPresent -ea 0;
	
	if (!$notPresent) 
	{
		New-AzureRmResourceGroup -Name $Name -Location $location;
	}
	
	Write-Verbose "Starting ARM deployment...";
	New-AzureRmResourceGroupDeployment -Name $Name -ResourceGroupName $Name -TemplateUri $ArmTemplateUrl -TemplateParameterObject $additionalParams; # -DeploymentDebugLogLevel All -Debug;

	Write-Host "Deployment Complete.";
}
catch 
{
	Write-Error $_.Exception.Message
	Break 
}

sitecore-azure-quickstart-templates's People

Contributors

cmcsitecore avatar mikeboothsc avatar sc-dmitrykostenko avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.