Add a public service
Sitecore comes with four public services: Content Management, Continuous Delivery, Identity, and Grafana. You can also add additional services.
To add a public service:
-
Create a new service names in the DNS zone that points to Azure Frontdoor. Alternatively, if you use
managedcloud.sitecore.comyou can create a service request. -
Add the new hostname as a secret to Azure Key Vault. The name of the secret must have the following pattern:
sitecore-{your service name}-host-name. -
In the Infrastructure repository, create a pull request with the following changes:
-
Extend the
frontdoor/backend-config.jsonfile with a new service. -
Retrieve the Azure Keyvault secrets with new hostnames created in step 2.
-
Add an Azure Frontdoor routing rule at the
frontdoor/main.tfto point the new service backend pool routing_rule. ViewHTTPS-cdas an example. -
Add the Azure Frontdoor frontend endpoint to register the hostname on the Azure Frontdoor side at the
frontdoor/main.tf.View
cm-frontend-endpointas an example. If you want the service to be protected by WAF, viewcd-frontend-endpointas an example.
-
-
To apply the changes, complete the pull request and run the
Frontdoorpipeline. -
In the Infrastructure repository, create a second pull request with the following changes:
-
Add the Azure Frontdoor custom HTTPS configuration at the
frontdoor/main.tf. Viewcm_https_configurationas an example (and replace the frontend_endpoints with the correct service endpoint).NoteWait until the previously triggered pipeline is finished.
-
-
In the Application repository, create a pull request and include the following items:
-
Declare a deployment for a particular application and two services. Add the deployment and the first service to the Sitecore namespace. View CM declaration under
/platform-artifacts/cm.yamlas an example. -
Add the second service to the Nginx namespace to route traffic from the Nginx to the Sitecore role and prepare the Kubernetes deployment for the service
external-services-example.yaml: -
Declare an Ingress for the service and prepare the Kubernetes deployment for the Ingress configuration
ingress-config-example.yaml: -
Add an Ansible role to run these deployments. It must contain at least two tasks to run the deployments (the deployment files must be under the
templatesfolder inside the role):The value of the host field must be the same as the
host_headerproperty in/frontdoor/backend-config.jsonfile in the Infrastructure repository. The value ofserviceNameproperty must be the same as service name declared in the Nginx namespace.
-
-
Complete the pull request.