Scaling the Farm Using Terraform and Ansible
In the previous two chapters, we walked you through deploying our farm to Azure and AWS using Infrastructure as Code. We then performed configuration management using Ansible to install SharePoint based on our topology.
- PDF / 374,504 Bytes
- 27 Pages / 504 x 720 pts Page_size
- 55 Downloads / 218 Views
Scaling the Farm Using Terraform and Ansible In the previous two chapters, we walked you through deploying our farm to Azure and AWS using Infrastructure as Code. We then performed configuration management using Ansible to install SharePoint based on our topology. In this chapter, we go through the exercise of scaling the Azure SharePoint farm topology discussed in Chapter 4 by making the WFE role highly available using Azure availability sets. We use Terraform to specify the objects. We also add a load balancer to distribute incoming traffic.
Farm Topology We will modify the previous farm topology to make the role highly available. Figure 6-1 shows what the architecture will look like. We are also adding an Azure load balancer to control traffic to our WFEs.
© Oscar Medina, Ethan Schumann 2018 O. Medina and E. Schumann, DevOps for SharePoint, https://doi.org/10.1007/978-1-4842-3688-8_6
197
Chapter 6
Scaling the Farm Using Terraform and Ansible
Figure 6-1. The SharePoint 2016 farm using Azure availability sets for the WFE role
Architecture Changes There are several architectural changes that we will walk through in this chapter to help you understand how to scale a SharePoint farm rapidly and in a repeatable, predictable fashion. The following includes some of the major changes. •
We add availability sets for the WFE role to make them highly available and redundant.
•
We add a load balancer to manage traffic to our WFEs.
•
We place each SharePoint role in its respective subnet and NSGs.
•
We create a Packer image to quickly spin up additional WFEs. This image has the SharePoint bits and prerequisites installed, which allows us to run an Ansible playbook to add the new WFEs to the farm.
Please note that not all roles are made highly available for this walkthrough. The aim of this chapter is to show you how to do this for a given tier; in this case, the web front end role, using Terraform, Ansible, and Packer.
198
Chapter 6
Scaling the Farm Using Terraform and Ansible
Note We focus on the scaling the Azure cloud farm we deployed in earlier chapters. However, the code can be enhanced (and perhaps this is a good challenge for you) to scale the AWS SharePoint 2016 farm deployment by modifying the Terraform IaC.
Building the Packer WFE Image Earlier chapters showed you how to create a Packer Windows 2016 server image as a base image for the SharePoint 2016 farm. We had a vanilla OS with a VSCode and a couple of other software packages. However, another approach is to create an image per SharePoint role, which is preloaded with the SharePoint prerequisites installed. Using this approach, you can easily join it to the farm. In our case, we want to create an image for the WFE role. Let’s go through what you need to do next.
Getting Started To start creating our Packer template, we copied our existing one and made modifications. The key difference is that we are using the Ansible provisioner to execute our WFE Ansible playbook, which we have also modified. We will go over changes shortly. Onc
Data Loading...