This article uses the provided Terraform scripts to configure and create a Kubernetes cluster and resources required to run the Email Signature Server.
Prerequisites
|
What do the Terraform scripts below create?
- Service principal: this is required for the Kubernetes cluster to access the azure resources.
- Resource group: the Kubernetes cluster, Storage account, and Log analytics resources will be created here.
-
Node resource group:
MC_<Original Resource Group Name>_<Kubernetes Cluster Name>_<Location>
- Kubernetes cluster: this is required to host the email signature server component.
- Log analytics: from here the performance of the Kubernetes cluster can be monitored.
- Storage account: this is where the email signature generated from Templafy will be stored.
ESS Configuration
- Navigate to https://portal.azure.com.
-
Start Cloud Shell (the terminal icon in the top right).
- The first time you use Cloud Shell, you need to create a storage account.
- When prompted, choose Bash.
- Verify subscription where the AKS cluster should reside:
az account show
-
Set the default subscription to the one all resources should be created under:
az account set --subscription <subscription name or id>
-
-
Navigate to the clouddrive directory:
cd clouddrive
-
Create a new directory which will host the terraform files:
mkdir terraform
-
Change to this directory:
cd terraform
-
Download the terraform-root.zip file:
curl -O https://templafydownload.blob.core.windows.net/delivery/ESS/terraform-root.zip
- Extract the file:
unzip terraform-root.zip
. -
Open the editor:
code .
-
Select the configuration file
variables.tfvars
and edit the variables based on your environment.Note
-
office365ApplicationId
is the Application Id assigned in the App Registration. -
office365SmtpServerHostname
can be retrieved from the Microsoft Admin Center selecting the default domain. From here you can select the DNS records tab to find the MX entry- Alternatively, to find this variable, you can run
nslookup -type=mx <your primary domain>
.
- Alternatively, to find this variable, you can run
-
office365AuthenticationUrl
ishttps://login.microsoftonline.com/<your Primary Domain or Tenant ID>
.
-
-
Save the
variables.tfvars
file. - Run the first set of terraform scripts:
./tf-run-azure-config.bat
Note
In order to troubleshoot any errors that arise, please follow the links specified by Microsoft in the error message.
- Common issues include incorrect licensing, inadequate vCPU quota, and improper permissions.
-
The output result will display the cluster_public_ip on which the Email Signature Server is listening.
- Click the mxtoolbox_blacklist_ip_check URL in the output result and verify the IP address issued by Microsoft is not on any SMTP blacklist.
Important
If you find the Microsoft issued public IP address is on any of the blacklists, you will need to delete the public IP address and re-run the
./tf-run-azure-config.bat
from step 12. Repeat the steps below until the output gives a cluster_public_ip that is not on any blacklists.-
source init.env
az network public-ip delete --ids $ess_cluster_public_ip_resource_id
-
- Click the mxtoolbox_blacklist_ip_check URL in the output result and verify the IP address issued by Microsoft is not on any SMTP blacklist.
- Update your SPF record for all email sending domains with this cluster_public_ip. Save this IP for use in Step 4 of the Implementation.
- Set the environment variables for your cluster that will be used by the rest of the commands:
source init.env
-
Since the cluster uses Azure RBAC, we need to go through an authentication process to gain access to the cluster.
- Run the following command to authenticate:
./ess-get-credentials.bat
- This will trigger an SSO Microsoft authentication process. Follow the instructions on screen and after successful authentication the output will be the namespaces of the cluster. Now you have a valid session with the cluster to run the next terraform deployment.
- Run the following command to authenticate:
- Run the second set of terraform scripts:
./tf-run-kubernetes-config.bat
- Set the load balancer configuration in the deployment to the cluster_public_ip:
./ess-set-standard-load-balancer.bat
- Upload the certificate files created earlier to the Cloud Shell by clicking on the Upload/Download files icon.
- Click the Manage file share link.
- Navigate to the terraform/ directory.
- Navigate to the certs/ directory.
- Click the Upload button and select the certificates (2 certificates and 2 passwords).
- Run the command to upload the certificates to the secrets in the cluster:
./ess-upload-certs.bat
. - Activate the replica set and create the email-signature-server pods:
./ess-activate-replicas.bat
- Show the generated Azure Blob storage Shared Access Signature URL:
./ess-show-sas-url.bat
- Copy the Blob SAS URL and save it for use in Step 5 of the Implementation.
Comments
Article is closed for comments.