Application Management-Example-Deploying a Service to Your Private Cloud (Part 4)
Hello Readers, welcome to the 4th and final post in this series on deploying the example VMM Service Template for SharePoint 2013 to your Microsoft private cloud. To recap where we’ve been:
Introduction material on what we’ll be covering in this series at a high level.
Getting started with the basics such as downloading the required content and staging this content in preparation of importing, configuring, and deploying your SharePoint service template.
This post was mostly about how you get your VHDs setup and ready to be used by the service template for SharePoint 2013. Details around building a default image, installing the required components, sysprepping, and storing those newly created images in your VMM library to be leveraged during the service template import (covered next).
What’s Left to Do? “The Rest”
This is a comprehensive post with lots of information. In this post we’ll get the following squared away (there’s tons of pictures – they will be your guide as you move through this process):
- Modify the AutoSPInstaller XML to match the accounts / passwords / servers in your configuration and environment
- Import the scripts into your VMM library and refresh the library to reflect changes
- Import the Service Template using the VMM console and map any configuration mappings / dependencies / accounts / etc.
- Open the imported service template up in your Service Template Designer within VMM to ensure you have updated some key fields
- Deploy it! (magic happens) – well hopefully
OK, without delay – let’s jump right in shall we?
Updating the SharePointEnterprise2013Farm-3-tier.xml Configuration File
The service template for SharePoint 2013 Enterprise Three Tier comes with a preconfigured AutoSPInstaller.xml file (SharePointEnterprise2013Farm-3-tier.xml) that requires specific updates to be supported in your environment. This configuration file is provided as a working example for you to customize. In (Part 2) of this series, we discussed sourcing the contents for the AutoSPInstaller on your APPS$ share (in our example: \\fs02\apps$\AutoSPInstaller-3Tier-Enterprise\SP). It is now time to copy the XML provided as an example in the TechNet Gallery content into the directory structure you created and then properly update for your environment.
Copy the SharePointEnterprise2013Farm-3-tier.xml to Your Network Share
- Locate the XML within the zipped content you downloaded from here
- Copy it to the following folder within your environment (structure you created and shared out in Part 2)
Update License Key <PIDKey> for SharePoint
Contained within the SharePointEnterprise2013Farm-3-tier.xml is a section for updating your license key for SharePoint. Our example assumes a SharePoint 2013 Enterprise key to ensure all features configured within the XML file are properly installed.
To update the key:
Note It is recommended to use something like Notepad to update (XML shown below for easier viewing).
- Don’t close the file just yet – more updating needed .
Update Account Information
It is necessary to update the account information in the SharePointEnterprise2013Farm-3-tier.xml.
- Locate each account leveraged within the configuration file. We’ve made it easier since all accounts have a default password entered into the configuration file of EnterPassword to make it searchable.
- These account names and passwords need to be updated in this step before proceeding. If they are not updated properly, the service template will fail to deploy.
For details on service accounts in SharePoint, see Plan for administrative and service accounts in SharePoint 2013.
Note Some passwords are surrounded by quotes and some are not. Ensure to follow the standards of the .xml file to ensure you are updating your passwords correctly. Search for the phrase EnterPassword without quotes to ensure you are updating all required accounts / passwords.
Server Name Updates
This service template for SharePoint 2013 leverages static server names to make the example easy to follow. However, if you want to use different server names for your deployment, you must update the server names in this file, as well as make appropriate updates are in the service template prior to deploying it. We’ll cover the AutoSPInstaller configuration file here and cover server names in the service template in a later step.
Three server names are leveraged within this service template by default.
SPFESQL: SQL Tier for SharePoint
SPFEAPP1: Application Tier
SPFEWFE1: Web Tier
If you decide to update these server names, update them throughout the SharePointEnterprise2013Farm-3-tier.xml configuration file and then reference the section on server name updates in the service template designer defined later in this post.
One more update required – don’t close just yet!
Note Dynamic server names could be used in this service template for more advanced scenarios. A NLB and VIP is required to ensure that any URL referenced in the AutoSPInstaller .xml configuration file references a DNS name that can point to the deployed dynamically created server names. The addition of this extension to the service template allows for elasticity (expansion and potentially contraction) of the WFE tiers for scalability needs. For more information, seeConfiguring Load Balancing in VMM Overview . Dynamic server names are outside of the scope for the current release of this service template.
SharePoint Farm Passphrase Update
The SharePoint Farm passphrase is a passphrase used by SharePoint to allow resources to join an existing SharePoint environment. This passphrase is configured in the SharePointEnterprise2013Farm-3-tier.xml file and it is used during installation. We strongly recommend updating the passphrase from the default passphrase before deploying this service template (you want to be unique right)? .
- To update the passphrase, locate the <Passphrase> section of the AutoSPInstaller referenced .xml file, and then update it accordingly.
- Save and close the file!
A final tip on this configuration file: Pay close attention to the comments within this file if you are interested in customizing beyond the example we’ve provided. Go here to learn more about the PowerShell scripted solution to install SharePoint within this service template: http://autospinstaller.codeplex.com/ and any potential improvements / enhancements that have been added since the publishing of our example solution.
Copy the Library Scripts Used for the Service Template
The final step we have to accomplish before importing the service template into your environment is to ensure we copy the leveraged scripts from the TechNet content download into your VMM library.
Copy EnablePSExec.CR, EnablePing.CR, and EnableDatabaseFWException.cr to Your VMM Library
To copy the script source files/folders to your VMM library
Navigate to the directory where you downloaded and extracted the service template for SharePoint 2013 Enterprise Three Tier
In the VMMLibrary_Dependencies subfolder, select the three folders EnablePSExec.CR, EnablePing.CR, and EnableDatabaseFWException.CR, and then copy them to your VMM library environment in System Center 2012
To here (example: \\fS02\vmmlibrary\scripts)
As a final step, make sure you go into your VMM library and refresh the library so these scripts will be available when you import the service template in the steps that follow [within your VMM console go to Library / Library Servers and right click on your VMMLibrary share and select Refresh]
Import and Define Mappings for the Service Template
Now that you’ve updated your configuration file and copied the necessary scripts into your library (complete with a refresh) we should be set to import the service template for SharePoint 2013 into VMM.
Browse to where you extracted the source content you downloaded from the TechNet Gallery for the SharePoint Service Template and locate the SharePoint 2013 Enterprise Farm Three Tier.1.0.xml service template file at the root folder of the extracted content. Select the XML and click Next
Map out the following references to resources within your VMMLibrary. The user guide provided with the download content (Service Template for SharePoint 2013 User Guide) goes into detail on the “how’s” and “what’s” so break out that guide at this point to get some detail here. Key point here is you need to ensure all RunAs accounts are created and mapped, VHDx’s you created are mapped to the correct “tier references”, any scripts are mapped (you just imported these in the last step), and your network that you will be using needs to be updated accordingly.
Note If you fail to map any resources in the list above, they may be completely removed from the service template configuration. So key thing here (don’t ignore any mappings ). You’ll know if you missed a mapping with a message showing on the summary screen. Ensure all is updated and no “bangs” or warnings are showing.
Post Configuration Tasks (Not Done Yet? We’re Almost There!)
OK! Last step before we deploy this . Once you successfully imported the service template using the above process and got all “green”, you need to do some minor updates to make this work. What follows is what I would consider to be the minimum update list. To get started, open the freshly imported service template in the Service Template Designer within your VMM console by going to Library / Templates / Service Templates and select your service template you just imported in the middle pane. Finally click Open Designer.
Common Tier Post Import Configuration Tasks
Some minor updates are needed to be done to reflect your environment for each tier. To modify the tier specifically, right click on the tier and select Properties
TIP: You’ll modify each tier the very same way as above so we’ll use this in the next steps for configuration of the other two tiers.
Computer name: Remember above, I mentioned you could change the computer names in the SharePointEnterprise2013Farm-3-tier.XML (AutoSPInstaller configuration file)? If you update that file with new server names, you need to update the server names on each tier in this spot
Admin Password: By default, the administrator password will be blank. You should update this here or programmatically create one through group policy
Product Key: Provide your OS product key
Domain / Workgroup: Define the domain, user account to join that domain, and the proper password (or select a pre-defined Run As account to preform this task)
- Pre-Install 3 (administrator group add command) : Each tier has a command that executes to add the SharePoint Farm administrator account to the local administrator group on each tier. This is only required during the installation of SharePoint (not post install) but this command must be updated to the proper account you defined, created, and setup that is leveraged in the autospinstaller xml you modified in this post.
SQL Tier Post Import Configuration Tasks
Along with the common configuration updates mentioned above, the following updates need to be done within the SQL tier configuration (post import).
SQL Server Configuration
- SQL Server Deployment: ensure Instance ID is accurately updated according to your sysprepped sql instance you prepared in Part 3 of this series. Update installation account to a mapped Run As account that has local administrator rights on your SQL tier.
- Configuration: update Media Source to point to the proper place on your network for the SQL media. Update the SQL Server Administrators appropriately ensuring that your SharePoint Farm administrator account is defined within this list. Remove any domain line items not relevant in your environment to avoid errors during execution.
App and Web Tier Post Import Configuration Tasks
Both the Application and Web Front End tiers have the same essential configuration tasks to be performed (in addition to the common ones called out above).
- Post-Install 1: The command line within this script needs to be updated to reflect the proper server name and share for your internal environment.
The default has the following that will need to be updated to reflect your internal server and share you configured in Part 2 of this series:
/c %SYSTEMROOT%\system32\windowspowershell\v1.0\powershell.exe -executionpolicy bypass -noprofile -file "\\server\apps$\AutoSPInstaller-3Tier-Enterprise\SP\autospinstaller\AutoSPInstallerMain.ps1" "\\server\apps$\AutoSPInstaller-3Tier-Enterprise\SP\AutoSPInstaller\SharePointEnterprise2013Farm-3-tier.xml" –unattended
Note The server and share are referenced twice in the above command line. It is recommended to copy / paste this entire command into a text editor, update appropriately, and then copy / paste back into the command line.
Additional Note The user account defined to execute this service template should be validated to ensure it is configured with the SharePoint Farm admin account that has been defined for this deployment.
Deploy Away! Go NUTS
Final step in this process is to go into your VMM console (all things being configured properly) and successfully deploy this into your environment for review.
- Navigate to Library / Templates / Service Templates within your VMM console
- Select your service template you have just finished configuring and click Configure Deployment
- Select the target location
- Assess ratings (Refresh Preview) and click Deploy Service when ready!
Just for fun, do you want to see this in super sonic speed? Check out this video from Part 1 in the series
Until Next time.
Happy Service Template Deploying!