From 057e9d7df02db2225fe26e7e078bc73a9c02a477 Mon Sep 17 00:00:00 2001 From: sc-marcusheath Date: Mon, 27 May 2024 20:59:03 -0400 Subject: [PATCH 01/17] Add SXP 10.4 connector modules --- compose/chub/5.2/ltsc2022/xm1/.env-example | 25 ++++++ .../ltsc2022/xm1/docker-compose.override.yml | 17 ++++ compose/chub/5.2/ltsc2022/xp0/.env-example | 25 ++++++ .../ltsc2022/xp0/docker-compose.override.yml | 11 +++ compose/chub/5.2/ltsc2022/xp1/.env-example | 25 ++++++ .../ltsc2022/xp1/docker-compose.override.yml | 17 ++++ compose/dcrm/9.0/ltsc2019/xp0/.env-example | 7 ++ .../ltsc2019/xp0/docker-compose.override.yml | 12 +++ compose/dcrm/9.0/ltsc2019/xp1/.env-example | 7 ++ .../ltsc2019/xp1/docker-compose.override.yml | 14 ++++ compose/dcrm/9.0/ltsc2022/xp0/.env-example | 7 ++ .../ltsc2022/xp0/docker-compose.override.yml | 12 +++ compose/dcrm/9.0/ltsc2022/xp1/.env-example | 7 ++ .../ltsc2022/xp1/docker-compose.override.yml | 14 ++++ compose/def-ts/9.0/ltsc2022/xp0/.env-example | 16 ++++ .../ltsc2022/xp0/tenant-service.override.yml | 24 ++++++ compose/def-ts/9.0/ltsc2022/xp1/.env-example | 16 ++++ .../ltsc2022/xp1/tenant-service.override.yml | 24 ++++++ compose/def/9.0/ltsc2022/xm1/.env-example | 7 ++ .../ltsc2022/xm1/docker-compose.override.yml | 3 + compose/def/9.0/ltsc2022/xp0/.env-example | 7 ++ .../ltsc2022/xp0/docker-compose.override.yml | 11 +++ compose/def/9.0/ltsc2022/xp1/.env-example | 7 ++ .../ltsc2022/xp1/docker-compose.override.yml | 15 ++++ compose/sfcrm/9.0/ltsc2022/xp0/.env-example | 3 + .../ltsc2022/xp0/docker-compose.override.yml | 9 ++ compose/sfcrm/9.0/ltsc2022/xp1/.env-example | 3 + .../ltsc2022/xp1/docker-compose.override.yml | 11 +++ compose/sfmcbde/9.0/ltsc2022/xp0/.env-example | 7 ++ .../ltsc2022/xp0/docker-compose.override.yml | 16 ++++ compose/sfmcbde/9.0/ltsc2022/xp1/.env-example | 7 ++ .../ltsc2022/xp1/docker-compose.override.yml | 20 +++++ compose/sfmcce/9.0/ltsc2022/xm1/.env-example | 3 + .../ltsc2022/xm1/docker-compose.override.yml | 5 ++ compose/sfmcce/9.0/ltsc2022/xp0/.env-example | 3 + .../ltsc2022/xp0/docker-compose.override.yml | 5 ++ compose/sfmcce/9.0/ltsc2022/xp1/.env-example | 3 + .../ltsc2022/xp1/docker-compose.override.yml | 5 ++ .../ltsc2022/overrides/xm1/kustomization.yaml | 17 ++++ .../ltsc2022/overrides/xm1/patch-cd.scch.yaml | 33 ++++++++ .../ltsc2022/overrides/xm1/patch-cm.scch.yaml | 53 ++++++++++++ .../overrides/xm1/secrets/kustomization.yaml | 21 +++++ .../xm1/secrets/sitecore-cmp-content-hub.txt | 1 + ...itecore-cmp-service-bus-entity-path-in.txt | 1 + ...tecore-cmp-service-bus-entity-path-out.txt | 1 + .../sitecore-cmp-service-bus-subscription.txt | 1 + .../xm1/secrets/sitecore-dam-content-hub.txt | 1 + .../sitecore-dam-external-redirect-key.txt | 1 + .../xm1/secrets/sitecore-dam-search-page.txt | 1 + .../ltsc2022/overrides/xp1/kustomization.yaml | 17 ++++ .../ltsc2022/overrides/xp1/patch-cd.scch.yaml | 33 ++++++++ .../ltsc2022/overrides/xp1/patch-cm.scch.yaml | 53 ++++++++++++ .../overrides/xp1/secrets/kustomization.yaml | 21 +++++ .../xp1/secrets/sitecore-cmp-content-hub.txt | 1 + ...itecore-cmp-service-bus-entity-path-in.txt | 1 + ...tecore-cmp-service-bus-entity-path-out.txt | 1 + .../sitecore-cmp-service-bus-subscription.txt | 1 + .../xp1/secrets/sitecore-dam-content-hub.txt | 1 + .../sitecore-dam-external-redirect-key.txt | 1 + .../xp1/secrets/sitecore-dam-search-page.txt | 1 + .../overrides/xp1/init/kustomization.yaml | 10 +++ .../ltsc2019/overrides/xp1/kustomization.yaml | 22 +++++ .../ltsc2019/overrides/xp1/patch-cm.dcrm.yaml | 28 +++++++ .../overrides/xp1/secrets/kustomization.yaml | 14 ++++ .../sitecore-data-exchange-staging.txt | 1 + .../overrides/xp1/secrets/sitecore-dcrm.txt | 1 + .../overrides/xp1/init/kustomization.yaml | 10 +++ .../ltsc2022/overrides/xp1/kustomization.yaml | 22 +++++ .../ltsc2022/overrides/xp1/patch-cm.dcrm.yaml | 28 +++++++ .../overrides/xp1/secrets/kustomization.yaml | 14 ++++ .../sitecore-data-exchange-staging.txt | 1 + .../overrides/xp1/secrets/sitecore-dcrm.txt | 1 + .../xp1/ingress-nginx/kustomization.yaml | 13 +++ .../xp1/ingress-nginx/patch-ingress.yaml | 19 +++++ .../ltsc2022/overrides/xp1/kustomization.yaml | 13 +++ .../overrides/xp1/secrets/kustomization.yaml | 21 +++++ .../tenant-service-sitecore-connection.txt | 1 + .../tenant-service-xconnect-collection.txt | 1 + .../xp1/secrets/tls/global-ts/readme.md | 0 k8s/def-ts/9.0/ltsc2022/overrides/xp1/ts.yaml | 82 +++++++++++++++++++ .../ltsc2022/overrides/xm1/kustomization.yaml | 10 +++ .../ltsc2022/overrides/xp1/kustomization.yaml | 24 ++++++ .../ltsc2022/overrides/xp1/patch-cd.def.yaml | 23 ++++++ .../ltsc2022/overrides/xp1/patch-cm.def.yaml | 23 ++++++ .../xp1/patch-xdbautomationworker.def.yaml | 23 ++++++ .../overrides/xp1/secrets/kustomization.yaml | 14 ++++ ...ecore-tenant-service-connection-string.txt | 1 + .../ltsc2022/overrides/xp1/kustomization.yaml | 22 +++++ .../9.0/ltsc2022/overrides/xp1/patch-cm.yaml | 23 ++++++ .../overrides/xp1/secrets/kustomization.yaml | 13 +++ ...ecore-salesforce-crm-connection-string.txt | 1 + .../ltsc2022/overrides/xp1/kustomization.yaml | 25 ++++++ .../9.0/ltsc2022/overrides/xp1/patch-cm.yaml | 23 ++++++ .../overrides/xp1/secrets/kustomization.yaml | 13 +++ ...ecore-salesforce-bde-connection-string.txt | 1 + .../ltsc2022/overrides/xm1/kustomization.yaml | 13 +++ .../9.0/ltsc2022/overrides/xm1/patch-cm.yaml | 23 ++++++ .../overrides/xm1/secrets/kustomization.yaml | 13 +++ ...rce-content-exchange-connection-string.txt | 1 + .../ltsc2022/overrides/xp1/kustomization.yaml | 13 +++ .../9.0/ltsc2022/overrides/xp1/patch-cm.yaml | 23 ++++++ .../overrides/xp1/secrets/kustomization.yaml | 13 +++ ...rce-content-exchange-connection-string.txt | 1 + 103 files changed, 1333 insertions(+) create mode 100644 compose/chub/5.2/ltsc2022/xm1/.env-example create mode 100644 compose/chub/5.2/ltsc2022/xm1/docker-compose.override.yml create mode 100644 compose/chub/5.2/ltsc2022/xp0/.env-example create mode 100644 compose/chub/5.2/ltsc2022/xp0/docker-compose.override.yml create mode 100644 compose/chub/5.2/ltsc2022/xp1/.env-example create mode 100644 compose/chub/5.2/ltsc2022/xp1/docker-compose.override.yml create mode 100644 compose/dcrm/9.0/ltsc2019/xp0/.env-example create mode 100644 compose/dcrm/9.0/ltsc2019/xp0/docker-compose.override.yml create mode 100644 compose/dcrm/9.0/ltsc2019/xp1/.env-example create mode 100644 compose/dcrm/9.0/ltsc2019/xp1/docker-compose.override.yml create mode 100644 compose/dcrm/9.0/ltsc2022/xp0/.env-example create mode 100644 compose/dcrm/9.0/ltsc2022/xp0/docker-compose.override.yml create mode 100644 compose/dcrm/9.0/ltsc2022/xp1/.env-example create mode 100644 compose/dcrm/9.0/ltsc2022/xp1/docker-compose.override.yml create mode 100644 compose/def-ts/9.0/ltsc2022/xp0/.env-example create mode 100644 compose/def-ts/9.0/ltsc2022/xp0/tenant-service.override.yml create mode 100644 compose/def-ts/9.0/ltsc2022/xp1/.env-example create mode 100644 compose/def-ts/9.0/ltsc2022/xp1/tenant-service.override.yml create mode 100644 compose/def/9.0/ltsc2022/xm1/.env-example create mode 100644 compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml create mode 100644 compose/def/9.0/ltsc2022/xp0/.env-example create mode 100644 compose/def/9.0/ltsc2022/xp0/docker-compose.override.yml create mode 100644 compose/def/9.0/ltsc2022/xp1/.env-example create mode 100644 compose/def/9.0/ltsc2022/xp1/docker-compose.override.yml create mode 100644 compose/sfcrm/9.0/ltsc2022/xp0/.env-example create mode 100644 compose/sfcrm/9.0/ltsc2022/xp0/docker-compose.override.yml create mode 100644 compose/sfcrm/9.0/ltsc2022/xp1/.env-example create mode 100644 compose/sfcrm/9.0/ltsc2022/xp1/docker-compose.override.yml create mode 100644 compose/sfmcbde/9.0/ltsc2022/xp0/.env-example create mode 100644 compose/sfmcbde/9.0/ltsc2022/xp0/docker-compose.override.yml create mode 100644 compose/sfmcbde/9.0/ltsc2022/xp1/.env-example create mode 100644 compose/sfmcbde/9.0/ltsc2022/xp1/docker-compose.override.yml create mode 100644 compose/sfmcce/9.0/ltsc2022/xm1/.env-example create mode 100644 compose/sfmcce/9.0/ltsc2022/xm1/docker-compose.override.yml create mode 100644 compose/sfmcce/9.0/ltsc2022/xp0/.env-example create mode 100644 compose/sfmcce/9.0/ltsc2022/xp0/docker-compose.override.yml create mode 100644 compose/sfmcce/9.0/ltsc2022/xp1/.env-example create mode 100644 compose/sfmcce/9.0/ltsc2022/xp1/docker-compose.override.yml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cd.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cm.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-search-page.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cd.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cm.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt create mode 100644 k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-search-page.txt create mode 100644 k8s/dcrm/9.0/ltsc2019/overrides/xp1/init/kustomization.yaml create mode 100644 k8s/dcrm/9.0/ltsc2019/overrides/xp1/kustomization.yaml create mode 100644 k8s/dcrm/9.0/ltsc2019/overrides/xp1/patch-cm.dcrm.yaml create mode 100644 k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-data-exchange-staging.txt create mode 100644 k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-dcrm.txt create mode 100644 k8s/dcrm/9.0/ltsc2022/overrides/xp1/init/kustomization.yaml create mode 100644 k8s/dcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml create mode 100644 k8s/dcrm/9.0/ltsc2022/overrides/xp1/patch-cm.dcrm.yaml create mode 100644 k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-data-exchange-staging.txt create mode 100644 k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-dcrm.txt create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/kustomization.yaml create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/patch-ingress.yaml create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/kustomization.yaml create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-sitecore-connection.txt create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-xconnect-collection.txt create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tls/global-ts/readme.md create mode 100644 k8s/def-ts/9.0/ltsc2022/overrides/xp1/ts.yaml create mode 100644 k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml create mode 100644 k8s/def/9.0/ltsc2022/overrides/xp1/kustomization.yaml create mode 100644 k8s/def/9.0/ltsc2022/overrides/xp1/patch-cd.def.yaml create mode 100644 k8s/def/9.0/ltsc2022/overrides/xp1/patch-cm.def.yaml create mode 100644 k8s/def/9.0/ltsc2022/overrides/xp1/patch-xdbautomationworker.def.yaml create mode 100644 k8s/def/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/def/9.0/ltsc2022/overrides/xp1/secrets/sitecore-tenant-service-connection-string.txt create mode 100644 k8s/sfcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml create mode 100644 k8s/sfcrm/9.0/ltsc2022/overrides/xp1/patch-cm.yaml create mode 100644 k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-crm-connection-string.txt create mode 100644 k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/kustomization.yaml create mode 100644 k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/patch-cm.yaml create mode 100644 k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-bde-connection-string.txt create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xm1/kustomization.yaml create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xm1/patch-cm.yaml create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/kustomization.yaml create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/sitecore-salesforce-content-exchange-connection-string.txt create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xp1/kustomization.yaml create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xp1/patch-cm.yaml create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-content-exchange-connection-string.txt diff --git a/compose/chub/5.2/ltsc2022/xm1/.env-example b/compose/chub/5.2/ltsc2022/xm1/.env-example new file mode 100644 index 00000000..389ae6d1 --- /dev/null +++ b/compose/chub/5.2/ltsc2022/xm1/.env-example @@ -0,0 +1,25 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The Azure service bus entity path in +CMP_ServiceBusEntityPathIn= + +#The Azure service bus subscription +CMP_ServiceBusSubscription= + +#The Azure service bus entity path out +CMP_ServiceBusEntityPathOut= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +DAM_ContentHub= + +#The Content Hub searh page URL +DAM_SearchPage= + +#The Content Hub external redirect key +DAM_ExternalRedirectKey= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +CMP_ContentHub= + +#Sitecore Platform topology to deploy +TOPOLOGY= \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2022/xm1/docker-compose.override.yml b/compose/chub/5.2/ltsc2022/xm1/docker-compose.override.yml new file mode 100644 index 00000000..da4bf642 --- /dev/null +++ b/compose/chub/5.2/ltsc2022/xm1/docker-compose.override.yml @@ -0,0 +1,17 @@ +services: + cd: + image: sitecore-chub-${TOPOLOGY}-cd:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} + cm: + image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_CMP.ContentHub: ${CMP_ContentHub} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn: ${CMP_ServiceBusEntityPathIn} + Sitecore_ConnectionStrings_CMP.ServiceBusSubscription: ${CMP_ServiceBusSubscription} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut: ${CMP_ServiceBusEntityPathOut} + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} diff --git a/compose/chub/5.2/ltsc2022/xp0/.env-example b/compose/chub/5.2/ltsc2022/xp0/.env-example new file mode 100644 index 00000000..389ae6d1 --- /dev/null +++ b/compose/chub/5.2/ltsc2022/xp0/.env-example @@ -0,0 +1,25 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The Azure service bus entity path in +CMP_ServiceBusEntityPathIn= + +#The Azure service bus subscription +CMP_ServiceBusSubscription= + +#The Azure service bus entity path out +CMP_ServiceBusEntityPathOut= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +DAM_ContentHub= + +#The Content Hub searh page URL +DAM_SearchPage= + +#The Content Hub external redirect key +DAM_ExternalRedirectKey= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +CMP_ContentHub= + +#Sitecore Platform topology to deploy +TOPOLOGY= \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2022/xp0/docker-compose.override.yml b/compose/chub/5.2/ltsc2022/xp0/docker-compose.override.yml new file mode 100644 index 00000000..85f5bc0b --- /dev/null +++ b/compose/chub/5.2/ltsc2022/xp0/docker-compose.override.yml @@ -0,0 +1,11 @@ +services: + cm: + image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_CMP.ContentHub: ${CMP_ContentHub} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn: ${CMP_ServiceBusEntityPathIn} + Sitecore_ConnectionStrings_CMP.ServiceBusSubscription: ${CMP_ServiceBusSubscription} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut: ${CMP_ServiceBusEntityPathOut} + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2022/xp1/.env-example b/compose/chub/5.2/ltsc2022/xp1/.env-example new file mode 100644 index 00000000..389ae6d1 --- /dev/null +++ b/compose/chub/5.2/ltsc2022/xp1/.env-example @@ -0,0 +1,25 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The Azure service bus entity path in +CMP_ServiceBusEntityPathIn= + +#The Azure service bus subscription +CMP_ServiceBusSubscription= + +#The Azure service bus entity path out +CMP_ServiceBusEntityPathOut= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +DAM_ContentHub= + +#The Content Hub searh page URL +DAM_SearchPage= + +#The Content Hub external redirect key +DAM_ExternalRedirectKey= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +CMP_ContentHub= + +#Sitecore Platform topology to deploy +TOPOLOGY= \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2022/xp1/docker-compose.override.yml b/compose/chub/5.2/ltsc2022/xp1/docker-compose.override.yml new file mode 100644 index 00000000..da4bf642 --- /dev/null +++ b/compose/chub/5.2/ltsc2022/xp1/docker-compose.override.yml @@ -0,0 +1,17 @@ +services: + cd: + image: sitecore-chub-${TOPOLOGY}-cd:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} + cm: + image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_CMP.ContentHub: ${CMP_ContentHub} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn: ${CMP_ServiceBusEntityPathIn} + Sitecore_ConnectionStrings_CMP.ServiceBusSubscription: ${CMP_ServiceBusSubscription} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut: ${CMP_ServiceBusEntityPathOut} + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} diff --git a/compose/dcrm/9.0/ltsc2019/xp0/.env-example b/compose/dcrm/9.0/ltsc2019/xp0/.env-example new file mode 100644 index 00000000..fafeb866 --- /dev/null +++ b/compose/dcrm/9.0/ltsc2019/xp0/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The connectionstring for Dynamics CRM Connect, for example, AuthType=Office365;Url=;Username=;Password= +ConnectionString_DCRM= + +#The connectionstring for Staging database, for example, user id=;password=;data source=;database= +ConnectionString_StagingDB= \ No newline at end of file diff --git a/compose/dcrm/9.0/ltsc2019/xp0/docker-compose.override.yml b/compose/dcrm/9.0/ltsc2019/xp0/docker-compose.override.yml new file mode 100644 index 00000000..79072687 --- /dev/null +++ b/compose/dcrm/9.0/ltsc2019/xp0/docker-compose.override.yml @@ -0,0 +1,12 @@ +services: + cm: + image: sitecore-dcrm-xp0-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DCRM: ${ConnectionString_DCRM} + Sitecore_ConnectionStrings_Sitecore.DataExchange.Staging: ${ConnectionString_StagingDB} + xdbsearchworker: + image: sitecore-dcrm-xp0-xdbsearchworker:${SITECORE_VERSION} + xconnect: + image: sitecore-dcrm-xp0-xconnect:${SITECORE_VERSION} + mssql-init: + image: sitecore-dcrm-xp0-mssql-init:${SITECORE_VERSION} \ No newline at end of file diff --git a/compose/dcrm/9.0/ltsc2019/xp1/.env-example b/compose/dcrm/9.0/ltsc2019/xp1/.env-example new file mode 100644 index 00000000..fafeb866 --- /dev/null +++ b/compose/dcrm/9.0/ltsc2019/xp1/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The connectionstring for Dynamics CRM Connect, for example, AuthType=Office365;Url=;Username=;Password= +ConnectionString_DCRM= + +#The connectionstring for Staging database, for example, user id=;password=;data source=;database= +ConnectionString_StagingDB= \ No newline at end of file diff --git a/compose/dcrm/9.0/ltsc2019/xp1/docker-compose.override.yml b/compose/dcrm/9.0/ltsc2019/xp1/docker-compose.override.yml new file mode 100644 index 00000000..ea546eed --- /dev/null +++ b/compose/dcrm/9.0/ltsc2019/xp1/docker-compose.override.yml @@ -0,0 +1,14 @@ +services: + cm: + image: sitecore-dcrm-xp1-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DCRM: ${ConnectionString_DCRM} + Sitecore_ConnectionStrings_Sitecore.DataExchange.Staging: ${ConnectionString_StagingDB} + xdbsearchworker: + image: sitecore-dcrm-xp1-xdbsearchworker:${SITECORE_VERSION} + xdbsearch: + image: sitecore-dcrm-xp1-xdbsearch:${SITECORE_VERSION} + xdbcollection: + image: sitecore-dcrm-xp1-xdbcollection:${SITECORE_VERSION} + mssql-init: + image: sitecore-dcrm-xp1-mssql-init:${SITECORE_VERSION} \ No newline at end of file diff --git a/compose/dcrm/9.0/ltsc2022/xp0/.env-example b/compose/dcrm/9.0/ltsc2022/xp0/.env-example new file mode 100644 index 00000000..fafeb866 --- /dev/null +++ b/compose/dcrm/9.0/ltsc2022/xp0/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The connectionstring for Dynamics CRM Connect, for example, AuthType=Office365;Url=;Username=;Password= +ConnectionString_DCRM= + +#The connectionstring for Staging database, for example, user id=;password=;data source=;database= +ConnectionString_StagingDB= \ No newline at end of file diff --git a/compose/dcrm/9.0/ltsc2022/xp0/docker-compose.override.yml b/compose/dcrm/9.0/ltsc2022/xp0/docker-compose.override.yml new file mode 100644 index 00000000..79072687 --- /dev/null +++ b/compose/dcrm/9.0/ltsc2022/xp0/docker-compose.override.yml @@ -0,0 +1,12 @@ +services: + cm: + image: sitecore-dcrm-xp0-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DCRM: ${ConnectionString_DCRM} + Sitecore_ConnectionStrings_Sitecore.DataExchange.Staging: ${ConnectionString_StagingDB} + xdbsearchworker: + image: sitecore-dcrm-xp0-xdbsearchworker:${SITECORE_VERSION} + xconnect: + image: sitecore-dcrm-xp0-xconnect:${SITECORE_VERSION} + mssql-init: + image: sitecore-dcrm-xp0-mssql-init:${SITECORE_VERSION} \ No newline at end of file diff --git a/compose/dcrm/9.0/ltsc2022/xp1/.env-example b/compose/dcrm/9.0/ltsc2022/xp1/.env-example new file mode 100644 index 00000000..fafeb866 --- /dev/null +++ b/compose/dcrm/9.0/ltsc2022/xp1/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The connectionstring for Dynamics CRM Connect, for example, AuthType=Office365;Url=;Username=;Password= +ConnectionString_DCRM= + +#The connectionstring for Staging database, for example, user id=;password=;data source=;database= +ConnectionString_StagingDB= \ No newline at end of file diff --git a/compose/dcrm/9.0/ltsc2022/xp1/docker-compose.override.yml b/compose/dcrm/9.0/ltsc2022/xp1/docker-compose.override.yml new file mode 100644 index 00000000..ea546eed --- /dev/null +++ b/compose/dcrm/9.0/ltsc2022/xp1/docker-compose.override.yml @@ -0,0 +1,14 @@ +services: + cm: + image: sitecore-dcrm-xp1-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DCRM: ${ConnectionString_DCRM} + Sitecore_ConnectionStrings_Sitecore.DataExchange.Staging: ${ConnectionString_StagingDB} + xdbsearchworker: + image: sitecore-dcrm-xp1-xdbsearchworker:${SITECORE_VERSION} + xdbsearch: + image: sitecore-dcrm-xp1-xdbsearch:${SITECORE_VERSION} + xdbcollection: + image: sitecore-dcrm-xp1-xdbcollection:${SITECORE_VERSION} + mssql-init: + image: sitecore-dcrm-xp1-mssql-init:${SITECORE_VERSION} \ No newline at end of file diff --git a/compose/def-ts/9.0/ltsc2022/xp0/.env-example b/compose/def-ts/9.0/ltsc2022/xp0/.env-example new file mode 100644 index 00000000..ba341613 --- /dev/null +++ b/compose/def-ts/9.0/ltsc2022/xp0/.env-example @@ -0,0 +1,16 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The host for the Tenant service website, for example, ts.localhost +TENANT_SERVICE_HOST= + +#The version tag for the Tenant service image +MODULE_VERSION= + +#The Tenant Id after it is created in Sitecore CM +SITECORE_TENANT_ID= + +#The Client Id of Sitecore Identity Server +SITECORE_CLIENT_ID= + +#The Client Secret of Sitecore Identity Server +SITECORE_CLIENT_SECRET= \ No newline at end of file diff --git a/compose/def-ts/9.0/ltsc2022/xp0/tenant-service.override.yml b/compose/def-ts/9.0/ltsc2022/xp0/tenant-service.override.yml new file mode 100644 index 00000000..b4703f82 --- /dev/null +++ b/compose/def-ts/9.0/ltsc2022/xp0/tenant-service.override.yml @@ -0,0 +1,24 @@ +services: + tenant-service: + isolation: ${ISOLATION} + image: scr.sitecore.com/sxp/modules/sitecore-tenant-service:${MODULE_VERSION} + depends_on: + id: + condition: service_healthy + cm: + condition: service_healthy + environment: + TenantService_ConnectionStrings_sitecore: database=master;tenant id=${SITECORE_TENANT_ID};host=http://cm;timeout=20;auth endpoint=http://id/;client secret=${SITECORE_CLIENT_SECRET};client id=${SITECORE_CLIENT_ID} + TenantService_ConnectionStrings_xconnect.collection: http://sitecore_xconnect + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + labels: + - "traefik.enable=true" + - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true" + - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000" + - "traefik.http.routers.ts-secure.entrypoints=websecure" + - "traefik.http.routers.ts-secure.rule=Host(`${TENANT_SERVICE_HOST}`)" + - "traefik.http.routers.ts-secure.tls=true" + - "traefik.http.routers.ts-secure.middlewares=force-STS-Header" + - "traefik.http.services.ts.loadbalancer.server.port=80" \ No newline at end of file diff --git a/compose/def-ts/9.0/ltsc2022/xp1/.env-example b/compose/def-ts/9.0/ltsc2022/xp1/.env-example new file mode 100644 index 00000000..ba341613 --- /dev/null +++ b/compose/def-ts/9.0/ltsc2022/xp1/.env-example @@ -0,0 +1,16 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The host for the Tenant service website, for example, ts.localhost +TENANT_SERVICE_HOST= + +#The version tag for the Tenant service image +MODULE_VERSION= + +#The Tenant Id after it is created in Sitecore CM +SITECORE_TENANT_ID= + +#The Client Id of Sitecore Identity Server +SITECORE_CLIENT_ID= + +#The Client Secret of Sitecore Identity Server +SITECORE_CLIENT_SECRET= \ No newline at end of file diff --git a/compose/def-ts/9.0/ltsc2022/xp1/tenant-service.override.yml b/compose/def-ts/9.0/ltsc2022/xp1/tenant-service.override.yml new file mode 100644 index 00000000..b4703f82 --- /dev/null +++ b/compose/def-ts/9.0/ltsc2022/xp1/tenant-service.override.yml @@ -0,0 +1,24 @@ +services: + tenant-service: + isolation: ${ISOLATION} + image: scr.sitecore.com/sxp/modules/sitecore-tenant-service:${MODULE_VERSION} + depends_on: + id: + condition: service_healthy + cm: + condition: service_healthy + environment: + TenantService_ConnectionStrings_sitecore: database=master;tenant id=${SITECORE_TENANT_ID};host=http://cm;timeout=20;auth endpoint=http://id/;client secret=${SITECORE_CLIENT_SECRET};client id=${SITECORE_CLIENT_ID} + TenantService_ConnectionStrings_xconnect.collection: http://sitecore_xconnect + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + labels: + - "traefik.enable=true" + - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true" + - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000" + - "traefik.http.routers.ts-secure.entrypoints=websecure" + - "traefik.http.routers.ts-secure.rule=Host(`${TENANT_SERVICE_HOST}`)" + - "traefik.http.routers.ts-secure.tls=true" + - "traefik.http.routers.ts-secure.middlewares=force-STS-Header" + - "traefik.http.services.ts.loadbalancer.server.port=80" \ No newline at end of file diff --git a/compose/def/9.0/ltsc2022/xm1/.env-example b/compose/def/9.0/ltsc2022/xm1/.env-example new file mode 100644 index 00000000..acc1bf44 --- /dev/null +++ b/compose/def/9.0/ltsc2022/xm1/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#Sitecore Platform topology to deploy +TOPOLOGY= + +#The host for the Tenant service website if necessary, for example, ts.localhost +TENANT_SERVICE_HOST= \ No newline at end of file diff --git a/compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml b/compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml new file mode 100644 index 00000000..f104cf18 --- /dev/null +++ b/compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml @@ -0,0 +1,3 @@ +services: + cm: + image: sitecore-def-${TOPOLOGY}-cm:${SITECORE_VERSION} \ No newline at end of file diff --git a/compose/def/9.0/ltsc2022/xp0/.env-example b/compose/def/9.0/ltsc2022/xp0/.env-example new file mode 100644 index 00000000..acc1bf44 --- /dev/null +++ b/compose/def/9.0/ltsc2022/xp0/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#Sitecore Platform topology to deploy +TOPOLOGY= + +#The host for the Tenant service website if necessary, for example, ts.localhost +TENANT_SERVICE_HOST= \ No newline at end of file diff --git a/compose/def/9.0/ltsc2022/xp0/docker-compose.override.yml b/compose/def/9.0/ltsc2022/xp0/docker-compose.override.yml new file mode 100644 index 00000000..b24bb22e --- /dev/null +++ b/compose/def/9.0/ltsc2022/xp0/docker-compose.override.yml @@ -0,0 +1,11 @@ +services: + cm: + image: sitecore-def-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_TenantService: https://${TENANT_SERVICE_HOST} + id: + image: sitecore-def-${TOPOLOGY}-id:${SITECORE_VERSION} + xdbautomationworker: + image: sitecore-def-${TOPOLOGY}-xdbautomationworker:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_TenantService: https://${TENANT_SERVICE_HOST} \ No newline at end of file diff --git a/compose/def/9.0/ltsc2022/xp1/.env-example b/compose/def/9.0/ltsc2022/xp1/.env-example new file mode 100644 index 00000000..acc1bf44 --- /dev/null +++ b/compose/def/9.0/ltsc2022/xp1/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#Sitecore Platform topology to deploy +TOPOLOGY= + +#The host for the Tenant service website if necessary, for example, ts.localhost +TENANT_SERVICE_HOST= \ No newline at end of file diff --git a/compose/def/9.0/ltsc2022/xp1/docker-compose.override.yml b/compose/def/9.0/ltsc2022/xp1/docker-compose.override.yml new file mode 100644 index 00000000..3870bb82 --- /dev/null +++ b/compose/def/9.0/ltsc2022/xp1/docker-compose.override.yml @@ -0,0 +1,15 @@ +services: + cd: + image: sitecore-def-${TOPOLOGY}-cd:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_TenantService: https://${TENANT_SERVICE_HOST} + cm: + image: sitecore-def-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_TenantService: https://${TENANT_SERVICE_HOST} + id: + image: sitecore-def-${TOPOLOGY}-id:${SITECORE_VERSION} + xdbautomationworker: + image: sitecore-def-${TOPOLOGY}-xdbautomationworker:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_TenantService: https://${TENANT_SERVICE_HOST} \ No newline at end of file diff --git a/compose/sfcrm/9.0/ltsc2022/xp0/.env-example b/compose/sfcrm/9.0/ltsc2022/xp0/.env-example new file mode 100644 index 00000000..cda06e0d --- /dev/null +++ b/compose/sfcrm/9.0/ltsc2022/xp0/.env-example @@ -0,0 +1,3 @@ +#Connection string for Salesforce Marketing Cloud. +#Example: client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] +MYSF_CONNECTIONSTRING=user id=[userid];password=[password];client id=[clientid];secret key=[secretkey];security token=[securitytoken] diff --git a/compose/sfcrm/9.0/ltsc2022/xp0/docker-compose.override.yml b/compose/sfcrm/9.0/ltsc2022/xp0/docker-compose.override.yml new file mode 100644 index 00000000..2929e945 --- /dev/null +++ b/compose/sfcrm/9.0/ltsc2022/xp0/docker-compose.override.yml @@ -0,0 +1,9 @@ +services: + cm: + image: sitecore-sfcrm-xp0-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_mysf: ${MYSF_CONNECTIONSTRING} + xdbsearchworker: + image: sitecore-sfcrm-xp0-xdbsearchworker:${SITECORE_VERSION} + xconnect: + image: sitecore-sfcrm-xp0-xconnect:${SITECORE_VERSION} diff --git a/compose/sfcrm/9.0/ltsc2022/xp1/.env-example b/compose/sfcrm/9.0/ltsc2022/xp1/.env-example new file mode 100644 index 00000000..cda06e0d --- /dev/null +++ b/compose/sfcrm/9.0/ltsc2022/xp1/.env-example @@ -0,0 +1,3 @@ +#Connection string for Salesforce Marketing Cloud. +#Example: client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] +MYSF_CONNECTIONSTRING=user id=[userid];password=[password];client id=[clientid];secret key=[secretkey];security token=[securitytoken] diff --git a/compose/sfcrm/9.0/ltsc2022/xp1/docker-compose.override.yml b/compose/sfcrm/9.0/ltsc2022/xp1/docker-compose.override.yml new file mode 100644 index 00000000..98ffb096 --- /dev/null +++ b/compose/sfcrm/9.0/ltsc2022/xp1/docker-compose.override.yml @@ -0,0 +1,11 @@ +services: + cm: + image: sitecore-sfcrm-xp1-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_mysf: ${MYSF_Connectionstring} + xdbsearchworker: + image: sitecore-sfcrm-xp1-xdbsearchworker:${SITECORE_VERSION} + xdbcollection: + image: sitecore-sfcrm-xp1-xdbcollection:${SITECORE_VERSION} + xdbsearch: + image: sitecore-sfcrm-xp1-xdbsearch:${SITECORE_VERSION} diff --git a/compose/sfmcbde/9.0/ltsc2022/xp0/.env-example b/compose/sfmcbde/9.0/ltsc2022/xp0/.env-example new file mode 100644 index 00000000..12374f6c --- /dev/null +++ b/compose/sfmcbde/9.0/ltsc2022/xp0/.env-example @@ -0,0 +1,7 @@ +#Connection string for Salesforce Marketing Cloud. +#Example: client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] +ConnectionString_sfmc= + +#Connection string for Tenant Service. +#Example: http://[TENANT_SERVICE_HOST] +ConnectionString_TS= \ No newline at end of file diff --git a/compose/sfmcbde/9.0/ltsc2022/xp0/docker-compose.override.yml b/compose/sfmcbde/9.0/ltsc2022/xp0/docker-compose.override.yml new file mode 100644 index 00000000..b513d9c0 --- /dev/null +++ b/compose/sfmcbde/9.0/ltsc2022/xp0/docker-compose.override.yml @@ -0,0 +1,16 @@ +services: + cm: + image: sitecore-sfmcbde-xp0-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_sfmc: ${ConnectionString_sfmc} + Sitecore_ConnectionStrings_TenantService: ${ConnectionString_TS} + id: + image: sitecore-sfmcbde-id:${SITECORE_VERSION} + xdbautomationworker: + image: sitecore-sfmcbde-xp0-xdbautomationworker:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_TenantService: ${ConnectionString_TS} + xdbsearchworker: + image: sitecore-sfmcbde-xp0-xdbsearchworker:${SITECORE_VERSION} + xconnect: + image: sitecore-sfmcbde-xp0-xconnect:${SITECORE_VERSION} diff --git a/compose/sfmcbde/9.0/ltsc2022/xp1/.env-example b/compose/sfmcbde/9.0/ltsc2022/xp1/.env-example new file mode 100644 index 00000000..12374f6c --- /dev/null +++ b/compose/sfmcbde/9.0/ltsc2022/xp1/.env-example @@ -0,0 +1,7 @@ +#Connection string for Salesforce Marketing Cloud. +#Example: client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] +ConnectionString_sfmc= + +#Connection string for Tenant Service. +#Example: http://[TENANT_SERVICE_HOST] +ConnectionString_TS= \ No newline at end of file diff --git a/compose/sfmcbde/9.0/ltsc2022/xp1/docker-compose.override.yml b/compose/sfmcbde/9.0/ltsc2022/xp1/docker-compose.override.yml new file mode 100644 index 00000000..e816d5ac --- /dev/null +++ b/compose/sfmcbde/9.0/ltsc2022/xp1/docker-compose.override.yml @@ -0,0 +1,20 @@ +services: + cm: + image: sitecore-sfmcbde-xp1-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_sfmc: ${ConnectionString_sfmc} + Sitecore_ConnectionStrings_TenantService: ${ConnectionString_TS} + id: + image: sitecore-sfmcbde-id:${SITECORE_VERSION} + xdbautomationworker: + image: sitecore-sfmcbde-xp1-xdbautomationworker:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_TenantService: ${ConnectionString_TS} + xdbsearchworker: + image: sitecore-sfmcbde-xp1-xdbsearchworker:${SITECORE_VERSION} + xdbsearch: + image: sitecore-sfmcbde-xp1-xdbsearch:${SITECORE_VERSION} + xdbcollection: + image: sitecore-sfmcbde-xp1-xdbcollection:${SITECORE_VERSION} + cd: + image: sitecore-sfmcbde-xp1-cd:${SITECORE_VERSION} diff --git a/compose/sfmcce/9.0/ltsc2022/xm1/.env-example b/compose/sfmcce/9.0/ltsc2022/xm1/.env-example new file mode 100644 index 00000000..41356131 --- /dev/null +++ b/compose/sfmcce/9.0/ltsc2022/xm1/.env-example @@ -0,0 +1,3 @@ +#Connection string for Salesforce Marketing Cloud. +#Example: client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] +SFMC_CONNECTIONSTRING= \ No newline at end of file diff --git a/compose/sfmcce/9.0/ltsc2022/xm1/docker-compose.override.yml b/compose/sfmcce/9.0/ltsc2022/xm1/docker-compose.override.yml new file mode 100644 index 00000000..dbaebafb --- /dev/null +++ b/compose/sfmcce/9.0/ltsc2022/xm1/docker-compose.override.yml @@ -0,0 +1,5 @@ +services: + cm: + image: sitecore-sfmcce-xm1-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_sfmc: ${SFMC_CONNECTIONSTRING} diff --git a/compose/sfmcce/9.0/ltsc2022/xp0/.env-example b/compose/sfmcce/9.0/ltsc2022/xp0/.env-example new file mode 100644 index 00000000..41356131 --- /dev/null +++ b/compose/sfmcce/9.0/ltsc2022/xp0/.env-example @@ -0,0 +1,3 @@ +#Connection string for Salesforce Marketing Cloud. +#Example: client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] +SFMC_CONNECTIONSTRING= \ No newline at end of file diff --git a/compose/sfmcce/9.0/ltsc2022/xp0/docker-compose.override.yml b/compose/sfmcce/9.0/ltsc2022/xp0/docker-compose.override.yml new file mode 100644 index 00000000..2379b82f --- /dev/null +++ b/compose/sfmcce/9.0/ltsc2022/xp0/docker-compose.override.yml @@ -0,0 +1,5 @@ +services: + cm: + image: sitecore-sfmcce-xp0-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_sfmc: ${SFMC_CONNECTIONSTRING} diff --git a/compose/sfmcce/9.0/ltsc2022/xp1/.env-example b/compose/sfmcce/9.0/ltsc2022/xp1/.env-example new file mode 100644 index 00000000..41356131 --- /dev/null +++ b/compose/sfmcce/9.0/ltsc2022/xp1/.env-example @@ -0,0 +1,3 @@ +#Connection string for Salesforce Marketing Cloud. +#Example: client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] +SFMC_CONNECTIONSTRING= \ No newline at end of file diff --git a/compose/sfmcce/9.0/ltsc2022/xp1/docker-compose.override.yml b/compose/sfmcce/9.0/ltsc2022/xp1/docker-compose.override.yml new file mode 100644 index 00000000..052b031b --- /dev/null +++ b/compose/sfmcce/9.0/ltsc2022/xp1/docker-compose.override.yml @@ -0,0 +1,5 @@ +services: + cm: + image: sitecore-sfmcce-xp1-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_sfmc: ${SFMC_CONNECTIONSTRING} diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/kustomization.yaml b/k8s/chub/5.2/ltsc2022/overrides/xm1/kustomization.yaml new file mode 100644 index 00000000..921fd6ee --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xm1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xm1-cd + newName: "{registry}/sitecore-chub-xm1-cd" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xm1-cm + newName: "{registry}/sitecore-chub-xm1-cm" + newTag: tag + +patchesStrategicMerge: + - patch-cd.scch.yaml + - patch-cm.scch.yaml diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cd.scch.yaml b/k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cd.scch.yaml new file mode 100644 index 00000000..f78d7bf4 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cd.scch.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cd +spec: + selector: + matchLabels: + app: cd + template: + metadata: + labels: + app: cd + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cd + env: + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cm.scch.yaml b/k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cm.scch.yaml new file mode 100644 index 00000000..12014622 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/patch-cm.scch.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cm + env: + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-in.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusSubscription + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-subscription.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-out.txt + - name: Sitecore_ConnectionStrings_CMP.ContentHub + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/kustomization.yaml b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/kustomization.yaml new file mode 100644 index 00000000..1ef4672e --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xm1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: scch-cmp-connection-strings + files: + - sitecore-cmp-service-bus-entity-path-in.txt + - sitecore-cmp-service-bus-subscription.txt + - sitecore-cmp-service-bus-entity-path-out.txt + - sitecore-cmp-content-hub.txt +- name: scch-dam-connection-strings + files: + - sitecore-dam-content-hub.txt + - sitecore-dam-search-page.txt + - sitecore-dam-external-redirect-key.txt diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-content-hub.txt b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt new file mode 100644 index 00000000..2e16b7cc --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt @@ -0,0 +1 @@ +[CMP_ServiceBusSubscription] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-content-hub.txt b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt new file mode 100644 index 00000000..4240afb5 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt @@ -0,0 +1 @@ +[DAM_ExternalRedirectKey] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-search-page.txt b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-search-page.txt new file mode 100644 index 00000000..96f63438 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xm1/secrets/sitecore-dam-search-page.txt @@ -0,0 +1 @@ +[DAM_SearchPage] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/kustomization.yaml b/k8s/chub/5.2/ltsc2022/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..9f5efee3 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cd + newName: "{registry}/sitecore-chub-xp1-cd" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-chub-xp1-cm" + newTag: tag + +patchesStrategicMerge: + - patch-cd.scch.yaml + - patch-cm.scch.yaml diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cd.scch.yaml b/k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cd.scch.yaml new file mode 100644 index 00000000..1d7748e3 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cd.scch.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cd +spec: + selector: + matchLabels: + app: cd + template: + metadata: + labels: + app: cd + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cd + env: + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cm.scch.yaml b/k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cm.scch.yaml new file mode 100644 index 00000000..5a79ed5c --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/patch-cm.scch.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-in.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusSubscription + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-subscription.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-out.txt + - name: Sitecore_ConnectionStrings_CMP.ContentHub + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/kustomization.yaml b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..7f41c0fb --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: scch-cmp-connection-strings + files: + - sitecore-cmp-service-bus-entity-path-in.txt + - sitecore-cmp-service-bus-subscription.txt + - sitecore-cmp-service-bus-entity-path-out.txt + - sitecore-cmp-content-hub.txt +- name: scch-dam-connection-strings + files: + - sitecore-dam-content-hub.txt + - sitecore-dam-search-page.txt + - sitecore-dam-external-redirect-key.txt diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-content-hub.txt b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt new file mode 100644 index 00000000..2e16b7cc --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt @@ -0,0 +1 @@ +[CMP_ServiceBusSubscription] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-content-hub.txt b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt new file mode 100644 index 00000000..4240afb5 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt @@ -0,0 +1 @@ +[DAM_ExternalRedirectKey] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-search-page.txt b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-search-page.txt new file mode 100644 index 00000000..96f63438 --- /dev/null +++ b/k8s/chub/5.2/ltsc2022/overrides/xp1/secrets/sitecore-dam-search-page.txt @@ -0,0 +1 @@ +[DAM_SearchPage] \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2019/overrides/xp1/init/kustomization.yaml b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/init/kustomization.yaml new file mode 100644 index 00000000..2a78c755 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/init/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/init + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-mssql-init + newName: "{registry}/sitecore-dcrm-xp1-mssql-init" + newTag: tag \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2019/overrides/xp1/kustomization.yaml b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..bf1a22e2 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-dcrm-xp1-cm" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbcollection + newName: "{registry}/sitecore-dcrm-xp1-xdbcollection" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearch + newName: "{registry}/sitecore-dcrm-xp1-xdbsearch" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearchworker + newName: "{registry}/sitecore-dcrm-xp1-xdbsearchworker" + newTag: tag + +patchesStrategicMerge: + - patch-cm.dcrm.yaml diff --git a/k8s/dcrm/9.0/ltsc2019/overrides/xp1/patch-cm.dcrm.yaml b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/patch-cm.dcrm.yaml new file mode 100644 index 00000000..d8bf2d29 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/patch-cm.dcrm.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_DCRM + valueFrom: + secretKeyRef: + name: sitecore-dcrm-connection-strings + key: sitecore-dcrm.txt + - name: Sitecore_ConnectionStrings_Sitecore.DataExchange.Staging + valueFrom: + secretKeyRef: + name: sitecore-dcrm-connection-strings + key: sitecore-data-exchange-staging.txt \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..120eca62 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-dcrm-connection-strings + files: + - sitecore-dcrm.txt + - sitecore-data-exchange-staging.txt diff --git a/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-data-exchange-staging.txt b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-data-exchange-staging.txt new file mode 100644 index 00000000..c5483395 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-data-exchange-staging.txt @@ -0,0 +1 @@ +user id=[user-id];password=[password];data source=[data-source];database=[database] \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-dcrm.txt b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-dcrm.txt new file mode 100644 index 00000000..97cdbcec --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2019/overrides/xp1/secrets/sitecore-dcrm.txt @@ -0,0 +1 @@ +AuthType=Office365;Url=[dynamics-crm-url];Username=[username];Password=[password] \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2022/overrides/xp1/init/kustomization.yaml b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/init/kustomization.yaml new file mode 100644 index 00000000..2a78c755 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/init/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/init + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-mssql-init + newName: "{registry}/sitecore-dcrm-xp1-mssql-init" + newTag: tag \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..bf1a22e2 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-dcrm-xp1-cm" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbcollection + newName: "{registry}/sitecore-dcrm-xp1-xdbcollection" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearch + newName: "{registry}/sitecore-dcrm-xp1-xdbsearch" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearchworker + newName: "{registry}/sitecore-dcrm-xp1-xdbsearchworker" + newTag: tag + +patchesStrategicMerge: + - patch-cm.dcrm.yaml diff --git a/k8s/dcrm/9.0/ltsc2022/overrides/xp1/patch-cm.dcrm.yaml b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/patch-cm.dcrm.yaml new file mode 100644 index 00000000..d8bf2d29 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/patch-cm.dcrm.yaml @@ -0,0 +1,28 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_DCRM + valueFrom: + secretKeyRef: + name: sitecore-dcrm-connection-strings + key: sitecore-dcrm.txt + - name: Sitecore_ConnectionStrings_Sitecore.DataExchange.Staging + valueFrom: + secretKeyRef: + name: sitecore-dcrm-connection-strings + key: sitecore-data-exchange-staging.txt \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..120eca62 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-dcrm-connection-strings + files: + - sitecore-dcrm.txt + - sitecore-data-exchange-staging.txt diff --git a/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-data-exchange-staging.txt b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-data-exchange-staging.txt new file mode 100644 index 00000000..c5483395 --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-data-exchange-staging.txt @@ -0,0 +1 @@ +user id=[user-id];password=[password];data source=[data-source];database=[database] \ No newline at end of file diff --git a/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-dcrm.txt b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-dcrm.txt new file mode 100644 index 00000000..97cdbcec --- /dev/null +++ b/k8s/dcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-dcrm.txt @@ -0,0 +1 @@ +AuthType=Office365;Url=[dynamics-crm-url];Username=[username];Password=[password] \ No newline at end of file diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/kustomization.yaml b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/kustomization.yaml new file mode 100644 index 00000000..1943f573 --- /dev/null +++ b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/ingress-nginx + +patchesJson6902: + - path: patch-ingress.yaml + target: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 \ No newline at end of file diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/patch-ingress.yaml b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/patch-ingress.yaml new file mode 100644 index 00000000..37b35257 --- /dev/null +++ b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ingress-nginx/patch-ingress.yaml @@ -0,0 +1,19 @@ +- op: add + path: "/spec/rules/0" + value: + host: ts.globalhost + http: + paths: + - path: "/" + pathType: Prefix + backend: + service: + name: ts + port: + number: 80 +- op: add + path: "/spec/tls/0" + value: + secretName: global-ts-tls + hosts: + - ts.globalhost \ No newline at end of file diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/kustomization.yaml b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..81c946dc --- /dev/null +++ b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../xp1 + +images: +- name: sitecore-ts + newName: scr.sitecore.com/sxp/sitecore-tenant-service + newTag: 9.0.0-ltsc2022 + +resources: +- ts.yaml \ No newline at end of file diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..d846935a --- /dev/null +++ b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: tenant-service-sitecore-connection + files: + - tenant-service-sitecore-connection.txt +- name: tenant-service-xconnect-collection + files: + - tenant-service-xconnect-collection.txt +- name: global-ts-tls + files: + - tls/global-ts/tls.key + - tls/global-ts/tls.crt + type: kubernetes.io/tls diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-sitecore-connection.txt b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-sitecore-connection.txt new file mode 100644 index 00000000..4f33ece3 --- /dev/null +++ b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-sitecore-connection.txt @@ -0,0 +1 @@ +database=master;tenant id=[tenant id];host=[cm endpoint];timeout=20;auth endpoint=[id endpoint];client secret=[client secret];client id=[client id] \ No newline at end of file diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-xconnect-collection.txt b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-xconnect-collection.txt new file mode 100644 index 00000000..0aea1d82 --- /dev/null +++ b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tenant-service-xconnect-collection.txt @@ -0,0 +1 @@ +[xconnect collection endpoint] \ No newline at end of file diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tls/global-ts/readme.md b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/secrets/tls/global-ts/readme.md new file mode 100644 index 00000000..e69de29b diff --git a/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ts.yaml b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ts.yaml new file mode 100644 index 00000000..0cedde3c --- /dev/null +++ b/k8s/def-ts/9.0/ltsc2022/overrides/xp1/ts.yaml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: Service +metadata: + name: ts +spec: + selector: + app: ts + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ts + labels: + app: ts +spec: + replicas: 1 + selector: + matchLabels: + app: ts + template: + metadata: + labels: + app: ts + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-ts + image: sitecore-ts + ports: + - containerPort: 80 + env: + - name: TenantService_ConnectionStrings_sitecore + valueFrom: + secretKeyRef: + name: tenant-service-sitecore-connection + key: tenant-service-sitecore-connection.txt + - name: TenantService_ConnectionStrings_xconnect.collection + valueFrom: + secretKeyRef: + name: tenant-service-xconnect-collection + key: tenant-service-xconnect-collection.txt + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: ts + resources: + requests: + memory: 200Mi + cpu: 20m + limits: + memory: 1Gi + cpu: 200m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry diff --git a/k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml b/k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml new file mode 100644 index 00000000..ef1dbdf1 --- /dev/null +++ b/k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xm1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xm1-cm + newName: "{registry}/sitecore-def-xm1-cm" + newTag: tag diff --git a/k8s/def/9.0/ltsc2022/overrides/xp1/kustomization.yaml b/k8s/def/9.0/ltsc2022/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..721c5a3c --- /dev/null +++ b/k8s/def/9.0/ltsc2022/overrides/xp1/kustomization.yaml @@ -0,0 +1,24 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-def-xp1-cm" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-cd + newName: "{registry}/sitecore-def-xp1-cd" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-id7 + newName: "{registry}/sitecore-def-xp1-id" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbautomationworker + newName: "{registry}/sitecore-def-xp1-xdbautomationworker" + newTag: tag + +patchesStrategicMerge: +- patch-cd.def.yaml +- patch-cm.def.yaml +- patch-xdbautomationworker.def.yaml \ No newline at end of file diff --git a/k8s/def/9.0/ltsc2022/overrides/xp1/patch-cd.def.yaml b/k8s/def/9.0/ltsc2022/overrides/xp1/patch-cd.def.yaml new file mode 100644 index 00000000..f5ce588e --- /dev/null +++ b/k8s/def/9.0/ltsc2022/overrides/xp1/patch-cd.def.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cd +spec: + selector: + matchLabels: + app: cd + template: + metadata: + labels: + app: cd + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cd + env: + - name: Sitecore_ConnectionStrings_tenantservice + valueFrom: + secretKeyRef: + name: sitecore-tenant-service + key: sitecore-tenant-service-connection-string.txt diff --git a/k8s/def/9.0/ltsc2022/overrides/xp1/patch-cm.def.yaml b/k8s/def/9.0/ltsc2022/overrides/xp1/patch-cm.def.yaml new file mode 100644 index 00000000..8da74496 --- /dev/null +++ b/k8s/def/9.0/ltsc2022/overrides/xp1/patch-cm.def.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_tenantservice + valueFrom: + secretKeyRef: + name: sitecore-tenant-service + key: sitecore-tenant-service-connection-string.txt diff --git a/k8s/def/9.0/ltsc2022/overrides/xp1/patch-xdbautomationworker.def.yaml b/k8s/def/9.0/ltsc2022/overrides/xp1/patch-xdbautomationworker.def.yaml new file mode 100644 index 00000000..39803a69 --- /dev/null +++ b/k8s/def/9.0/ltsc2022/overrides/xp1/patch-xdbautomationworker.def.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbautomationworker +spec: + selector: + matchLabels: + app: xdbautomationworker + template: + metadata: + labels: + app: xdbautomationworker + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-xdbautomationworker + env: + - name: Sitecore_ConnectionStrings_tenantservice + valueFrom: + secretKeyRef: + name: sitecore-tenant-service + key: sitecore-tenant-service-connection-string.txt diff --git a/k8s/def/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml b/k8s/def/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..cef5d3f1 --- /dev/null +++ b/k8s/def/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-tenant-service + files: + - sitecore-tenant-service-connection-string.txt + diff --git a/k8s/def/9.0/ltsc2022/overrides/xp1/secrets/sitecore-tenant-service-connection-string.txt b/k8s/def/9.0/ltsc2022/overrides/xp1/secrets/sitecore-tenant-service-connection-string.txt new file mode 100644 index 00000000..5f9d240f --- /dev/null +++ b/k8s/def/9.0/ltsc2022/overrides/xp1/secrets/sitecore-tenant-service-connection-string.txt @@ -0,0 +1 @@ +http://ts.globalhost \ No newline at end of file diff --git a/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..bf7d924a --- /dev/null +++ b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../k8s-sitecore-xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-sfcrm-xp1-cm" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbcollection + newName: "{registry}/sitecore-sfcrm-xp1-xdbcollection" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearch + newName: "{registry}/sitecore-sfcrm-xp1-xdbsearch" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearchworker + newName: "{registry}/sitecore-sfcrm-xp1-xdbsearchworker" + newTag: tag + +patchesStrategicMerge: +- patch-cm.yaml diff --git a/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/patch-cm.yaml b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/patch-cm.yaml new file mode 100644 index 00000000..56c5168d --- /dev/null +++ b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/patch-cm.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_mysf + valueFrom: + secretKeyRef: + name: salesforce-crm + key: sitecore-salesforce-crm-connection-string.txt \ No newline at end of file diff --git a/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..6e4c671f --- /dev/null +++ b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../k8s-sitecore-xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: salesforce-crm + files: + - sitecore-salesforce-crm-connection-string.txt \ No newline at end of file diff --git a/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-crm-connection-string.txt b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-crm-connection-string.txt new file mode 100644 index 00000000..74bcf85f --- /dev/null +++ b/k8s/sfcrm/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-crm-connection-string.txt @@ -0,0 +1 @@ +user id=[userid];password=[password];client id=[clientid];secret key=[secretkey];security token=[securitytoken] diff --git a/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/kustomization.yaml b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..be1d833e --- /dev/null +++ b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/kustomization.yaml @@ -0,0 +1,25 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../k8s-sitecore-xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-sfmcbde-xp1-cm" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbautomationworker + newName: "{registry}/sitecore-sfmcbde-xp1-xdbautomationworker" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbcollection + newName: "{registry}/sitecore-sfmcbde-xp1-xdbcollection" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearch + newName: "{registry}/sitecore-sfmcbde-xp1-xdbsearch" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-xdbsearchworker + newName: "{registry}/sitecore-sfmcbde-xp1-xdbsearchworker" + newTag: tag + +patchesStrategicMerge: +- patch-cm.yaml diff --git a/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/patch-cm.yaml b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/patch-cm.yaml new file mode 100644 index 00000000..e6befe02 --- /dev/null +++ b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/patch-cm.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_sfmc + valueFrom: + secretKeyRef: + name: sitecore-salesforce-bde + key: sitecore-salesforce-bde-connection-string.txt diff --git a/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..fcc3cb86 --- /dev/null +++ b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../k8s-sitecore-xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-salesforce-bde + files: + - sitecore-salesforce-bde-connection-string.txt diff --git a/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-bde-connection-string.txt b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-bde-connection-string.txt new file mode 100644 index 00000000..4786e7a2 --- /dev/null +++ b/k8s/sfmcbde/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-bde-connection-string.txt @@ -0,0 +1 @@ +client id=[clientid];client secret=[clientsecret];auth endpoint=[authendpoint];rest endpoint=[restendpoint];soap endpoint=[soapendpoint] diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/kustomization.yaml b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/kustomization.yaml new file mode 100644 index 00000000..5e08be58 --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../k8s-sitecore-xm1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xm1-cm + newName: "{registry}/sitecore-sfmcce-xm1-cm" + newTag: tag + +patchesStrategicMerge: +- patch-cm.yaml diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/patch-cm.yaml b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/patch-cm.yaml new file mode 100644 index 00000000..d0e80b57 --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/patch-cm.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cm + env: + - name: Sitecore_ConnectionStrings_sfmc + valueFrom: + secretKeyRef: + name: sitecore-salesforce-content-exchange + key: sitecore-salesforce-content-exchange-connection-string.txt \ No newline at end of file diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/kustomization.yaml b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/kustomization.yaml new file mode 100644 index 00000000..64c89e52 --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../k8s-sitecore-xm1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-salesforce-content-exchange + files: + - sitecore-salesforce-content-exchange-connection-string.txt \ No newline at end of file diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/sitecore-salesforce-content-exchange-connection-string.txt b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/sitecore-salesforce-content-exchange-connection-string.txt new file mode 100644 index 00000000..2106a17b --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xm1/secrets/sitecore-salesforce-content-exchange-connection-string.txt @@ -0,0 +1 @@ +client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] \ No newline at end of file diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/kustomization.yaml b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..624efef6 --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../k8s-sitecore-xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-sfmcce-xp1-cm" + newTag: tag + +patchesStrategicMerge: +- patch-cm.yaml \ No newline at end of file diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/patch-cm.yaml b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/patch-cm.yaml new file mode 100644 index 00000000..ae5b65a6 --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/patch-cm.yaml @@ -0,0 +1,23 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_sfmc + valueFrom: + secretKeyRef: + name: sitecore-salesforce-content-exchange + key: sitecore-salesforce-content-exchange-connection-string.txt \ No newline at end of file diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..818af036 --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../k8s-sitecore-xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-salesforce-content-exchange + files: + - sitecore-salesforce-content-exchange-connection-string.txt \ No newline at end of file diff --git a/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-content-exchange-connection-string.txt b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-content-exchange-connection-string.txt new file mode 100644 index 00000000..2106a17b --- /dev/null +++ b/k8s/sfmcce/9.0/ltsc2022/overrides/xp1/secrets/sitecore-salesforce-content-exchange-connection-string.txt @@ -0,0 +1 @@ +client id=[client id];client secret=[client secret];auth endpoint=[auth endpoint];rest endpoint=[rest endpoint];soap endpoint=[soap endpoint] \ No newline at end of file From e802744dfbcbbb22bd1bfb94f7007cb3319f2c5a Mon Sep 17 00:00:00 2001 From: Katerina Pontzolkova Date: Wed, 29 May 2024 15:21:05 +0300 Subject: [PATCH 02/17] Add Sitecore Container Deployment to 10.4.0 r010422.1819 --- .../ltsc2019/upgrade/xm1/compose-init.ps1 | 290 +++++++++++++ .../upgrade/xm1/docker-compose.upgrade.yml | 12 + .../sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env | 11 + .../ltsc2019/upgrade/xp1/compose-init.ps1 | 290 +++++++++++++ .../upgrade/xp1/docker-compose.upgrade.yml | 21 + .../sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env | 13 + compose/sxp/10.4/ltsc2019/xm1/.env | 29 ++ .../sxp/10.4/ltsc2019/xm1/compose-init.ps1 | 290 +++++++++++++ .../xm1/device-detection-data/readme.md | 1 + .../sxp/10.4/ltsc2019/xm1/docker-compose.yml | 182 ++++++++ .../10.4/ltsc2019/xm1/mssql-data/readme.md | 1 + .../sxp/10.4/ltsc2019/xm1/solr-data/readme.md | 1 + .../10.4/ltsc2019/xm1/traefik/certs/readme | 7 + .../traefik/config/dynamic/certs_config.yaml | 8 + compose/sxp/10.4/ltsc2019/xp0/.env | 28 ++ .../sxp/10.4/ltsc2019/xp0/compose-init.ps1 | 290 +++++++++++++ .../xp0/device-detection-data/readme.md | 1 + .../sxp/10.4/ltsc2019/xp0/docker-compose.yml | 234 ++++++++++ .../10.4/ltsc2019/xp0/mssql-data/readme.md | 1 + .../sxp/10.4/ltsc2019/xp0/solr-data/readme.md | 1 + .../10.4/ltsc2019/xp0/traefik/certs/readme | 5 + .../traefik/config/dynamic/certs_config.yaml | 6 + compose/sxp/10.4/ltsc2019/xp1/.env | 30 ++ .../sxp/10.4/ltsc2019/xp1/compose-init.ps1 | 290 +++++++++++++ .../xp1/device-detection-data/readme.md | 1 + .../sxp/10.4/ltsc2019/xp1/docker-compose.yml | 407 ++++++++++++++++++ .../10.4/ltsc2019/xp1/mssql-data/readme.md | 1 + .../sxp/10.4/ltsc2019/xp1/solr-data/readme.md | 1 + .../10.4/ltsc2019/xp1/traefik/certs/readme | 7 + .../traefik/config/dynamic/certs_config.yaml | 8 + .../database-upgrade-from-version.txt | 1 + .../database-upgrade-to-version.txt | 1 + .../xm1/configuration/sitecore-license.txt | 0 .../xm1/configuration/sql-database-prefix.txt | 1 + .../xm1/configuration/sql-password.txt | 0 .../upgrade/xm1/configuration/sql-server.txt | 1 + .../xm1/configuration/sql-user-name.txt | 0 .../ltsc2019/upgrade/xm1/k8s-init-upgrade.ps1 | 117 +++++ .../ltsc2019/upgrade/xm1/kustomization.yaml | 21 + .../ltsc2019/upgrade/xm1/mssql-upgrade.yaml | 60 +++ .../database-upgrade-from-version.txt | 1 + .../database-upgrade-to-version.txt | 1 + .../xp1/configuration/is-always-encrypted.txt | 1 + ...essing-engine-tasks-database-user-name.txt | 0 .../xp1/configuration/sitecore-license.txt | 0 .../xp1/configuration/sql-database-prefix.txt | 1 + .../xp1/configuration/sql-password.txt | 0 .../upgrade/xp1/configuration/sql-server.txt | 1 + .../xp1/configuration/sql-user-name.txt | 0 .../ltsc2019/upgrade/xp1/k8s-init-upgrade.ps1 | 117 +++++ .../ltsc2019/upgrade/xp1/kustomization.yaml | 23 + .../ltsc2019/upgrade/xp1/mssql-upgrade.yaml | 85 ++++ k8s/sxp/10.4/ltsc2019/xm1/cd.yaml | 154 +++++++ k8s/sxp/10.4/ltsc2019/xm1/cm.yaml | 198 +++++++++ .../10.4/ltsc2019/xm1/configmaps/cd-hostname | 1 + .../10.4/ltsc2019/xm1/configmaps/cm-hostname | 1 + .../10.4/ltsc2019/xm1/configmaps/id-hostname | 1 + .../xm1/configmaps/kustomization.yaml | 12 + .../ltsc2019/xm1/external/kustomization.yaml | 18 + k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml | 60 +++ k8s/sxp/10.4/ltsc2019/xm1/external/redis.yaml | 52 +++ k8s/sxp/10.4/ltsc2019/xm1/external/solr.yaml | 65 +++ k8s/sxp/10.4/ltsc2019/xm1/id.yaml | 120 ++++++ .../xm1/ingress-nginx/configuration.yaml | 6 + .../ltsc2019/xm1/ingress-nginx/ingress.yaml | 55 +++ .../xm1/ingress-nginx/kustomization.yaml | 69 +++ .../10.4/ltsc2019/xm1/init/kustomization.yaml | 14 + .../10.4/ltsc2019/xm1/init/mssql-init.yaml | 92 ++++ k8s/sxp/10.4/ltsc2019/xm1/init/solr-init.yaml | 27 ++ k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 | 372 ++++++++++++++++ k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml | 73 ++++ .../init/SearchStax/kustomization.yaml | 22 + .../sitecore-searchstax-account-name.txt | 0 .../SearchStax/sitecore-searchstax-apikey.txt | 0 .../sitecore-searchstax-deployment-uid.txt | 0 .../overlays/init/SearchStax/solr-init.yaml | 26 ++ .../ltsc2019/xm1/secrets/kustomization.yaml | 63 +++ .../xm1/secrets/sitecore-adminpassword.txt | 0 .../sitecore-core-database-password.txt | 0 .../sitecore-core-database-username.txt | 1 + ...ore-custom-database-prefix-update-from.txt | 0 .../sitecore-database-elastic-pool-name.txt | 0 .../xm1/secrets/sitecore-databasepassword.txt | 0 .../xm1/secrets/sitecore-databaseprefix.txt | 1 + .../secrets/sitecore-databaseservername.txt | 1 + .../xm1/secrets/sitecore-databaseusername.txt | 1 + .../sitecore-forms-database-password.txt | 0 .../sitecore-forms-database-username.txt | 1 + ...core-graphql-uploadmedia_encryptionkey.txt | 1 + .../secrets/sitecore-identitycertificate.txt | 0 .../sitecore-identitycertificatepassword.txt | 0 .../xm1/secrets/sitecore-identitysecret.txt | 0 .../ltsc2019/xm1/secrets/sitecore-license.txt | 0 .../xm1/secrets/sitecore-log-level-value.txt | 1 + .../sitecore-master-database-password.txt | 0 .../sitecore-master-database-username.txt | 1 + ...media-request-protection-shared-secret.txt | 1 + .../sitecore-solr-connection-string.txt | 1 + .../sitecore-solr-core-prefix-name.txt | 1 + .../secrets/sitecore-telerikencryptionkey.txt | 0 .../sitecore-web-database-password.txt | 0 .../sitecore-web-database-username.txt | 1 + .../xm1/secrets/tls/global-authority/readme | 2 + .../ltsc2019/xm1/secrets/tls/global-cd/readme | 3 + .../ltsc2019/xm1/secrets/tls/global-cm/readme | 3 + .../ltsc2019/xm1/secrets/tls/global-id/readme | 3 + .../volumes/azurefile/device-detection.yaml | 20 + .../ltsc2019/xm1/volumes/azurefile/logs.yaml | 20 + .../volumes/hostpath/device-detection.yaml | 27 ++ .../ltsc2019/xm1/volumes/hostpath/logs.yaml | 27 ++ k8s/sxp/10.4/ltsc2019/xp1/cd.yaml | 206 +++++++++ k8s/sxp/10.4/ltsc2019/xp1/cm.yaml | 291 +++++++++++++ .../10.4/ltsc2019/xp1/configmaps/cd-hostname | 1 + .../10.4/ltsc2019/xp1/configmaps/cm-hostname | 1 + .../10.4/ltsc2019/xp1/configmaps/id-hostname | 1 + .../xp1/configmaps/kustomization.yaml | 12 + .../10.4/ltsc2019/xp1/cortexprocessing.yaml | 111 +++++ .../ltsc2019/xp1/cortexprocessingworker.yaml | 130 ++++++ .../10.4/ltsc2019/xp1/cortexreporting.yaml | 99 +++++ .../ltsc2019/xp1/external/kustomization.yaml | 18 + k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml | 60 +++ k8s/sxp/10.4/ltsc2019/xp1/external/redis.yaml | 52 +++ k8s/sxp/10.4/ltsc2019/xp1/external/solr.yaml | 65 +++ k8s/sxp/10.4/ltsc2019/xp1/id.yaml | 120 ++++++ .../xp1/ingress-nginx/configuration.yaml | 6 + .../ltsc2019/xp1/ingress-nginx/ingress.yaml | 55 +++ .../xp1/ingress-nginx/kustomization.yaml | 69 +++ .../10.4/ltsc2019/xp1/init/kustomization.yaml | 14 + .../10.4/ltsc2019/xp1/init/mssql-init.yaml | 192 +++++++++ k8s/sxp/10.4/ltsc2019/xp1/init/solr-init.yaml | 27 ++ k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 | 372 ++++++++++++++++ k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml | 119 +++++ .../init/SearchStax/kustomization.yaml | 22 + .../sitecore-searchstax-account-name.txt | 0 .../SearchStax/sitecore-searchstax-apikey.txt | 0 .../sitecore-searchstax-deployment-uid.txt | 0 .../overlays/init/SearchStax/solr-init.yaml | 26 ++ k8s/sxp/10.4/ltsc2019/xp1/prc.yaml | 186 ++++++++ .../ltsc2019/xp1/secrets/kustomization.yaml | 89 ++++ .../xp1/secrets/sitecore-adminpassword.txt | 0 ...tion-shardmapmanager-database-password.txt | 0 ...tion-shardmapmanager-database-username.txt | 1 + .../sitecore-core-database-password.txt | 0 .../sitecore-core-database-username.txt | 1 + ...ore-custom-database-prefix-update-from.txt | 0 .../sitecore-database-elastic-pool-name.txt | 0 .../xp1/secrets/sitecore-databasepassword.txt | 0 .../xp1/secrets/sitecore-databaseprefix.txt | 1 + .../secrets/sitecore-databaseservername.txt | 1 + .../xp1/secrets/sitecore-databaseusername.txt | 1 + .../sitecore-exm-master-database-password.txt | 0 .../sitecore-exm-master-database-username.txt | 1 + .../sitecore-forms-database-password.txt | 0 .../sitecore-forms-database-username.txt | 1 + ...core-graphql-uploadmedia_encryptionkey.txt | 1 + .../secrets/sitecore-identitycertificate.txt | 0 .../sitecore-identitycertificatepassword.txt | 0 .../xp1/secrets/sitecore-identitysecret.txt | 0 .../ltsc2019/xp1/secrets/sitecore-license.txt | 0 .../xp1/secrets/sitecore-log-level-value.txt | 1 + ...marketing-automation-database-password.txt | 0 ...marketing-automation-database-username.txt | 1 + .../sitecore-master-database-password.txt | 0 .../sitecore-master-database-username.txt | 1 + ...media-request-protection-shared-secret.txt | 1 + .../sitecore-messaging-database-password.txt | 0 .../sitecore-messaging-database-username.txt | 1 + ...ssing-engine-storage-database-password.txt | 0 ...ssing-engine-storage-database-username.txt | 1 + ...cessing-engine-tasks-database-password.txt | 0 ...cessing-engine-tasks-database-username.txt | 1 + ...ore-processing-pools-database-password.txt | 0 ...ore-processing-pools-database-username.txt | 1 + ...ore-processing-tasks-database-password.txt | 0 ...ore-processing-tasks-database-username.txt | 1 + ...ecore-reference-data-database-password.txt | 0 ...ecore-reference-data-database-username.txt | 1 + .../sitecore-reporting-database-password.txt | 0 .../sitecore-reporting-database-username.txt | 1 + .../xp1/secrets/sitecore-reportingapikey.txt | 0 .../sitecore-solr-connection-string-xdb.txt | 1 + .../sitecore-solr-connection-string.txt | 1 + .../sitecore-solr-core-prefix-name.txt | 1 + .../secrets/sitecore-telerikencryptionkey.txt | 0 .../sitecore-web-database-password.txt | 0 .../sitecore-web-database-username.txt | 1 + .../xp1/secrets/tls/global-authority/readme | 2 + .../ltsc2019/xp1/secrets/tls/global-cd/readme | 3 + .../ltsc2019/xp1/secrets/tls/global-cm/readme | 3 + .../ltsc2019/xp1/secrets/tls/global-id/readme | 3 + .../volumes/azurefile/device-detection.yaml | 20 + .../ltsc2019/xp1/volumes/azurefile/logs.yaml | 20 + .../xp1/volumes/azurefile/submit-queue.yaml | 20 + .../volumes/hostpath/device-detection.yaml | 27 ++ .../ltsc2019/xp1/volumes/hostpath/logs.yaml | 27 ++ .../xp1/volumes/hostpath/submit-queue.yaml | 27 ++ k8s/sxp/10.4/ltsc2019/xp1/xdbautomation.yaml | 134 ++++++ .../10.4/ltsc2019/xp1/xdbautomationrpt.yaml | 111 +++++ .../ltsc2019/xp1/xdbautomationworker.yaml | 128 ++++++ k8s/sxp/10.4/ltsc2019/xp1/xdbcollection.yaml | 147 +++++++ k8s/sxp/10.4/ltsc2019/xp1/xdbrefdata.yaml | 99 +++++ k8s/sxp/10.4/ltsc2019/xp1/xdbsearch.yaml | 156 +++++++ .../10.4/ltsc2019/xp1/xdbsearchworker.yaml | 104 +++++ 203 files changed, 7915 insertions(+) create mode 100644 compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 create mode 100644 compose/sxp/10.4/ltsc2019/upgrade/xm1/docker-compose.upgrade.yml create mode 100644 compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env create mode 100644 compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 create mode 100644 compose/sxp/10.4/ltsc2019/upgrade/xp1/docker-compose.upgrade.yml create mode 100644 compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env create mode 100644 compose/sxp/10.4/ltsc2019/xm1/.env create mode 100644 compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 create mode 100644 compose/sxp/10.4/ltsc2019/xm1/device-detection-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml create mode 100644 compose/sxp/10.4/ltsc2019/xm1/mssql-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xm1/solr-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xm1/traefik/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xm1/traefik/config/dynamic/certs_config.yaml create mode 100644 compose/sxp/10.4/ltsc2019/xp0/.env create mode 100644 compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 create mode 100644 compose/sxp/10.4/ltsc2019/xp0/device-detection-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml create mode 100644 compose/sxp/10.4/ltsc2019/xp0/mssql-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xp0/solr-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xp0/traefik/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xp0/traefik/config/dynamic/certs_config.yaml create mode 100644 compose/sxp/10.4/ltsc2019/xp1/.env create mode 100644 compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 create mode 100644 compose/sxp/10.4/ltsc2019/xp1/device-detection-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml create mode 100644 compose/sxp/10.4/ltsc2019/xp1/mssql-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xp1/solr-data/readme.md create mode 100644 compose/sxp/10.4/ltsc2019/xp1/traefik/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xp1/traefik/config/dynamic/certs_config.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-from-version.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sitecore-license.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-database-prefix.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-server.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-user-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/k8s-init-upgrade.ps1 create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xm1/mssql-upgrade.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-from-version.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/is-always-encrypted.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/processing-engine-tasks-database-user-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sitecore-license.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-database-prefix.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-server.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-user-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/k8s-init-upgrade.ps1 create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/upgrade/xp1/mssql-upgrade.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/cd.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/cm.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/configmaps/cd-hostname create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/configmaps/cm-hostname create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/configmaps/id-hostname create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/configmaps/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/external/redis.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/external/solr.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/id.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/configuration.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/ingress.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/init/mssql-init.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/init/solr-init.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-account-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-apikey.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-deployment-uid.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/solr-init.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-adminpassword.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-core-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-core-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-custom-database-prefix-update-from.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-database-elastic-pool-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databasepassword.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseprefix.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseservername.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseusername.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-forms-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-forms-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitycertificate.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitycertificatepassword.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitysecret.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-license.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-log-level-value.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-master-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-master-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-media-request-protection-shared-secret.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-connection-string.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-core-prefix-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-telerikencryptionkey.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-web-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-web-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-authority/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cd/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cm/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-id/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/device-detection.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/logs.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/device-detection.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/logs.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/cd.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/cm.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/configmaps/cd-hostname create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/configmaps/cm-hostname create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/configmaps/id-hostname create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/configmaps/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/cortexprocessing.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/cortexprocessingworker.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/cortexreporting.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/external/redis.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/external/solr.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/id.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/configuration.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/ingress.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/init/mssql-init.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/init/solr-init.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-account-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-apikey.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-deployment-uid.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/solr-init.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/prc.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-adminpassword.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-collection-shardmapmanager-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-collection-shardmapmanager-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-core-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-core-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-custom-database-prefix-update-from.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-database-elastic-pool-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databasepassword.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseprefix.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseservername.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseusername.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-exm-master-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-exm-master-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-forms-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-forms-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitycertificate.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitycertificatepassword.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitysecret.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-license.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-log-level-value.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-marketing-automation-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-marketing-automation-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-master-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-master-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-media-request-protection-shared-secret.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-messaging-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-messaging-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-storage-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-storage-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-tasks-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-tasks-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-pools-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-pools-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-tasks-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-tasks-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reference-data-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reference-data-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reporting-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reporting-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reportingapikey.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string-xdb.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-core-prefix-name.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-telerikencryptionkey.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-web-database-password.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-web-database-username.txt create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-authority/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cd/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cm/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-id/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/device-detection.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/logs.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/submit-queue.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/device-detection.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/logs.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/submit-queue.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/xdbautomation.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/xdbautomationrpt.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/xdbautomationworker.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/xdbcollection.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/xdbrefdata.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/xdbsearch.yaml create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/xdbsearchworker.yaml diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 new file mode 100644 index 00000000..cc7b9050 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 @@ -0,0 +1,290 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp0","xp1")] + [string]$Topology = "xm1", + + [string] + [ValidateNotNullOrEmpty()] + $EnvFilePath = ".\.env", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SitecoreAdminPassword = "Password12345", + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SqlSaPassword = "Password12345", + + [string] + $SqlServer = "mssql", + + [string] + $SqlUserName = "sa", + + [boolean] + $IsAlwaysEncrypted = $false, + + [string] + $ProcessingEngineTasksDatabaseUserName = "dbo", + + [string] + $CdHost = "$($Topology)cd.localhost", + + [string] + $CmHost = "$($Topology)cm.localhost", + + [string] + $IdHost = "$($Topology)id.localhost", + + # The link to a source NuGet Feed has been updated. + # In case of a name conflict with local PSRepository we suggest unregistering previous version from the host. + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $CertDataFolder = ".\traefik\certs", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; +[boolean]$RootCertificateCreated = $false; + +function Get-EnvironmentVariableNameList { + param( + [string]$EnvFilePath + ) + + $envVariableNameList = @() + $envVariables = Get-Content -Path $EnvFilePath + foreach ($envVariable in $envVariables) { + $envName = $envVariable.Split('=')[0] + $envVariableNameList += $envName + } + return $envVariableNameList +} + +function Populate-EnvironmentFile { + param( + [string]$EnvFilePath, + [hashtable]$EnvVariablesTable + ) + + Write-Information -MessageData "Starting populating '$EnvFilePath' env file variables..." -InformationAction Continue + + $envVariableNameList = Get-EnvironmentVariableNameList -EnvFilePath $EnvFilePath + foreach ($envVariableName in $envVariableNameList){ + if ($EnvVariablesTable.ContainsKey($envVariableName)) { + Set-EnvFileVariable $envVariableName -Value $($EnvVariablesTable[$envVariableName]) -Path $EnvFilePath + } + } + + Write-Information -MessageData "Finish populating '$EnvFilePath' env file variables." -InformationAction Continue +} + +function Add-WindowsHostsFileEntries{ + param( + [string]$EnvFilePath, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting adding Windows hosts file entries for '$Topology' topology..." -InformationAction Continue + + Add-HostsEntry "$CmHost" + Add-HostsEntry "$IdHost" + if (($Topology -eq "xm1") -or ($Topology -eq "xp1")) { + Add-HostsEntry "$CdHost" + } + + Write-Information -MessageData "Finish adding Windows hosts file entries for '$Topology' topology." -InformationAction Continue +} + +function Create-Certificates{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue + + $dnsNames = @("$CdHost", "$CmHost", "$IdHost") + + if ($Topology -eq "xp0") { + $dnsNames = @("$CmHost", "$IdHost") + } + + # Check that Certificate or Key files already exist in the $CertDataFolder + $existingCertificateFiles = Get-ChildItem "$CertDataFolder\*" -Include *.crt, *.key + + if (-not $existingCertificateFiles){ + + # Create Root Certificate file + $rootKey = Create-RSAKey -KeyLength 4096 + $rootCertificate = Create-SelfSignedCertificate -Key $rootKey + Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" + + # Create Certificate and Key files for each Sitecore role + $dnsNames | ForEach-Object { + $selfSignedKey = Create-RSAKey + $certificate = Create-SelfSignedCertificateWithSignature -Key $selfSignedKey -CommonName $_ -DnsName $_ -RootCertificate $rootCertificate + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$CertDataFolder\$_.key" + Create-CertificateFile -Certificate $certificate -OutCertPath "$CertDataFolder\$_.crt" + } + + Write-Information -MessageData "Finish creating certificates for '$Topology' topology." -InformationAction Continue + return $true + } + else { + Write-Information -MessageData "Certificate files already exist for '$Topology' topology." -InformationAction Continue + return $false + } +} + +function Update-CertsConfigFile{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + $certsConfigFile = Join-Path (Split-Path $CertDataFolder -Parent) "config\dynamic\certs_config.yaml" + $certificatePath = "C:\etc\traefik\certs\" + + $customHostNames = @("$CdHost", "$CmHost", "$IdHost") + if ($Topology -eq "xp0") { + $customHostNames = @("$CmHost", "$IdHost") + } + + $newFileContent = @("tls:", " certificates:") + + foreach ($customHostName in $customHostNames){ + $newFileContent += " - certFile: " + $certificatePath + $customHostName + ".crt" + $newFileContent += " keyFile: " + $certificatePath + $customHostName + ".key" + } + + # Clear certs_config.yaml file + Clear-Content -Path $certsConfigFile + + # Setting new content to the certs_config.yaml file + $newFileContent | Set-Content $certsConfigFile + + Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue +} + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Invoke-ComposeInit { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial + $envVariablesTable = @{ + "SITECORE_ADMIN_PASSWORD" = $SitecoreAdminPassword + "SQL_SA_PASSWORD" = $SqlSaPassword + "REPORTING_API_KEY" = "00112233445566778899AABBCCDDEEFF" + "TELERIK_ENCRYPTION_KEY" = Get-SitecoreRandomString 128 -DisallowSpecial + "MEDIA_REQUEST_PROTECTION_SHARED_SECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_IDSECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_ID_CERTIFICATE" = (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText) -KeyLength 2048) + "SITECORE_ID_CERTIFICATE_PASSWORD" = $idCertPassword + "SITECORE_LICENSE" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "SQL_SERVER" = $SqlServer + "SQL_USERNAME" = $SqlUserName + "SQL_PASSWORD" = $SqlSaPassword + "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted + "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName + "CD_HOST" = $CdHost + "CM_HOST" = $CmHost + "ID_HOST" = $IdHost + "SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY" = Get-SitecoreRandomString 16 -DisallowSpecial + } + + $envFile = Split-Path $EnvFilePath -Leaf + + if($envFile -eq "upgrade.env"){ + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + }else{ + if (!(Test-Path $CertDataFolder)) { + Write-Warning -Message "The certificate '$CertDataFolder' path isn't valid. Please, specify another path for certificates." + return + } + + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + + # Configure TLS/HTTPS certificates + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + + # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. + if ($RootCertificateCreated){ + Update-CertsConfigFile -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } + + # Install Root Certificate if it was created + if ($RootCertificateCreated){ + Import-Certificate -FilePath "$CertDataFolder\RootCA.crt" -CertStoreLocation "Cert:\LocalMachine\Root" + } + + # Add Windows hosts file entries + Add-WindowsHostsFileEntries -EnvFilePath $EnvFilePath -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "compose-init-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-ComposeInit *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xm1/docker-compose.upgrade.yml b/compose/sxp/10.4/ltsc2019/upgrade/xm1/docker-compose.upgrade.yml new file mode 100644 index 00000000..7d1c8e99 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/upgrade/xm1/docker-compose.upgrade.yml @@ -0,0 +1,12 @@ +services: + mssql-upgrade: + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-upgrade:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Experienceforms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Experienceforms;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Database_Upgrade_From_Version: ${DATABASE_UPGRADE_FROM_VERSION} + Database_Upgrade_To_Version: ${DATABASE_UPGRADE_TO_VERSION} + Sitecore_License: ${SITECORE_LICENSE} + isolation: ${ISOLATION} \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env b/compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env new file mode 100644 index 00000000..345a833b --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env @@ -0,0 +1,11 @@ +COMPOSE_PROJECT_NAME=sitecore-xm1 +SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ +SITECORE_VERSION=10.4-ltsc2019 +SQL_DATABASE_PREFIX=Sitecore +SQL_SERVER= +SQL_USERNAME= +SQL_PASSWORD= +DATABASE_UPGRADE_FROM_VERSION=10.3.0 +DATABASE_UPGRADE_TO_VERSION=10.4.0 +SITECORE_LICENSE= +ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 new file mode 100644 index 00000000..a28b66c9 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 @@ -0,0 +1,290 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp0","xp1")] + [string]$Topology = "xp1", + + [string] + [ValidateNotNullOrEmpty()] + $EnvFilePath = ".\.env", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SitecoreAdminPassword = "Password12345", + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SqlSaPassword = "Password12345", + + [string] + $SqlServer = "mssql", + + [string] + $SqlUserName = "sa", + + [boolean] + $IsAlwaysEncrypted = $false, + + [string] + $ProcessingEngineTasksDatabaseUserName = "dbo", + + [string] + $CdHost = "$($Topology)cd.localhost", + + [string] + $CmHost = "$($Topology)cm.localhost", + + [string] + $IdHost = "$($Topology)id.localhost", + + # The link to a source NuGet Feed has been updated. + # In case of a name conflict with local PSRepository we suggest unregistering previous version from the host. + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $CertDataFolder = ".\traefik\certs", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; +[boolean]$RootCertificateCreated = $false; + +function Get-EnvironmentVariableNameList { + param( + [string]$EnvFilePath + ) + + $envVariableNameList = @() + $envVariables = Get-Content -Path $EnvFilePath + foreach ($envVariable in $envVariables) { + $envName = $envVariable.Split('=')[0] + $envVariableNameList += $envName + } + return $envVariableNameList +} + +function Populate-EnvironmentFile { + param( + [string]$EnvFilePath, + [hashtable]$EnvVariablesTable + ) + + Write-Information -MessageData "Starting populating '$EnvFilePath' env file variables..." -InformationAction Continue + + $envVariableNameList = Get-EnvironmentVariableNameList -EnvFilePath $EnvFilePath + foreach ($envVariableName in $envVariableNameList){ + if ($EnvVariablesTable.ContainsKey($envVariableName)) { + Set-EnvFileVariable $envVariableName -Value $($EnvVariablesTable[$envVariableName]) -Path $EnvFilePath + } + } + + Write-Information -MessageData "Finish populating '$EnvFilePath' env file variables." -InformationAction Continue +} + +function Add-WindowsHostsFileEntries{ + param( + [string]$EnvFilePath, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting adding Windows hosts file entries for '$Topology' topology..." -InformationAction Continue + + Add-HostsEntry "$CmHost" + Add-HostsEntry "$IdHost" + if (($Topology -eq "xm1") -or ($Topology -eq "xp1")) { + Add-HostsEntry "$CdHost" + } + + Write-Information -MessageData "Finish adding Windows hosts file entries for '$Topology' topology." -InformationAction Continue +} + +function Create-Certificates{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue + + $dnsNames = @("$CdHost", "$CmHost", "$IdHost") + + if ($Topology -eq "xp0") { + $dnsNames = @("$CmHost", "$IdHost") + } + + # Check that Certificate or Key files already exist in the $CertDataFolder + $existingCertificateFiles = Get-ChildItem "$CertDataFolder\*" -Include *.crt, *.key + + if (-not $existingCertificateFiles){ + + # Create Root Certificate file + $rootKey = Create-RSAKey -KeyLength 4096 + $rootCertificate = Create-SelfSignedCertificate -Key $rootKey + Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" + + # Create Certificate and Key files for each Sitecore role + $dnsNames | ForEach-Object { + $selfSignedKey = Create-RSAKey + $certificate = Create-SelfSignedCertificateWithSignature -Key $selfSignedKey -CommonName $_ -DnsName $_ -RootCertificate $rootCertificate + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$CertDataFolder\$_.key" + Create-CertificateFile -Certificate $certificate -OutCertPath "$CertDataFolder\$_.crt" + } + + Write-Information -MessageData "Finish creating certificates for '$Topology' topology." -InformationAction Continue + return $true + } + else { + Write-Information -MessageData "Certificate files already exist for '$Topology' topology." -InformationAction Continue + return $false + } +} + +function Update-CertsConfigFile{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + $certsConfigFile = Join-Path (Split-Path $CertDataFolder -Parent) "config\dynamic\certs_config.yaml" + $certificatePath = "C:\etc\traefik\certs\" + + $customHostNames = @("$CdHost", "$CmHost", "$IdHost") + if ($Topology -eq "xp0") { + $customHostNames = @("$CmHost", "$IdHost") + } + + $newFileContent = @("tls:", " certificates:") + + foreach ($customHostName in $customHostNames){ + $newFileContent += " - certFile: " + $certificatePath + $customHostName + ".crt" + $newFileContent += " keyFile: " + $certificatePath + $customHostName + ".key" + } + + # Clear certs_config.yaml file + Clear-Content -Path $certsConfigFile + + # Setting new content to the certs_config.yaml file + $newFileContent | Set-Content $certsConfigFile + + Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue +} + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Invoke-ComposeInit { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial + $envVariablesTable = @{ + "SITECORE_ADMIN_PASSWORD" = $SitecoreAdminPassword + "SQL_SA_PASSWORD" = $SqlSaPassword + "REPORTING_API_KEY" = "00112233445566778899AABBCCDDEEFF" + "TELERIK_ENCRYPTION_KEY" = Get-SitecoreRandomString 128 -DisallowSpecial + "MEDIA_REQUEST_PROTECTION_SHARED_SECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_IDSECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_ID_CERTIFICATE" = (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText) -KeyLength 2048) + "SITECORE_ID_CERTIFICATE_PASSWORD" = $idCertPassword + "SITECORE_LICENSE" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "SQL_SERVER" = $SqlServer + "SQL_USERNAME" = $SqlUserName + "SQL_PASSWORD" = $SqlSaPassword + "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted + "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName + "CD_HOST" = $CdHost + "CM_HOST" = $CmHost + "ID_HOST" = $IdHost + "SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY" = Get-SitecoreRandomString 16 -DisallowSpecial + } + + $envFile = Split-Path $EnvFilePath -Leaf + + if($envFile -eq "upgrade.env"){ + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + }else{ + if (!(Test-Path $CertDataFolder)) { + Write-Warning -Message "The certificate '$CertDataFolder' path isn't valid. Please, specify another path for certificates." + return + } + + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + + # Configure TLS/HTTPS certificates + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + + # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. + if ($RootCertificateCreated){ + Update-CertsConfigFile -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } + + # Install Root Certificate if it was created + if ($RootCertificateCreated){ + Import-Certificate -FilePath "$CertDataFolder\RootCA.crt" -CertStoreLocation "Cert:\LocalMachine\Root" + } + + # Add Windows hosts file entries + Add-WindowsHostsFileEntries -EnvFilePath $EnvFilePath -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "compose-init-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-ComposeInit *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xp1/docker-compose.upgrade.yml b/compose/sxp/10.4/ltsc2019/upgrade/xp1/docker-compose.upgrade.yml new file mode 100644 index 00000000..db32d208 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/upgrade/xp1/docker-compose.upgrade.yml @@ -0,0 +1,21 @@ +services: + mssql-upgrade: + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-upgrade:${SITECORE_VERSION} + environment: + IS_ALWAYS_ENCRYPTED: ${IS_ALWAYS_ENCRYPTED} + PROCESSING_ENGINE_TASKS_DATABASE_USERNAME: ${PROCESSING_ENGINE_TASKS_DATABASE_USERNAME} + Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Experienceforms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Experienceforms;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Processing_Engine_Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Xdb_Collection_Shard0: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.Shard0;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Xdb_Collection_Shard1: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.Shard1;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Sitecore_ConnectionStrings_Processing_Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Pools;User ID=${SQL_USERNAME};Password=${SQL_PASSWORD} + Database_Upgrade_From_Version: ${DATABASE_UPGRADE_FROM_VERSION} + Database_Upgrade_To_Version: ${DATABASE_UPGRADE_TO_VERSION} + Sitecore_License: ${SITECORE_LICENSE} + isolation: ${ISOLATION} \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env b/compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env new file mode 100644 index 00000000..9b89b6d2 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env @@ -0,0 +1,13 @@ +COMPOSE_PROJECT_NAME=sitecore-xp1 +SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ +SITECORE_VERSION=10.4-ltsc2019 +SQL_DATABASE_PREFIX=Sitecore +SQL_SERVER= +SQL_USERNAME= +SQL_PASSWORD= +IS_ALWAYS_ENCRYPTED= +PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= +DATABASE_UPGRADE_FROM_VERSION=10.3.0 +DATABASE_UPGRADE_TO_VERSION=10.4.0 +SITECORE_LICENSE= +ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/.env b/compose/sxp/10.4/ltsc2019/xm1/.env new file mode 100644 index 00000000..74880d63 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/.env @@ -0,0 +1,29 @@ +COMPOSE_PROJECT_NAME=sitecore-xm1 +SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ +SITECORE_VERSION=10.4-ltsc2019 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 +SITECORE_ADMIN_PASSWORD= +SQL_SERVER=mssql +SQL_SA_LOGIN=sa +SQL_SA_PASSWORD= +SQL_DATABASE_PREFIX=Sitecore +SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +TELERIK_ENCRYPTION_KEY= +SITECORE_GRAPHQL_ENABLED=true +SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false +# You should change the encryption key to a random string and not use the default value +SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY=432A462D4A614E64 +SITECORE_IDSECRET= +SITECORE_ID_CERTIFICATE= +SITECORE_ID_CERTIFICATE_PASSWORD= +SITECORE_LICENSE= +CD_HOST=xm1cd.localhost +CM_HOST=xm1cm.localhost +ID_HOST=xm1id.localhost +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default +ISOLATION=default +SOLR_CORE_PREFIX_NAME=sitecore +# You should change the shared secret to a random string and not use the default value +MEDIA_REQUEST_PROTECTION_SHARED_SECRET=HQ(NjM(u6_5koVla-cTf4ta8x1h6Sb+ZcUQrULUz-0Afpx0cx-NuMtIoQkpDFmX5 +LOG_LEVEL_VALUE=INFO \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 new file mode 100644 index 00000000..cc7b9050 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 @@ -0,0 +1,290 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp0","xp1")] + [string]$Topology = "xm1", + + [string] + [ValidateNotNullOrEmpty()] + $EnvFilePath = ".\.env", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SitecoreAdminPassword = "Password12345", + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SqlSaPassword = "Password12345", + + [string] + $SqlServer = "mssql", + + [string] + $SqlUserName = "sa", + + [boolean] + $IsAlwaysEncrypted = $false, + + [string] + $ProcessingEngineTasksDatabaseUserName = "dbo", + + [string] + $CdHost = "$($Topology)cd.localhost", + + [string] + $CmHost = "$($Topology)cm.localhost", + + [string] + $IdHost = "$($Topology)id.localhost", + + # The link to a source NuGet Feed has been updated. + # In case of a name conflict with local PSRepository we suggest unregistering previous version from the host. + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $CertDataFolder = ".\traefik\certs", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; +[boolean]$RootCertificateCreated = $false; + +function Get-EnvironmentVariableNameList { + param( + [string]$EnvFilePath + ) + + $envVariableNameList = @() + $envVariables = Get-Content -Path $EnvFilePath + foreach ($envVariable in $envVariables) { + $envName = $envVariable.Split('=')[0] + $envVariableNameList += $envName + } + return $envVariableNameList +} + +function Populate-EnvironmentFile { + param( + [string]$EnvFilePath, + [hashtable]$EnvVariablesTable + ) + + Write-Information -MessageData "Starting populating '$EnvFilePath' env file variables..." -InformationAction Continue + + $envVariableNameList = Get-EnvironmentVariableNameList -EnvFilePath $EnvFilePath + foreach ($envVariableName in $envVariableNameList){ + if ($EnvVariablesTable.ContainsKey($envVariableName)) { + Set-EnvFileVariable $envVariableName -Value $($EnvVariablesTable[$envVariableName]) -Path $EnvFilePath + } + } + + Write-Information -MessageData "Finish populating '$EnvFilePath' env file variables." -InformationAction Continue +} + +function Add-WindowsHostsFileEntries{ + param( + [string]$EnvFilePath, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting adding Windows hosts file entries for '$Topology' topology..." -InformationAction Continue + + Add-HostsEntry "$CmHost" + Add-HostsEntry "$IdHost" + if (($Topology -eq "xm1") -or ($Topology -eq "xp1")) { + Add-HostsEntry "$CdHost" + } + + Write-Information -MessageData "Finish adding Windows hosts file entries for '$Topology' topology." -InformationAction Continue +} + +function Create-Certificates{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue + + $dnsNames = @("$CdHost", "$CmHost", "$IdHost") + + if ($Topology -eq "xp0") { + $dnsNames = @("$CmHost", "$IdHost") + } + + # Check that Certificate or Key files already exist in the $CertDataFolder + $existingCertificateFiles = Get-ChildItem "$CertDataFolder\*" -Include *.crt, *.key + + if (-not $existingCertificateFiles){ + + # Create Root Certificate file + $rootKey = Create-RSAKey -KeyLength 4096 + $rootCertificate = Create-SelfSignedCertificate -Key $rootKey + Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" + + # Create Certificate and Key files for each Sitecore role + $dnsNames | ForEach-Object { + $selfSignedKey = Create-RSAKey + $certificate = Create-SelfSignedCertificateWithSignature -Key $selfSignedKey -CommonName $_ -DnsName $_ -RootCertificate $rootCertificate + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$CertDataFolder\$_.key" + Create-CertificateFile -Certificate $certificate -OutCertPath "$CertDataFolder\$_.crt" + } + + Write-Information -MessageData "Finish creating certificates for '$Topology' topology." -InformationAction Continue + return $true + } + else { + Write-Information -MessageData "Certificate files already exist for '$Topology' topology." -InformationAction Continue + return $false + } +} + +function Update-CertsConfigFile{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + $certsConfigFile = Join-Path (Split-Path $CertDataFolder -Parent) "config\dynamic\certs_config.yaml" + $certificatePath = "C:\etc\traefik\certs\" + + $customHostNames = @("$CdHost", "$CmHost", "$IdHost") + if ($Topology -eq "xp0") { + $customHostNames = @("$CmHost", "$IdHost") + } + + $newFileContent = @("tls:", " certificates:") + + foreach ($customHostName in $customHostNames){ + $newFileContent += " - certFile: " + $certificatePath + $customHostName + ".crt" + $newFileContent += " keyFile: " + $certificatePath + $customHostName + ".key" + } + + # Clear certs_config.yaml file + Clear-Content -Path $certsConfigFile + + # Setting new content to the certs_config.yaml file + $newFileContent | Set-Content $certsConfigFile + + Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue +} + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Invoke-ComposeInit { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial + $envVariablesTable = @{ + "SITECORE_ADMIN_PASSWORD" = $SitecoreAdminPassword + "SQL_SA_PASSWORD" = $SqlSaPassword + "REPORTING_API_KEY" = "00112233445566778899AABBCCDDEEFF" + "TELERIK_ENCRYPTION_KEY" = Get-SitecoreRandomString 128 -DisallowSpecial + "MEDIA_REQUEST_PROTECTION_SHARED_SECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_IDSECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_ID_CERTIFICATE" = (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText) -KeyLength 2048) + "SITECORE_ID_CERTIFICATE_PASSWORD" = $idCertPassword + "SITECORE_LICENSE" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "SQL_SERVER" = $SqlServer + "SQL_USERNAME" = $SqlUserName + "SQL_PASSWORD" = $SqlSaPassword + "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted + "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName + "CD_HOST" = $CdHost + "CM_HOST" = $CmHost + "ID_HOST" = $IdHost + "SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY" = Get-SitecoreRandomString 16 -DisallowSpecial + } + + $envFile = Split-Path $EnvFilePath -Leaf + + if($envFile -eq "upgrade.env"){ + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + }else{ + if (!(Test-Path $CertDataFolder)) { + Write-Warning -Message "The certificate '$CertDataFolder' path isn't valid. Please, specify another path for certificates." + return + } + + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + + # Configure TLS/HTTPS certificates + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + + # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. + if ($RootCertificateCreated){ + Update-CertsConfigFile -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } + + # Install Root Certificate if it was created + if ($RootCertificateCreated){ + Import-Certificate -FilePath "$CertDataFolder\RootCA.crt" -CertStoreLocation "Cert:\LocalMachine\Root" + } + + # Add Windows hosts file entries + Add-WindowsHostsFileEntries -EnvFilePath $EnvFilePath -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "compose-init-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-ComposeInit *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/device-detection-data/readme.md b/compose/sxp/10.4/ltsc2019/xm1/device-detection-data/readme.md new file mode 100644 index 00000000..fe38d074 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/device-detection-data/readme.md @@ -0,0 +1 @@ +device detection database will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml b/compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml new file mode 100644 index 00000000..44366724 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml @@ -0,0 +1,182 @@ +services: + traefik: + isolation: ${TRAEFIK_ISOLATION} + image: ${TRAEFIK_IMAGE} + command: + - "--ping" + - "--api.insecure=true" + - "--providers.docker.endpoint=npipe:////./pipe/docker_engine" + - "--providers.docker.exposedByDefault=false" + - "--providers.file.directory=C:/etc/traefik/config/dynamic" + - "--entryPoints.websecure.address=:443" + - "--entryPoints.websecure.forwardedHeaders.insecure" + ports: + - "443:443" + - "8079:8080" + healthcheck: + test: ["CMD", "traefik", "healthcheck", "--ping"] + volumes: + - source: \\.\pipe\docker_engine + target: \\.\pipe\docker_engine + type: npipe + - ./traefik:C:/etc/traefik + depends_on: + id: + condition: service_healthy + cd: + condition: service_healthy + cm: + condition: service_healthy + redis: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} + mssql: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} + environment: + SA_PASSWORD: ${SQL_SA_PASSWORD} + ACCEPT_EULA: "Y" + ports: + - "14330:1433" + volumes: + - type: bind + source: .\mssql-data + target: c:\data + mssql-init: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION} + environment: + SQL_SERVER: ${SQL_SERVER} + SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN} + SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD} + SQL_DATABASE_PREFIX: ${SQL_DATABASE_PREFIX} + SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM: ${SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM} + SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD} + POST_DEPLOYMENT_WAIT_PERIOD: 300 + healthcheck: + test: ["CMD", "powershell", "-command", "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}"] + start_period: 300s + interval: 5s + depends_on: + mssql: + condition: service_healthy + solr: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + ports: + - "8984:8983" + volumes: + - type: bind + source: .\solr-data + target: c:\data + environment: + SOLR_MODE: solrcloud + healthcheck: + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + solr-init: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} + environment: + SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + depends_on: + solr: + condition: service_healthy + id: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + environment: + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 + Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} + Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} + Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE} + Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST} + Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + depends_on: + mssql-init: + condition: service_healthy + labels: + - "traefik.enable=true" + - "traefik.http.routers.id-secure.entrypoints=websecure" + - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" + - "traefik.http.routers.id-secure.tls=true" + cd: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + solr-init: + condition: service_started + redis: + condition: service_started + environment: + Sitecore_AppSettings_instanceNameMode:define: default + Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true + Sitecore_ConnectionStrings_Redis.Sessions: redis:6379,ssl=False,abortConnect=False + Sitecore_License: ${SITECORE_LICENSE} + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET} + LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + labels: + - "traefik.enable=true" + - "traefik.http.routers.cd-secure.entrypoints=websecure" + - "traefik.http.routers.cd-secure.rule=Host(`${CD_HOST}`)" + - "traefik.http.routers.cd-secure.tls=true" + volumes: + - "./device-detection-data:C:/inetpub/wwwroot/App_Data/DeviceDetection" + cm: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cm:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + solr-init: + condition: service_started + id: + condition: service_started + environment: + Sitecore_AppSettings_instanceNameMode:define: default + Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true + Sitecore_ConnectionStrings_Sitecoreidentity.secret: ${SITECORE_IDSECRET} + Sitecore_AppSettings_Telerik.AsyncUpload.ConfigurationEncryptionKey: ${TELERIK_ENCRYPTION_KEY} + Sitecore_AppSettings_Telerik.Upload.ConfigurationHashKey: ${TELERIK_ENCRYPTION_KEY} + Sitecore_AppSettings_Telerik.Web.UI.DialogParametersEncryptionKey: ${TELERIK_ENCRYPTION_KEY} + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_GraphQL_Enabled: ${SITECORE_GRAPHQL_ENABLED} + Sitecore_GraphQL_ExposePlayground: ${SITECORE_GRAPHQL_EXPOSEPLAYGROUND} + Sitecore_GraphQL_UploadMediaOptions_EncryptionKey: ${SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY} + Sitecore_Identity_Server_Authority: https://${ID_HOST} + Sitecore_Identity_Server_InternalAuthority: http://id + Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST} + Sitecore_Identity_Server_Require_Https: "false" + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET} + LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + labels: + - "traefik.enable=true" + - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true" + - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000" + - "traefik.http.routers.cm-secure.entrypoints=websecure" + - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)" + - "traefik.http.routers.cm-secure.tls=true" + - "traefik.http.routers.cm-secure.middlewares=force-STS-Header" \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/mssql-data/readme.md b/compose/sxp/10.4/ltsc2019/xm1/mssql-data/readme.md new file mode 100644 index 00000000..d3edaed8 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/mssql-data/readme.md @@ -0,0 +1 @@ +database files will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/solr-data/readme.md b/compose/sxp/10.4/ltsc2019/xm1/solr-data/readme.md new file mode 100644 index 00000000..7a168695 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/solr-data/readme.md @@ -0,0 +1 @@ +solr indexes will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/traefik/certs/readme b/compose/sxp/10.4/ltsc2019/xm1/traefik/certs/readme new file mode 100644 index 00000000..7ab7c0a6 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/traefik/certs/readme @@ -0,0 +1,7 @@ +Add TLS certificates for xm1cd.localhost, xm1cm.localhost and xm1id.localhost hosts to this folder: + xm1cd.localhost.crt + xm1cd.localhost.key + xm1cm.localhost.crt + xm1cm.localhost.key + xm1id.localhost.crt + xm1id.localhost.key \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/traefik/config/dynamic/certs_config.yaml b/compose/sxp/10.4/ltsc2019/xm1/traefik/config/dynamic/certs_config.yaml new file mode 100644 index 00000000..abb005ae --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/traefik/config/dynamic/certs_config.yaml @@ -0,0 +1,8 @@ +tls: + certificates: + - certFile: C:\etc\traefik\certs\xm1cd.localhost.crt + keyFile: C:\etc\traefik\certs\xm1cd.localhost.key + - certFile: C:\etc\traefik\certs\xm1cm.localhost.crt + keyFile: C:\etc\traefik\certs\xm1cm.localhost.key + - certFile: C:\etc\traefik\certs\xm1id.localhost.crt + keyFile: C:\etc\traefik\certs\xm1id.localhost.key \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/.env b/compose/sxp/10.4/ltsc2019/xp0/.env new file mode 100644 index 00000000..c7b0b410 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/.env @@ -0,0 +1,28 @@ +COMPOSE_PROJECT_NAME=sitecore-xp0 +SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ +SITECORE_VERSION=10.4-ltsc2019 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 +SITECORE_ADMIN_PASSWORD= +SQL_SERVER=mssql +SQL_SA_LOGIN=sa +SQL_SA_PASSWORD= +SQL_DATABASE_PREFIX=Sitecore +SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +TELERIK_ENCRYPTION_KEY= +SITECORE_GRAPHQL_ENABLED=true +SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false +# You should change the encryption key to a random string and not use the default value +SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY=432A462D4A614E64 +SITECORE_IDSECRET= +SITECORE_ID_CERTIFICATE= +SITECORE_ID_CERTIFICATE_PASSWORD= +SITECORE_LICENSE= +CM_HOST=xp0cm.localhost +ID_HOST=xp0id.localhost +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default +ISOLATION=default +SOLR_CORE_PREFIX_NAME=sitecore +# You should change the shared secret to a random string and not use the default value +MEDIA_REQUEST_PROTECTION_SHARED_SECRET=HQ(NjM(u6_5koVla-cTf4ta8x1h6Sb+ZcUQrULUz-0Afpx0cx-NuMtIoQkpDFmX5 +LOG_LEVEL_VALUE=INFO \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 new file mode 100644 index 00000000..26281ba4 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 @@ -0,0 +1,290 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp0","xp1")] + [string]$Topology = "xp0", + + [string] + [ValidateNotNullOrEmpty()] + $EnvFilePath = ".\.env", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SitecoreAdminPassword = "Password12345", + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SqlSaPassword = "Password12345", + + [string] + $SqlServer = "mssql", + + [string] + $SqlUserName = "sa", + + [boolean] + $IsAlwaysEncrypted = $false, + + [string] + $ProcessingEngineTasksDatabaseUserName = "dbo", + + [string] + $CdHost = "$($Topology)cd.localhost", + + [string] + $CmHost = "$($Topology)cm.localhost", + + [string] + $IdHost = "$($Topology)id.localhost", + + # The link to a source NuGet Feed has been updated. + # In case of a name conflict with local PSRepository we suggest unregistering previous version from the host. + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $CertDataFolder = ".\traefik\certs", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; +[boolean]$RootCertificateCreated = $false; + +function Get-EnvironmentVariableNameList { + param( + [string]$EnvFilePath + ) + + $envVariableNameList = @() + $envVariables = Get-Content -Path $EnvFilePath + foreach ($envVariable in $envVariables) { + $envName = $envVariable.Split('=')[0] + $envVariableNameList += $envName + } + return $envVariableNameList +} + +function Populate-EnvironmentFile { + param( + [string]$EnvFilePath, + [hashtable]$EnvVariablesTable + ) + + Write-Information -MessageData "Starting populating '$EnvFilePath' env file variables..." -InformationAction Continue + + $envVariableNameList = Get-EnvironmentVariableNameList -EnvFilePath $EnvFilePath + foreach ($envVariableName in $envVariableNameList){ + if ($EnvVariablesTable.ContainsKey($envVariableName)) { + Set-EnvFileVariable $envVariableName -Value $($EnvVariablesTable[$envVariableName]) -Path $EnvFilePath + } + } + + Write-Information -MessageData "Finish populating '$EnvFilePath' env file variables." -InformationAction Continue +} + +function Add-WindowsHostsFileEntries{ + param( + [string]$EnvFilePath, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting adding Windows hosts file entries for '$Topology' topology..." -InformationAction Continue + + Add-HostsEntry "$CmHost" + Add-HostsEntry "$IdHost" + if (($Topology -eq "xm1") -or ($Topology -eq "xp1")) { + Add-HostsEntry "$CdHost" + } + + Write-Information -MessageData "Finish adding Windows hosts file entries for '$Topology' topology." -InformationAction Continue +} + +function Create-Certificates{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue + + $dnsNames = @("$CdHost", "$CmHost", "$IdHost") + + if ($Topology -eq "xp0") { + $dnsNames = @("$CmHost", "$IdHost") + } + + # Check that Certificate or Key files already exist in the $CertDataFolder + $existingCertificateFiles = Get-ChildItem "$CertDataFolder\*" -Include *.crt, *.key + + if (-not $existingCertificateFiles){ + + # Create Root Certificate file + $rootKey = Create-RSAKey -KeyLength 4096 + $rootCertificate = Create-SelfSignedCertificate -Key $rootKey + Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" + + # Create Certificate and Key files for each Sitecore role + $dnsNames | ForEach-Object { + $selfSignedKey = Create-RSAKey + $certificate = Create-SelfSignedCertificateWithSignature -Key $selfSignedKey -CommonName $_ -DnsName $_ -RootCertificate $rootCertificate + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$CertDataFolder\$_.key" + Create-CertificateFile -Certificate $certificate -OutCertPath "$CertDataFolder\$_.crt" + } + + Write-Information -MessageData "Finish creating certificates for '$Topology' topology." -InformationAction Continue + return $true + } + else { + Write-Information -MessageData "Certificate files already exist for '$Topology' topology." -InformationAction Continue + return $false + } +} + +function Update-CertsConfigFile{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + $certsConfigFile = Join-Path (Split-Path $CertDataFolder -Parent) "config\dynamic\certs_config.yaml" + $certificatePath = "C:\etc\traefik\certs\" + + $customHostNames = @("$CdHost", "$CmHost", "$IdHost") + if ($Topology -eq "xp0") { + $customHostNames = @("$CmHost", "$IdHost") + } + + $newFileContent = @("tls:", " certificates:") + + foreach ($customHostName in $customHostNames){ + $newFileContent += " - certFile: " + $certificatePath + $customHostName + ".crt" + $newFileContent += " keyFile: " + $certificatePath + $customHostName + ".key" + } + + # Clear certs_config.yaml file + Clear-Content -Path $certsConfigFile + + # Setting new content to the certs_config.yaml file + $newFileContent | Set-Content $certsConfigFile + + Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue +} + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Invoke-ComposeInit { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial + $envVariablesTable = @{ + "SITECORE_ADMIN_PASSWORD" = $SitecoreAdminPassword + "SQL_SA_PASSWORD" = $SqlSaPassword + "REPORTING_API_KEY" = "00112233445566778899AABBCCDDEEFF" + "TELERIK_ENCRYPTION_KEY" = Get-SitecoreRandomString 128 -DisallowSpecial + "MEDIA_REQUEST_PROTECTION_SHARED_SECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_IDSECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_ID_CERTIFICATE" = (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText) -KeyLength 2048) + "SITECORE_ID_CERTIFICATE_PASSWORD" = $idCertPassword + "SITECORE_LICENSE" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "SQL_SERVER" = $SqlServer + "SQL_USERNAME" = $SqlUserName + "SQL_PASSWORD" = $SqlSaPassword + "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted + "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName + "CD_HOST" = $CdHost + "CM_HOST" = $CmHost + "ID_HOST" = $IdHost + "SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY" = Get-SitecoreRandomString 16 -DisallowSpecial + } + + $envFile = Split-Path $EnvFilePath -Leaf + + if($envFile -eq "upgrade.env"){ + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + }else{ + if (!(Test-Path $CertDataFolder)) { + Write-Warning -Message "The certificate '$CertDataFolder' path isn't valid. Please, specify another path for certificates." + return + } + + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + + # Configure TLS/HTTPS certificates + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + + # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. + if ($RootCertificateCreated){ + Update-CertsConfigFile -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } + + # Install Root Certificate if it was created + if ($RootCertificateCreated){ + Import-Certificate -FilePath "$CertDataFolder\RootCA.crt" -CertStoreLocation "Cert:\LocalMachine\Root" + } + + # Add Windows hosts file entries + Add-WindowsHostsFileEntries -EnvFilePath $EnvFilePath -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "compose-init-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-ComposeInit *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/device-detection-data/readme.md b/compose/sxp/10.4/ltsc2019/xp0/device-detection-data/readme.md new file mode 100644 index 00000000..fe38d074 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/device-detection-data/readme.md @@ -0,0 +1 @@ +device detection database will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml b/compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml new file mode 100644 index 00000000..81bd2d8f --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml @@ -0,0 +1,234 @@ +services: + traefik: + isolation: ${TRAEFIK_ISOLATION} + image: ${TRAEFIK_IMAGE} + command: + - "--ping" + - "--api.insecure=true" + - "--providers.docker.endpoint=npipe:////./pipe/docker_engine" + - "--providers.docker.exposedByDefault=false" + - "--providers.file.directory=C:/etc/traefik/config/dynamic" + - "--entryPoints.websecure.address=:443" + - "--entryPoints.websecure.forwardedHeaders.insecure" + ports: + - "443:443" + - "8079:8080" + healthcheck: + test: ["CMD", "traefik", "healthcheck", "--ping"] + volumes: + - source: \\.\pipe\docker_engine + target: \\.\pipe\docker_engine + type: npipe + - ./traefik:C:/etc/traefik + depends_on: + id: + condition: service_healthy + cm: + condition: service_healthy + mssql: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} + environment: + SA_PASSWORD: ${SQL_SA_PASSWORD} + ACCEPT_EULA: "Y" + ports: + - "14330:1433" + volumes: + - type: bind + source: .\mssql-data + target: c:\data + mssql-init: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} + environment: + SQL_SERVER: ${SQL_SERVER} + SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN} + SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD} + SQL_DATABASE_PREFIX: ${SQL_DATABASE_PREFIX} + SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM: ${SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM} + SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD} + POST_DEPLOYMENT_WAIT_PERIOD: 300 + healthcheck: + test: ["CMD", "powershell", "-command", "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}"] + start_period: 300s + interval: 5s + depends_on: + mssql: + condition: service_healthy + solr: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + ports: + - "8984:8983" + volumes: + - type: bind + source: .\solr-data + target: c:\data + environment: + SOLR_MODE: solrcloud + healthcheck: + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + solr-init: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} + environment: + SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + depends_on: + solr: + condition: service_healthy + id: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + environment: + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 + Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} + Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} + Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE} + Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST} + Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + depends_on: + mssql-init: + condition: service_healthy + labels: + - "traefik.enable=true" + - "traefik.http.routers.id-secure.entrypoints=websecure" + - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" + - "traefik.http.routers.id-secure.tls=true" + cm: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION} + depends_on: + id: + condition: service_started + xconnect: + condition: service_started + environment: + Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Processing.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Sitecore.Reporting.Client: http://xconnect + Sitecore_ConnectionStrings_Cortex.Processing.Engine: http://xconnect + Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true + Sitecore_ConnectionStrings_SitecoreIdentity.Secret: ${SITECORE_IDSECRET} + Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect + Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xconnect + Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xconnect + Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xconnect + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_GraphQL_Enabled: ${SITECORE_GRAPHQL_ENABLED} + Sitecore_GraphQL_ExposePlayground: ${SITECORE_GRAPHQL_EXPOSEPLAYGROUND} + Sitecore_GraphQL_UploadMediaOptions_EncryptionKey: ${SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY} + Sitecore_Identity_Server_Authority: https://${ID_HOST} + Sitecore_Identity_Server_InternalAuthority: http://id + Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST} + Sitecore_Identity_Server_Require_Https: "false" + Sitecore_Analytics_Forwarded_Request_Http_Header: X-Forwarded-For + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET} + LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + labels: + - "traefik.enable=true" + - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true" + - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000" + - "traefik.http.routers.cm-secure.entrypoints=websecure" + - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)" + - "traefik.http.routers.cm-secure.tls=true" + - "traefik.http.routers.cm-secure.middlewares=force-STS-Header" + volumes: + - "./device-detection-data:C:/inetpub/wwwroot/App_Data/DeviceDetection" + xconnect: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xconnect:${SITECORE_VERSION} + ports: + - "8081:80" + depends_on: + mssql-init: + condition: service_healthy + solr-init: + condition: service_started + environment: + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true + Sitecore_Sitecore:XConnect:CollectionSearch:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: 'false' + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + xdbsearchworker: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbsearchworker:${SITECORE_VERSION} + depends_on: + xconnect: + condition: service_healthy + restart: unless-stopped + environment: + Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: 'false' + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"] + timeout: 300s + xdbautomationworker: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-xdbautomationworker:${SITECORE_VERSION} + depends_on: + xconnect: + condition: service_healthy + restart: unless-stopped + environment: + Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect + Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"] + timeout: 300s + cortexprocessingworker: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cortexprocessingworker:${SITECORE_VERSION} + depends_on: + xconnect: + condition: service_healthy + restart: unless-stopped + environment: + Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_XConnect.Collection: http://xconnect + Sitecore_ConnectionStrings_XConnect.Configuration: http://xconnect + Sitecore_ConnectionStrings_XConnect.Search: http://xconnect + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"] + timeout: 300s \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/mssql-data/readme.md b/compose/sxp/10.4/ltsc2019/xp0/mssql-data/readme.md new file mode 100644 index 00000000..d3edaed8 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/mssql-data/readme.md @@ -0,0 +1 @@ +database files will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/solr-data/readme.md b/compose/sxp/10.4/ltsc2019/xp0/solr-data/readme.md new file mode 100644 index 00000000..7a168695 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/solr-data/readme.md @@ -0,0 +1 @@ +solr indexes will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/traefik/certs/readme b/compose/sxp/10.4/ltsc2019/xp0/traefik/certs/readme new file mode 100644 index 00000000..1176e9a9 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/traefik/certs/readme @@ -0,0 +1,5 @@ +Add TLS certificates for xp0cm.localhost and xp0id.localhost hosts to this folder: + xp0cm.localhost.crt + xp0cm.localhost.key + xp0id.localhost.crt + xp0id.localhost.key \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/traefik/config/dynamic/certs_config.yaml b/compose/sxp/10.4/ltsc2019/xp0/traefik/config/dynamic/certs_config.yaml new file mode 100644 index 00000000..45581422 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/traefik/config/dynamic/certs_config.yaml @@ -0,0 +1,6 @@ +tls: + certificates: + - certFile: C:\etc\traefik\certs\xp0cm.localhost.crt + keyFile: C:\etc\traefik\certs\xp0cm.localhost.key + - certFile: C:\etc\traefik\certs\xp0id.localhost.crt + keyFile: C:\etc\traefik\certs\xp0id.localhost.key \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/.env b/compose/sxp/10.4/ltsc2019/xp1/.env new file mode 100644 index 00000000..bc4ee83e --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/.env @@ -0,0 +1,30 @@ +COMPOSE_PROJECT_NAME=sitecore-xp1 +SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ +SITECORE_VERSION=10.4-ltsc2019 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 +SITECORE_ADMIN_PASSWORD= +SQL_SERVER=mssql +SQL_SA_LOGIN=sa +SQL_SA_PASSWORD= +SQL_DATABASE_PREFIX=Sitecore +SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +REPORTING_API_KEY= +TELERIK_ENCRYPTION_KEY= +SITECORE_GRAPHQL_ENABLED=true +SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false +# You should change the encryption key to a random string and not use the default value +SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY=432A462D4A614E64 +SITECORE_IDSECRET= +SITECORE_ID_CERTIFICATE= +SITECORE_ID_CERTIFICATE_PASSWORD= +SITECORE_LICENSE= +CD_HOST=xp1cd.localhost +CM_HOST=xp1cm.localhost +ID_HOST=xp1id.localhost +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default +ISOLATION=default +SOLR_CORE_PREFIX_NAME=sitecore +# You should change the shared secret to a random string and not use the default value +MEDIA_REQUEST_PROTECTION_SHARED_SECRET=HQ(NjM(u6_5koVla-cTf4ta8x1h6Sb+ZcUQrULUz-0Afpx0cx-NuMtIoQkpDFmX5 +LOG_LEVEL_VALUE=INFO \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 new file mode 100644 index 00000000..a28b66c9 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 @@ -0,0 +1,290 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp0","xp1")] + [string]$Topology = "xp1", + + [string] + [ValidateNotNullOrEmpty()] + $EnvFilePath = ".\.env", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SitecoreAdminPassword = "Password12345", + + # We do not need to use [SecureString] here since the value will be stored unencrypted in .env, + # and used only for transient local example environment. + [string] + $SqlSaPassword = "Password12345", + + [string] + $SqlServer = "mssql", + + [string] + $SqlUserName = "sa", + + [boolean] + $IsAlwaysEncrypted = $false, + + [string] + $ProcessingEngineTasksDatabaseUserName = "dbo", + + [string] + $CdHost = "$($Topology)cd.localhost", + + [string] + $CmHost = "$($Topology)cm.localhost", + + [string] + $IdHost = "$($Topology)id.localhost", + + # The link to a source NuGet Feed has been updated. + # In case of a name conflict with local PSRepository we suggest unregistering previous version from the host. + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $CertDataFolder = ".\traefik\certs", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; +[boolean]$RootCertificateCreated = $false; + +function Get-EnvironmentVariableNameList { + param( + [string]$EnvFilePath + ) + + $envVariableNameList = @() + $envVariables = Get-Content -Path $EnvFilePath + foreach ($envVariable in $envVariables) { + $envName = $envVariable.Split('=')[0] + $envVariableNameList += $envName + } + return $envVariableNameList +} + +function Populate-EnvironmentFile { + param( + [string]$EnvFilePath, + [hashtable]$EnvVariablesTable + ) + + Write-Information -MessageData "Starting populating '$EnvFilePath' env file variables..." -InformationAction Continue + + $envVariableNameList = Get-EnvironmentVariableNameList -EnvFilePath $EnvFilePath + foreach ($envVariableName in $envVariableNameList){ + if ($EnvVariablesTable.ContainsKey($envVariableName)) { + Set-EnvFileVariable $envVariableName -Value $($EnvVariablesTable[$envVariableName]) -Path $EnvFilePath + } + } + + Write-Information -MessageData "Finish populating '$EnvFilePath' env file variables." -InformationAction Continue +} + +function Add-WindowsHostsFileEntries{ + param( + [string]$EnvFilePath, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting adding Windows hosts file entries for '$Topology' topology..." -InformationAction Continue + + Add-HostsEntry "$CmHost" + Add-HostsEntry "$IdHost" + if (($Topology -eq "xm1") -or ($Topology -eq "xp1")) { + Add-HostsEntry "$CdHost" + } + + Write-Information -MessageData "Finish adding Windows hosts file entries for '$Topology' topology." -InformationAction Continue +} + +function Create-Certificates{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue + + $dnsNames = @("$CdHost", "$CmHost", "$IdHost") + + if ($Topology -eq "xp0") { + $dnsNames = @("$CmHost", "$IdHost") + } + + # Check that Certificate or Key files already exist in the $CertDataFolder + $existingCertificateFiles = Get-ChildItem "$CertDataFolder\*" -Include *.crt, *.key + + if (-not $existingCertificateFiles){ + + # Create Root Certificate file + $rootKey = Create-RSAKey -KeyLength 4096 + $rootCertificate = Create-SelfSignedCertificate -Key $rootKey + Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" + + # Create Certificate and Key files for each Sitecore role + $dnsNames | ForEach-Object { + $selfSignedKey = Create-RSAKey + $certificate = Create-SelfSignedCertificateWithSignature -Key $selfSignedKey -CommonName $_ -DnsName $_ -RootCertificate $rootCertificate + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$CertDataFolder\$_.key" + Create-CertificateFile -Certificate $certificate -OutCertPath "$CertDataFolder\$_.crt" + } + + Write-Information -MessageData "Finish creating certificates for '$Topology' topology." -InformationAction Continue + return $true + } + else { + Write-Information -MessageData "Certificate files already exist for '$Topology' topology." -InformationAction Continue + return $false + } +} + +function Update-CertsConfigFile{ + param( + [string]$CertDataFolder, + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + $certsConfigFile = Join-Path (Split-Path $CertDataFolder -Parent) "config\dynamic\certs_config.yaml" + $certificatePath = "C:\etc\traefik\certs\" + + $customHostNames = @("$CdHost", "$CmHost", "$IdHost") + if ($Topology -eq "xp0") { + $customHostNames = @("$CmHost", "$IdHost") + } + + $newFileContent = @("tls:", " certificates:") + + foreach ($customHostName in $customHostNames){ + $newFileContent += " - certFile: " + $certificatePath + $customHostName + ".crt" + $newFileContent += " keyFile: " + $certificatePath + $customHostName + ".key" + } + + # Clear certs_config.yaml file + Clear-Content -Path $certsConfigFile + + # Setting new content to the certs_config.yaml file + $newFileContent | Set-Content $certsConfigFile + + Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue +} + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Invoke-ComposeInit { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial + $envVariablesTable = @{ + "SITECORE_ADMIN_PASSWORD" = $SitecoreAdminPassword + "SQL_SA_PASSWORD" = $SqlSaPassword + "REPORTING_API_KEY" = "00112233445566778899AABBCCDDEEFF" + "TELERIK_ENCRYPTION_KEY" = Get-SitecoreRandomString 128 -DisallowSpecial + "MEDIA_REQUEST_PROTECTION_SHARED_SECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_IDSECRET" = Get-SitecoreRandomString 64 -DisallowSpecial + "SITECORE_ID_CERTIFICATE" = (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText) -KeyLength 2048) + "SITECORE_ID_CERTIFICATE_PASSWORD" = $idCertPassword + "SITECORE_LICENSE" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "SQL_SERVER" = $SqlServer + "SQL_USERNAME" = $SqlUserName + "SQL_PASSWORD" = $SqlSaPassword + "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted + "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName + "CD_HOST" = $CdHost + "CM_HOST" = $CmHost + "ID_HOST" = $IdHost + "SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY" = Get-SitecoreRandomString 16 -DisallowSpecial + } + + $envFile = Split-Path $EnvFilePath -Leaf + + if($envFile -eq "upgrade.env"){ + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + }else{ + if (!(Test-Path $CertDataFolder)) { + Write-Warning -Message "The certificate '$CertDataFolder' path isn't valid. Please, specify another path for certificates." + return + } + + # Populate the environment file + Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable + + # Configure TLS/HTTPS certificates + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + + # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. + if ($RootCertificateCreated){ + Update-CertsConfigFile -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } + + # Install Root Certificate if it was created + if ($RootCertificateCreated){ + Import-Certificate -FilePath "$CertDataFolder\RootCA.crt" -CertStoreLocation "Cert:\LocalMachine\Root" + } + + # Add Windows hosts file entries + Add-WindowsHostsFileEntries -EnvFilePath $EnvFilePath -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + } +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "compose-init-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-ComposeInit *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/device-detection-data/readme.md b/compose/sxp/10.4/ltsc2019/xp1/device-detection-data/readme.md new file mode 100644 index 00000000..fe38d074 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/device-detection-data/readme.md @@ -0,0 +1 @@ +device detection database will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml b/compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml new file mode 100644 index 00000000..011700ac --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml @@ -0,0 +1,407 @@ +services: + traefik: + isolation: ${TRAEFIK_ISOLATION} + image: ${TRAEFIK_IMAGE} + command: + - "--ping" + - "--api.insecure=true" + - "--providers.docker.endpoint=npipe:////./pipe/docker_engine" + - "--providers.docker.exposedByDefault=false" + - "--providers.file.directory=C:/etc/traefik/config/dynamic" + - "--entryPoints.websecure.address=:443" + - "--entryPoints.websecure.forwardedHeaders.insecure" + ports: + - "443:443" + - "8079:8080" + healthcheck: + test: ["CMD", "traefik", "healthcheck", "--ping"] + volumes: + - source: \\.\pipe\docker_engine + target: \\.\pipe\docker_engine + type: npipe + - ./traefik:C:/etc/traefik + depends_on: + id: + condition: service_healthy + cd: + condition: service_healthy + cm: + condition: service_healthy + redis: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} + mssql: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} + environment: + SA_PASSWORD: ${SQL_SA_PASSWORD} + ACCEPT_EULA: "Y" + ports: + - "14330:1433" + volumes: + - type: bind + source: .\mssql-data + target: c:\data + mssql-init: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} + environment: + SQL_SERVER: ${SQL_SERVER} + SQL_ADMIN_LOGIN: ${SQL_SA_LOGIN} + SQL_ADMIN_PASSWORD: ${SQL_SA_PASSWORD} + SQL_DATABASE_PREFIX: ${SQL_DATABASE_PREFIX} + SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM: ${SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM} + SITECORE_ADMIN_PASSWORD: ${SITECORE_ADMIN_PASSWORD} + POST_DEPLOYMENT_WAIT_PERIOD: 300 + healthcheck: + test: ["CMD", "powershell", "-command", "if ([System.Environment]::GetEnvironmentVariable('DatabasesDeploymentStatus', 'Machine') -eq 'Complete') { exit 0 } else { exit 1}"] + start_period: 300s + interval: 5s + depends_on: + mssql: + condition: service_healthy + solr: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + ports: + - "8984:8983" + volumes: + - type: bind + source: .\solr-data + target: c:\data + environment: + SOLR_MODE: solrcloud + healthcheck: + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + solr-init: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} + environment: + SITECORE_SOLR_CONNECTION_STRING: http://solr:8983/solr + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + depends_on: + solr: + condition: service_healthy + id: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + environment: + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 + Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} + Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} + Sitecore_Sitecore__IdentityServer__CertificateRawData: ${SITECORE_ID_CERTIFICATE} + Sitecore_Sitecore__IdentityServer__PublicOrigin: https://${ID_HOST} + Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword: ${SITECORE_ID_CERTIFICATE_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "pwsh", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + depends_on: + mssql-init: + condition: service_healthy + labels: + - "traefik.enable=true" + - "traefik.http.routers.id-secure.entrypoints=websecure" + - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" + - "traefik.http.routers.id-secure.tls=true" + cd: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + redis: + condition: service_started + xdbcollection: + condition: service_started + xdbautomation: + condition: service_started + xdbautomationrpt: + condition: service_started + xdbrefdata: + condition: service_started + environment: + Sitecore_AppSettings_instanceNameMode:define: default + Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true + Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection + Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xdbautomation + Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xdbautomationrpt + Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xdbrefdata + Sitecore_ConnectionStrings_Redis.Sessions: redis:6379,ssl=False,abortConnect=False + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_Analytics_Forwarded_Request_Http_Header: X-Forwarded-For + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET} + LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + labels: + - "traefik.enable=true" + - "traefik.http.routers.cd-secure.entrypoints=websecure" + - "traefik.http.routers.cd-secure.rule=Host(`${CD_HOST}`)" + - "traefik.http.routers.cd-secure.tls=true" + volumes: + - "./device-detection-data:C:/inetpub/wwwroot/App_Data/DeviceDetection" + cm: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cm:${SITECORE_VERSION} + depends_on: + id: + condition: service_started + cortexreporting: + condition: service_started + cortexprocessing: + condition: service_started + xdbcollection: + condition: service_started + xdbsearch: + condition: service_started + xdbautomation: + condition: service_started + xdbautomationrpt: + condition: service_started + xdbrefdata: + condition: service_started + environment: + Sitecore_AppSettings_instanceNameMode:define: default + Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Reporting.ApiKey: ${REPORTING_API_KEY} + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_ExperienceForms: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.ExperienceForms;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Exm.Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Exm.master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Sitecore.Reporting.Client: http://cortexreporting + Sitecore_ConnectionStrings_Cortex.Processing.Engine: http://cortexprocessing + Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr;solrCloud=true + Sitecore_ConnectionStrings_SitecoreIdentity.Secret: ${SITECORE_IDSECRET} + Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection + Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch + Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client: http://xdbautomation + Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client: http://xdbautomationrpt + Sitecore_ConnectionStrings_Xdb.ReferenceData.Client: http://xdbrefdata + Sitecore_Processing_Service_Url: http://prc + Sitecore_Processing_Service_Require_Https: 'false' + Sitecore_AppSettings_Telerik.AsyncUpload.ConfigurationEncryptionKey: ${TELERIK_ENCRYPTION_KEY} + Sitecore_AppSettings_Telerik.Upload.ConfigurationHashKey: ${TELERIK_ENCRYPTION_KEY} + Sitecore_AppSettings_Telerik.Web.UI.DialogParametersEncryptionKey: ${TELERIK_ENCRYPTION_KEY} + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_GraphQL_Enabled: ${SITECORE_GRAPHQL_ENABLED} + Sitecore_GraphQL_ExposePlayground: ${SITECORE_GRAPHQL_EXPOSEPLAYGROUND} + Sitecore_GraphQL_UploadMediaOptions_EncryptionKey: ${SITECORE_GRAPHQL_UPLOADMEDIAOPTIONS_ENCRYPTIONKEY} + Sitecore_Identity_Server_Authority: https://${ID_HOST} + Sitecore_Identity_Server_InternalAuthority: http://id + Sitecore_Identity_Server_CallbackAuthority: https://${CM_HOST} + Sitecore_Identity_Server_Require_Https: "false" + SOLR_CORE_PREFIX_NAME: ${SOLR_CORE_PREFIX_NAME} + MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET} + LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + labels: + - "traefik.enable=true" + - "traefik.http.middlewares.force-STS-Header.headers.forceSTSHeader=true" + - "traefik.http.middlewares.force-STS-Header.headers.stsSeconds=31536000" + - "traefik.http.routers.cm-secure.entrypoints=websecure" + - "traefik.http.routers.cm-secure.rule=Host(`${CM_HOST}`)" + - "traefik.http.routers.cm-secure.tls=true" + - "traefik.http.routers.cm-secure.middlewares=force-STS-Header" + prc: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-prc:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + xdbcollection: + condition: service_started + environment: + Sitecore_AppSettings_instanceNameMode:define: default + Sitecore_ConnectionStrings_Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Security: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Reporting.ApiKey: ${REPORTING_API_KEY} + Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Processing.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection + Sitecore_License: ${SITECORE_LICENSE} + MEDIA_REQUEST_PROTECTION_SHARED_SECRET: ${MEDIA_REQUEST_PROTECTION_SHARED_SECRET} + LOG_LEVEL_VALUE: ${LOG_LEVEL_VALUE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + xdbcollection: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbcollection:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + environment: + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + xdbsearch: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearch:${SITECORE_VERSION} + depends_on: + xdbcollection: + condition: service_healthy + solr-init: + condition: service_started + environment: + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Processing.Pools: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.pools;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_Sitecore:XConnect:CollectionSearch:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: 'false' + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + xdbautomation: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomation:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + xdbcollection: + condition: service_started + xdbsearch: + condition: service_started + environment: + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection + Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + xdbautomationrpt: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationrpt:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + environment: + Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + cortexprocessing: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessing:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + environment: + Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + cortexreporting: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexreporting:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + environment: + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + xdbrefdata: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbrefdata:${SITECORE_VERSION} + depends_on: + mssql-init: + condition: service_healthy + environment: + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"] + timeout: 300s + xdbsearchworker: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbsearchworker:${SITECORE_VERSION} + depends_on: + xdbsearch: + condition: service_healthy + restart: unless-stopped + environment: + Sitecore_ConnectionStrings_Collection: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Xdb.Collection.ShardMapManager;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_SolrCore: http://solr:8983/solr/${SOLR_CORE_PREFIX_NAME}_xdb;solrCloud=true + Sitecore_License: ${SITECORE_LICENSE} + Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrReaderSettings:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:SearchIndexer:Services:Solr.SolrWriterSettings:Options:RequireHttps: 'false' + Sitecore_Sitecore:XConnect:CollectionSearch:Services:XConnectSolrHealthCheckServicesConfiguration:Options:RequireHttps: 'false' + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"] + timeout: 300s + xdbautomationworker: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-xdbautomationworker:${SITECORE_VERSION} + depends_on: + xdbcollection: + condition: service_healthy + xdbsearch: + condition: service_healthy + restart: unless-stopped + environment: + Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection + Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch + Sitecore_ConnectionStrings_Xdb.Marketingautomation: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Marketingautomation;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Xdb.Referencedata: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Referencedata;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Messaging: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Messaging;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"] + timeout: 300s + cortexprocessingworker: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cortexprocessingworker:${SITECORE_VERSION} + depends_on: + xdbcollection: + condition: service_healthy + xdbsearch: + condition: service_healthy + restart: unless-stopped + environment: + Sitecore_ConnectionStrings_Processing.Engine.Storage: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Storage;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_Processing.Engine.Tasks: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Processing.Engine.Tasks;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_ConnectionStrings_XConnect.Collection: http://xdbcollection + Sitecore_ConnectionStrings_XConnect.Configuration: http://xdbcollection + Sitecore_ConnectionStrings_XConnect.Search: http://xdbsearch + Sitecore_ConnectionStrings_Reporting: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Reporting;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_License: ${SITECORE_LICENSE} + healthcheck: + test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1 -Port 8080"] + timeout: 300s \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/mssql-data/readme.md b/compose/sxp/10.4/ltsc2019/xp1/mssql-data/readme.md new file mode 100644 index 00000000..d3edaed8 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/mssql-data/readme.md @@ -0,0 +1 @@ +database files will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/solr-data/readme.md b/compose/sxp/10.4/ltsc2019/xp1/solr-data/readme.md new file mode 100644 index 00000000..7a168695 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/solr-data/readme.md @@ -0,0 +1 @@ +solr indexes will be mounted here \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/traefik/certs/readme b/compose/sxp/10.4/ltsc2019/xp1/traefik/certs/readme new file mode 100644 index 00000000..95e398fc --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/traefik/certs/readme @@ -0,0 +1,7 @@ +Add TLS certificates for xp1cd.localhost, xp1cm.localhost and xp1id.localhost hosts to this folder: + xp1cd.localhost.crt + xp1cd.localhost.key + xp1cm.localhost.crt + xp1cm.localhost.key + xp1id.localhost.crt + xp1id.localhost.key \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/traefik/config/dynamic/certs_config.yaml b/compose/sxp/10.4/ltsc2019/xp1/traefik/config/dynamic/certs_config.yaml new file mode 100644 index 00000000..725742ba --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/traefik/config/dynamic/certs_config.yaml @@ -0,0 +1,8 @@ +tls: + certificates: + - certFile: C:\etc\traefik\certs\xp1cd.localhost.crt + keyFile: C:\etc\traefik\certs\xp1cd.localhost.key + - certFile: C:\etc\traefik\certs\xp1cm.localhost.crt + keyFile: C:\etc\traefik\certs\xp1cm.localhost.key + - certFile: C:\etc\traefik\certs\xp1id.localhost.crt + keyFile: C:\etc\traefik\certs\xp1id.localhost.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-from-version.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-from-version.txt new file mode 100644 index 00000000..6495db7e --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-from-version.txt @@ -0,0 +1 @@ +10.3.0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt new file mode 100644 index 00000000..7400abcd --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -0,0 +1 @@ +10.4.0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sitecore-license.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sitecore-license.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-database-prefix.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-database-prefix.txt new file mode 100644 index 00000000..84e851b6 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-database-prefix.txt @@ -0,0 +1 @@ +Sitecore \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-password.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-server.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-server.txt new file mode 100644 index 00000000..a5faf708 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-server.txt @@ -0,0 +1 @@ +mssql \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-user-name.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/sql-user-name.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/k8s-init-upgrade.ps1 b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/k8s-init-upgrade.ps1 new file mode 100644 index 00000000..a02b2d96 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/k8s-init-upgrade.ps1 @@ -0,0 +1,117 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp1")] + [string]$Topology = "xm1", + + [string] + [ValidateNotNullOrEmpty()] + $SecretsFolderPath = ".\configuration", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + [Parameter(Mandatory = $true)] + [string] + $SqlUserName, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [Parameter(Mandatory = $true)] + [string] + $SqlUserPassword, + + [boolean] + $IsAlwaysEncrypted = $false, + + [string] + $ProcessingEngineTasksDatabaseUserName = "dbo", + + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Populate-ContentSecrets { + param( + [string]$SecretsFolderPath, + [hashtable]$K8sSecretArray, + [string]$Topology + ) + + Write-Information -MessageData "Starting populating the secret .txt files to '$SecretsFolderPath' folder for k8s '$Topology' topology..." -InformationAction Continue + + $K8sSecretArray.keys | ForEach-Object { + $secretFilePath = Join-Path $SecretsFolderPath $_ + if (Test-Path $secretFilePath -PathType Leaf) { + Set-Content $secretFilePath -Value "$($K8sSecretArray[$_])" -Force -NoNewline + } + } + + Write-Information -MessageData "Finish populating the secret .txt files to '$SecretsFolderPath' folder for k8s '$Topology' topology." -InformationAction Continue +} + +function Invoke-K8sInitUpgrade { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $k8sSecretArray = @{ + "sitecore-license.txt" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "sql-password.txt" = $SqlUserPassword + "sql-user-name.txt" = $SqlUserName + "processing-engine-tasks-database-user-name.txt" = $ProcessingEngineTasksDatabaseUserName + "is-always-encrypted.txt" = $IsAlwaysEncrypted + } + + # Populate the .txt secret files + Populate-ContentSecrets -SecretsFolderPath $SecretsFolderPath -K8sSecretArray $k8sSecretArray -Topology $Topology +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "k8s-init-upgrade-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-K8sInitUpgrade *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/kustomization.yaml new file mode 100644 index 00000000..370dc424 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/kustomization.yaml @@ -0,0 +1,21 @@ +generatorOptions: + disableNameSuffixHash: true +configMapGenerator: +- name: mssql-upgrade-config + files: + - configuration/sql-server.txt + - configuration/sql-database-prefix.txt + - configuration/database-upgrade-from-version.txt + - configuration/database-upgrade-to-version.txt +secretGenerator: +- name: mssql-upgrade-secret + files: + - configuration/sql-user-name.txt + - configuration/sql-password.txt + - configuration/sitecore-license.txt +resources: +- mssql-upgrade.yaml +images: +- name: sitecore-xm1-mssql-upgrade + newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-upgrade + newTag: 10.4-ltsc2019 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/mssql-upgrade.yaml b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/mssql-upgrade.yaml new file mode 100644 index 00000000..a9eff564 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/mssql-upgrade.yaml @@ -0,0 +1,60 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: mssql-upgrade +spec: + template: + spec: + nodeSelector: + kubernetes.io/os: windows + imagePullSecrets: + - name: sitecore-docker-registry + containers: + - name: mssql-upgrade + image: sitecore-xm1-mssql-upgrade + env: + - name: SQL_DATABASE_PREFIX + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: sql-database-prefix.txt + - name: SQL_SERVER + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: sql-server.txt + - name: SQL_USER_NAME + valueFrom: + secretKeyRef: + name: mssql-upgrade-secret + key: sql-user-name.txt + - name: SQL_PASSWORD + valueFrom: + secretKeyRef: + name: mssql-upgrade-secret + key: sql-password.txt + - name: DATABASE_UPGRADE_FROM_VERSION + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: database-upgrade-from-version.txt + - name: DATABASE_UPGRADE_TO_VERSION + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: database-upgrade-to-version.txt + - name: SITECORE_LICENSE + valueFrom: + secretKeyRef: + name: mssql-upgrade-secret + key: sitecore-license.txt + - name: Sitecore_ConnectionStrings_Core + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Core;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Master + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Master;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Web + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Web;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Experienceforms + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Experienceforms;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + restartPolicy: Never + backoffLimit: 5 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-from-version.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-from-version.txt new file mode 100644 index 00000000..6495db7e --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-from-version.txt @@ -0,0 +1 @@ +10.3.0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt new file mode 100644 index 00000000..7400abcd --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -0,0 +1 @@ +10.4.0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/is-always-encrypted.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/is-always-encrypted.txt new file mode 100644 index 00000000..02e4a84d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/is-always-encrypted.txt @@ -0,0 +1 @@ +false \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/processing-engine-tasks-database-user-name.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/processing-engine-tasks-database-user-name.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sitecore-license.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sitecore-license.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-database-prefix.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-database-prefix.txt new file mode 100644 index 00000000..84e851b6 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-database-prefix.txt @@ -0,0 +1 @@ +Sitecore \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-password.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-server.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-server.txt new file mode 100644 index 00000000..a5faf708 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-server.txt @@ -0,0 +1 @@ +mssql \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-user-name.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/sql-user-name.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/k8s-init-upgrade.ps1 b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/k8s-init-upgrade.ps1 new file mode 100644 index 00000000..0be0ed14 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/k8s-init-upgrade.ps1 @@ -0,0 +1,117 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp1")] + [string]$Topology = "xp1", + + [string] + [ValidateNotNullOrEmpty()] + $SecretsFolderPath = ".\configuration", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + [Parameter(Mandatory = $true)] + [string] + $SqlUserName, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [Parameter(Mandatory = $true)] + [string] + $SqlUserPassword, + + [boolean] + $IsAlwaysEncrypted = $false, + + [string] + $ProcessingEngineTasksDatabaseUserName = "dbo", + + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Populate-ContentSecrets { + param( + [string]$SecretsFolderPath, + [hashtable]$K8sSecretArray, + [string]$Topology + ) + + Write-Information -MessageData "Starting populating the secret .txt files to '$SecretsFolderPath' folder for k8s '$Topology' topology..." -InformationAction Continue + + $K8sSecretArray.keys | ForEach-Object { + $secretFilePath = Join-Path $SecretsFolderPath $_ + if (Test-Path $secretFilePath -PathType Leaf) { + Set-Content $secretFilePath -Value "$($K8sSecretArray[$_])" -Force -NoNewline + } + } + + Write-Information -MessageData "Finish populating the secret .txt files to '$SecretsFolderPath' folder for k8s '$Topology' topology." -InformationAction Continue +} + +function Invoke-K8sInitUpgrade { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $k8sSecretArray = @{ + "sitecore-license.txt" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "sql-password.txt" = $SqlUserPassword + "sql-user-name.txt" = $SqlUserName + "processing-engine-tasks-database-user-name.txt" = $ProcessingEngineTasksDatabaseUserName + "is-always-encrypted.txt" = $IsAlwaysEncrypted + } + + # Populate the .txt secret files + Populate-ContentSecrets -SecretsFolderPath $SecretsFolderPath -K8sSecretArray $k8sSecretArray -Topology $Topology +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "k8s-init-upgrade-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-K8sInitUpgrade *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/kustomization.yaml new file mode 100644 index 00000000..6a0b29b0 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/kustomization.yaml @@ -0,0 +1,23 @@ +generatorOptions: + disableNameSuffixHash: true +configMapGenerator: +- name: mssql-upgrade-config + files: + - configuration/sql-server.txt + - configuration/sql-database-prefix.txt + - configuration/is-always-encrypted.txt + - configuration/processing-engine-tasks-database-user-name.txt + - configuration/database-upgrade-from-version.txt + - configuration/database-upgrade-to-version.txt +secretGenerator: +- name: mssql-upgrade-secret + files: + - configuration/sql-user-name.txt + - configuration/sql-password.txt + - configuration/sitecore-license.txt +resources: +- mssql-upgrade.yaml +images: +- name: sitecore-xp1-mssql-upgrade + newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-upgrade + newTag: 10.4-ltsc2019 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/mssql-upgrade.yaml b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/mssql-upgrade.yaml new file mode 100644 index 00000000..309affb3 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/mssql-upgrade.yaml @@ -0,0 +1,85 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: mssql-upgrade +spec: + template: + spec: + nodeSelector: + kubernetes.io/os: windows + imagePullSecrets: + - name: sitecore-docker-registry + containers: + - name: mssql-upgrade + image: sitecore-xp1-mssql-upgrade + env: + - name: SQL_DATABASE_PREFIX + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: sql-database-prefix.txt + - name: SQL_SERVER + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: sql-server.txt + - name: IS_ALWAYS_ENCRYPTED + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: is-always-encrypted.txt + - name: PROCESSING_ENGINE_TASKS_DATABASE_USERNAME + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: processing-engine-tasks-database-user-name.txt + - name: SQL_USER_NAME + valueFrom: + secretKeyRef: + name: mssql-upgrade-secret + key: sql-user-name.txt + - name: SQL_PASSWORD + valueFrom: + secretKeyRef: + name: mssql-upgrade-secret + key: sql-password.txt + - name: DATABASE_UPGRADE_FROM_VERSION + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: database-upgrade-from-version.txt + - name: DATABASE_UPGRADE_TO_VERSION + valueFrom: + configMapKeyRef: + name: mssql-upgrade-config + key: database-upgrade-to-version.txt + - name: SITECORE_LICENSE + valueFrom: + secretKeyRef: + name: mssql-upgrade-secret + key: sitecore-license.txt + - name: Sitecore_ConnectionStrings_Core + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Core;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Master + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Master;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Web + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Web;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Experienceforms + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Experienceforms;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Processing_Engine_Tasks + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Processing.Engine.Tasks;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Messaging + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Messaging;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Reporting + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Reporting;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Xdb_Collection_Shard0 + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Xdb.Collection.Shard0;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Xdb_Collection_Shard1 + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Xdb.Collection.Shard1;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Marketingautomation + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Marketingautomation;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + - name: Sitecore_ConnectionStrings_Processing_Pools + value: Data Source=$(SQL_SERVER);Initial Catalog=$(SQL_DATABASE_PREFIX).Processing.Pools;User ID=$(SQL_USER_NAME);Password=$(SQL_PASSWORD); + restartPolicy: Never + backoffLimit: 5 + \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/cd.yaml b/k8s/sxp/10.4/ltsc2019/xm1/cd.yaml new file mode 100644 index 00000000..06a71955 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/cd.yaml @@ -0,0 +1,154 @@ +apiVersion: v1 +kind: Service +metadata: + name: cd +spec: + selector: + app: cd + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cd + labels: + app: cd +spec: + replicas: 1 + selector: + matchLabels: + app: cd + template: + metadata: + labels: + app: cd + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cd + image: sitecore-xm1-cd + ports: + - containerPort: 80 + env: + - name: Sitecore_InstanceName + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Web_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-username.txt + - name: Web_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-password.txt + - name: Forms_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-username.txt + - name: Forms_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: LOG_LEVEL_VALUE + valueFrom: + secretKeyRef: + name: sitecore-log-level + key: sitecore-log-level-value.txt + - name: Sitecore_ConnectionStrings_Security + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Web + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Web;User ID=$(Web_Database_Username);Password=$(Web_Database_Password); + - name: Sitecore_ConnectionStrings_ExperienceForms + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).ExperienceForms;User ID=$(Forms_Database_Username);Password=$(Forms_Database_Password); + - name: Sitecore_ConnectionStrings_Solr.Search + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-connection-string.txt + - name: Sitecore_ConnectionStrings_Redis.Sessions + value: redis:6379,ssl=False,abortConnect=False + - name: SOLR_CORE_PREFIX_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-core-prefix-name.txt + - name: MEDIA_REQUEST_PROTECTION_SHARED_SECRET + valueFrom: + secretKeyRef: + name: sitecore-protect-media-requests + key: sitecore-media-request-protection-shared-secret.txt + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: cd + - mountPath: C:\inetpub\wwwroot\App_Data\DeviceDetection + name: device-detection + resources: + requests: + memory: 2500Mi + cpu: 1000m + limits: + memory: 4Gi + cpu: 1500m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + - name: device-detection + persistentVolumeClaim: + claimName: device-detection + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/cm.yaml b/k8s/sxp/10.4/ltsc2019/xm1/cm.yaml new file mode 100644 index 00000000..d3b3ec0d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/cm.yaml @@ -0,0 +1,198 @@ +apiVersion: v1 +kind: Service +metadata: + name: cm +spec: + selector: + app: cm + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm + labels: + app: cm +spec: + replicas: 1 + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cm + image: sitecore-xm1-cm + ports: + - containerPort: 80 + env: + - name: Sitecore_InstanceName + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-username.txt + - name: Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-password.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Web_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-username.txt + - name: Web_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-password.txt + - name: Forms_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-username.txt + - name: Forms_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-password.txt + - name: Sitecore_ConnectionStrings_Sitecoreidentity.secret + valueFrom: + secretKeyRef: + name: sitecore-identity + key: sitecore-identitysecret.txt + - name: Sitecore_AppSettings_Telerik.AsyncUpload.ConfigurationEncryptionKey + valueFrom: + secretKeyRef: + name: sitecore-telerik + key: sitecore-telerikencryptionkey.txt + - name: Sitecore_AppSettings_Telerik.Upload.ConfigurationHashKey + valueFrom: + secretKeyRef: + name: sitecore-telerik + key: sitecore-telerikencryptionkey.txt + - name: Sitecore_AppSettings_Telerik.Web.UI.DialogParametersEncryptionKey + valueFrom: + secretKeyRef: + name: sitecore-telerik + key: sitecore-telerikencryptionkey.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: LOG_LEVEL_VALUE + valueFrom: + secretKeyRef: + name: sitecore-log-level + key: sitecore-log-level-value.txt + - name: Sitecore_ConnectionStrings_Core + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Security + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Master + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Master;User ID=$(Master_Database_Username);Password=$(Master_Database_Password); + - name: Sitecore_ConnectionStrings_Web + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Web;User ID=$(Web_Database_Username);Password=$(Web_Database_Password); + - name: Sitecore_ConnectionStrings_ExperienceForms + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).ExperienceForms;User ID=$(Forms_Database_Username);Password=$(Forms_Database_Password); + - name: Sitecore_ConnectionStrings_Solr.Search + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-connection-string.txt + - name: Sitecore_GraphQL_Enabled + value: "true" + - name: Sitecore_GraphQL_ExposePlayground + value: "false" + - name: Sitecore_GraphQL_UploadMediaOptions_EncryptionKey + valueFrom: + secretKeyRef: + name: sitecore-graphql + key: sitecore-graphql-uploadmedia_encryptionkey.txt + - name: Sitecore_Identity_Server_Authority + value: https://id-placeholder-hostname + - name: Sitecore_Identity_Server_CallbackAuthority + value: https://cm-placeholder-hostname + - name: Sitecore_Identity_Server_InternalAuthority + value: http://id + - name: Sitecore_Identity_Server_Require_Https + value: "false" + - name: SOLR_CORE_PREFIX_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-core-prefix-name.txt + - name: MEDIA_REQUEST_PROTECTION_SHARED_SECRET + valueFrom: + secretKeyRef: + name: sitecore-protect-media-requests + key: sitecore-media-request-protection-shared-secret.txt + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: cm + resources: + requests: + memory: 2500Mi + cpu: 1000m + limits: + memory: 4Gi + cpu: 1500m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/configmaps/cd-hostname b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/cd-hostname new file mode 100644 index 00000000..d6c7cb76 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/cd-hostname @@ -0,0 +1 @@ +cd.globalhost \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/configmaps/cm-hostname b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/cm-hostname new file mode 100644 index 00000000..3d05b3fe --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/cm-hostname @@ -0,0 +1 @@ +cm.globalhost \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/configmaps/id-hostname b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/id-hostname new file mode 100644 index 00000000..1e750d1a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/id-hostname @@ -0,0 +1 @@ +id.globalhost \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/configmaps/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/kustomization.yaml new file mode 100644 index 00000000..ea28225a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/configmaps/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: +- name: sitecore-hostnames + files: + - cd-hostname + - cm-hostname + - id-hostname \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml new file mode 100644 index 00000000..cf1783cb --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +- name: mssql + newName: mcr.microsoft.com/mssql/server + newTag: 2022-CU10-ubuntu-22.04 +- name: redis + newName: redis + newTag: 4.0.14-alpine +- name: solr + newName: solr + newTag: 8.11.2 + +resources: + - mssql.yaml + - redis.yaml + - solr.yaml \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml b/k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml new file mode 100644 index 00000000..a7781007 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml @@ -0,0 +1,60 @@ +apiVersion: v1 +kind: Service +metadata: + name: mssql +spec: + selector: + app: mssql + ports: + - protocol: TCP + port: 1433 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mssql + labels: + app: mssql +spec: + replicas: 1 + selector: + matchLabels: + app: mssql + template: + metadata: + labels: + app: mssql + spec: + nodeSelector: + kubernetes.io/os: linux + containers: + - name: mssql + image: mssql + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 101 + ports: + - containerPort: 1433 + env: + - name: SA_PASSWORD + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databasepassword.txt + - name: ACCEPT_EULA + value: "Y" + volumeMounts: + - mountPath: /var/opt/mssql + name: sql + resources: + requests: + memory: 2Gi + cpu: 200m + limits: + memory: 3Gi + cpu: 700m + volumes: + - name: sql + emptyDir: {} \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/external/redis.yaml b/k8s/sxp/10.4/ltsc2019/xm1/external/redis.yaml new file mode 100644 index 00000000..1bd7c8df --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/external/redis.yaml @@ -0,0 +1,52 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis +spec: + selector: + app: redis + ports: + - protocol: TCP + port: 6379 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis + labels: + app: redis +spec: + replicas: 1 + selector: + matchLabels: + app: redis + template: + metadata: + labels: + app: redis + spec: + volumes: + - emptyDir: {} + name: data + nodeSelector: + kubernetes.io/os: linux + containers: + - name: sitecore-redis + image: redis + ports: + - containerPort: 6379 + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + resources: + requests: + memory: 100Mi + cpu: 100m + limits: + memory: 2500Mi + cpu: 500m + volumeMounts: + - mountPath: /data + name: data \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/external/solr.yaml b/k8s/sxp/10.4/ltsc2019/xm1/external/solr.yaml new file mode 100644 index 00000000..0e3f533f --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/external/solr.yaml @@ -0,0 +1,65 @@ +apiVersion: v1 +kind: Service +metadata: + name: solr +spec: + selector: + app: solr + ports: + - protocol: TCP + port: 8983 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: solr + labels: + app: solr +spec: + replicas: 1 + selector: + matchLabels: + app: solr + template: + metadata: + labels: + app: solr + spec: + nodeSelector: + kubernetes.io/os: linux + containers: + - name: solr + image: solr + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + ports: + - containerPort: 8983 + env: + - name: SOLR_MODE + value: solrcloud + startupProbe: + httpGet: + path: /solr/admin/info/system + port: 8983 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 30 + periodSeconds: 10 + failureThreshold: 10 + volumeMounts: + - mountPath: /tmp + name: tmp + resources: + requests: + memory: 2Gi + cpu: 500m + limits: + memory: 3Gi + cpu: 1500m + volumes: + - emptyDir: {} + name: tmp \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/id.yaml b/k8s/sxp/10.4/ltsc2019/xm1/id.yaml new file mode 100644 index 00000000..fa907eb3 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/id.yaml @@ -0,0 +1,120 @@ +apiVersion: v1 +kind: Service +metadata: + name: id +spec: + selector: + app: id + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: id + labels: + app: id +spec: + replicas: 1 + selector: + matchLabels: + app: id + template: + metadata: + labels: + app: id + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-id + image: sitecore-xm1-id + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1 + valueFrom: + secretKeyRef: + name: sitecore-identity + key: sitecore-identitysecret.txt + - name: Sitecore_Sitecore__IdentityServer__CertificateRawData + valueFrom: + secretKeyRef: + name: sitecore-identitycertificate + key: sitecore-identitycertificate.txt + - name: Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword + valueFrom: + secretKeyRef: + name: sitecore-identitycertificate + key: sitecore-identitycertificatepassword.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl + value: https://cm-placeholder-hostname/sitecore/login?rc=1 + - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 + value: https://cm-placeholder-hostname + - name: Sitecore_Sitecore__IdentityServer__PublicOrigin + value: https://id-placeholder-hostname + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\Identity\logs + name: logs + subPath: id + resources: + requests: + memory: 700Mi + cpu: 200m + limits: + memory: 1Gi + cpu: 300m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/configuration.yaml b/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/configuration.yaml new file mode 100644 index 00000000..369feaeb --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/configuration.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-ingress-ingress-nginx-controller +data: + use-forwarded-headers: "true" \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/ingress.yaml b/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/ingress.yaml new file mode 100644 index 00000000..3b939a42 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/ingress.yaml @@ -0,0 +1,55 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: sitecore-ingress + annotations: + nginx.ingress.kubernetes.io/proxy-buffer-size: "32k" + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/proxy-connect-timeout: "600" + nginx.ingress.kubernetes.io/proxy-read-timeout: "600" + nginx.ingress.kubernetes.io/proxy-send-timeout: "600" + nginx.ingress.kubernetes.io/proxy-body-size: "512m" +spec: + ingressClassName: "nginx" + rules: + - host: cd-placeholder-hostname + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: cd + port: + number: 80 + - host: cm-placeholder-hostname + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: cm + port: + number: 80 + - host: id-placeholder-hostname + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: id + port: + number: 80 + tls: + - secretName: global-cd-tls + hosts: + - cd-placeholder-hostname + - secretName: global-cm-tls + hosts: + - cm-placeholder-hostname + - secretName: global-id-tls + hosts: + - id-placeholder-hostname \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/kustomization.yaml new file mode 100644 index 00000000..cf09a27d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/ingress-nginx/kustomization.yaml @@ -0,0 +1,69 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ../configmaps +- ingress.yaml +- configuration.yaml + +replacements: +- source: + fieldPath: data.cd-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.rules.[host=cd-placeholder-hostname].host + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.tls.[secretName=global-cd-tls].hosts.0 +- source: + fieldPath: data.cm-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.rules.[host=cm-placeholder-hostname].host + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.tls.[secretName=global-cm-tls].hosts.0 +- source: + fieldPath: data.id-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.rules.[host=id-placeholder-hostname].host + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.tls.[secretName=global-id-tls].hosts.0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml new file mode 100644 index 00000000..65bbe83b --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +- name: sitecore-xm1-mssql-init + newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-init + newTag: 10.4-ltsc2019 +- name: sitecore-xm1-solr-init + newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init + newTag: 10.4-ltsc2019 + +resources: + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/init/mssql-init.yaml b/k8s/sxp/10.4/ltsc2019/xm1/init/mssql-init.yaml new file mode 100644 index 00000000..2b084a0e --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/init/mssql-init.yaml @@ -0,0 +1,92 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: mssql-init +spec: + template: + spec: + nodeSelector: + kubernetes.io/os: windows + imagePullSecrets: + - name: sitecore-docker-registry + containers: + - name: mssql-init + image: sitecore-xm1-mssql-init + env: + - name: sitecore_admin_password + valueFrom: + secretKeyRef: + name: sitecore-admin + key: sitecore-adminpassword.txt + - name: SQL_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databasepassword.txt + - name: SQL_ADMIN_LOGIN + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseusername.txt + - name: SQL_SERVER + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: SQL_ELASTIC_POOL_NAME + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-database-elastic-pool-name.txt + - name: Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-username.txt + - name: Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-password.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Web_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-username.txt + - name: Web_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-password.txt + - name: Forms_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-username.txt + - name: Forms_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-password.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sql_Custom_Database_Prefix_Update_From + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-custom-database-prefix-update-from.txt + restartPolicy: Never + backoffLimit: 5 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/init/solr-init.yaml b/k8s/sxp/10.4/ltsc2019/xm1/init/solr-init.yaml new file mode 100644 index 00000000..6e4f1700 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/init/solr-init.yaml @@ -0,0 +1,27 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: solr-init +spec: + template: + spec: + nodeSelector: + kubernetes.io/os: windows + imagePullSecrets: + - name: sitecore-docker-registry + containers: + - name: solr-init + image: sitecore-xm1-solr-init + env: + - name: SITECORE_SOLR_CONNECTION_STRING + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-connection-string.txt + - name: SOLR_CORE_PREFIX_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-core-prefix-name.txt + restartPolicy: Never + backoffLimit: 5 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 b/k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 new file mode 100644 index 00000000..a8084728 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 @@ -0,0 +1,372 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp1")] + [string]$Topology = "xm1", + + [string] + [ValidateNotNullOrEmpty()] + $SecretsFolderPath = ".\secrets", + + [string] + $CertDataFolder = ".\secrets\tls", + + [string] + $ConfigmapsDataFolder = ".\configmaps", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + [string] + $CdHost = "cd.globalhost", + + [string] + $CmHost = "cm.globalhost", + + [string] + $IdHost = "id.globalhost", + + [Parameter(Mandatory = $true)] + [string] + $ExternalIPAddress, + + [Parameter(Mandatory = $true)] + [string] + $SqlUserName, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [Parameter(Mandatory = $true)] + [string] + $SqlUserPassword, + + [string] + $SqlServer = "mssql", + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [Parameter(Mandatory = $true)] + [string] + $SitecoreAdminPassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlCoreDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlFormsDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlMasterDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlWebDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlCollectionShardmapmanagerDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlExmMasterDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlMarketingAutomationDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlMessagingDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingEngineStorageDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingEngineTasksDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingPoolsDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingTasksDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlReferenceDataDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlReportingDatabasePassword, + + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; +[boolean]$RootCertificateCreated = $false; + +$certDataFolderList = @{ + "$CertDataFolder\global-cd" = "$CdHost" + "$CertDataFolder\global-cm" = "$CmHost" + "$CertDataFolder\global-id" = "$IdHost" +} + +$configmapsHostnameList = @{ + "$ConfigmapsDataFolder\cd-hostname" = "$CdHost" + "$ConfigmapsDataFolder\cm-hostname" = "$CmHost" + "$ConfigmapsDataFolder\id-hostname" = "$IdHost" +} + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Populate-ContentSecrets { + param( + [string]$SecretsFolderPath, + [hashtable]$K8sSecretArray + ) + + Write-Information -MessageData "Starting populating the secret .txt files for '$SecretsFolderPath' folder..." -InformationAction Continue + + $K8sSecretArray.keys | ForEach-Object { + $secretFilePath = Join-Path $SecretsFolderPath $_ + if (Test-Path $secretFilePath -PathType Leaf) { + Set-Content $secretFilePath -Value "$($K8sSecretArray[$_])" -Force -NoNewline + } + } + + Write-Information -MessageData "Finish populating the secret .txt files for '$SecretsFolderPath' folder." -InformationAction Continue +} + +function Add-WindowsHostsFileEntries{ + param( + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost, + [string]$ExternalIPAddress + ) + + Write-Information -MessageData "Starting adding Windows hosts file entries for k8s '$Topology' topology..." -InformationAction Continue + + Add-HostsEntry -Hostname "$CdHost" -IPAddress $ExternalIPAddress + Add-HostsEntry -Hostname "$CmHost" -IPAddress $ExternalIPAddress + Add-HostsEntry -Hostname "$IdHost" -IPAddress $ExternalIPAddress + + Write-Information -MessageData "Finish adding Windows hosts file entries for k8s '$Topology' topology." -InformationAction Continue +} + +function Update-ConfigmapsFolder{ + param( + [hashtable]$ConfigmapsHostnameList, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + $ConfigmapsHostnameList.Keys | ForEach-Object { + $hostnameFile = $_ + $hostName = $ConfigmapsHostnameList[$_] + + if (!(Test-Path $hostnameFile)) { + Write-Warning -Message "The configmaps hostname '$hostnameFile' path isn't valid. Please, specify another path for hostnames configmaps." + return + } + + # Clear *-hostname file + Clear-Content -Path $hostnameFile + + # Setting new content to the *-hostname file + $hostName | Set-Content $hostnameFile -NoNewline + + Write-Information -MessageData "'$hostnameFile' file was successfully updated." -InformationAction Continue + } +} + +function Create-Certificates{ + param( + [string]$CertDataFolder, + [hashtable]$CertDataFolderList, + [string]$Topology + ) + + if (![string]::IsNullOrEmpty($CertDataFolder)) { + + Write-Information -MessageData "Starting create certificates for k8s '$Topology' topology..." -InformationAction Continue + + # Check that root certificate file already exist in the $CertDataFolder + $existingRootCertificateFile = Get-ChildItem "$CertDataFolder\global-authority\*" -Include *.crt + + if (-not $existingRootCertificateFile){ + + # Create Root Certificate file + $rootKey = Create-RSAKey -KeyLength 4096 + $rootCertificate = Create-SelfSignedCertificate -Key $rootKey -CommonName "Sitecore Kubernetes Development Self-Signed Authority" + Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\global-authority\root.crt" + + # Create Certificate and Key files for each Sitecore role + $CertDataFolderList.Keys | ForEach-Object { + $certDataFolderName = $_ + $hostName = $CertDataFolderList[$_] + + if (!(Test-Path $certDataFolderName)) { + Write-Warning -Message "The certificate '$certDataFolderName' path isn't valid. Please, specify another path for certificates." + return + } + + $selfSignedKey = Create-RSAKey + $certificate = Create-SelfSignedCertificateWithSignature -Key $selfSignedKey -CommonName $hostName -DnsName $hostName -RootCertificate $rootCertificate + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$certDataFolderName\tls.key" + Create-CertificateFile -Certificate $certificate -OutCertPath "$certDataFolderName\tls.crt" + } + + Write-Information -MessageData "Finish creating certificates for k8s '$Topology' topology." -InformationAction Continue + return $true + } + else { + Write-Information -MessageData "Certificate files already exist for k8s '$Topology' topology." -InformationAction Continue + return $false + } + + }else { + Write-Information -MessageData "The TLS certificate path is empty. '\upgrade\*' folder doen't contains TLS certificates for k8s '$Topology' topology." -InformationAction Continue + } +} + +function ApplyOrGenerate-DatabasePassword{ + param( + [string]$DatabasePassword + ) + + $password = $null + + if ([string]::IsNullOrEmpty($DatabasePassword)){ + $password = Get-SitecoreRandomString 12 -DisallowSpecial + $password = "Password0_" + $password + }else { + $password = $DatabasePassword + } + + return $password +} + +function Invoke-K8sInit { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial + $k8sSecretArray = @{ + "sitecore-adminpassword.txt" = $SitecoreAdminPassword + "sitecore-identitycertificate.txt" = (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText) -KeyLength 2048) + "sitecore-identitysecret.txt" = Get-SitecoreRandomString 64 -DisallowSpecial + "sitecore-license.txt" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "sitecore-telerikencryptionkey.txt" = Get-SitecoreRandomString 128 -DisallowSpecial + "sitecore-reportingapikey.txt" = "00112233445566778899AABBCCDDEEFF" + "sitecore-identitycertificatepassword.txt" = $idCertPassword + "sitecore-databasepassword.txt" = $SqlUserPassword + "sitecore-databaseusername.txt" = $SqlUserName + "sitecore-databaseservername.txt" = $SqlServer + "sitecore-core-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlCoreDatabasePassword + "sitecore-forms-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlFormsDatabasePassword + "sitecore-master-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlMasterDatabasePassword + "sitecore-web-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlWebDatabasePassword + "sitecore-collection-shardmapmanager-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlCollectionShardmapmanagerDatabasePassword + "sitecore-exm-master-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlExmMasterDatabasePassword + "sitecore-marketing-automation-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlMarketingAutomationDatabasePassword + "sitecore-messaging-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlMessagingDatabasePassword + "sitecore-processing-engine-storage-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingEngineStorageDatabasePassword + "sitecore-processing-engine-tasks-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingEngineTasksDatabasePassword + "sitecore-processing-pools-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingPoolsDatabasePassword + "sitecore-processing-tasks-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingTasksDatabasePassword + "sitecore-reference-data-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlReferenceDataDatabasePassword + "sitecore-reporting-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlReportingDatabasePassword + "sitecore-media-request-protection-shared-secret.txt" = Get-SitecoreRandomString 64 -DisallowSpecial + "sitecore-graphql-uploadmedia_encryptionkey.txt" = Get-SitecoreRandomString 16 -DisallowSpecial + } + + # Populate the .txt secret files + Populate-ContentSecrets -SecretsFolderPath $SecretsFolderPath -K8sSecretArray $k8sSecretArray + + if (![string]::IsNullOrEmpty($CertDataFolder) -and (Test-Path $CertDataFolder)) { + + # Configure TLS/HTTPS certificates + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology + + if ($RootCertificateCreated){ + # The update for the \configmaps\*-hostname files is if Certificates were created for the custom hostnames. + Update-ConfigmapsFolder -ConfigmapsHostnameList $configmapsHostnameList -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + + # Install root certificate if it was created + Import-Certificate -FilePath "$CertDataFolder\global-authority\root.crt" -CertStoreLocation "Cert:\LocalMachine\Root" + + # Add Windows hosts file entries + Add-WindowsHostsFileEntries -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -ExternalIPAddress $ExternalIPAddress + } + } +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "k8s-init-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-K8sInit *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml new file mode 100644 index 00000000..a5b795c4 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml @@ -0,0 +1,73 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +- name: sitecore-xm1-cd + newName: scr.sitecore.com/sxp/sitecore-xm1-cd + newTag: 10.4-ltsc2019 +- name: sitecore-xm1-cm + newName: scr.sitecore.com/sxp/sitecore-xm1-cm + newTag: 10.4-ltsc2019 +- name: sitecore-xm1-id + newName: scr.sitecore.com/sxp/sitecore-id7 + newTag: 10.4-ltsc2019 + +resources: + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + +replacements: +- source: + fieldPath: data.cm-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + kind: Deployment + name: cm + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value + options: + delimiter: '//' + index: 1 + - select: + kind: Deployment + name: id + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value + options: + delimiter: '/' + index: 2 + - select: + kind: Deployment + name: id + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value + options: + delimiter: '//' + index: 1 +- source: + fieldPath: data.id-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + kind: Deployment + name: cm + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_Authority].value + options: + delimiter: '//' + index: 1 + - select: + kind: Deployment + name: id + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value + options: + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml new file mode 100644 index 00000000..1067f9d4 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ..\..\..\init + +patchesStrategicMerge: + - solr-init.yaml + +images: +- name: sitecore-xm1-solr-init-searchstax + newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init-searchstax + newTag: 10.4-ltsc2019 + +generatorOptions: + disableNameSuffixHash: true +secretGenerator: +- name: sitecore-solr-searchstax + files: + - sitecore-searchstax-apikey.txt + - sitecore-searchstax-account-name.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-account-name.txt b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-account-name.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-apikey.txt b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-apikey.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-deployment-uid.txt b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/sitecore-searchstax-deployment-uid.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/solr-init.yaml b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/solr-init.yaml new file mode 100644 index 00000000..cbfe0d32 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/solr-init.yaml @@ -0,0 +1,26 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: solr-init +spec: + template: + spec: + containers: + - name: solr-init + image: sitecore-xm1-solr-init-searchstax + env: + - name: SEARCH_STAX_APIKEY + valueFrom: + secretKeyRef: + name: sitecore-solr-searchstax + key: sitecore-searchstax-apikey.txt + - name: SEARCH_STAX_ACCOUNT_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr-searchstax + key: sitecore-searchstax-account-name.txt + - name: SEARCH_STAX_DEPLOYMENT_UID + valueFrom: + secretKeyRef: + name: sitecore-solr-searchstax + key: sitecore-searchstax-deployment-uid.txt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml new file mode 100644 index 00000000..99747337 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml @@ -0,0 +1,63 @@ +generatorOptions: + disableNameSuffixHash: true +secretGenerator: +- name: sitecore-admin + files: + - sitecore-adminpassword.txt +- name: sitecore-database + files: + - sitecore-databaseusername.txt + - sitecore-databasepassword.txt + - sitecore-databaseservername.txt + - sitecore-database-elastic-pool-name.txt + - sitecore-master-database-username.txt + - sitecore-master-database-password.txt + - sitecore-core-database-username.txt + - sitecore-core-database-password.txt + - sitecore-web-database-username.txt + - sitecore-web-database-password.txt + - sitecore-forms-database-username.txt + - sitecore-forms-database-password.txt + - sitecore-databaseprefix.txt + - sitecore-custom-database-prefix-update-from.txt +- name: sitecore-identitycertificate + files: + - sitecore-identitycertificate.txt + - sitecore-identitycertificatepassword.txt +- name: sitecore-license + files: + - sitecore-license.txt +- name: sitecore-graphql + files: + - sitecore-graphql-uploadmedia_encryptionkey.txt +- name: sitecore-identity + files: + - sitecore-identitysecret.txt +- name: sitecore-telerik + files: + - sitecore-telerikencryptionkey.txt +- name: sitecore-solr + files: + - sitecore-solr-connection-string.txt + - sitecore-solr-core-prefix-name.txt +- name: sitecore-protect-media-requests + files: + - sitecore-media-request-protection-shared-secret.txt +- name: sitecore-log-level + files: + - sitecore-log-level-value.txt +- name: global-cd-tls + files: + - tls/global-cd/tls.key + - tls/global-cd/tls.crt + type: kubernetes.io/tls +- name: global-cm-tls + files: + - tls/global-cm/tls.key + - tls/global-cm/tls.crt + type: kubernetes.io/tls +- name: global-id-tls + files: + - tls/global-id/tls.key + - tls/global-id/tls.crt + type: kubernetes.io/tls \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-adminpassword.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-adminpassword.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-core-database-password.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-core-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-core-database-username.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-core-database-username.txt new file mode 100644 index 00000000..1a01ffc1 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-core-database-username.txt @@ -0,0 +1 @@ +coreuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-custom-database-prefix-update-from.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-custom-database-prefix-update-from.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-database-elastic-pool-name.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-database-elastic-pool-name.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databasepassword.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databasepassword.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseprefix.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseprefix.txt new file mode 100644 index 00000000..84e851b6 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseprefix.txt @@ -0,0 +1 @@ +Sitecore \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseservername.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseservername.txt new file mode 100644 index 00000000..a5faf708 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseservername.txt @@ -0,0 +1 @@ +mssql \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseusername.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseusername.txt new file mode 100644 index 00000000..0107e44b --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-databaseusername.txt @@ -0,0 +1 @@ +sa \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-forms-database-password.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-forms-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-forms-database-username.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-forms-database-username.txt new file mode 100644 index 00000000..2af61966 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-forms-database-username.txt @@ -0,0 +1 @@ +formsuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt new file mode 100644 index 00000000..a7ce33d9 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt @@ -0,0 +1 @@ +432A462D4A614E64 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitycertificate.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitycertificate.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitycertificatepassword.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitycertificatepassword.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitysecret.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-identitysecret.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-license.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-license.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-log-level-value.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-log-level-value.txt new file mode 100644 index 00000000..6a34d78a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-log-level-value.txt @@ -0,0 +1 @@ +INFO \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-master-database-password.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-master-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-master-database-username.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-master-database-username.txt new file mode 100644 index 00000000..92db7144 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-master-database-username.txt @@ -0,0 +1 @@ +masteruser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-media-request-protection-shared-secret.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-media-request-protection-shared-secret.txt new file mode 100644 index 00000000..04d929b5 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-media-request-protection-shared-secret.txt @@ -0,0 +1 @@ +HQ(NjM(u6_5koVla-cTf4ta8x1h6Sb+ZcUQrULUz-0Afpx0cx-NuMtIoQkpDFmX5 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-connection-string.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-connection-string.txt new file mode 100644 index 00000000..223d335a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-connection-string.txt @@ -0,0 +1 @@ +http://solr:8983/solr;solrCloud=true \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-core-prefix-name.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-core-prefix-name.txt new file mode 100644 index 00000000..3220fb37 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-solr-core-prefix-name.txt @@ -0,0 +1 @@ +sitecore \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-telerikencryptionkey.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-telerikencryptionkey.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-web-database-password.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-web-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-web-database-username.txt b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-web-database-username.txt new file mode 100644 index 00000000..134ed9db --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/sitecore-web-database-username.txt @@ -0,0 +1 @@ +webuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-authority/readme b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-authority/readme new file mode 100644 index 00000000..e6e8c9db --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-authority/readme @@ -0,0 +1,2 @@ +Add generated root certificate authority to this folder: + root.crt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cd/readme b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cd/readme new file mode 100644 index 00000000..e9d69a7d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cd/readme @@ -0,0 +1,3 @@ +Add TLS certificate for cd.globalhost host to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cm/readme b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cm/readme new file mode 100644 index 00000000..4ff9e350 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-cm/readme @@ -0,0 +1,3 @@ +Add TLS certificate for cm.globalhost host to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-id/readme b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-id/readme new file mode 100644 index 00000000..9e46877e --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/global-id/readme @@ -0,0 +1,3 @@ +Add TLS certificate for id.globalhost host to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/device-detection.yaml b/k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/device-detection.yaml new file mode 100644 index 00000000..eade3f82 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/device-detection.yaml @@ -0,0 +1,20 @@ +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: device-detection +provisioner: file.csi.azure.com +parameters: + skuName: Standard_LRS +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: device-detection +spec: + accessModes: + - ReadWriteMany + storageClassName: device-detection + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/logs.yaml b/k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/logs.yaml new file mode 100644 index 00000000..290c5e6d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/volumes/azurefile/logs.yaml @@ -0,0 +1,20 @@ +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: logs +provisioner: file.csi.azure.com +parameters: + skuName: Standard_LRS +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: logs +spec: + accessModes: + - ReadWriteMany + storageClassName: logs + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/device-detection.yaml b/k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/device-detection.yaml new file mode 100644 index 00000000..cd894bcf --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/device-detection.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: device-detection +spec: + storageClassName: "" + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: "/sitecore/device-detection" + type: DirectoryOrCreate +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: device-detection +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + storageClassName: "" \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/logs.yaml b/k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/logs.yaml new file mode 100644 index 00000000..ab4a1098 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/volumes/hostpath/logs.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: logs +spec: + storageClassName: "" + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: "/sitecore/logs" + type: DirectoryOrCreate +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: logs +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + storageClassName: "" \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/cd.yaml b/k8s/sxp/10.4/ltsc2019/xp1/cd.yaml new file mode 100644 index 00000000..0eb51f1c --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/cd.yaml @@ -0,0 +1,206 @@ +apiVersion: v1 +kind: Service +metadata: + name: cd +spec: + selector: + app: cd + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cd + labels: + app: cd +spec: + replicas: 1 + selector: + matchLabels: + app: cd + template: + metadata: + labels: + app: cd + spec: + nodeSelector: + kubernetes.io/os: windows + initContainers: + - name: wait-xdbcollection + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbcollection/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbautomation + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbautomation/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbautomationrpt + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbautomationrpt/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbrefdata + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbrefdata/healthz/ready).StatusCode -eq 200} catch { $false }));"] + containers: + - name: sitecore-xp1-cd + image: sitecore-xp1-cd + ports: + - containerPort: 80 + env: + - name: Sitecore_InstanceName + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Web_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-username.txt + - name: Web_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-password.txt + - name: Forms_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-username.txt + - name: Forms_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-password.txt + - name: Exm_Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-exm-master-database-username.txt + - name: Exm_Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-exm-master-database-password.txt + - name: Messaging_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-username.txt + - name: Messaging_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: LOG_LEVEL_VALUE + valueFrom: + secretKeyRef: + name: sitecore-log-level + key: sitecore-log-level-value.txt + - name: Sitecore_ConnectionStrings_Security + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Web + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Web;User ID=$(Web_Database_Username);Password=$(Web_Database_Password); + - name: Sitecore_ConnectionStrings_Messaging + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Messaging;User ID=$(Messaging_Database_Username);Password=$(Messaging_Database_Password); + - name: Sitecore_ConnectionStrings_ExperienceForms + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).ExperienceForms;User ID=$(Forms_Database_Username);Password=$(Forms_Database_Password); + - name: Sitecore_ConnectionStrings_Exm.Master + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Exm.master;User ID=$(Exm_Master_Database_Username);Password=$(Exm_Master_Database_Password); + - name: Sitecore_ConnectionStrings_Solr.Search + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-connection-string.txt + - name: Sitecore_ConnectionStrings_XConnect.Collection + value: http://xdbcollection + - name: Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client + value: http://xdbautomation + - name: Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client + value: http://xdbautomationrpt + - name: Sitecore_ConnectionStrings_Xdb.ReferenceData.Client + value: http://xdbrefdata + - name: Sitecore_ConnectionStrings_Redis.Sessions + value: redis:6379,ssl=False,abortConnect=False + - name: Sitecore_Analytics_Forwarded_Request_Http_Header + value: X-Forwarded-For + - name: SOLR_CORE_PREFIX_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-core-prefix-name.txt + - name: MEDIA_REQUEST_PROTECTION_SHARED_SECRET + valueFrom: + secretKeyRef: + name: sitecore-protect-media-requests + key: sitecore-media-request-protection-shared-secret.txt + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\Submit Queue + name: submit-queue + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: cd + - mountPath: C:\inetpub\wwwroot\App_Data\DeviceDetection + name: device-detection + resources: + requests: + memory: 1Gi + cpu: 1000m + limits: + memory: 3Gi + cpu: 2000m + volumes: + - name: submit-queue + persistentVolumeClaim: + claimName: submit-queue + - name: logs + persistentVolumeClaim: + claimName: logs + - name: device-detection + persistentVolumeClaim: + claimName: device-detection + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/cm.yaml b/k8s/sxp/10.4/ltsc2019/xp1/cm.yaml new file mode 100644 index 00000000..12fb3fd6 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/cm.yaml @@ -0,0 +1,291 @@ +apiVersion: v1 +kind: Service +metadata: + name: cm +spec: + selector: + app: cm + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm + labels: + app: cm +spec: + replicas: 1 + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + initContainers: + - name: wait-xdbcollection + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbcollection/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbsearch + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbsearch/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-cortexreporting + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://cortexreporting/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-cortexprocessing + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://cortexprocessing/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbautomation + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbautomation/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbautomationrpt + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbautomationrpt/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbrefdata + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbrefdata/healthz/ready).StatusCode -eq 200} catch { $false }));"] + containers: + - name: sitecore-xp1-cm + image: sitecore-xp1-cm + ports: + - containerPort: 80 + env: + - name: Sitecore_InstanceName + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-username.txt + - name: Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-password.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Web_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-username.txt + - name: Web_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-password.txt + - name: Forms_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-username.txt + - name: Forms_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-password.txt + - name: Exm_Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-exm-master-database-username.txt + - name: Exm_Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-exm-master-database-password.txt + - name: Messaging_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-username.txt + - name: Messaging_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-password.txt + - name: Reporting_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-username.txt + - name: Reporting_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Sitecore_ConnectionStrings_Sitecoreidentity.secret + valueFrom: + secretKeyRef: + name: sitecore-identity + key: sitecore-identitysecret.txt + - name: Sitecore_AppSettings_Telerik.AsyncUpload.ConfigurationEncryptionKey + valueFrom: + secretKeyRef: + name: sitecore-telerik + key: sitecore-telerikencryptionkey.txt + - name: Sitecore_AppSettings_Telerik.Upload.ConfigurationHashKey + valueFrom: + secretKeyRef: + name: sitecore-telerik + key: sitecore-telerikencryptionkey.txt + - name: Sitecore_AppSettings_Telerik.Web.UI.DialogParametersEncryptionKey + valueFrom: + secretKeyRef: + name: sitecore-telerik + key: sitecore-telerikencryptionkey.txt + - name: Sitecore_ConnectionStrings_Reporting.ApiKey + valueFrom: + secretKeyRef: + name: sitecore-reporting + key: sitecore-reportingapikey.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: LOG_LEVEL_VALUE + valueFrom: + secretKeyRef: + name: sitecore-log-level + key: sitecore-log-level-value.txt + - name: Sitecore_ConnectionStrings_Core + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Security + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Master + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Master;User ID=$(Master_Database_Username);Password=$(Master_Database_Password); + - name: Sitecore_ConnectionStrings_Web + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Web;User ID=$(Web_Database_Username);Password=$(Web_Database_Password); + - name: Sitecore_ConnectionStrings_Messaging + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Messaging;User ID=$(Messaging_Database_Username);Password=$(Messaging_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + - name: Sitecore_ConnectionStrings_ExperienceForms + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).ExperienceForms;User ID=$(Forms_Database_Username);Password=$(Forms_Database_Password); + - name: Sitecore_ConnectionStrings_Exm.Master + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Exm.master;User ID=$(Exm_Master_Database_Username);Password=$(Exm_Master_Database_Password); + - name: Sitecore_ConnectionStrings_Reporting + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Reporting;User ID=$(Reporting_Database_Username);Password=$(Reporting_Database_Password); + - name: Sitecore_ConnectionStrings_Sitecore.Reporting.Client + value: http://cortexreporting + - name: Sitecore_ConnectionStrings_Cortex.Processing.Engine + value: http://cortexprocessing + - name: Sitecore_ConnectionStrings_Solr.Search + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-connection-string.txt + - name: Sitecore_ConnectionStrings_XConnect.Collection + value: http://xdbcollection + - name: Sitecore_ConnectionStrings_XConnect.Search + value: http://xdbsearch + - name: Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Operations.Client + value: http://xdbautomation + - name: Sitecore_ConnectionStrings_Xdb.MarketingAutomation.Reporting.Client + value: http://xdbautomationrpt + - name: Sitecore_ConnectionStrings_Xdb.ReferenceData.Client + value: http://xdbrefdata + - name: Sitecore_Processing_Service_Url + value: http://prc + - name: Sitecore_Processing_Service_Require_Https + value: 'false' + - name: Sitecore_GraphQL_Enabled + value: "true" + - name: Sitecore_GraphQL_ExposePlayground + value: "false" + - name: Sitecore_GraphQL_UploadMediaOptions_EncryptionKey + valueFrom: + secretKeyRef: + name: sitecore-graphql + key: sitecore-graphql-uploadmedia_encryptionkey.txt + - name: Sitecore_Identity_Server_Authority + value: https://id-placeholder-hostname + - name: Sitecore_Identity_Server_CallbackAuthority + value: https://cm-placeholder-hostname + - name: Sitecore_Identity_Server_InternalAuthority + value: http://id + - name: Sitecore_Identity_Server_Require_Https + value: "false" + - name: SOLR_CORE_PREFIX_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-core-prefix-name.txt + - name: MEDIA_REQUEST_PROTECTION_SHARED_SECRET + valueFrom: + secretKeyRef: + name: sitecore-protect-media-requests + key: sitecore-media-request-protection-shared-secret.txt + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: cm + resources: + requests: + memory: 800Mi + cpu: 1000m + limits: + memory: 3Gi + cpu: 2000m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/configmaps/cd-hostname b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/cd-hostname new file mode 100644 index 00000000..d6c7cb76 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/cd-hostname @@ -0,0 +1 @@ +cd.globalhost \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/configmaps/cm-hostname b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/cm-hostname new file mode 100644 index 00000000..3d05b3fe --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/cm-hostname @@ -0,0 +1 @@ +cm.globalhost \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/configmaps/id-hostname b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/id-hostname new file mode 100644 index 00000000..1e750d1a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/id-hostname @@ -0,0 +1 @@ +id.globalhost \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/configmaps/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/kustomization.yaml new file mode 100644 index 00000000..ea28225a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/configmaps/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: +- name: sitecore-hostnames + files: + - cd-hostname + - cm-hostname + - id-hostname \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/cortexprocessing.yaml b/k8s/sxp/10.4/ltsc2019/xp1/cortexprocessing.yaml new file mode 100644 index 00000000..a68bc3ba --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/cortexprocessing.yaml @@ -0,0 +1,111 @@ +apiVersion: v1 +kind: Service +metadata: + name: cortexprocessing +spec: + selector: + app: cortexprocessing + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cortexprocessing + labels: + app: cortexprocessing +spec: + replicas: 1 + selector: + matchLabels: + app: cortexprocessing + template: + metadata: + labels: + app: cortexprocessing + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cortexprocessing + image: sitecore-xp1-cortexprocessing + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Processing_Engine_Tasks_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-tasks-database-username.txt + - name: Processing_Engine_Tasks_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-tasks-database-password.txt + - name: Processing_Engine_Storage_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-storage-database-username.txt + - name: Processing_Engine_Storage_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-storage-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Processing.Engine.Storage + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.Engine.Storage;User ID=$(Processing_Engine_Storage_Database_Username);Password=$(Processing_Engine_Storage_Database_Password); + - name: Sitecore_ConnectionStrings_Processing.Engine.Tasks + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.Engine.Tasks;User ID=$(Processing_Engine_Tasks_Database_Username);Password=$(Processing_Engine_Tasks_Database_Password); + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: cortexprocessing + resources: + requests: + memory: 500Mi + cpu: 100m + limits: + memory: 1Gi + cpu: 300m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/cortexprocessingworker.yaml b/k8s/sxp/10.4/ltsc2019/xp1/cortexprocessingworker.yaml new file mode 100644 index 00000000..2292ae00 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/cortexprocessingworker.yaml @@ -0,0 +1,130 @@ +apiVersion: v1 +kind: Service +metadata: + name: cortexprocessingworker +spec: + selector: + app: cortexprocessingworker + ports: + - protocol: TCP + port: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cortexprocessingworker + labels: + app: cortexprocessingworker +spec: + replicas: 1 + selector: + matchLabels: + app: cortexprocessingworker + template: + metadata: + labels: + app: cortexprocessingworker + spec: + nodeSelector: + kubernetes.io/os: windows + initContainers: + - name: wait-xdbcollection + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbcollection/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbsearch + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbsearch/healthz/ready).StatusCode -eq 200} catch { $false }));"] + containers: + - name: sitecore-xp1-cortexprocessingworker + image: sitecore-xp1-cortexprocessingworker + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Processing_Engine_Tasks_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-tasks-database-username.txt + - name: Processing_Engine_Tasks_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-tasks-database-password.txt + - name: Processing_Engine_Storage_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-storage-database-username.txt + - name: Processing_Engine_Storage_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-storage-database-password.txt + - name: Reporting_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-username.txt + - name: Reporting_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Processing.Engine.Storage + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.Engine.Storage;User ID=$(Processing_Engine_Storage_Database_Username);Password=$(Processing_Engine_Storage_Database_Password); + - name: Sitecore_ConnectionStrings_Processing.Engine.Tasks + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.Engine.Tasks;User ID=$(Processing_Engine_Tasks_Database_Username);Password=$(Processing_Engine_Tasks_Database_Password); + - name: Sitecore_ConnectionStrings_Xconnect.Collection + value: http://xdbcollection + - name: Sitecore_ConnectionStrings_Xconnect.Configuration + value: http://xdbcollection + - name: Sitecore_ConnectionStrings_XConnect.Search + value: http://xdbsearch + - name: Sitecore_ConnectionStrings_Reporting + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Reporting;User ID=$(Reporting_Database_Username);Password=$(Reporting_Database_Password); + livenessProbe: + exec: + command: + - curl + - http://localhost:8080/healthz/live + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + exec: + command: + - curl + - http://localhost:8080/healthz/ready + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\service\App_Data\Logs + name: logs + subPath: cortexprocessingworker + resources: + requests: + memory: 200Mi + cpu: 100m + limits: + memory: 1Gi + cpu: 300m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/cortexreporting.yaml b/k8s/sxp/10.4/ltsc2019/xp1/cortexreporting.yaml new file mode 100644 index 00000000..83de04d6 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/cortexreporting.yaml @@ -0,0 +1,99 @@ +apiVersion: v1 +kind: Service +metadata: + name: cortexreporting +spec: + selector: + app: cortexreporting + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cortexreporting + labels: + app: cortexreporting +spec: + replicas: 1 + selector: + matchLabels: + app: cortexreporting + template: + metadata: + labels: + app: cortexreporting + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cortexreporting + image: sitecore-xp1-cortexreporting + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Reporting_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-username.txt + - name: Reporting_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Reporting + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Reporting;User ID=$(Reporting_Database_Username);Password=$(Reporting_Database_Password); + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: cortexreporting + resources: + requests: + memory: 500Mi + cpu: 100m + limits: + memory: 1Gi + cpu: 300m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml new file mode 100644 index 00000000..cf1783cb --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +- name: mssql + newName: mcr.microsoft.com/mssql/server + newTag: 2022-CU10-ubuntu-22.04 +- name: redis + newName: redis + newTag: 4.0.14-alpine +- name: solr + newName: solr + newTag: 8.11.2 + +resources: + - mssql.yaml + - redis.yaml + - solr.yaml \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml b/k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml new file mode 100644 index 00000000..a7781007 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml @@ -0,0 +1,60 @@ +apiVersion: v1 +kind: Service +metadata: + name: mssql +spec: + selector: + app: mssql + ports: + - protocol: TCP + port: 1433 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mssql + labels: + app: mssql +spec: + replicas: 1 + selector: + matchLabels: + app: mssql + template: + metadata: + labels: + app: mssql + spec: + nodeSelector: + kubernetes.io/os: linux + containers: + - name: mssql + image: mssql + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 101 + ports: + - containerPort: 1433 + env: + - name: SA_PASSWORD + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databasepassword.txt + - name: ACCEPT_EULA + value: "Y" + volumeMounts: + - mountPath: /var/opt/mssql + name: sql + resources: + requests: + memory: 2Gi + cpu: 200m + limits: + memory: 3Gi + cpu: 700m + volumes: + - name: sql + emptyDir: {} \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/external/redis.yaml b/k8s/sxp/10.4/ltsc2019/xp1/external/redis.yaml new file mode 100644 index 00000000..3cff892d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/external/redis.yaml @@ -0,0 +1,52 @@ +apiVersion: v1 +kind: Service +metadata: + name: redis +spec: + selector: + app: redis + ports: + - protocol: TCP + port: 6379 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis + labels: + app: redis +spec: + replicas: 1 + selector: + matchLabels: + app: redis + template: + metadata: + labels: + app: redis + spec: + volumes: + - emptyDir: {} + name: data + nodeSelector: + kubernetes.io/os: linux + containers: + - name: sitecore-redis + image: redis + ports: + - containerPort: 6379 + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + volumeMounts: + - mountPath: /data + name: data + resources: + requests: + memory: 100Mi + cpu: 100m + limits: + memory: 2500Mi + cpu: 500m \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/external/solr.yaml b/k8s/sxp/10.4/ltsc2019/xp1/external/solr.yaml new file mode 100644 index 00000000..a62ad43d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/external/solr.yaml @@ -0,0 +1,65 @@ +apiVersion: v1 +kind: Service +metadata: + name: solr +spec: + selector: + app: solr + ports: + - protocol: TCP + port: 8983 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: solr + labels: + app: solr +spec: + replicas: 1 + selector: + matchLabels: + app: solr + template: + metadata: + labels: + app: solr + spec: + nodeSelector: + kubernetes.io/os: linux + containers: + - name: solr + image: solr + securityContext: + allowPrivilegeEscalation: false + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + ports: + - containerPort: 8983 + env: + - name: SOLR_MODE + value: solrcloud + startupProbe: + httpGet: + path: /solr/admin/info/system + port: 8983 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 30 + periodSeconds: 10 + failureThreshold: 10 + volumeMounts: + - mountPath: /tmp + name: tmp + resources: + requests: + memory: 2Gi + cpu: 500m + limits: + memory: 3Gi + cpu: 1500m + volumes: + - emptyDir: {} + name: tmp \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/id.yaml b/k8s/sxp/10.4/ltsc2019/xp1/id.yaml new file mode 100644 index 00000000..8d5b4731 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/id.yaml @@ -0,0 +1,120 @@ +apiVersion: v1 +kind: Service +metadata: + name: id +spec: + selector: + app: id + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: id + labels: + app: id +spec: + replicas: 1 + selector: + matchLabels: + app: id + template: + metadata: + labels: + app: id + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-id + image: sitecore-xp1-id + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1 + valueFrom: + secretKeyRef: + name: sitecore-identity + key: sitecore-identitysecret.txt + - name: Sitecore_Sitecore__IdentityServer__CertificateRawData + valueFrom: + secretKeyRef: + name: sitecore-identitycertificate + key: sitecore-identitycertificate.txt + - name: Sitecore_Sitecore__IdentityServer__CertificateRawDataPassword + valueFrom: + secretKeyRef: + name: sitecore-identitycertificate + key: sitecore-identitycertificatepassword.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl + value: https://cm-placeholder-hostname/sitecore/login?rc=1 + - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 + value: https://cm-placeholder-hostname + - name: Sitecore_Sitecore__IdentityServer__PublicOrigin + value: https://id-placeholder-hostname + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\Identity\logs + name: logs + subPath: id + resources: + requests: + memory: 400Mi + cpu: 50m + limits: + memory: 1Gi + cpu: 200m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/configuration.yaml b/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/configuration.yaml new file mode 100644 index 00000000..369feaeb --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/configuration.yaml @@ -0,0 +1,6 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: nginx-ingress-ingress-nginx-controller +data: + use-forwarded-headers: "true" \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/ingress.yaml b/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/ingress.yaml new file mode 100644 index 00000000..3b939a42 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/ingress.yaml @@ -0,0 +1,55 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: sitecore-ingress + annotations: + nginx.ingress.kubernetes.io/proxy-buffer-size: "32k" + nginx.ingress.kubernetes.io/affinity: "cookie" + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/proxy-connect-timeout: "600" + nginx.ingress.kubernetes.io/proxy-read-timeout: "600" + nginx.ingress.kubernetes.io/proxy-send-timeout: "600" + nginx.ingress.kubernetes.io/proxy-body-size: "512m" +spec: + ingressClassName: "nginx" + rules: + - host: cd-placeholder-hostname + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: cd + port: + number: 80 + - host: cm-placeholder-hostname + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: cm + port: + number: 80 + - host: id-placeholder-hostname + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: id + port: + number: 80 + tls: + - secretName: global-cd-tls + hosts: + - cd-placeholder-hostname + - secretName: global-cm-tls + hosts: + - cm-placeholder-hostname + - secretName: global-id-tls + hosts: + - id-placeholder-hostname \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/kustomization.yaml new file mode 100644 index 00000000..9f7e12f5 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/ingress-nginx/kustomization.yaml @@ -0,0 +1,69 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../configmaps + - ingress.yaml + - configuration.yaml + +replacements: +- source: + fieldPath: data.cd-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.rules.[host=cd-placeholder-hostname].host + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.tls.[secretName=global-cd-tls].hosts.0 +- source: + fieldPath: data.cm-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.rules.[host=cm-placeholder-hostname].host + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.tls.[secretName=global-cm-tls].hosts.0 +- source: + fieldPath: data.id-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.rules.[host=id-placeholder-hostname].host + - select: + group: networking.k8s.io + kind: Ingress + name: sitecore-ingress + version: v1 + fieldPaths: + - spec.tls.[secretName=global-id-tls].hosts.0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml new file mode 100644 index 00000000..b22774ad --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +- name: sitecore-xp1-mssql-init + newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-init + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-solr-init + newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init + newTag: 10.4-ltsc2019 + +resources: + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/init/mssql-init.yaml b/k8s/sxp/10.4/ltsc2019/xp1/init/mssql-init.yaml new file mode 100644 index 00000000..2430f0f4 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/init/mssql-init.yaml @@ -0,0 +1,192 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: mssql-init +spec: + template: + spec: + nodeSelector: + kubernetes.io/os: windows + imagePullSecrets: + - name: sitecore-docker-registry + containers: + - name: mssql-init + image: sitecore-xp1-mssql-init + env: + - name: sitecore_admin_password + valueFrom: + secretKeyRef: + name: sitecore-admin + key: sitecore-adminpassword.txt + - name: SQL_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databasepassword.txt + - name: SQL_ADMIN_LOGIN + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseusername.txt + - name: SQL_SERVER + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: SQL_ELASTIC_POOL_NAME + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-database-elastic-pool-name.txt + - name: Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-username.txt + - name: Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-password.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Web_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-username.txt + - name: Web_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-password.txt + - name: Forms_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-username.txt + - name: Forms_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-forms-database-password.txt + - name: Exm_Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-exm-master-database-username.txt + - name: Exm_Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-exm-master-database-password.txt + - name: Marketing_Automation_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-username.txt + - name: Marketing_Automation_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-password.txt + - name: Messaging_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-username.txt + - name: Messaging_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-password.txt + - name: Reporting_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-username.txt + - name: Reporting_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Processing_Pools_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-username.txt + - name: Processing_Pools_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-password.txt + - name: Processing_Tasks_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-tasks-database-username.txt + - name: Processing_Tasks_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-tasks-database-password.txt + - name: Processing_Engine_Tasks_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-tasks-database-username.txt + - name: Processing_Engine_Tasks_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-tasks-database-password.txt + - name: Processing_Engine_Storage_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-storage-database-username.txt + - name: Processing_Engine_Storage_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-engine-storage-database-password.txt + - name: Collection_ShardMapManager_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-username.txt + - name: Collection_ShardMapManager_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-password.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sql_Custom_Database_Prefix_Update_From + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-custom-database-prefix-update-from.txt + restartPolicy: Never + backoffLimit: 5 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/init/solr-init.yaml b/k8s/sxp/10.4/ltsc2019/xp1/init/solr-init.yaml new file mode 100644 index 00000000..1efdb3c1 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/init/solr-init.yaml @@ -0,0 +1,27 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: solr-init +spec: + template: + spec: + nodeSelector: + kubernetes.io/os: windows + imagePullSecrets: + - name: sitecore-docker-registry + containers: + - name: solr-init + image: sitecore-xp1-solr-init + env: + - name: SITECORE_SOLR_CONNECTION_STRING + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-connection-string.txt + - name: SOLR_CORE_PREFIX_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr + key: sitecore-solr-core-prefix-name.txt + restartPolicy: Never + backoffLimit: 5 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 b/k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 new file mode 100644 index 00000000..9cadef50 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 @@ -0,0 +1,372 @@ +[CmdletBinding()] +Param ( + [ValidateSet("xm1","xp1")] + [string]$Topology = "xp1", + + [string] + [ValidateNotNullOrEmpty()] + $SecretsFolderPath = ".\secrets", + + [string] + $CertDataFolder = ".\secrets\tls", + + [string] + $ConfigmapsDataFolder = ".\configmaps", + + [Parameter(Mandatory = $true)] + [string] + [ValidateNotNullOrEmpty()] + $LicenseXmlPath, + + [string] + $CdHost = "cd.globalhost", + + [string] + $CmHost = "cm.globalhost", + + [string] + $IdHost = "id.globalhost", + + [Parameter(Mandatory = $true)] + [string] + $ExternalIPAddress, + + [Parameter(Mandatory = $true)] + [string] + $SqlUserName, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [Parameter(Mandatory = $true)] + [string] + $SqlUserPassword, + + [string] + $SqlServer = "mssql", + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [Parameter(Mandatory = $true)] + [string] + $SitecoreAdminPassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlCoreDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlFormsDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlMasterDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlWebDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlCollectionShardmapmanagerDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlExmMasterDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlMarketingAutomationDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlMessagingDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingEngineStorageDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingEngineTasksDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingPoolsDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlProcessingTasksDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlReferenceDataDatabasePassword, + + # We do not need to use [SecureString] here since the value will be stored unencrypted in secrets, + # and used only for transient local example environment. + [string] + $SqlReportingDatabasePassword, + + [string] + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", + + [string] + $SpecificVersion +) + +$ErrorActionPreference = "Stop"; +[boolean]$RootCertificateCreated = $false; + +$certDataFolderList = @{ + "$CertDataFolder\global-cd" = "$CdHost" + "$CertDataFolder\global-cm" = "$CmHost" + "$CertDataFolder\global-id" = "$IdHost" +} + +$configmapsHostnameList = @{ + "$ConfigmapsDataFolder\cd-hostname" = "$CdHost" + "$ConfigmapsDataFolder\cm-hostname" = "$CmHost" + "$ConfigmapsDataFolder\id-hostname" = "$IdHost" +} + +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion + ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } + + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } + } +} + +function Populate-ContentSecrets { + param( + [string]$SecretsFolderPath, + [hashtable]$K8sSecretArray + ) + + Write-Information -MessageData "Starting populating the secret .txt files for '$SecretsFolderPath' folder..." -InformationAction Continue + + $K8sSecretArray.keys | ForEach-Object { + $secretFilePath = Join-Path $SecretsFolderPath $_ + if (Test-Path $secretFilePath -PathType Leaf) { + Set-Content $secretFilePath -Value "$($K8sSecretArray[$_])" -Force -NoNewline + } + } + + Write-Information -MessageData "Finish populating the secret .txt files for '$SecretsFolderPath' folder." -InformationAction Continue +} + +function Add-WindowsHostsFileEntries{ + param( + [string]$Topology, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost, + [string]$ExternalIPAddress + ) + + Write-Information -MessageData "Starting adding Windows hosts file entries for k8s '$Topology' topology..." -InformationAction Continue + + Add-HostsEntry -Hostname "$CdHost" -IPAddress $ExternalIPAddress + Add-HostsEntry -Hostname "$CmHost" -IPAddress $ExternalIPAddress + Add-HostsEntry -Hostname "$IdHost" -IPAddress $ExternalIPAddress + + Write-Information -MessageData "Finish adding Windows hosts file entries for k8s '$Topology' topology." -InformationAction Continue +} + +function Update-ConfigmapsFolder{ + param( + [hashtable]$ConfigmapsHostnameList, + [string]$CdHost, + [string]$CmHost, + [string]$IdHost + ) + + $ConfigmapsHostnameList.Keys | ForEach-Object { + $hostnameFile = $_ + $hostName = $ConfigmapsHostnameList[$_] + + if (!(Test-Path $hostnameFile)) { + Write-Warning -Message "The configmaps hostname '$hostnameFile' path isn't valid. Please, specify another path for hostnames configmaps." + return + } + + # Clear *-hostname file + Clear-Content -Path $hostnameFile + + # Setting new content to the *-hostname file + $hostName | Set-Content $hostnameFile -NoNewline + + Write-Information -MessageData "'$hostnameFile' file was successfully updated." -InformationAction Continue + } +} + +function Create-Certificates{ + param( + [string]$CertDataFolder, + [hashtable]$CertDataFolderList, + [string]$Topology + ) + + if (![string]::IsNullOrEmpty($CertDataFolder)) { + + Write-Information -MessageData "Starting create certificates for k8s '$Topology' topology..." -InformationAction Continue + + # Check that root certificate file already exist in the $CertDataFolder + $existingRootCertificateFile = Get-ChildItem "$CertDataFolder\global-authority\*" -Include *.crt + + if (-not $existingRootCertificateFile){ + + # Create Root Certificate file + $rootKey = Create-RSAKey -KeyLength 4096 + $rootCertificate = Create-SelfSignedCertificate -Key $rootKey -CommonName "Sitecore Kubernetes Development Self-Signed Authority" + Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\global-authority\root.crt" + + # Create Certificate and Key files for each Sitecore role + $CertDataFolderList.Keys | ForEach-Object { + $certDataFolderName = $_ + $hostName = $CertDataFolderList[$_] + + if (!(Test-Path $certDataFolderName)) { + Write-Warning -Message "The certificate '$certDataFolderName' path isn't valid. Please, specify another path for certificates." + return + } + + $selfSignedKey = Create-RSAKey + $certificate = Create-SelfSignedCertificateWithSignature -Key $selfSignedKey -CommonName $hostName -DnsName $hostName -RootCertificate $rootCertificate + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$certDataFolderName\tls.key" + Create-CertificateFile -Certificate $certificate -OutCertPath "$certDataFolderName\tls.crt" + } + + Write-Information -MessageData "Finish creating certificates for k8s '$Topology' topology." -InformationAction Continue + return $true + } + else { + Write-Information -MessageData "Certificate files already exist for k8s '$Topology' topology." -InformationAction Continue + return $false + } + + }else { + Write-Information -MessageData "The TLS certificate path is empty. '\upgrade\*' folder doen't contains TLS certificates for k8s '$Topology' topology." -InformationAction Continue + } +} + +function ApplyOrGenerate-DatabasePassword{ + param( + [string]$DatabasePassword + ) + + $password = $null + + if ([string]::IsNullOrEmpty($DatabasePassword)){ + $password = Get-SitecoreRandomString 12 -DisallowSpecial + $password = "Password0_" + $password + }else { + $password = $DatabasePassword + } + + return $password +} + +function Invoke-K8sInit { + if (-not (Test-Path $LicenseXmlPath)) { + throw "Did not find $LicenseXmlPath" + } + if (-not (Test-Path $LicenseXmlPath -PathType Leaf)) { + throw "$LicenseXmlPath is not a file" + } + + # Install and Import SitecoreDockerTools + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion + + $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial + $k8sSecretArray = @{ + "sitecore-adminpassword.txt" = $SitecoreAdminPassword + "sitecore-identitycertificate.txt" = (Get-SitecoreCertificateAsBase64String -DnsName "localhost" -Password (ConvertTo-SecureString -String $idCertPassword -Force -AsPlainText) -KeyLength 2048) + "sitecore-identitysecret.txt" = Get-SitecoreRandomString 64 -DisallowSpecial + "sitecore-license.txt" = ConvertTo-CompressedBase64String -Path $LicenseXmlPath + "sitecore-telerikencryptionkey.txt" = Get-SitecoreRandomString 128 -DisallowSpecial + "sitecore-reportingapikey.txt" = "00112233445566778899AABBCCDDEEFF" + "sitecore-identitycertificatepassword.txt" = $idCertPassword + "sitecore-databasepassword.txt" = $SqlUserPassword + "sitecore-databaseusername.txt" = $SqlUserName + "sitecore-databaseservername.txt" = $SqlServer + "sitecore-core-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlCoreDatabasePassword + "sitecore-forms-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlFormsDatabasePassword + "sitecore-master-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlMasterDatabasePassword + "sitecore-web-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlWebDatabasePassword + "sitecore-collection-shardmapmanager-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlCollectionShardmapmanagerDatabasePassword + "sitecore-exm-master-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlExmMasterDatabasePassword + "sitecore-marketing-automation-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlMarketingAutomationDatabasePassword + "sitecore-messaging-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlMessagingDatabasePassword + "sitecore-processing-engine-storage-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingEngineStorageDatabasePassword + "sitecore-processing-engine-tasks-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingEngineTasksDatabasePassword + "sitecore-processing-pools-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingPoolsDatabasePassword + "sitecore-processing-tasks-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlProcessingTasksDatabasePassword + "sitecore-reference-data-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlReferenceDataDatabasePassword + "sitecore-reporting-database-password.txt" = ApplyOrGenerate-DatabasePassword -DatabasePassword $SqlReportingDatabasePassword + "sitecore-media-request-protection-shared-secret.txt" = Get-SitecoreRandomString 64 -DisallowSpecial + "sitecore-graphql-uploadmedia_encryptionkey.txt" = Get-SitecoreRandomString 16 -DisallowSpecial + } + + # Populate the .txt secret files + Populate-ContentSecrets -SecretsFolderPath $SecretsFolderPath -K8sSecretArray $k8sSecretArray + + if (![string]::IsNullOrEmpty($CertDataFolder) -and (Test-Path $CertDataFolder)) { + + # Configure TLS/HTTPS certificates + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology + + if ($RootCertificateCreated){ + # The update for the \configmaps\*-hostname files is if Certificates were created for the custom hostnames. + Update-ConfigmapsFolder -ConfigmapsHostnameList $configmapsHostnameList -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + + # Install root certificate if it was created + Import-Certificate -FilePath "$CertDataFolder\global-authority\root.crt" -CertStoreLocation "Cert:\LocalMachine\Root" + + # Add Windows hosts file entries + Add-WindowsHostsFileEntries -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -ExternalIPAddress $ExternalIPAddress + } + } +} + +$logFilePath = Join-Path -path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath "k8s-init-$(Get-date -f 'yyyyMMddHHmmss').log"; +Invoke-K8sInit *>&1 | Tee-Object $logFilePath \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml new file mode 100644 index 00000000..2cc78104 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml @@ -0,0 +1,119 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +- name: sitecore-xp1-cd + newName: scr.sitecore.com/sxp/sitecore-xp1-cd + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-cm + newName: scr.sitecore.com/sxp/sitecore-xp1-cm + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-id + newName: scr.sitecore.com/sxp/sitecore-id7 + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-cortexprocessing + newName: scr.sitecore.com/sxp/sitecore-xp1-cortexprocessing + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-cortexprocessingworker + newName: scr.sitecore.com/sxp/sitecore-xp1-cortexprocessingworker + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-cortexreporting + newName: scr.sitecore.com/sxp/sitecore-xp1-cortexreporting + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-prc + newName: scr.sitecore.com/sxp/sitecore-xp1-prc + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-xdbautomation + newName: scr.sitecore.com/sxp/sitecore-xp1-xdbautomation + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-xdbautomationrpt + newName: scr.sitecore.com/sxp/sitecore-xp1-xdbautomationrpt + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-xdbautomationworker + newName: scr.sitecore.com/sxp/sitecore-xp1-xdbautomationworker + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-xdbcollection + newName: scr.sitecore.com/sxp/sitecore-xp1-xdbcollection + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-xdbrefdata + newName: scr.sitecore.com/sxp/sitecore-xp1-xdbrefdata + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-xdbsearch + newName: scr.sitecore.com/sxp/sitecore-xp1-xdbsearch + newTag: 10.4-ltsc2019 +- name: sitecore-xp1-xdbsearchworker + newName: scr.sitecore.com/sxp/sitecore-xp1-xdbsearchworker + newTag: 10.4-ltsc2019 +- name: pwsh-initContainer + newName: mcr.microsoft.com/powershell:lts-nanoserver-1809 + +resources: + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + - cortexprocessing.yaml + - cortexprocessingworker.yaml + - cortexreporting.yaml + - prc.yaml + - xdbautomation.yaml + - xdbautomationrpt.yaml + - xdbautomationworker.yaml + - xdbcollection.yaml + - xdbrefdata.yaml + - xdbsearch.yaml + - xdbsearchworker.yaml + +replacements: +- source: + fieldPath: data.cm-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + kind: Deployment + name: cm + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value + options: + delimiter: '//' + index: 1 + - select: + kind: Deployment + name: id + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value + options: + delimiter: '/' + index: 2 + - select: + kind: Deployment + name: id + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value + options: + delimiter: '//' + index: 1 +- source: + fieldPath: data.id-hostname + kind: ConfigMap + name: sitecore-hostnames + version: v1 + targets: + - select: + kind: Deployment + name: cm + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_Authority].value + options: + delimiter: '//' + index: 1 + - select: + kind: Deployment + name: id + fieldPaths: + - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value + options: + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml new file mode 100644 index 00000000..2b3fd12b --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ..\..\..\init + +patchesStrategicMerge: + - solr-init.yaml + +images: +- name: sitecore-xp1-solr-init-searchstax + newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init-searchstax + newTag: 10.4-ltsc2019 + +generatorOptions: + disableNameSuffixHash: true +secretGenerator: +- name: sitecore-solr-searchstax + files: + - sitecore-searchstax-apikey.txt + - sitecore-searchstax-account-name.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-account-name.txt b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-account-name.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-apikey.txt b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-apikey.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-deployment-uid.txt b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/sitecore-searchstax-deployment-uid.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/solr-init.yaml b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/solr-init.yaml new file mode 100644 index 00000000..14309743 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/solr-init.yaml @@ -0,0 +1,26 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: solr-init +spec: + template: + spec: + containers: + - name: solr-init + image: sitecore-xp1-solr-init-searchstax + env: + - name: SEARCH_STAX_APIKEY + valueFrom: + secretKeyRef: + name: sitecore-solr-searchstax + key: sitecore-searchstax-apikey.txt + - name: SEARCH_STAX_ACCOUNT_NAME + valueFrom: + secretKeyRef: + name: sitecore-solr-searchstax + key: sitecore-searchstax-account-name.txt + - name: SEARCH_STAX_DEPLOYMENT_UID + valueFrom: + secretKeyRef: + name: sitecore-solr-searchstax + key: sitecore-searchstax-deployment-uid.txt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/prc.yaml b/k8s/sxp/10.4/ltsc2019/xp1/prc.yaml new file mode 100644 index 00000000..0a07471f --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/prc.yaml @@ -0,0 +1,186 @@ +apiVersion: v1 +kind: Service +metadata: + name: prc +spec: + selector: + app: prc + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: prc + labels: + app: prc +spec: + replicas: 1 + selector: + matchLabels: + app: prc + template: + metadata: + labels: + app: prc + spec: + nodeSelector: + kubernetes.io/os: windows + initContainers: + - name: wait-xdbcollection + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbcollection/healthz/ready).StatusCode -eq 200} catch { $false }));"] + containers: + - name: sitecore-xp1-prc + image: sitecore-xp1-prc + ports: + - containerPort: 80 + env: + - name: Sitecore_InstanceName + valueFrom: + fieldRef: + fieldPath: metadata.name + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-username.txt + - name: Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-password.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Reporting_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-username.txt + - name: Reporting_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reporting-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Processing_Pools_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-username.txt + - name: Processing_Pools_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-password.txt + - name: Processing_Tasks_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-tasks-database-username.txt + - name: Processing_Tasks_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-tasks-database-password.txt + - name: Sitecore_ConnectionStrings_Reporting.ApiKey + valueFrom: + secretKeyRef: + name: sitecore-reporting + key: sitecore-reportingapikey.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: LOG_LEVEL_VALUE + valueFrom: + secretKeyRef: + name: sitecore-log-level + key: sitecore-log-level-value.txt + - name: Sitecore_ConnectionStrings_Core + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Security + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + - name: Sitecore_ConnectionStrings_Master + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Master;User ID=$(Master_Database_Username);Password=$(Master_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Processing.Pools + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.pools;User ID=$(Processing_Pools_Database_Username);Password=$(Processing_Pools_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Processing.Tasks + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.tasks;User ID=$(Processing_Tasks_Database_Username);Password=$(Processing_Tasks_Database_Password); + - name: Sitecore_ConnectionStrings_Reporting + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Reporting;User ID=$(Reporting_Database_Username);Password=$(Reporting_Database_Password); + - name: Sitecore_ConnectionStrings_XConnect.Collection + value: http://xdbcollection + - name: MEDIA_REQUEST_PROTECTION_SHARED_SECRET + valueFrom: + secretKeyRef: + name: sitecore-protect-media-requests + key: sitecore-media-request-protection-shared-secret.txt + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: prc + resources: + requests: + memory: 500Mi + cpu: 200m + limits: + memory: 1.5Gi + cpu: 500m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..7612f474 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml @@ -0,0 +1,89 @@ +generatorOptions: + disableNameSuffixHash: true +secretGenerator: +- name: sitecore-admin + files: + - sitecore-adminpassword.txt +- name: sitecore-database + files: + - sitecore-databaseusername.txt + - sitecore-databasepassword.txt + - sitecore-databaseservername.txt + - sitecore-collection-shardmapmanager-database-password.txt + - sitecore-collection-shardmapmanager-database-username.txt + - sitecore-core-database-password.txt + - sitecore-core-database-username.txt + - sitecore-exm-master-database-password.txt + - sitecore-exm-master-database-username.txt + - sitecore-forms-database-password.txt + - sitecore-forms-database-username.txt + - sitecore-marketing-automation-database-password.txt + - sitecore-marketing-automation-database-username.txt + - sitecore-master-database-password.txt + - sitecore-master-database-username.txt + - sitecore-messaging-database-password.txt + - sitecore-messaging-database-username.txt + - sitecore-processing-engine-storage-database-password.txt + - sitecore-processing-engine-storage-database-username.txt + - sitecore-processing-engine-tasks-database-password.txt + - sitecore-processing-engine-tasks-database-username.txt + - sitecore-processing-pools-database-password.txt + - sitecore-processing-pools-database-username.txt + - sitecore-processing-tasks-database-password.txt + - sitecore-processing-tasks-database-username.txt + - sitecore-reference-data-database-password.txt + - sitecore-reference-data-database-username.txt + - sitecore-reporting-database-password.txt + - sitecore-reporting-database-username.txt + - sitecore-web-database-password.txt + - sitecore-web-database-username.txt + - sitecore-database-elastic-pool-name.txt + - sitecore-databaseprefix.txt + - sitecore-custom-database-prefix-update-from.txt +- name: sitecore-identitycertificate + files: + - sitecore-identitycertificate.txt + - sitecore-identitycertificatepassword.txt +- name: sitecore-license + files: + - sitecore-license.txt +- name: sitecore-identity + files: + - sitecore-identitysecret.txt +- name: sitecore-graphql + files: + - sitecore-graphql-uploadmedia_encryptionkey.txt +- name: sitecore-telerik + files: + - sitecore-telerikencryptionkey.txt +- name: sitecore-reporting + files: + - sitecore-reportingapikey.txt +- name: sitecore-solr + files: + - sitecore-solr-connection-string.txt + - sitecore-solr-core-prefix-name.txt +- name: sitecore-solr-xdb + files: + - sitecore-solr-connection-string-xdb.txt +- name: sitecore-protect-media-requests + files: + - sitecore-media-request-protection-shared-secret.txt +- name: sitecore-log-level + files: + - sitecore-log-level-value.txt +- name: global-cd-tls + files: + - tls/global-cd/tls.key + - tls/global-cd/tls.crt + type: kubernetes.io/tls +- name: global-cm-tls + files: + - tls/global-cm/tls.key + - tls/global-cm/tls.crt + type: kubernetes.io/tls +- name: global-id-tls + files: + - tls/global-id/tls.key + - tls/global-id/tls.crt + type: kubernetes.io/tls \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-adminpassword.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-adminpassword.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-collection-shardmapmanager-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-collection-shardmapmanager-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-collection-shardmapmanager-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-collection-shardmapmanager-database-username.txt new file mode 100644 index 00000000..44946c85 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-collection-shardmapmanager-database-username.txt @@ -0,0 +1 @@ +shardmapmanageruser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-core-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-core-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-core-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-core-database-username.txt new file mode 100644 index 00000000..1a01ffc1 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-core-database-username.txt @@ -0,0 +1 @@ +coreuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-custom-database-prefix-update-from.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-custom-database-prefix-update-from.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-database-elastic-pool-name.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-database-elastic-pool-name.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databasepassword.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databasepassword.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseprefix.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseprefix.txt new file mode 100644 index 00000000..84e851b6 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseprefix.txt @@ -0,0 +1 @@ +Sitecore \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseservername.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseservername.txt new file mode 100644 index 00000000..a5faf708 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseservername.txt @@ -0,0 +1 @@ +mssql \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseusername.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseusername.txt new file mode 100644 index 00000000..0107e44b --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-databaseusername.txt @@ -0,0 +1 @@ +sa \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-exm-master-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-exm-master-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-exm-master-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-exm-master-database-username.txt new file mode 100644 index 00000000..6b4a10e9 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-exm-master-database-username.txt @@ -0,0 +1 @@ +exmmasteruser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-forms-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-forms-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-forms-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-forms-database-username.txt new file mode 100644 index 00000000..2af61966 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-forms-database-username.txt @@ -0,0 +1 @@ +formsuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt new file mode 100644 index 00000000..a7ce33d9 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-graphql-uploadmedia_encryptionkey.txt @@ -0,0 +1 @@ +432A462D4A614E64 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitycertificate.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitycertificate.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitycertificatepassword.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitycertificatepassword.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitysecret.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-identitysecret.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-license.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-license.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-log-level-value.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-log-level-value.txt new file mode 100644 index 00000000..6a34d78a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-log-level-value.txt @@ -0,0 +1 @@ +INFO \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-marketing-automation-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-marketing-automation-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-marketing-automation-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-marketing-automation-database-username.txt new file mode 100644 index 00000000..0d2f9dc0 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-marketing-automation-database-username.txt @@ -0,0 +1 @@ +mauser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-master-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-master-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-master-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-master-database-username.txt new file mode 100644 index 00000000..92db7144 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-master-database-username.txt @@ -0,0 +1 @@ +masteruser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-media-request-protection-shared-secret.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-media-request-protection-shared-secret.txt new file mode 100644 index 00000000..04d929b5 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-media-request-protection-shared-secret.txt @@ -0,0 +1 @@ +HQ(NjM(u6_5koVla-cTf4ta8x1h6Sb+ZcUQrULUz-0Afpx0cx-NuMtIoQkpDFmX5 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-messaging-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-messaging-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-messaging-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-messaging-database-username.txt new file mode 100644 index 00000000..627db567 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-messaging-database-username.txt @@ -0,0 +1 @@ +messaginguser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-storage-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-storage-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-storage-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-storage-database-username.txt new file mode 100644 index 00000000..0447fe0e --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-storage-database-username.txt @@ -0,0 +1 @@ +processingenginestorageuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-tasks-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-tasks-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-tasks-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-tasks-database-username.txt new file mode 100644 index 00000000..09ab54b3 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-engine-tasks-database-username.txt @@ -0,0 +1 @@ +processingenginetasksuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-pools-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-pools-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-pools-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-pools-database-username.txt new file mode 100644 index 00000000..afa67198 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-pools-database-username.txt @@ -0,0 +1 @@ +processingpoolsuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-tasks-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-tasks-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-tasks-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-tasks-database-username.txt new file mode 100644 index 00000000..8731b1da --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-processing-tasks-database-username.txt @@ -0,0 +1 @@ +processingtasksuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reference-data-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reference-data-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reference-data-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reference-data-database-username.txt new file mode 100644 index 00000000..eec4367d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reference-data-database-username.txt @@ -0,0 +1 @@ +refdatauser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reporting-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reporting-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reporting-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reporting-database-username.txt new file mode 100644 index 00000000..68515d53 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reporting-database-username.txt @@ -0,0 +1 @@ +reportinguser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reportingapikey.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-reportingapikey.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string-xdb.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string-xdb.txt new file mode 100644 index 00000000..eea97d74 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string-xdb.txt @@ -0,0 +1 @@ +http://solr:8983/solr/sitecore_xdb;solrCloud=true \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string.txt new file mode 100644 index 00000000..223d335a --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-connection-string.txt @@ -0,0 +1 @@ +http://solr:8983/solr;solrCloud=true \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-core-prefix-name.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-core-prefix-name.txt new file mode 100644 index 00000000..3220fb37 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-solr-core-prefix-name.txt @@ -0,0 +1 @@ +sitecore \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-telerikencryptionkey.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-telerikencryptionkey.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-web-database-password.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-web-database-password.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-web-database-username.txt b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-web-database-username.txt new file mode 100644 index 00000000..134ed9db --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/sitecore-web-database-username.txt @@ -0,0 +1 @@ +webuser \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-authority/readme b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-authority/readme new file mode 100644 index 00000000..e6e8c9db --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-authority/readme @@ -0,0 +1,2 @@ +Add generated root certificate authority to this folder: + root.crt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cd/readme b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cd/readme new file mode 100644 index 00000000..e9d69a7d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cd/readme @@ -0,0 +1,3 @@ +Add TLS certificate for cd.globalhost host to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cm/readme b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cm/readme new file mode 100644 index 00000000..4ff9e350 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-cm/readme @@ -0,0 +1,3 @@ +Add TLS certificate for cm.globalhost host to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-id/readme b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-id/readme new file mode 100644 index 00000000..9e46877e --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/global-id/readme @@ -0,0 +1,3 @@ +Add TLS certificate for id.globalhost host to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/device-detection.yaml b/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/device-detection.yaml new file mode 100644 index 00000000..eade3f82 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/device-detection.yaml @@ -0,0 +1,20 @@ +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: device-detection +provisioner: file.csi.azure.com +parameters: + skuName: Standard_LRS +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: device-detection +spec: + accessModes: + - ReadWriteMany + storageClassName: device-detection + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/logs.yaml b/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/logs.yaml new file mode 100644 index 00000000..290c5e6d --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/logs.yaml @@ -0,0 +1,20 @@ +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: logs +provisioner: file.csi.azure.com +parameters: + skuName: Standard_LRS +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: logs +spec: + accessModes: + - ReadWriteMany + storageClassName: logs + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/submit-queue.yaml b/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/submit-queue.yaml new file mode 100644 index 00000000..d88bb2b0 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/volumes/azurefile/submit-queue.yaml @@ -0,0 +1,20 @@ +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: submit-queue +provisioner: file.csi.azure.com +parameters: + skuName: Standard_LRS +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: submit-queue +spec: + accessModes: + - ReadWriteMany + storageClassName: submit-queue + resources: + requests: + storage: 10Gi \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/device-detection.yaml b/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/device-detection.yaml new file mode 100644 index 00000000..cd894bcf --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/device-detection.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: device-detection +spec: + storageClassName: "" + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: "/sitecore/device-detection" + type: DirectoryOrCreate +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: device-detection +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + storageClassName: "" \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/logs.yaml b/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/logs.yaml new file mode 100644 index 00000000..ab4a1098 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/logs.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: logs +spec: + storageClassName: "" + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: "/sitecore/logs" + type: DirectoryOrCreate +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: logs +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + storageClassName: "" \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/submit-queue.yaml b/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/submit-queue.yaml new file mode 100644 index 00000000..06aa4a70 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/volumes/hostpath/submit-queue.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: submit-queue +spec: + storageClassName: "" + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + hostPath: + path: "/sitecore/submitqueue" + type: DirectoryOrCreate +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: submit-queue +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: 10Gi + storageClassName: "" \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/xdbautomation.yaml b/k8s/sxp/10.4/ltsc2019/xp1/xdbautomation.yaml new file mode 100644 index 00000000..5e5ce7e1 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/xdbautomation.yaml @@ -0,0 +1,134 @@ +apiVersion: v1 +kind: Service +metadata: + name: xdbautomation +spec: + selector: + app: xdbautomation + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbautomation + labels: + app: xdbautomation +spec: + replicas: 1 + selector: + matchLabels: + app: xdbautomation + template: + metadata: + labels: + app: xdbautomation + spec: + nodeSelector: + kubernetes.io/os: windows + initContainers: + - name: wait-xdbcollection + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbcollection/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbsearch + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbsearch/healthz/ready).StatusCode -eq 200} catch { $false }));"] + containers: + - name: sitecore-xp1-xdbautomation + image: sitecore-xp1-xdbautomation + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Marketing_Automation_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-username.txt + - name: Marketing_Automation_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-password.txt + - name: Messaging_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-username.txt + - name: Messaging_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Messaging + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Messaging;User ID=$(Messaging_Database_Username);Password=$(Messaging_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Marketingautomation + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Marketingautomation;User ID=$(Marketing_Automation_Database_Username);Password=$(Marketing_Automation_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + - name: Sitecore_ConnectionStrings_XConnect.Collection + value: http://xdbcollection + - name: Sitecore_ConnectionStrings_XConnect.Search + value: http://xdbsearch + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: xdbautomation + resources: + requests: + memory: 500Mi + cpu: 50m + limits: + memory: 1Gi + cpu: 200m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/xdbautomationrpt.yaml b/k8s/sxp/10.4/ltsc2019/xp1/xdbautomationrpt.yaml new file mode 100644 index 00000000..2d4dfc65 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/xdbautomationrpt.yaml @@ -0,0 +1,111 @@ +apiVersion: v1 +kind: Service +metadata: + name: xdbautomationrpt +spec: + selector: + app: xdbautomationrpt + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbautomationrpt + labels: + app: xdbautomationrpt +spec: + replicas: 1 + selector: + matchLabels: + app: xdbautomationrpt + template: + metadata: + labels: + app: xdbautomationrpt + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-xdbautomationrpt + image: sitecore-xp1-xdbautomationrpt + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Marketing_Automation_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-username.txt + - name: Marketing_Automation_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Xdb.Marketingautomation + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Marketingautomation;User ID=$(Marketing_Automation_Database_Username);Password=$(Marketing_Automation_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: xdbautomationrpt + resources: + requests: + memory: 500Mi + cpu: 50m + limits: + memory: 1Gi + cpu: 200m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/xdbautomationworker.yaml b/k8s/sxp/10.4/ltsc2019/xp1/xdbautomationworker.yaml new file mode 100644 index 00000000..8700a5a0 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/xdbautomationworker.yaml @@ -0,0 +1,128 @@ +apiVersion: v1 +kind: Service +metadata: + name: xdbautomationworker +spec: + selector: + app: xdbautomationworker + ports: + - protocol: TCP + port: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbautomationworker + labels: + app: xdbautomationworker +spec: + replicas: 1 + selector: + matchLabels: + app: xdbautomationworker + template: + metadata: + labels: + app: xdbautomationworker + spec: + nodeSelector: + kubernetes.io/os: windows + initContainers: + - name: wait-xdbcollection + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbcollection/healthz/ready).StatusCode -eq 200} catch { $false }));"] + - name: wait-xdbsearch + image: pwsh-initContainer + command: ["pwsh", "-Command", "do { Start-Sleep -Seconds 3 } until ($(try {(iwr http://xdbsearch/healthz/ready).StatusCode -eq 200} catch { $false }));"] + containers: + - name: sitecore-xp1-xdbautomationworker + image: sitecore-xp1-xdbautomationworker + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Messaging_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-username.txt + - name: Messaging_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-password.txt + - name: Marketing_Automation_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-username.txt + - name: Marketing_Automation_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_XConnect.Collection + value: http://xdbcollection + - name: Sitecore_ConnectionStrings_XConnect.Search + value: http://xdbsearch + - name: Sitecore_ConnectionStrings_Xdb.Marketingautomation + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Marketingautomation;User ID=$(Marketing_Automation_Database_Username);Password=$(Marketing_Automation_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + - name: Sitecore_ConnectionStrings_Messaging + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Messaging;User ID=$(Messaging_Database_Username);Password=$(Messaging_Database_Password); + livenessProbe: + exec: + command: + - curl + - http://localhost:8080/healthz/live + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + exec: + command: + - curl + - http://localhost:8080/healthz/ready + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\service\App_Data\Logs + name: logs + subPath: xdbautomationworker + resources: + requests: + memory: 200Mi + cpu: 20m + limits: + memory: 1Gi + cpu: 200m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/xdbcollection.yaml b/k8s/sxp/10.4/ltsc2019/xp1/xdbcollection.yaml new file mode 100644 index 00000000..e1336071 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/xdbcollection.yaml @@ -0,0 +1,147 @@ +apiVersion: v1 +kind: Service +metadata: + name: xdbcollection +spec: + selector: + app: xdbcollection + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbcollection + labels: + app: xdbcollection +spec: + replicas: 1 + selector: + matchLabels: + app: xdbcollection + template: + metadata: + labels: + app: xdbcollection + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-xdbcollection + image: sitecore-xp1-xdbcollection + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Messaging_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-username.txt + - name: Messaging_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-password.txt + - name: Marketing_Automation_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-username.txt + - name: Marketing_Automation_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-password.txt + - name: Collection_ShardMapManager_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-username.txt + - name: Collection_ShardMapManager_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-password.txt + - name: Processing_Pools_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-username.txt + - name: Processing_Pools_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Messaging + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Messaging;User ID=$(Messaging_Database_Username);Password=$(Messaging_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Marketingautomation + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Marketingautomation;User ID=$(Marketing_Automation_Database_Username);Password=$(Marketing_Automation_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Processing.Pools + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.pools;User ID=$(Processing_Pools_Database_Username);Password=$(Processing_Pools_Database_Password); + - name: Sitecore_ConnectionStrings_Collection + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Xdb.Collection.ShardMapManager;User ID=$(Collection_ShardMapManager_Database_Username);Password=$(Collection_ShardMapManager_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: xdbcollection + resources: + requests: + memory: 500Mi + cpu: 150m + limits: + memory: 1Gi + cpu: 350m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/xdbrefdata.yaml b/k8s/sxp/10.4/ltsc2019/xp1/xdbrefdata.yaml new file mode 100644 index 00000000..047002d2 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/xdbrefdata.yaml @@ -0,0 +1,99 @@ +apiVersion: v1 +kind: Service +metadata: + name: xdbrefdata +spec: + selector: + app: xdbrefdata + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbrefdata + labels: + app: xdbrefdata +spec: + replicas: 1 + selector: + matchLabels: + app: xdbrefdata + template: + metadata: + labels: + app: xdbrefdata + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-xdbrefdata + image: sitecore-xp1-xdbrefdata + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: xdbrefdata + resources: + requests: + memory: 500Mi + cpu: 150m + limits: + memory: 1Gi + cpu: 350m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/xdbsearch.yaml b/k8s/sxp/10.4/ltsc2019/xp1/xdbsearch.yaml new file mode 100644 index 00000000..a27ff5e7 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/xdbsearch.yaml @@ -0,0 +1,156 @@ +apiVersion: v1 +kind: Service +metadata: + name: xdbsearch +spec: + selector: + app: xdbsearch + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbsearch + labels: + app: xdbsearch +spec: + replicas: 1 + selector: + matchLabels: + app: xdbsearch + template: + metadata: + labels: + app: xdbsearch + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-xdbsearch + image: sitecore-xp1-xdbsearch + ports: + - containerPort: 80 + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Messaging_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-username.txt + - name: Messaging_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-messaging-database-password.txt + - name: Marketing_Automation_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-username.txt + - name: Marketing_Automation_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-marketing-automation-database-password.txt + - name: Collection_ShardMapManager_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-username.txt + - name: Collection_ShardMapManager_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-password.txt + - name: Processing_Pools_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-username.txt + - name: Processing_Pools_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-processing-pools-database-password.txt + - name: Reference_Data_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-username.txt + - name: Reference_Data_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-reference-data-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Messaging + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Messaging;User ID=$(Messaging_Database_Username);Password=$(Messaging_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Marketingautomation + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Marketingautomation;User ID=$(Marketing_Automation_Database_Username);Password=$(Marketing_Automation_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Processing.Pools + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Processing.pools;User ID=$(Processing_Pools_Database_Username);Password=$(Processing_Pools_Database_Password); + - name: Sitecore_ConnectionStrings_Collection + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Xdb.Collection.ShardMapManager;User ID=$(Collection_ShardMapManager_Database_Username);Password=$(Collection_ShardMapManager_Database_Password); + - name: Sitecore_ConnectionStrings_Xdb.Referencedata + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Referencedata;User ID=$(Reference_Data_Database_Username);Password=$(Reference_Data_Database_Password); + - name: Sitecore_ConnectionStrings_SolrCore + valueFrom: + secretKeyRef: + name: sitecore-solr-xdb + key: sitecore-solr-connection-string-xdb.txt + - name: Sitecore_Sitecore__XConnect__CollectionSearch__Services__Solr.SolrReaderSettings__Options__RequireHttps + value: 'false' + - name: Sitecore_Sitecore__XConnect__CollectionSearch__Services__XConnectSolrHealthCheckServicesConfiguration__Options__RequireHttps + value: 'false' + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\inetpub\wwwroot\App_Data\logs + name: logs + subPath: xdbsearch + resources: + requests: + memory: 500Mi + cpu: 150m + limits: + memory: 1Gi + cpu: 350m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/xdbsearchworker.yaml b/k8s/sxp/10.4/ltsc2019/xp1/xdbsearchworker.yaml new file mode 100644 index 00000000..9e6687a2 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/xdbsearchworker.yaml @@ -0,0 +1,104 @@ +apiVersion: v1 +kind: Service +metadata: + name: xdbsearchworker +spec: + selector: + app: xdbsearchworker + ports: + - protocol: TCP + port: 8080 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: xdbsearchworker + labels: + app: xdbsearchworker +spec: + replicas: 1 + selector: + matchLabels: + app: xdbsearchworker + template: + metadata: + labels: + app: xdbsearchworker + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-xdbsearchworker + image: sitecore-xp1-xdbsearchworker + env: + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Collection_ShardMapManager_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-username.txt + - name: Collection_ShardMapManager_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-collection-shardmapmanager-database-password.txt + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Sql_Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Sitecore_ConnectionStrings_Collection + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Xdb.Collection.ShardMapManager;User ID=$(Collection_ShardMapManager_Database_Username);Password=$(Collection_ShardMapManager_Database_Password); + - name: Sitecore_ConnectionStrings_SolrCore + valueFrom: + secretKeyRef: + name: sitecore-solr-xdb + key: sitecore-solr-connection-string-xdb.txt + - name: Sitecore_Sitecore__XConnect__SearchIndexer__Services__Solr.SolrReaderSettings__Options__RequireHttps + value: 'false' + - name: Sitecore_Sitecore__XConnect__SearchIndexer__Services__Solr.SolrWriterSettings__Options__RequireHttps + value: 'false' + - name: Sitecore_Sitecore__XConnect__CollectionSearch__Services__XConnectSolrHealthCheckServicesConfiguration__Options__RequireHttps + value: 'false' + livenessProbe: + exec: + command: + - curl + - http://localhost:8080/healthz/live + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + exec: + command: + - curl + - http://localhost:8080/healthz/ready + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + volumeMounts: + - mountPath: C:\service\App_Data\Logs + name: logs + subPath: xdbsearchworker + resources: + requests: + memory: 400Mi + cpu: 50m + limits: + memory: 1Gi + cpu: 300m + volumes: + - name: logs + persistentVolumeClaim: + claimName: logs + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file From e6ed969edd9852bb2f1a17fd02f938affff1c70f Mon Sep 17 00:00:00 2001 From: sc-marcusheath Date: Tue, 4 Jun 2024 21:49:30 -0400 Subject: [PATCH 03/17] Removed def 9.0 xm1 script because it is not supported anymore --- compose/def/9.0/ltsc2022/xm1/.env-example | 7 ------- compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml | 3 --- 2 files changed, 10 deletions(-) delete mode 100644 compose/def/9.0/ltsc2022/xm1/.env-example delete mode 100644 compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml diff --git a/compose/def/9.0/ltsc2022/xm1/.env-example b/compose/def/9.0/ltsc2022/xm1/.env-example deleted file mode 100644 index acc1bf44..00000000 --- a/compose/def/9.0/ltsc2022/xm1/.env-example +++ /dev/null @@ -1,7 +0,0 @@ -#Add the following environment variables to the Sitecore Platform .env file - -#Sitecore Platform topology to deploy -TOPOLOGY= - -#The host for the Tenant service website if necessary, for example, ts.localhost -TENANT_SERVICE_HOST= \ No newline at end of file diff --git a/compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml b/compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml deleted file mode 100644 index f104cf18..00000000 --- a/compose/def/9.0/ltsc2022/xm1/docker-compose.override.yml +++ /dev/null @@ -1,3 +0,0 @@ -services: - cm: - image: sitecore-def-${TOPOLOGY}-cm:${SITECORE_VERSION} \ No newline at end of file From 24b299d1ec83d251fac7b67af5086305463dc817 Mon Sep 17 00:00:00 2001 From: sc-marcusheath Date: Tue, 4 Jun 2024 22:00:06 -0400 Subject: [PATCH 04/17] Removed def 9.0 xm1 kustomization script because it is not supported anymore --- k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml diff --git a/k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml b/k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml deleted file mode 100644 index ef1dbdf1..00000000 --- a/k8s/def/9.0/ltsc2022/overrides/xm1/kustomization.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -bases: - - ../../xm1 - -images: -- name: scr.sitecore.com/sxp/sitecore-xm1-cm - newName: "{registry}/sitecore-def-xm1-cm" - newTag: tag From 55d1b857baeae04bb0c371f4b30cb288d636cfdc Mon Sep 17 00:00:00 2001 From: Ming Sheng Khoo Date: Wed, 19 Jun 2024 11:09:22 +0800 Subject: [PATCH 05/17] Add Sitecore Experience Edge Connector Container Deployment 22.0.2.0002.672 ltsc2019 --- compose/expedge/22.0/ltsc2019/.env-example | 7 +++ .../ltsc2019/docker-compose.xe.override.yml | 23 ++++++++ .../ltsc2019/overrides/xm1/kustomization.yaml | 13 +++++ .../ltsc2019/overrides/xm1/patch-cm.xe.yaml | 57 +++++++++++++++++++ .../overrides/xm1/secrets/kustomization.yaml | 14 +++++ .../sitecore-experienceedge-connection.txt | 0 .../ltsc2019/overrides/xp1/kustomization.yaml | 13 +++++ .../ltsc2019/overrides/xp1/patch-cm.xe.yaml | 57 +++++++++++++++++++ .../overrides/xp1/secrets/kustomization.yaml | 14 +++++ .../sitecore-experienceedge-connection.txt | 0 10 files changed, 198 insertions(+) create mode 100644 compose/expedge/22.0/ltsc2019/.env-example create mode 100644 compose/expedge/22.0/ltsc2019/docker-compose.xe.override.yml create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xm1/kustomization.yaml create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xm1/patch-cm.xe.yaml create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xm1/secrets/kustomization.yaml create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xm1/secrets/sitecore-experienceedge-connection.txt create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xp1/kustomization.yaml create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xp1/patch-cm.xe.yaml create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/expedge/22.0/ltsc2019/overrides/xp1/secrets/sitecore-experienceedge-connection.txt diff --git a/compose/expedge/22.0/ltsc2019/.env-example b/compose/expedge/22.0/ltsc2019/.env-example new file mode 100644 index 00000000..1187df71 --- /dev/null +++ b/compose/expedge/22.0/ltsc2019/.env-example @@ -0,0 +1,7 @@ +# Add the following environment variables to the Sitecore Platform .env file + +VERSION= + +TOPOLOGY= + +XE_CONNECTION= diff --git a/compose/expedge/22.0/ltsc2019/docker-compose.xe.override.yml b/compose/expedge/22.0/ltsc2019/docker-compose.xe.override.yml new file mode 100644 index 00000000..25a06f29 --- /dev/null +++ b/compose/expedge/22.0/ltsc2019/docker-compose.xe.override.yml @@ -0,0 +1,23 @@ +version: "2.4" +services: + cm: + image: sitecore-experience-edge-connector-${TOPOLOGY}-cm:${VERSION} + environment: + Sitecore_ConnectionStrings_ExperienceEdge: "${XE_CONNECTION}" + Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerAttemptsBeforeBreak: "12" + Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerDurationOfBreak: "00:15:00" + Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureRetryCount: "3" + Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureSleepTime: "00:00:10" + Sitecore_ExperienceEdge_EnableItemLanguageFallback: "false" + Sitecore_ExperienceEdge_EnableFieldLanguageFallback: "false" + Sitecore_ExperienceEdge_MaxExportEntitiesThreadCount: "20" + Sitecore_ExperienceEdge_MaxPublishThreadCount: "2" + Sitecore_ExperienceEdge_ExportEntitiesBufferSize: "500" + Sitecore_ExperienceEdge_ExportPublishEventsBatchSize: "150" + Sitecore_ExperienceEdge_LayoutService_ConfigName: "default" + Sitecore_ExperienceEdge_MaxMetadataCacheSize: "30MB" + Sitecore_ExperienceEdge_CheckDeltaStatusBatchSize: "250" + Sitecore_ExperienceEdge_AckCleanupTimeoutSeconds: "5" + Sitecore_ExperienceEdge_AckBatchWaitTimeoutSeconds: "120" + Sitecore_ExperienceEdge_AckWaitTimeoutSeconds: "600" + Sitecore_ExperienceEdge_MaxDependencyResolutionThreadCount: "5" diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xm1/kustomization.yaml b/k8s/expedge/22.0/ltsc2019/overrides/xm1/kustomization.yaml new file mode 100644 index 00000000..3f9a680a --- /dev/null +++ b/k8s/expedge/22.0/ltsc2019/overrides/xm1/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../xm1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xm1-cm + newName: "{registry}/sitecore-experience-edge-connector-xm1-cm" + newTag: tag + +patchesStrategicMerge: +- patch-cm.xe.yaml diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xm1/patch-cm.xe.yaml b/k8s/expedge/22.0/ltsc2019/overrides/xm1/patch-cm.xe.yaml new file mode 100644 index 00000000..bea6fd4a --- /dev/null +++ b/k8s/expedge/22.0/ltsc2019/overrides/xm1/patch-cm.xe.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cm + env: + - name: Sitecore_ConnectionStrings_ExperienceEdge + valueFrom: + secretKeyRef: + name: sitecore-experienceedge + key: sitecore-experienceedge-connection.txt + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerAttemptsBeforeBreak + value: "12" + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerDurationOfBreak + value: "00:15:00" + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureRetryCount + value: "3" + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureSleepTime + value: "00:00:10" + - name: Sitecore_ExperienceEdge_EnableItemLanguageFallback + value: "false" + - name: Sitecore_ExperienceEdge_EnableFieldLanguageFallback + value: "false" + - name: Sitecore_ExperienceEdge_MaxExportEntitiesThreadCount + value: "20" + - name: Sitecore_ExperienceEdge_MaxPublishThreadCount + value: "2" + - name: Sitecore_ExperienceEdge_ExportEntitiesBufferSize + value: "500" + - name: Sitecore_ExperienceEdge_ExportPublishEventsBatchSize + value: "150" + - name: Sitecore_ExperienceEdge_LayoutService_ConfigName + value: "default" + - name: Sitecore_ExperienceEdge_MaxMetadataCacheSize + value: "30MB" + - name: Sitecore_ExperienceEdge_CheckDeltaStatusBatchSize + value: "250" + - name: Sitecore_ExperienceEdge_AckCleanupTimeoutSeconds + value: "5" + - name: Sitecore_ExperienceEdge_AckBatchWaitTimeoutSeconds + value: "120" + - name: Sitecore_ExperienceEdge_AckWaitTimeoutSeconds + value: "600" + - name: Sitecore_ExperienceEdge_MaxDependencyResolutionThreadCount + value: "5" diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xm1/secrets/kustomization.yaml b/k8s/expedge/22.0/ltsc2019/overrides/xm1/secrets/kustomization.yaml new file mode 100644 index 00000000..6338d03b --- /dev/null +++ b/k8s/expedge/22.0/ltsc2019/overrides/xm1/secrets/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../../xm1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-experienceedge + files: + - sitecore-experienceedge-connection.txt + diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xm1/secrets/sitecore-experienceedge-connection.txt b/k8s/expedge/22.0/ltsc2019/overrides/xm1/secrets/sitecore-experienceedge-connection.txt new file mode 100644 index 00000000..e69de29b diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xp1/kustomization.yaml b/k8s/expedge/22.0/ltsc2019/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..d33a2d20 --- /dev/null +++ b/k8s/expedge/22.0/ltsc2019/overrides/xp1/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-experience-edge-connector-xp1-cm" + newTag: tag + +patchesStrategicMerge: +- patch-cm.xe.yaml diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xp1/patch-cm.xe.yaml b/k8s/expedge/22.0/ltsc2019/overrides/xp1/patch-cm.xe.yaml new file mode 100644 index 00000000..8461c4e6 --- /dev/null +++ b/k8s/expedge/22.0/ltsc2019/overrides/xp1/patch-cm.xe.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_ExperienceEdge + valueFrom: + secretKeyRef: + name: sitecore-experienceedge + key: sitecore-experienceedge-connection.txt + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerAttemptsBeforeBreak + value: "12" + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_CircuitBreakerDurationOfBreak + value: "00:15:00" + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureRetryCount + value: "3" + - name: Sitecore_ExperienceEdge_DeliveryEndpoint_TransientFailureSleepTime + value: "00:00:10" + - name: Sitecore_ExperienceEdge_EnableItemLanguageFallback + value: "false" + - name: Sitecore_ExperienceEdge_EnableFieldLanguageFallback + value: "false" + - name: Sitecore_ExperienceEdge_MaxExportEntitiesThreadCount + value: "20" + - name: Sitecore_ExperienceEdge_MaxPublishThreadCount + value: "2" + - name: Sitecore_ExperienceEdge_ExportEntitiesBufferSize + value: "500" + - name: Sitecore_ExperienceEdge_ExportPublishEventsBatchSize + value: "150" + - name: Sitecore_ExperienceEdge_LayoutService_ConfigName + value: "default" + - name: Sitecore_ExperienceEdge_MaxMetadataCacheSize + value: "30MB" + - name: Sitecore_ExperienceEdge_CheckDeltaStatusBatchSize + value: "250" + - name: Sitecore_ExperienceEdge_AckCleanupTimeoutSeconds + value: "5" + - name: Sitecore_ExperienceEdge_AckBatchWaitTimeoutSeconds + value: "120" + - name: Sitecore_ExperienceEdge_AckWaitTimeoutSeconds + value: "600" + - name: Sitecore_ExperienceEdge_MaxDependencyResolutionThreadCount + value: "5" diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml b/k8s/expedge/22.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..3a7f5783 --- /dev/null +++ b/k8s/expedge/22.0/ltsc2019/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,14 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../../xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: sitecore-experienceedge + files: + - sitecore-experienceedge-connection.txt + diff --git a/k8s/expedge/22.0/ltsc2019/overrides/xp1/secrets/sitecore-experienceedge-connection.txt b/k8s/expedge/22.0/ltsc2019/overrides/xp1/secrets/sitecore-experienceedge-connection.txt new file mode 100644 index 00000000..e69de29b From bcab3c0dcea8e64356b4556c0c60576efb1d0a24 Mon Sep 17 00:00:00 2001 From: Ming Sheng Khoo Date: Wed, 19 Jun 2024 11:25:23 +0800 Subject: [PATCH 06/17] Add Sitecore Publishing Service Module 10.4.0.00689.430 ltsc2019 --- compose/publishing/10.4/ltsc2019/.env-example | 7 ++ .../ltsc2019/docker-compose.sps.override.yml | 39 ++++++ .../overrides/xm1/init/kustomization.yaml | 10 ++ .../ltsc2019/overrides/xm1/kustomization.yaml | 17 +++ .../ltsc2019/overrides/xm1/patch-cm.sps.yaml | 20 +++ .../overrides/xp1/init/kustomization.yaml | 10 ++ .../ltsc2019/overrides/xp1/kustomization.yaml | 17 +++ .../ltsc2019/overrides/xp1/patch-cm.sps.yaml | 12 ++ .../10.4/ltsc2019/sps/kustomization.yaml | 13 ++ .../10.4/ltsc2019/sps/patch-sps.yaml | 45 +++++++ k8s/publishing/10.4/ltsc2019/sps/sps.yaml | 119 ++++++++++++++++++ 11 files changed, 309 insertions(+) create mode 100644 compose/publishing/10.4/ltsc2019/.env-example create mode 100644 compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml create mode 100644 k8s/publishing/10.4/ltsc2019/overrides/xm1/init/kustomization.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/overrides/xm1/kustomization.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/overrides/xm1/patch-cm.sps.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/overrides/xp1/init/kustomization.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/overrides/xp1/kustomization.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/overrides/xp1/patch-cm.sps.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/sps/kustomization.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/sps/patch-sps.yaml create mode 100644 k8s/publishing/10.4/ltsc2019/sps/sps.yaml diff --git a/compose/publishing/10.4/ltsc2019/.env-example b/compose/publishing/10.4/ltsc2019/.env-example new file mode 100644 index 00000000..99c1ccf8 --- /dev/null +++ b/compose/publishing/10.4/ltsc2019/.env-example @@ -0,0 +1,7 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The version tag for the CM and CD patched images +VERSION= + +#Sitecore Platform topology to deploy +TOPOLOGY= \ No newline at end of file diff --git a/compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml b/compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml new file mode 100644 index 00000000..f7e156a4 --- /dev/null +++ b/compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml @@ -0,0 +1,39 @@ +services: + cm: + image: sitecore-sps-integration-${TOPOLOGY}-cm:${VERSION} + environment: + Sitecore_Publishing_Service_Url: "http://sps/" + cd: + image: sitecore-sps-integration-${TOPOLOGY}-cd:${VERSION} + mssql-init: + image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} + sps-mssql-init: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.0-ltsc2019 + environment: + SITECORE_License: ${SITECORE_LICENSE} + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + command: schema upgrade --force + depends_on: + mssql-init: + condition: service_healthy + sps: + isolation: ${ISOLATION} + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.1-ltsc2019 + environment: + ASPNETCORE_URLS: "http://*:80" + SITECORE_License: ${SITECORE_LICENSE} + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + ports: + - "80" + depends_on: + - sps-mssql-init + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] + timeout: 300s \ No newline at end of file diff --git a/k8s/publishing/10.4/ltsc2019/overrides/xm1/init/kustomization.yaml b/k8s/publishing/10.4/ltsc2019/overrides/xm1/init/kustomization.yaml new file mode 100644 index 00000000..ae592833 --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/overrides/xm1/init/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../../xm1/init + +images: +- name: scr.sitecore.com/sxp/sitecore-xm1-mssql-init + newName: "{registry}/sitecore-sps-integration-xm1-mssql-init" + newTag: tag \ No newline at end of file diff --git a/k8s/publishing/10.4/ltsc2019/overrides/xm1/kustomization.yaml b/k8s/publishing/10.4/ltsc2019/overrides/xm1/kustomization.yaml new file mode 100644 index 00000000..9ca0f329 --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/overrides/xm1/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../xm1 +- ../../sps + +images: +- name: scr.sitecore.com/sxp/sitecore-xm1-cm + newName: "{registry}/sitecore-sps-integration-xm1-cm" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xm1-cd + newName: "{registry}/sitecore-sps-integration-xm1-cd" + newTag: tag + +patchesStrategicMerge: +- patch-cm.sps.yaml diff --git a/k8s/publishing/10.4/ltsc2019/overrides/xm1/patch-cm.sps.yaml b/k8s/publishing/10.4/ltsc2019/overrides/xm1/patch-cm.sps.yaml new file mode 100644 index 00000000..398bfe00 --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/overrides/xm1/patch-cm.sps.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cm + env: + - name: Sitecore_Publishing_Service_Url + value: http://sps/ diff --git a/k8s/publishing/10.4/ltsc2019/overrides/xp1/init/kustomization.yaml b/k8s/publishing/10.4/ltsc2019/overrides/xp1/init/kustomization.yaml new file mode 100644 index 00000000..19d29897 --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/overrides/xp1/init/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../../xp1/init + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-mssql-init + newName: "{registry}/sitecore-sps-integration-xp1-mssql-init" + newTag: tag \ No newline at end of file diff --git a/k8s/publishing/10.4/ltsc2019/overrides/xp1/kustomization.yaml b/k8s/publishing/10.4/ltsc2019/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..9d3ace01 --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/overrides/xp1/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: +- ../../xp1 +- ../../sps + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-sps-integration-xp1-cm" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-cd + newName: "{registry}/sitecore-sps-integration-xp1-cd" + newTag: tag + +patchesStrategicMerge: +- patch-cm.sps.yaml diff --git a/k8s/publishing/10.4/ltsc2019/overrides/xp1/patch-cm.sps.yaml b/k8s/publishing/10.4/ltsc2019/overrides/xp1/patch-cm.sps.yaml new file mode 100644 index 00000000..1899e27e --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/overrides/xp1/patch-cm.sps.yaml @@ -0,0 +1,12 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + template: + spec: + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_Publishing_Service_Url + value: http://sps/ diff --git a/k8s/publishing/10.4/ltsc2019/sps/kustomization.yaml b/k8s/publishing/10.4/ltsc2019/sps/kustomization.yaml new file mode 100644 index 00000000..57bb5dc5 --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/sps/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +images: +- name: sitecore-sps + newName: scr.sitecore.com/sxp/modules/sitecore-sps + newTag: 7.0-ltsc2019 + +resources: +- sps.yaml + +patchesStrategicMerge: +- patch-sps.yaml \ No newline at end of file diff --git a/k8s/publishing/10.4/ltsc2019/sps/patch-sps.yaml b/k8s/publishing/10.4/ltsc2019/sps/patch-sps.yaml new file mode 100644 index 00000000..aa6a34fd --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/sps/patch-sps.yaml @@ -0,0 +1,45 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sps +spec: + template: + spec: + initContainers: + - name: sitecore-sps-init + image: sitecore-sps + args: ["schema", "upgrade", "--force"] + env: + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Database_Admin_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseusername.txt + - name: Database_Admin_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databasepassword.txt + - name: SITECORE_Publishing__ConnectionStrings__Core + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Core;User ID=$(Database_Admin_Username);Password=$(Database_Admin_Password);MultipleActiveResultSets=True + - name: SITECORE_Publishing__ConnectionStrings__Master + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Master;User ID=$(Database_Admin_Username);Password=$(Database_Admin_Password);MultipleActiveResultSets=True + - name: SITECORE_Publishing__ConnectionStrings__Service + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Master;User ID=$(Database_Admin_Username);Password=$(Database_Admin_Password);MultipleActiveResultSets=True + - name: SITECORE_Publishing__ConnectionStrings__Web + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Web;User ID=$(Database_Admin_Username);Password=$(Database_Admin_Password);MultipleActiveResultSets=True diff --git a/k8s/publishing/10.4/ltsc2019/sps/sps.yaml b/k8s/publishing/10.4/ltsc2019/sps/sps.yaml new file mode 100644 index 00000000..c320699f --- /dev/null +++ b/k8s/publishing/10.4/ltsc2019/sps/sps.yaml @@ -0,0 +1,119 @@ +apiVersion: v1 +kind: Service +metadata: + name: sps +spec: + selector: + app: sps + ports: + - protocol: TCP + port: 80 +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: sps + labels: + app: sps +spec: + replicas: 1 + selector: + matchLabels: + app: sps + template: + metadata: + labels: + app: sps + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-sps + image: sitecore-sps + ports: + - containerPort: 80 + env: + - name: Sitecore_License + valueFrom: + secretKeyRef: + name: sitecore-license + key: sitecore-license.txt + - name: Database_Server + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseservername.txt + - name: Database_Prefix + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-databaseprefix.txt + - name: Master_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-username.txt + - name: Master_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-master-database-password.txt + - name: Core_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-username.txt + - name: Core_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-core-database-password.txt + - name: Web_Database_Username + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-username.txt + - name: Web_Database_Password + valueFrom: + secretKeyRef: + name: sitecore-database + key: sitecore-web-database-password.txt + - name: ASPNETCORE_URLS + value: "http://*:80" + - name: SITECORE_Publishing__ConnectionStrings__Core + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);MultipleActiveResultSets=True + - name: SITECORE_Publishing__ConnectionStrings__Master + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Master;User ID=$(Master_Database_Username);Password=$(Master_Database_Password);MultipleActiveResultSets=True + - name: SITECORE_Publishing__ConnectionStrings__Service + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Master;User ID=$(Master_Database_Username);Password=$(Master_Database_Password);MultipleActiveResultSets=True + - name: SITECORE_Publishing__ConnectionStrings__Web + value: Data Source=$(Database_Server);Initial Catalog=$(Database_Prefix).Web;User ID=$(Web_Database_Username);Password=$(Web_Database_Password);MultipleActiveResultSets=True + livenessProbe: + httpGet: + path: /healthz/live + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Liveness + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 3 + startupProbe: + httpGet: + path: /healthz/ready + port: 80 + httpHeaders: + - name: X-Kubernetes-Probe + value: Startup + timeoutSeconds: 300 + periodSeconds: 30 + failureThreshold: 10 + resources: + requests: + memory: 400Mi + cpu: 400m + limits: + memory: 2Gi + cpu: 2000m + imagePullSecrets: + - name: sitecore-docker-registry \ No newline at end of file From 9d3745fe939b500a8b3f72107f480cd0b6d88964 Mon Sep 17 00:00:00 2001 From: Katerina Pontzolkova Date: Fri, 28 Jun 2024 14:31:53 +0300 Subject: [PATCH 07/17] Update 10.2 SXP Sitecore Container Deployment to 10.2.2.010645.1838 --- .../ltsc2019/upgrade/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2019/upgrade/xm1/upgrade.env | 2 +- .../ltsc2019/upgrade/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2019/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.2/ltsc2019/xm1/.env | 5 +- .../sxp/10.2/ltsc2019/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2019/xm1/docker-compose.yml | 8 +- compose/sxp/10.2/ltsc2019/xp0/.env | 5 +- .../sxp/10.2/ltsc2019/xp0/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2019/xp0/docker-compose.yml | 6 +- compose/sxp/10.2/ltsc2019/xp1/.env | 5 +- .../sxp/10.2/ltsc2019/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2019/xp1/docker-compose.yml | 8 +- .../ltsc2022/upgrade/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2022/upgrade/xm1/upgrade.env | 2 +- .../ltsc2022/upgrade/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2022/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.2/ltsc2022/xm1/.env | 5 +- .../sxp/10.2/ltsc2022/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2022/xm1/docker-compose.yml | 8 +- compose/sxp/10.2/ltsc2022/xp0/.env | 5 +- .../sxp/10.2/ltsc2022/xp0/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2022/xp0/docker-compose.yml | 6 +- compose/sxp/10.2/ltsc2022/xp1/.env | 5 +- .../sxp/10.2/ltsc2022/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.2/ltsc2022/xp1/docker-compose.yml | 8 +- .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2019/xm1/external/kustomization.yaml | 2 +- k8s/sxp/10.2/ltsc2019/xm1/kustomization.yaml | 2 +- .../init/SearchStax/kustomization.yaml | 2 +- .../ltsc2019/xp1/external/kustomization.yaml | 2 +- k8s/sxp/10.2/ltsc2019/xp1/kustomization.yaml | 2 +- .../init/SearchStax/kustomization.yaml | 2 +- .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2022/xm1/external/kustomization.yaml | 2 +- .../10.2/ltsc2022/xm1/init/kustomization.yaml | 6 +- k8s/sxp/10.2/ltsc2022/xm1/kustomization.yaml | 23 +++--- .../init/SearchStax/kustomization.yaml | 8 +- .../ltsc2022/xp1/external/kustomization.yaml | 2 +- .../10.2/ltsc2022/xp1/init/kustomization.yaml | 6 +- k8s/sxp/10.2/ltsc2022/xp1/kustomization.yaml | 45 ++++++----- .../init/SearchStax/kustomization.yaml | 8 +- 44 files changed, 423 insertions(+), 539 deletions(-) diff --git a/compose/sxp/10.2/ltsc2019/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.2/ltsc2019/upgrade/xm1/compose-init.ps1 index cc9699c7..37ba425e 100644 --- a/compose/sxp/10.2/ltsc2019/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2019/upgrade/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2019/upgrade/xm1/upgrade.env b/compose/sxp/10.2/ltsc2019/upgrade/xm1/upgrade.env index e3805dae..4d840eb9 100644 --- a/compose/sxp/10.2/ltsc2019/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.2/ltsc2019/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.1.0 -DATABASE_UPGRADE_TO_VERSION=10.2.1 +DATABASE_UPGRADE_TO_VERSION=10.2.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.2/ltsc2019/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.2/ltsc2019/upgrade/xp1/compose-init.ps1 index fc7a8b53..bc830727 100644 --- a/compose/sxp/10.2/ltsc2019/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2019/upgrade/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2019/upgrade/xp1/upgrade.env b/compose/sxp/10.2/ltsc2019/upgrade/xp1/upgrade.env index add2eead..cb1e8f5a 100644 --- a/compose/sxp/10.2/ltsc2019/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.2/ltsc2019/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.1.0 -DATABASE_UPGRADE_TO_VERSION=10.2.1 +DATABASE_UPGRADE_TO_VERSION=10.2.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.2/ltsc2019/xm1/.env b/compose/sxp/10.2/ltsc2019/xm1/.env index b0ea599f..164ab204 100644 --- a/compose/sxp/10.2/ltsc2019/xm1/.env +++ b/compose/sxp/10.2/ltsc2019/xm1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xm1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.2-ltsc2019 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql SQL_SA_LOGIN=sa @@ -13,8 +14,8 @@ SITECORE_LICENSE= CD_HOST=xm1cd.localhost CM_HOST=xm1cm.localhost ID_HOST=xm1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.2/ltsc2019/xm1/compose-init.ps1 b/compose/sxp/10.2/ltsc2019/xm1/compose-init.ps1 index cc9699c7..37ba425e 100644 --- a/compose/sxp/10.2/ltsc2019/xm1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2019/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2019/xm1/docker-compose.yml b/compose/sxp/10.2/ltsc2019/xm1/docker-compose.yml index d5ea176b..b36ca083 100644 --- a/compose/sxp/10.2/ltsc2019/xm1/docker-compose.yml +++ b/compose/sxp/10.2/ltsc2019/xm1/docker-compose.yml @@ -29,10 +29,10 @@ services: condition: service_healthy redis: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-redis:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -60,7 +60,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -70,7 +70,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.2/ltsc2019/xp0/.env b/compose/sxp/10.2/ltsc2019/xp0/.env index 5d517835..528618a1 100644 --- a/compose/sxp/10.2/ltsc2019/xp0/.env +++ b/compose/sxp/10.2/ltsc2019/xp0/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp0 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.2-ltsc2019 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql SQL_SA_LOGIN=sa @@ -12,8 +13,8 @@ SITECORE_ID_CERTIFICATE_PASSWORD= SITECORE_LICENSE= CM_HOST=xp0cm.localhost ID_HOST=xp0id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.2/ltsc2019/xp0/compose-init.ps1 b/compose/sxp/10.2/ltsc2019/xp0/compose-init.ps1 index 2d728612..beb8e2ec 100644 --- a/compose/sxp/10.2/ltsc2019/xp0/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2019/xp0/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2019/xp0/docker-compose.yml b/compose/sxp/10.2/ltsc2019/xp0/docker-compose.yml index b41a894e..b54167d1 100644 --- a/compose/sxp/10.2/ltsc2019/xp0/docker-compose.yml +++ b/compose/sxp/10.2/ltsc2019/xp0/docker-compose.yml @@ -27,7 +27,7 @@ services: condition: service_healthy mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -55,7 +55,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -65,7 +65,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.2/ltsc2019/xp1/.env b/compose/sxp/10.2/ltsc2019/xp1/.env index b45835e1..22d7fdba 100644 --- a/compose/sxp/10.2/ltsc2019/xp1/.env +++ b/compose/sxp/10.2/ltsc2019/xp1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.2-ltsc2019 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql SQL_SA_LOGIN=sa @@ -14,8 +15,8 @@ SITECORE_LICENSE= CD_HOST=xp1cd.localhost CM_HOST=xp1cm.localhost ID_HOST=xp1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.2/ltsc2019/xp1/compose-init.ps1 b/compose/sxp/10.2/ltsc2019/xp1/compose-init.ps1 index fc7a8b53..bc830727 100644 --- a/compose/sxp/10.2/ltsc2019/xp1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2019/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2019/xp1/docker-compose.yml b/compose/sxp/10.2/ltsc2019/xp1/docker-compose.yml index 01a64368..a324bd0f 100644 --- a/compose/sxp/10.2/ltsc2019/xp1/docker-compose.yml +++ b/compose/sxp/10.2/ltsc2019/xp1/docker-compose.yml @@ -29,10 +29,10 @@ services: condition: service_healthy redis: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-redis:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -60,7 +60,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -70,7 +70,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.2/ltsc2022/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.2/ltsc2022/upgrade/xm1/compose-init.ps1 index cc9699c7..37ba425e 100644 --- a/compose/sxp/10.2/ltsc2022/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2022/upgrade/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2022/upgrade/xm1/upgrade.env b/compose/sxp/10.2/ltsc2022/upgrade/xm1/upgrade.env index 6c15a5ac..6b62ff1a 100644 --- a/compose/sxp/10.2/ltsc2022/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.2/ltsc2022/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.1.0 -DATABASE_UPGRADE_TO_VERSION=10.2.1 +DATABASE_UPGRADE_TO_VERSION=10.2.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.2/ltsc2022/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.2/ltsc2022/upgrade/xp1/compose-init.ps1 index fc7a8b53..bc830727 100644 --- a/compose/sxp/10.2/ltsc2022/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2022/upgrade/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2022/upgrade/xp1/upgrade.env b/compose/sxp/10.2/ltsc2022/upgrade/xp1/upgrade.env index caf53bd7..605ae28b 100644 --- a/compose/sxp/10.2/ltsc2022/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.2/ltsc2022/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.1.0 -DATABASE_UPGRADE_TO_VERSION=10.2.1 +DATABASE_UPGRADE_TO_VERSION=10.2.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.2/ltsc2022/xm1/.env b/compose/sxp/10.2/ltsc2022/xm1/.env index 740791be..a0124dbd 100644 --- a/compose/sxp/10.2/ltsc2022/xm1/.env +++ b/compose/sxp/10.2/ltsc2022/xm1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xm1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.2-ltsc2022 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql SQL_SA_LOGIN=sa @@ -13,8 +14,8 @@ SITECORE_LICENSE= CD_HOST=xm1cd.localhost CM_HOST=xm1cm.localhost ID_HOST=xm1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.2/ltsc2022/xm1/compose-init.ps1 b/compose/sxp/10.2/ltsc2022/xm1/compose-init.ps1 index cc9699c7..37ba425e 100644 --- a/compose/sxp/10.2/ltsc2022/xm1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2022/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2022/xm1/docker-compose.yml b/compose/sxp/10.2/ltsc2022/xm1/docker-compose.yml index d5ea176b..b36ca083 100644 --- a/compose/sxp/10.2/ltsc2022/xm1/docker-compose.yml +++ b/compose/sxp/10.2/ltsc2022/xm1/docker-compose.yml @@ -29,10 +29,10 @@ services: condition: service_healthy redis: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-redis:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -60,7 +60,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -70,7 +70,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.2/ltsc2022/xp0/.env b/compose/sxp/10.2/ltsc2022/xp0/.env index 70a7fb7d..61be29b5 100644 --- a/compose/sxp/10.2/ltsc2022/xp0/.env +++ b/compose/sxp/10.2/ltsc2022/xp0/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp0 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.2-ltsc2022 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql SQL_SA_LOGIN=sa @@ -12,8 +13,8 @@ SITECORE_ID_CERTIFICATE_PASSWORD= SITECORE_LICENSE= CM_HOST=xp0cm.localhost ID_HOST=xp0id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.2/ltsc2022/xp0/compose-init.ps1 b/compose/sxp/10.2/ltsc2022/xp0/compose-init.ps1 index 2d728612..beb8e2ec 100644 --- a/compose/sxp/10.2/ltsc2022/xp0/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2022/xp0/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2022/xp0/docker-compose.yml b/compose/sxp/10.2/ltsc2022/xp0/docker-compose.yml index b41a894e..b54167d1 100644 --- a/compose/sxp/10.2/ltsc2022/xp0/docker-compose.yml +++ b/compose/sxp/10.2/ltsc2022/xp0/docker-compose.yml @@ -27,7 +27,7 @@ services: condition: service_healthy mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -55,7 +55,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -65,7 +65,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.2/ltsc2022/xp1/.env b/compose/sxp/10.2/ltsc2022/xp1/.env index 396fe13a..47bd9891 100644 --- a/compose/sxp/10.2/ltsc2022/xp1/.env +++ b/compose/sxp/10.2/ltsc2022/xp1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.2-ltsc2022 +EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql SQL_SA_LOGIN=sa @@ -14,8 +15,8 @@ SITECORE_LICENSE= CD_HOST=xp1cd.localhost CM_HOST=xp1cm.localhost ID_HOST=xp1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.2/ltsc2022/xp1/compose-init.ps1 b/compose/sxp/10.2/ltsc2022/xp1/compose-init.ps1 index fc7a8b53..bc830727 100644 --- a/compose/sxp/10.2/ltsc2022/xp1/compose-init.ps1 +++ b/compose/sxp/10.2/ltsc2022/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.2/ltsc2022/xp1/docker-compose.yml b/compose/sxp/10.2/ltsc2022/xp1/docker-compose.yml index 01a64368..a324bd0f 100644 --- a/compose/sxp/10.2/ltsc2022/xp1/docker-compose.yml +++ b/compose/sxp/10.2/ltsc2022/xp1/docker-compose.yml @@ -29,10 +29,10 @@ services: condition: service_healthy redis: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-redis:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -60,7 +60,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.8.2-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -70,7 +70,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} diff --git a/k8s/sxp/10.2/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.2/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt index 85651cb5..9b2298ca 100644 --- a/k8s/sxp/10.2/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.2/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.2.1 \ No newline at end of file +10.2.2 \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.2/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt index 85651cb5..9b2298ca 100644 --- a/k8s/sxp/10.2/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.2/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.2.1 \ No newline at end of file +10.2.2 \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2019/xm1/external/kustomization.yaml b/k8s/sxp/10.2/ltsc2019/xm1/external/kustomization.yaml index 6abb7164..9bbbea50 100644 --- a/k8s/sxp/10.2/ltsc2019/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2019/xm1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.2/ltsc2019/xm1/kustomization.yaml b/k8s/sxp/10.2/ltsc2019/xm1/kustomization.yaml index d8a279ad..8c543525 100644 --- a/k8s/sxp/10.2/ltsc2019/xm1/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2019/xm1/kustomization.yaml @@ -67,4 +67,4 @@ replacements: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: delimiter: // - index: 1 \ No newline at end of file + index: 1 diff --git a/k8s/sxp/10.2/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.2/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml index a3524af1..59ad7d90 100644 --- a/k8s/sxp/10.2/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml @@ -15,4 +15,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt \ No newline at end of file + - sitecore-searchstax-deployment-uid.txt diff --git a/k8s/sxp/10.2/ltsc2019/xp1/external/kustomization.yaml b/k8s/sxp/10.2/ltsc2019/xp1/external/kustomization.yaml index 6abb7164..9bbbea50 100644 --- a/k8s/sxp/10.2/ltsc2019/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2019/xp1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.2/ltsc2019/xp1/kustomization.yaml b/k8s/sxp/10.2/ltsc2019/xp1/kustomization.yaml index 9234c989..6641e325 100644 --- a/k8s/sxp/10.2/ltsc2019/xp1/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2019/xp1/kustomization.yaml @@ -113,4 +113,4 @@ replacements: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: delimiter: // - index: 1 \ No newline at end of file + index: 1 diff --git a/k8s/sxp/10.2/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.2/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml index 3ab26936..c5bf0518 100644 --- a/k8s/sxp/10.2/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml @@ -15,4 +15,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt \ No newline at end of file + - sitecore-searchstax-deployment-uid.txt diff --git a/k8s/sxp/10.2/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.2/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt index 85651cb5..9b2298ca 100644 --- a/k8s/sxp/10.2/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.2/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.2.1 \ No newline at end of file +10.2.2 \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.2/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt index 85651cb5..9b2298ca 100644 --- a/k8s/sxp/10.2/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.2/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.2.1 \ No newline at end of file +10.2.2 \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2022/xm1/external/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xm1/external/kustomization.yaml index 6abb7164..9bbbea50 100644 --- a/k8s/sxp/10.2/ltsc2022/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xm1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.2/ltsc2022/xm1/init/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xm1/init/kustomization.yaml index b68bb722..96a12a55 100644 --- a/k8s/sxp/10.2/ltsc2022/xm1/init/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xm1/init/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xm1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-init @@ -7,6 +8,7 @@ images: - name: sitecore-xm1-solr-init newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init newTag: 10.2-ltsc2022 + resources: -- mssql-init.yaml -- solr-init.yaml + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2022/xm1/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xm1/kustomization.yaml index 9f2c9455..2f74dda1 100644 --- a/k8s/sxp/10.2/ltsc2022/xm1/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xm1/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xm1-cd newName: scr.sitecore.com/sxp/sitecore-xm1-cd @@ -10,11 +11,13 @@ images: - name: sitecore-xm1-id newName: scr.sitecore.com/sxp/sitecore-id7 newTag: 10.2-ltsc2022 + resources: -- configmaps -- cm.yaml -- cd.yaml -- id.yaml + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + replacements: - source: fieldPath: data.cm-hostname @@ -28,7 +31,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -36,7 +39,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: / + delimiter: '/' index: 2 - select: kind: Deployment @@ -44,7 +47,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: // + delimiter: '//' index: 1 - source: fieldPath: data.id-hostname @@ -58,7 +61,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -66,5 +69,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: // - index: 1 + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml index 8b5ef808..0d421f67 100644 --- a/k8s/sxp/10.2/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml @@ -1,13 +1,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + resources: - ..\..\..\init + patchesStrategicMerge: -- solr-init.yaml + - solr-init.yaml + images: - name: sitecore-xm1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init-searchstax newTag: 10.2-ltsc2022 + generatorOptions: disableNameSuffixHash: true secretGenerator: @@ -15,4 +19,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2022/xp1/external/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xp1/external/kustomization.yaml index 6abb7164..9bbbea50 100644 --- a/k8s/sxp/10.2/ltsc2022/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xp1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.2/ltsc2022/xp1/init/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xp1/init/kustomization.yaml index 0c999d64..114d4076 100644 --- a/k8s/sxp/10.2/ltsc2022/xp1/init/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xp1/init/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xp1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-init @@ -7,6 +8,7 @@ images: - name: sitecore-xp1-solr-init newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init newTag: 10.2-ltsc2022 + resources: -- mssql-init.yaml -- solr-init.yaml \ No newline at end of file + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2022/xp1/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xp1/kustomization.yaml index 411f87ef..e2f68334 100644 --- a/k8s/sxp/10.2/ltsc2022/xp1/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xp1/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xp1-cd newName: scr.sitecore.com/sxp/sitecore-xp1-cd @@ -45,22 +46,24 @@ images: newTag: 10.2-ltsc2022 - name: pwsh-initContainer newName: mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 + resources: -- configmaps -- cm.yaml -- cd.yaml -- id.yaml -- cortexprocessing.yaml -- cortexprocessingworker.yaml -- cortexreporting.yaml -- prc.yaml -- xdbautomation.yaml -- xdbautomationrpt.yaml -- xdbautomationworker.yaml -- xdbcollection.yaml -- xdbrefdata.yaml -- xdbsearch.yaml -- xdbsearchworker.yaml + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + - cortexprocessing.yaml + - cortexprocessingworker.yaml + - cortexreporting.yaml + - prc.yaml + - xdbautomation.yaml + - xdbautomationrpt.yaml + - xdbautomationworker.yaml + - xdbcollection.yaml + - xdbrefdata.yaml + - xdbsearch.yaml + - xdbsearchworker.yaml + replacements: - source: fieldPath: data.cm-hostname @@ -74,7 +77,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -82,7 +85,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: / + delimiter: '/' index: 2 - select: kind: Deployment @@ -90,7 +93,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: // + delimiter: '//' index: 1 - source: fieldPath: data.id-hostname @@ -104,7 +107,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -112,5 +115,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: // - index: 1 + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.2/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.2/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml index 9225d259..3785fc0b 100644 --- a/k8s/sxp/10.2/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.2/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml @@ -1,13 +1,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + resources: - ..\..\..\init + patchesStrategicMerge: -- solr-init.yaml + - solr-init.yaml + images: - name: sitecore-xp1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init-searchstax newTag: 10.2-ltsc2022 + generatorOptions: disableNameSuffixHash: true secretGenerator: @@ -15,4 +19,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file From 75740b2b5d39e439e4e22155fe738d1511665ed1 Mon Sep 17 00:00:00 2001 From: Jen Neng Ng Date: Wed, 24 Jul 2024 11:19:01 +0800 Subject: [PATCH 08/17] update --- compose/chub/5.2/ltsc2019/xm1/.env-example | 25 +++++++++ .../ltsc2019/xm1/docker-compose.override.yml | 17 ++++++ compose/chub/5.2/ltsc2019/xp0/.env-example | 25 +++++++++ .../ltsc2019/xp0/docker-compose.override.yml | 11 ++++ compose/chub/5.2/ltsc2019/xp1/.env-example | 25 +++++++++ .../ltsc2019/xp1/docker-compose.override.yml | 17 ++++++ .../ltsc2019/overrides/xm1/kustomization.yaml | 17 ++++++ .../ltsc2019/overrides/xm1/patch-cd.scch.yaml | 33 ++++++++++++ .../ltsc2019/overrides/xm1/patch-cm.scch.yaml | 53 +++++++++++++++++++ .../overrides/xm1/secrets/kustomization.yaml | 21 ++++++++ .../xm1/secrets/sitecore-cmp-content-hub.txt | 1 + ...itecore-cmp-service-bus-entity-path-in.txt | 1 + ...tecore-cmp-service-bus-entity-path-out.txt | 1 + .../sitecore-cmp-service-bus-subscription.txt | 1 + .../xm1/secrets/sitecore-dam-content-hub.txt | 1 + .../sitecore-dam-external-redirect-key.txt | 1 + .../xm1/secrets/sitecore-dam-search-page.txt | 1 + .../ltsc2019/overrides/xp1/kustomization.yaml | 17 ++++++ .../ltsc2019/overrides/xp1/patch-cd.scch.yaml | 33 ++++++++++++ .../ltsc2019/overrides/xp1/patch-cm.scch.yaml | 53 +++++++++++++++++++ .../overrides/xp1/secrets/kustomization.yaml | 21 ++++++++ .../xp1/secrets/sitecore-cmp-content-hub.txt | 1 + ...itecore-cmp-service-bus-entity-path-in.txt | 1 + ...tecore-cmp-service-bus-entity-path-out.txt | 1 + .../sitecore-cmp-service-bus-subscription.txt | 1 + .../xp1/secrets/sitecore-dam-content-hub.txt | 1 + .../sitecore-dam-external-redirect-key.txt | 1 + .../xp1/secrets/sitecore-dam-search-page.txt | 1 + 28 files changed, 382 insertions(+) create mode 100644 compose/chub/5.2/ltsc2019/xm1/.env-example create mode 100644 compose/chub/5.2/ltsc2019/xm1/docker-compose.override.yml create mode 100644 compose/chub/5.2/ltsc2019/xp0/.env-example create mode 100644 compose/chub/5.2/ltsc2019/xp0/docker-compose.override.yml create mode 100644 compose/chub/5.2/ltsc2019/xp1/.env-example create mode 100644 compose/chub/5.2/ltsc2019/xp1/docker-compose.override.yml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cd.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cm.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-search-page.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cd.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cm.scch.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/kustomization.yaml create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-content-hub.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt create mode 100644 k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-search-page.txt diff --git a/compose/chub/5.2/ltsc2019/xm1/.env-example b/compose/chub/5.2/ltsc2019/xm1/.env-example new file mode 100644 index 00000000..389ae6d1 --- /dev/null +++ b/compose/chub/5.2/ltsc2019/xm1/.env-example @@ -0,0 +1,25 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The Azure service bus entity path in +CMP_ServiceBusEntityPathIn= + +#The Azure service bus subscription +CMP_ServiceBusSubscription= + +#The Azure service bus entity path out +CMP_ServiceBusEntityPathOut= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +DAM_ContentHub= + +#The Content Hub searh page URL +DAM_SearchPage= + +#The Content Hub external redirect key +DAM_ExternalRedirectKey= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +CMP_ContentHub= + +#Sitecore Platform topology to deploy +TOPOLOGY= \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2019/xm1/docker-compose.override.yml b/compose/chub/5.2/ltsc2019/xm1/docker-compose.override.yml new file mode 100644 index 00000000..da4bf642 --- /dev/null +++ b/compose/chub/5.2/ltsc2019/xm1/docker-compose.override.yml @@ -0,0 +1,17 @@ +services: + cd: + image: sitecore-chub-${TOPOLOGY}-cd:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} + cm: + image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_CMP.ContentHub: ${CMP_ContentHub} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn: ${CMP_ServiceBusEntityPathIn} + Sitecore_ConnectionStrings_CMP.ServiceBusSubscription: ${CMP_ServiceBusSubscription} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut: ${CMP_ServiceBusEntityPathOut} + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} diff --git a/compose/chub/5.2/ltsc2019/xp0/.env-example b/compose/chub/5.2/ltsc2019/xp0/.env-example new file mode 100644 index 00000000..389ae6d1 --- /dev/null +++ b/compose/chub/5.2/ltsc2019/xp0/.env-example @@ -0,0 +1,25 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The Azure service bus entity path in +CMP_ServiceBusEntityPathIn= + +#The Azure service bus subscription +CMP_ServiceBusSubscription= + +#The Azure service bus entity path out +CMP_ServiceBusEntityPathOut= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +DAM_ContentHub= + +#The Content Hub searh page URL +DAM_SearchPage= + +#The Content Hub external redirect key +DAM_ExternalRedirectKey= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +CMP_ContentHub= + +#Sitecore Platform topology to deploy +TOPOLOGY= \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2019/xp0/docker-compose.override.yml b/compose/chub/5.2/ltsc2019/xp0/docker-compose.override.yml new file mode 100644 index 00000000..85f5bc0b --- /dev/null +++ b/compose/chub/5.2/ltsc2019/xp0/docker-compose.override.yml @@ -0,0 +1,11 @@ +services: + cm: + image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_CMP.ContentHub: ${CMP_ContentHub} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn: ${CMP_ServiceBusEntityPathIn} + Sitecore_ConnectionStrings_CMP.ServiceBusSubscription: ${CMP_ServiceBusSubscription} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut: ${CMP_ServiceBusEntityPathOut} + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2019/xp1/.env-example b/compose/chub/5.2/ltsc2019/xp1/.env-example new file mode 100644 index 00000000..389ae6d1 --- /dev/null +++ b/compose/chub/5.2/ltsc2019/xp1/.env-example @@ -0,0 +1,25 @@ +#Add the following environment variables to the Sitecore Platform .env file + +#The Azure service bus entity path in +CMP_ServiceBusEntityPathIn= + +#The Azure service bus subscription +CMP_ServiceBusSubscription= + +#The Azure service bus entity path out +CMP_ServiceBusEntityPathOut= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +DAM_ContentHub= + +#The Content Hub searh page URL +DAM_SearchPage= + +#The Content Hub external redirect key +DAM_ExternalRedirectKey= + +#The Content Hub connection string, for example, ClientId=;ClientSecret=;UserName=;Password=;URI= +CMP_ContentHub= + +#Sitecore Platform topology to deploy +TOPOLOGY= \ No newline at end of file diff --git a/compose/chub/5.2/ltsc2019/xp1/docker-compose.override.yml b/compose/chub/5.2/ltsc2019/xp1/docker-compose.override.yml new file mode 100644 index 00000000..da4bf642 --- /dev/null +++ b/compose/chub/5.2/ltsc2019/xp1/docker-compose.override.yml @@ -0,0 +1,17 @@ +services: + cd: + image: sitecore-chub-${TOPOLOGY}-cd:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} + cm: + image: sitecore-chub-${TOPOLOGY}-cm:${SITECORE_VERSION} + environment: + Sitecore_ConnectionStrings_CMP.ContentHub: ${CMP_ContentHub} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn: ${CMP_ServiceBusEntityPathIn} + Sitecore_ConnectionStrings_CMP.ServiceBusSubscription: ${CMP_ServiceBusSubscription} + Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut: ${CMP_ServiceBusEntityPathOut} + Sitecore_ConnectionStrings_DAM.ContentHub: ${DAM_ContentHub} + Sitecore_ConnectionStrings_DAM.SearchPage: ${DAM_SearchPage} + Sitecore_ConnectionStrings_DAM.ExternalRedirectKey: ${DAM_ExternalRedirectKey} diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/kustomization.yaml b/k8s/chub/5.2/ltsc2019/overrides/xm1/kustomization.yaml new file mode 100644 index 00000000..921fd6ee --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xm1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xm1-cd + newName: "{registry}/sitecore-chub-xm1-cd" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xm1-cm + newName: "{registry}/sitecore-chub-xm1-cm" + newTag: tag + +patchesStrategicMerge: + - patch-cd.scch.yaml + - patch-cm.scch.yaml diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cd.scch.yaml b/k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cd.scch.yaml new file mode 100644 index 00000000..f78d7bf4 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cd.scch.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cd +spec: + selector: + matchLabels: + app: cd + template: + metadata: + labels: + app: cd + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cd + env: + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cm.scch.yaml b/k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cm.scch.yaml new file mode 100644 index 00000000..12014622 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/patch-cm.scch.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xm1-cm + env: + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-in.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusSubscription + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-subscription.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-out.txt + - name: Sitecore_ConnectionStrings_CMP.ContentHub + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/kustomization.yaml b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/kustomization.yaml new file mode 100644 index 00000000..1ef4672e --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xm1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: scch-cmp-connection-strings + files: + - sitecore-cmp-service-bus-entity-path-in.txt + - sitecore-cmp-service-bus-subscription.txt + - sitecore-cmp-service-bus-entity-path-out.txt + - sitecore-cmp-content-hub.txt +- name: scch-dam-connection-strings + files: + - sitecore-dam-content-hub.txt + - sitecore-dam-search-page.txt + - sitecore-dam-external-redirect-key.txt diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-content-hub.txt b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-in.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-entity-path-out.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt new file mode 100644 index 00000000..2e16b7cc --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-cmp-service-bus-subscription.txt @@ -0,0 +1 @@ +[CMP_ServiceBusSubscription] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-content-hub.txt b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt new file mode 100644 index 00000000..4240afb5 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-external-redirect-key.txt @@ -0,0 +1 @@ +[DAM_ExternalRedirectKey] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-search-page.txt b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-search-page.txt new file mode 100644 index 00000000..96f63438 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xm1/secrets/sitecore-dam-search-page.txt @@ -0,0 +1 @@ +[DAM_SearchPage] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/kustomization.yaml b/k8s/chub/5.2/ltsc2019/overrides/xp1/kustomization.yaml new file mode 100644 index 00000000..9f5efee3 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../xp1 + +images: +- name: scr.sitecore.com/sxp/sitecore-xp1-cd + newName: "{registry}/sitecore-chub-xp1-cd" + newTag: tag +- name: scr.sitecore.com/sxp/sitecore-xp1-cm + newName: "{registry}/sitecore-chub-xp1-cm" + newTag: tag + +patchesStrategicMerge: + - patch-cd.scch.yaml + - patch-cm.scch.yaml diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cd.scch.yaml b/k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cd.scch.yaml new file mode 100644 index 00000000..1d7748e3 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cd.scch.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cd +spec: + selector: + matchLabels: + app: cd + template: + metadata: + labels: + app: cd + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cd + env: + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cm.scch.yaml b/k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cm.scch.yaml new file mode 100644 index 00000000..5a79ed5c --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/patch-cm.scch.yaml @@ -0,0 +1,53 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cm +spec: + selector: + matchLabels: + app: cm + template: + metadata: + labels: + app: cm + spec: + nodeSelector: + kubernetes.io/os: windows + containers: + - name: sitecore-xp1-cm + env: + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathIn + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-in.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusSubscription + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-subscription.txt + - name: Sitecore_ConnectionStrings_CMP.ServiceBusEntityPathOut + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-service-bus-entity-path-out.txt + - name: Sitecore_ConnectionStrings_CMP.ContentHub + valueFrom: + secretKeyRef: + name: scch-cmp-connection-strings + key: sitecore-cmp-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.ContentHub + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-content-hub.txt + - name: Sitecore_ConnectionStrings_DAM.SearchPage + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-search-page.txt + - name: Sitecore_ConnectionStrings_DAM.ExternalRedirectKey + valueFrom: + secretKeyRef: + name: scch-dam-connection-strings + key: sitecore-dam-external-redirect-key.txt \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/kustomization.yaml b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/kustomization.yaml new file mode 100644 index 00000000..7f41c0fb --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/kustomization.yaml @@ -0,0 +1,21 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +bases: + - ../../../xp1/secrets + +generatorOptions: + disableNameSuffixHash: true + +secretGenerator: +- name: scch-cmp-connection-strings + files: + - sitecore-cmp-service-bus-entity-path-in.txt + - sitecore-cmp-service-bus-subscription.txt + - sitecore-cmp-service-bus-entity-path-out.txt + - sitecore-cmp-content-hub.txt +- name: scch-dam-connection-strings + files: + - sitecore-dam-content-hub.txt + - sitecore-dam-search-page.txt + - sitecore-dam-external-redirect-key.txt diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-content-hub.txt b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-in.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt new file mode 100644 index 00000000..c1583a6b --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-entity-path-out.txt @@ -0,0 +1 @@ +Endpoint=[Endpoint];SharedAccessKeyName=[SharedAccessKeyName];SharedAccessKey=[SharedAccessKey];EntityPath=[EntityPath] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt new file mode 100644 index 00000000..2e16b7cc --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-cmp-service-bus-subscription.txt @@ -0,0 +1 @@ +[CMP_ServiceBusSubscription] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-content-hub.txt b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-content-hub.txt new file mode 100644 index 00000000..c653d3db --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-content-hub.txt @@ -0,0 +1 @@ +ClientId=[ClientId];ClientSecret=[ClientSecret];UserName=[UserName];Password=[Password];URI=[URI]; \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt new file mode 100644 index 00000000..4240afb5 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-external-redirect-key.txt @@ -0,0 +1 @@ +[DAM_ExternalRedirectKey] \ No newline at end of file diff --git a/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-search-page.txt b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-search-page.txt new file mode 100644 index 00000000..96f63438 --- /dev/null +++ b/k8s/chub/5.2/ltsc2019/overrides/xp1/secrets/sitecore-dam-search-page.txt @@ -0,0 +1 @@ +[DAM_SearchPage] \ No newline at end of file From 2281e89a6fec5cfb97af29609e65bb09ac19b52d Mon Sep 17 00:00:00 2001 From: Eugenia Bilynska Date: Fri, 16 Aug 2024 18:24:13 +0300 Subject: [PATCH 09/17] Update Sitecore Experience Platform Container Deployment to 10.3.2.010837.1896 --- .../ltsc2019/upgrade/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env | 2 +- .../ltsc2019/upgrade/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.3/ltsc2019/xm1/.env | 4 +- .../sxp/10.3/ltsc2019/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/xm1/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2019/xp0/.env | 4 +- .../sxp/10.3/ltsc2019/xp0/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/xp0/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2019/xp1/.env | 4 +- .../sxp/10.3/ltsc2019/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2019/xp1/docker-compose.yml | 4 +- .../ltsc2022/upgrade/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env | 2 +- .../ltsc2022/upgrade/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.3/ltsc2022/xm1/.env | 4 +- .../sxp/10.3/ltsc2022/xm1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/xm1/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2022/xp0/.env | 4 +- .../sxp/10.3/ltsc2022/xp0/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/xp0/docker-compose.yml | 4 +- compose/sxp/10.3/ltsc2022/xp1/.env | 4 +- .../sxp/10.3/ltsc2022/xp1/compose-init.ps1 | 76 ++++++++----------- .../sxp/10.3/ltsc2022/xp1/docker-compose.yml | 4 +- .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2019/xm1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml | 2 +- .../init/SearchStax/kustomization.yaml | 2 +- .../ltsc2019/xp1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml | 2 +- .../init/SearchStax/kustomization.yaml | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2022/upgrade/xm1/kustomization.yaml | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2022/upgrade/xp1/kustomization.yaml | 2 +- .../ltsc2022/xm1/external/kustomization.yaml | 2 +- .../10.3/ltsc2022/xm1/init/kustomization.yaml | 6 +- k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml | 23 +++--- .../init/SearchStax/kustomization.yaml | 8 +- .../ltsc2022/xp1/external/kustomization.yaml | 2 +- .../10.3/ltsc2022/xp1/init/kustomization.yaml | 6 +- k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml | 45 ++++++----- .../init/SearchStax/kustomization.yaml | 8 +- 46 files changed, 409 insertions(+), 531 deletions(-) diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env b/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env index 255af0ee..fa009d64 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env b/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env index f2276479..739cf0d4 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xm1/.env b/compose/sxp/10.3/ltsc2019/xm1/.env index 7a876045..a6f9db6c 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/.env +++ b/compose/sxp/10.3/ltsc2019/xm1/.env @@ -20,8 +20,8 @@ SITECORE_LICENSE= CD_HOST=xm1cd.localhost CM_HOST=xm1cm.localhost ID_HOST=xm1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml index 5778210a..4009e127 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2019/xp0/.env b/compose/sxp/10.3/ltsc2019/xp0/.env index 0a742e48..c9d4fa70 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/.env +++ b/compose/sxp/10.3/ltsc2019/xp0/.env @@ -19,8 +19,8 @@ SITECORE_ID_CERTIFICATE_PASSWORD= SITECORE_LICENSE= CM_HOST=xp0cm.localhost ID_HOST=xp0id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 index afa1487e..d2be2500 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml index 1659045f..07cc084d 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml @@ -27,7 +27,7 @@ services: condition: service_healthy mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -67,7 +67,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2019/xp1/.env b/compose/sxp/10.3/ltsc2019/xp1/.env index 8807e0e6..e6919ea1 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/.env +++ b/compose/sxp/10.3/ltsc2019/xp1/.env @@ -21,8 +21,8 @@ SITECORE_LICENSE= CD_HOST=xp1cd.localhost CM_HOST=xp1cm.localhost ID_HOST=xp1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-1809 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml index 3e7c4045..09271173 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env b/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env index 5b9a7165..06b4c075 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env b/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env index eb8065d1..ebdfcc6b 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.1 +DATABASE_UPGRADE_TO_VERSION=10.3.2 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xm1/.env b/compose/sxp/10.3/ltsc2022/xm1/.env index a6f53f84..20d0717c 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/.env +++ b/compose/sxp/10.3/ltsc2022/xm1/.env @@ -20,8 +20,8 @@ SITECORE_LICENSE= CD_HOST=xm1cd.localhost CM_HOST=xm1cm.localhost ID_HOST=xm1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 index 3d3b25f0..e4febb85 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml index 5778210a..4009e127 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/xp0/.env b/compose/sxp/10.3/ltsc2022/xp0/.env index 08b8b07b..7f08f66d 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/.env +++ b/compose/sxp/10.3/ltsc2022/xp0/.env @@ -19,8 +19,8 @@ SITECORE_ID_CERTIFICATE_PASSWORD= SITECORE_LICENSE= CM_HOST=xp0cm.localhost ID_HOST=xp0id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 index afa1487e..d2be2500 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml index 1659045f..07cc084d 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml @@ -27,7 +27,7 @@ services: condition: service_healthy mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -67,7 +67,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/xp1/.env b/compose/sxp/10.3/ltsc2022/xp1/.env index 5154b624..418a716b 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/.env +++ b/compose/sxp/10.3/ltsc2022/xp1/.env @@ -21,8 +21,8 @@ SITECORE_LICENSE= CD_HOST=xp1cd.localhost CM_HOST=xp1cm.localhost ID_HOST=xp1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 index c22c4eb6..f0345ac7 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 @@ -44,7 +44,7 @@ Param ( $IdHost = "$($Topology)id.localhost", [string] - $SitecoreGalleryRepositoryLocation = "https://sitecore.myget.org/F/sc-powershell/api/v2", + $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] $CertDataFolder = ".\traefik\certs", @@ -185,17 +185,36 @@ function Update-CertsConfigFile{ Write-Information -MessageData "certs_config.yaml file was successfully updated." -InformationAction Continue } -function InstallModule{ - param( - [string]$ModuleName, - [string]$ModuleVersion, - [string]$RepositoryName +function InstallModule { + Param( + [String]$ModuleName, + [String]$ModuleVersion ) + try { + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + if (!$repository) { + $tempRepositoryName = "Temp" + (New-Guid) + Register-PSRepository -Name $tempRepositoryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted + $repository = Get-PSRepository | Where-Object { $_.SourceLocation -eq $SitecoreGalleryRepositoryLocation } + } + if (!$ModuleVersion) { + $ModuleVersion = (Find-Module -Name $ModuleName -Repository $repository.Name -AllowPrerelease).Version + Write-Host "The Docker tool version was not specified. The latest available '$ModuleVersion' version will be used." -ForegroundColor Green + } - $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue - if (-not $moduleInstalled) { - Write-Host "Installing '$ModuleName'" -ForegroundColor Green - Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -Repository $RepositoryName -Scope CurrentUser + $moduleInstalled = Get-InstalledModule -Name $ModuleName -RequiredVersion $ModuleVersion -AllowPrerelease -ErrorAction SilentlyContinue + if (!$moduleInstalled) { + Write-Host "Installing '$ModuleName' $ModuleVersion" -ForegroundColor Green + Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" + } + $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path + Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Import-Module -Name $localModulePath + } + finally { + if ($tempRepositoryName -and ($repository.Name -eq $tempRepositoryName)) { + Unregister-PSRepository -Name $tempRepositoryName + } } } @@ -207,42 +226,9 @@ function Invoke-ComposeInit { throw "$LicenseXmlPath is not a file" } - # Check for Sitecore Gallery - Import-Module PowerShellGet - $SitecoreGalleryName = 'SitecoreGallery' - $SitecoreGallery = Get-PSRepository | Where-Object { $_.Name -eq $SitecoreGalleryName } - if (-not $SitecoreGallery) { - Write-Host "Adding Sitecore PowerShell Gallery..." -ForegroundColor Green - Register-PSRepository -Name $SitecoreGalleryName -SourceLocation $SitecoreGalleryRepositoryLocation -InstallationPolicy Trusted - $SitecoreGallery = Get-PSRepository -Name $SitecoreGalleryName - } - # Install and Import SitecoreDockerTools - $moduleName = "SitecoreDockerTools" - $repositoryName = $SitecoreGallery.Name - - $module = Find-Module -Name $moduleName -Repository $repositoryName - $latestVersion = $module.Version - $importModuleCommand = "Import-Module $moduleName -RequiredVersion $latestVersion" - - if(![string]::IsNullOrEmpty($SpecificVersion)){ - $module = Find-Module -Name $moduleName -Repository $repositoryName -RequiredVersion $SpecificVersion -AllowPrerelease - $latestVersion = $module.Version - - if([string]::IsNullOrEmpty($latestVersion)){ - Write-Warning -Message "'$moduleName' module with '$SpecificVersion' version doesn't exist." - return - } - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - - $modulePath = ((Get-Module $moduleName -ListAvailable) | where Version -eq $latestVersion.Split("-")[0]).Path - $importModuleCommand = "Import-Module -Name $modulePath" - }else{ - InstallModule -ModuleName $moduleName -ModuleVersion $latestVersion -RepositoryName $repositoryName - } - - Write-Host "Importing '$moduleName'..." -ForegroundColor Green - Invoke-Expression $importModuleCommand + $ModuleName = "SitecoreDockerTools" + InstallModule -ModuleName $ModuleName -ModuleVersion $SpecificVersion $idCertPassword = Get-SitecoreRandomString 12 -DisallowSpecial $envVariablesTable = @{ diff --git a/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml index 3e7c4045..09271173 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml @@ -32,7 +32,7 @@ services: image: ${SITECORE_DOCKER_REGISTRY}redis:3.2.100-${EXTERNAL_IMAGE_TAG_SUFFIX} mssql: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2017-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: SA_PASSWORD: ${SQL_SA_PASSWORD} ACCEPT_EULA: "Y" @@ -72,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} diff --git a/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml index 6480b944..5643f6ca 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml @@ -67,4 +67,4 @@ replacements: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: delimiter: // - index: 1 \ No newline at end of file + index: 1 diff --git a/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml index e4a513b4..094f443a 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml @@ -15,4 +15,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt \ No newline at end of file + - sitecore-searchstax-deployment-uid.txt diff --git a/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml index e1314961..ac4dd472 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml @@ -113,4 +113,4 @@ replacements: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: delimiter: // - index: 1 \ No newline at end of file + index: 1 diff --git a/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml index e1447333..68e61cba 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml @@ -15,4 +15,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt \ No newline at end of file + - sitecore-searchstax-deployment-uid.txt diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml index 4183e71e..b60db321 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/kustomization.yaml @@ -18,4 +18,4 @@ resources: images: - name: sitecore-xm1-mssql-upgrade newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-upgrade - newTag: 10.3-ltsc2022 + newTag: 10.3-ltsc2022 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt index 1b77c515..f963de45 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.1 \ No newline at end of file +10.3.2 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml index db91ca15..fac546a1 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/kustomization.yaml @@ -20,4 +20,4 @@ resources: images: - name: sitecore-xp1-mssql-upgrade newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-upgrade - newTag: 10.3-ltsc2022 + newTag: 10.3-ltsc2022 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml index 3279f8e7..48a547e9 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/init/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xm1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-init @@ -7,6 +8,7 @@ images: - name: sitecore-xm1-solr-init newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init newTag: 10.3-ltsc2022 + resources: -- mssql-init.yaml -- solr-init.yaml + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml index b70f112b..4a55a95d 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xm1-cd newName: scr.sitecore.com/sxp/sitecore-xm1-cd @@ -10,11 +11,13 @@ images: - name: sitecore-xm1-id newName: scr.sitecore.com/sxp/sitecore-id7 newTag: 10.3-ltsc2022 + resources: -- configmaps -- cm.yaml -- cd.yaml -- id.yaml + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + replacements: - source: fieldPath: data.cm-hostname @@ -28,7 +31,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -36,7 +39,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: / + delimiter: '/' index: 2 - select: kind: Deployment @@ -44,7 +47,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: // + delimiter: '//' index: 1 - source: fieldPath: data.id-hostname @@ -58,7 +61,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -66,5 +69,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: // - index: 1 + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml index 903ec3f1..90b13c84 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/overlays/init/SearchStax/kustomization.yaml @@ -1,13 +1,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + resources: - ..\..\..\init + patchesStrategicMerge: -- solr-init.yaml + - solr-init.yaml + images: - name: sitecore-xm1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init-searchstax newTag: 10.3-ltsc2022 + generatorOptions: disableNameSuffixHash: true secretGenerator: @@ -15,4 +19,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml index bb177eb8..e3cfc442 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml @@ -4,7 +4,7 @@ kind: Kustomization images: - name: mssql newName: mcr.microsoft.com/mssql/server - newTag: 2017-CU21-ubuntu-16.04 + newTag: 2019-CU25-ubuntu-20.04 - name: redis newName: redis newTag: 4.0.14-alpine diff --git a/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml index 07c73e04..e9c22e6a 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/init/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xp1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-init @@ -7,6 +8,7 @@ images: - name: sitecore-xp1-solr-init newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init newTag: 10.3-ltsc2022 + resources: -- mssql-init.yaml -- solr-init.yaml + - mssql-init.yaml + - solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml index 9790a950..9f7df7e4 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml @@ -1,5 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + images: - name: sitecore-xp1-cd newName: scr.sitecore.com/sxp/sitecore-xp1-cd @@ -45,22 +46,24 @@ images: newTag: 10.3-ltsc2022 - name: pwsh-initContainer newName: mcr.microsoft.com/powershell:lts-nanoserver-ltsc2022 + resources: -- configmaps -- cm.yaml -- cd.yaml -- id.yaml -- cortexprocessing.yaml -- cortexprocessingworker.yaml -- cortexreporting.yaml -- prc.yaml -- xdbautomation.yaml -- xdbautomationrpt.yaml -- xdbautomationworker.yaml -- xdbcollection.yaml -- xdbrefdata.yaml -- xdbsearch.yaml -- xdbsearchworker.yaml + - configmaps + - cm.yaml + - cd.yaml + - id.yaml + - cortexprocessing.yaml + - cortexprocessingworker.yaml + - cortexreporting.yaml + - prc.yaml + - xdbautomation.yaml + - xdbautomationrpt.yaml + - xdbautomationworker.yaml + - xdbcollection.yaml + - xdbrefdata.yaml + - xdbsearch.yaml + - xdbsearchworker.yaml + replacements: - source: fieldPath: data.cm-hostname @@ -74,7 +77,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -82,7 +85,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: / + delimiter: '/' index: 2 - select: kind: Deployment @@ -90,7 +93,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: // + delimiter: '//' index: 1 - source: fieldPath: data.id-hostname @@ -104,7 +107,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: // + delimiter: '//' index: 1 - select: kind: Deployment @@ -112,5 +115,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: // - index: 1 + delimiter: '//' + index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml index 0e858908..13e4a27c 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/overlays/init/SearchStax/kustomization.yaml @@ -1,13 +1,17 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization + resources: - ..\..\..\init + patchesStrategicMerge: -- solr-init.yaml + - solr-init.yaml + images: - name: sitecore-xp1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init-searchstax newTag: 10.3-ltsc2022 + generatorOptions: disableNameSuffixHash: true secretGenerator: @@ -15,4 +19,4 @@ secretGenerator: files: - sitecore-searchstax-apikey.txt - sitecore-searchstax-account-name.txt - - sitecore-searchstax-deployment-uid.txt + - sitecore-searchstax-deployment-uid.txt \ No newline at end of file From 588da4a548a80c97f4c0737b914c70a0fa98a8b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fotis=20Niarchos=20=28=CE=A6=CF=8E=CF=84=CE=B7=CF=82=20?= =?UTF-8?q?=CE=9D=CE=B9=CE=AC=CF=81=CF=87=CE=BF=CF=82=29?= Date: Tue, 17 Jun 2025 18:00:49 +0300 Subject: [PATCH 10/17] Update 10.4 SXP Sitecore Container Deployment to 10.4.1.012149.2344 --- .../ltsc2019/upgrade/xm1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env | 2 +- .../ltsc2019/upgrade/xp1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.4/ltsc2019/xm1/.env | 2 + .../sxp/10.4/ltsc2019/xm1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2019/xm1/docker-compose.yml | 17 +++++-- compose/sxp/10.4/ltsc2019/xm1/id/certs/readme | 2 + .../sxp/10.4/ltsc2019/xm1/mssql/certs/readme | 2 + compose/sxp/10.4/ltsc2019/xp0/.env | 2 + .../sxp/10.4/ltsc2019/xp0/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2019/xp0/docker-compose.yml | 17 +++++-- compose/sxp/10.4/ltsc2019/xp0/id/certs/readme | 2 + .../sxp/10.4/ltsc2019/xp0/mssql/certs/readme | 2 + compose/sxp/10.4/ltsc2019/xp1/.env | 2 + .../sxp/10.4/ltsc2019/xp1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2019/xp1/docker-compose.yml | 17 +++++-- compose/sxp/10.4/ltsc2019/xp1/id/certs/readme | 2 + .../sxp/10.4/ltsc2019/xp1/mssql/certs/readme | 2 + .../ltsc2022/upgrade/xm1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2022/upgrade/xm1/upgrade.env | 2 +- .../ltsc2022/upgrade/xp1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2022/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.4/ltsc2022/xm1/.env | 6 ++- .../sxp/10.4/ltsc2022/xm1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2022/xm1/docker-compose.yml | 17 +++++-- compose/sxp/10.4/ltsc2022/xm1/id/certs/readme | 2 + .../sxp/10.4/ltsc2022/xm1/mssql/certs/readme | 2 + compose/sxp/10.4/ltsc2022/xp0/.env | 6 ++- .../sxp/10.4/ltsc2022/xp0/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2022/xp0/docker-compose.yml | 17 +++++-- compose/sxp/10.4/ltsc2022/xp0/id/certs/readme | 2 + .../sxp/10.4/ltsc2022/xp0/mssql/certs/readme | 2 + compose/sxp/10.4/ltsc2022/xp1/.env | 6 ++- .../sxp/10.4/ltsc2022/xp1/compose-init.ps1 | 33 +++++++++++-- .../sxp/10.4/ltsc2022/xp1/docker-compose.yml | 17 +++++-- compose/sxp/10.4/ltsc2022/xp1/id/certs/readme | 2 + .../sxp/10.4/ltsc2022/xp1/mssql/certs/readme | 2 + .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2019/xm1/external/kustomization.yaml | 2 +- k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml | 16 ++++++- k8s/sxp/10.4/ltsc2019/xm1/id.yaml | 8 +++- .../10.4/ltsc2019/xm1/init/kustomization.yaml | 6 +-- k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 | 22 +++++++-- k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml | 25 +++++----- .../init/SearchStax/kustomization.yaml | 6 +-- .../ltsc2019/xm1/secrets/kustomization.yaml | 13 ++++- .../ltsc2019/xm1/secrets/mssql/mssql.conf | 5 ++ .../ltsc2019/xm1/secrets/tls/mssql/readme | 3 ++ .../ltsc2019/xp1/external/kustomization.yaml | 2 +- k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml | 16 ++++++- k8s/sxp/10.4/ltsc2019/xp1/id.yaml | 8 +++- .../10.4/ltsc2019/xp1/init/kustomization.yaml | 6 +-- k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 | 22 +++++++-- k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml | 47 +++++++++---------- .../init/SearchStax/kustomization.yaml | 6 +-- .../ltsc2019/xp1/secrets/kustomization.yaml | 13 ++++- .../ltsc2019/xp1/secrets/mssql/mssql.conf | 5 ++ .../ltsc2019/xp1/secrets/tls/mssql/readme | 3 ++ .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2022/xm1/external/kustomization.yaml | 2 +- k8s/sxp/10.4/ltsc2022/xm1/external/mssql.yaml | 16 ++++++- k8s/sxp/10.4/ltsc2022/xm1/id.yaml | 8 +++- k8s/sxp/10.4/ltsc2022/xm1/k8s-init.ps1 | 22 +++++++-- k8s/sxp/10.4/ltsc2022/xm1/kustomization.yaml | 4 +- .../ltsc2022/xm1/secrets/kustomization.yaml | 13 ++++- .../ltsc2022/xm1/secrets/mssql/mssql.conf | 5 ++ .../ltsc2022/xm1/secrets/tls/mssql/readme | 3 ++ .../ltsc2022/xp1/external/kustomization.yaml | 2 +- k8s/sxp/10.4/ltsc2022/xp1/external/mssql.yaml | 16 ++++++- k8s/sxp/10.4/ltsc2022/xp1/id.yaml | 8 +++- k8s/sxp/10.4/ltsc2022/xp1/k8s-init.ps1 | 22 +++++++-- k8s/sxp/10.4/ltsc2022/xp1/kustomization.yaml | 4 +- .../ltsc2022/xp1/secrets/kustomization.yaml | 13 ++++- .../ltsc2022/xp1/secrets/mssql/mssql.conf | 5 ++ .../ltsc2022/xp1/secrets/tls/mssql/readme | 3 ++ 78 files changed, 709 insertions(+), 167 deletions(-) create mode 100644 compose/sxp/10.4/ltsc2019/xm1/id/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xm1/mssql/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xp0/id/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xp0/mssql/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xp1/id/certs/readme create mode 100644 compose/sxp/10.4/ltsc2019/xp1/mssql/certs/readme create mode 100644 compose/sxp/10.4/ltsc2022/xm1/id/certs/readme create mode 100644 compose/sxp/10.4/ltsc2022/xm1/mssql/certs/readme create mode 100644 compose/sxp/10.4/ltsc2022/xp0/id/certs/readme create mode 100644 compose/sxp/10.4/ltsc2022/xp0/mssql/certs/readme create mode 100644 compose/sxp/10.4/ltsc2022/xp1/id/certs/readme create mode 100644 compose/sxp/10.4/ltsc2022/xp1/mssql/certs/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/mssql/readme create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/mssql/readme create mode 100644 k8s/sxp/10.4/ltsc2022/xm1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.4/ltsc2022/xm1/secrets/tls/mssql/readme create mode 100644 k8s/sxp/10.4/ltsc2022/xp1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.4/ltsc2022/xp1/secrets/tls/mssql/readme diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 index cc7b9050..7ba9825c 100644 --- a/compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2019/upgrade/xm1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env b/compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env index 345a833b..d5e3d191 100644 --- a/compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.4/ltsc2019/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.3.0 -DATABASE_UPGRADE_TO_VERSION=10.4.0 +DATABASE_UPGRADE_TO_VERSION=10.4.1 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 index a28b66c9..1c1dfe09 100644 --- a/compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2019/upgrade/xp1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env b/compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env index 9b89b6d2..ecc54079 100644 --- a/compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.4/ltsc2019/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.3.0 -DATABASE_UPGRADE_TO_VERSION=10.4.0 +DATABASE_UPGRADE_TO_VERSION=10.4.1 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/.env b/compose/sxp/10.4/ltsc2019/xm1/.env index 74880d63..801ec846 100644 --- a/compose/sxp/10.4/ltsc2019/xm1/.env +++ b/compose/sxp/10.4/ltsc2019/xm1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xm1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.4-ltsc2019 +SITECORE_ID_VERSION=8.0-ltsc2019 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=true SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false diff --git a/compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 index cc7b9050..7ba9825c 100644 --- a/compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2019/xm1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml b/compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml index 44366724..348e6a94 100644 --- a/compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml +++ b/compose/sxp/10.4/ltsc2019/xm1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -72,7 +77,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.4/ltsc2019/xm1/id/certs/readme b/compose/sxp/10.4/ltsc2019/xm1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xm1/mssql/certs/readme b/compose/sxp/10.4/ltsc2019/xm1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xm1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/.env b/compose/sxp/10.4/ltsc2019/xp0/.env index c7b0b410..aa3d0537 100644 --- a/compose/sxp/10.4/ltsc2019/xp0/.env +++ b/compose/sxp/10.4/ltsc2019/xp0/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp0 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.4-ltsc2019 +SITECORE_ID_VERSION=8.0-ltsc2019 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=true SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false diff --git a/compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 index 26281ba4..694036f6 100644 --- a/compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2019/xp0/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml b/compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml index 81bd2d8f..df0f2fc4 100644 --- a/compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml +++ b/compose/sxp/10.4/ltsc2019/xp0/docker-compose.yml @@ -29,7 +29,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -37,6 +39,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -57,7 +62,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -67,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} @@ -79,9 +84,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -100,6 +105,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cm: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION} diff --git a/compose/sxp/10.4/ltsc2019/xp0/id/certs/readme b/compose/sxp/10.4/ltsc2019/xp0/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp0/mssql/certs/readme b/compose/sxp/10.4/ltsc2019/xp0/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp0/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/.env b/compose/sxp/10.4/ltsc2019/xp1/.env index bc4ee83e..5e8d4f9f 100644 --- a/compose/sxp/10.4/ltsc2019/xp1/.env +++ b/compose/sxp/10.4/ltsc2019/xp1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.4-ltsc2019 +SITECORE_ID_VERSION=8.0-ltsc2019 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= REPORTING_API_KEY= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=true diff --git a/compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 b/compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 index a28b66c9..1c1dfe09 100644 --- a/compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2019/xp1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml b/compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml index 011700ac..834a1bff 100644 --- a/compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml +++ b/compose/sxp/10.4/ltsc2019/xp1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -72,7 +77,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.4/ltsc2019/xp1/id/certs/readme b/compose/sxp/10.4/ltsc2019/xp1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2019/xp1/mssql/certs/readme b/compose/sxp/10.4/ltsc2019/xp1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.4/ltsc2019/xp1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.4/ltsc2022/upgrade/xm1/compose-init.ps1 index cc7b9050..7ba9825c 100644 --- a/compose/sxp/10.4/ltsc2022/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2022/upgrade/xm1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2022/upgrade/xm1/upgrade.env b/compose/sxp/10.4/ltsc2022/upgrade/xm1/upgrade.env index b78d414b..b37db332 100644 --- a/compose/sxp/10.4/ltsc2022/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.4/ltsc2022/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.3.0 -DATABASE_UPGRADE_TO_VERSION=10.4.0 +DATABASE_UPGRADE_TO_VERSION=10.4.1 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.4/ltsc2022/upgrade/xp1/compose-init.ps1 index a28b66c9..1c1dfe09 100644 --- a/compose/sxp/10.4/ltsc2022/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2022/upgrade/xp1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2022/upgrade/xp1/upgrade.env b/compose/sxp/10.4/ltsc2022/upgrade/xp1/upgrade.env index 9fd87185..a436fff7 100644 --- a/compose/sxp/10.4/ltsc2022/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.4/ltsc2022/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.3.0 -DATABASE_UPGRADE_TO_VERSION=10.4.0 +DATABASE_UPGRADE_TO_VERSION=10.4.1 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/xm1/.env b/compose/sxp/10.4/ltsc2022/xm1/.env index 8d1e3967..f9ee7b35 100644 --- a/compose/sxp/10.4/ltsc2022/xm1/.env +++ b/compose/sxp/10.4/ltsc2022/xm1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xm1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.4-ltsc2022 +SITECORE_ID_VERSION=8.0-ltsc2022 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=true SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false @@ -20,8 +22,8 @@ SITECORE_LICENSE= CD_HOST=xm1cd.localhost CM_HOST=xm1cm.localhost ID_HOST=xm1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.4/ltsc2022/xm1/compose-init.ps1 b/compose/sxp/10.4/ltsc2022/xm1/compose-init.ps1 index cc7b9050..7ba9825c 100644 --- a/compose/sxp/10.4/ltsc2022/xm1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2022/xm1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2022/xm1/docker-compose.yml b/compose/sxp/10.4/ltsc2022/xm1/docker-compose.yml index 44366724..348e6a94 100644 --- a/compose/sxp/10.4/ltsc2022/xm1/docker-compose.yml +++ b/compose/sxp/10.4/ltsc2022/xm1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -72,7 +77,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION} @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.4/ltsc2022/xm1/id/certs/readme b/compose/sxp/10.4/ltsc2022/xm1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.4/ltsc2022/xm1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/xm1/mssql/certs/readme b/compose/sxp/10.4/ltsc2022/xm1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.4/ltsc2022/xm1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/xp0/.env b/compose/sxp/10.4/ltsc2022/xp0/.env index 3f5b6110..b94cd161 100644 --- a/compose/sxp/10.4/ltsc2022/xp0/.env +++ b/compose/sxp/10.4/ltsc2022/xp0/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp0 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.4-ltsc2022 +SITECORE_ID_VERSION=8.0-ltsc2022 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=true SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false @@ -19,8 +21,8 @@ SITECORE_ID_CERTIFICATE_PASSWORD= SITECORE_LICENSE= CM_HOST=xp0cm.localhost ID_HOST=xp0id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.4/ltsc2022/xp0/compose-init.ps1 b/compose/sxp/10.4/ltsc2022/xp0/compose-init.ps1 index 26281ba4..694036f6 100644 --- a/compose/sxp/10.4/ltsc2022/xp0/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2022/xp0/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2022/xp0/docker-compose.yml b/compose/sxp/10.4/ltsc2022/xp0/docker-compose.yml index 81bd2d8f..df0f2fc4 100644 --- a/compose/sxp/10.4/ltsc2022/xp0/docker-compose.yml +++ b/compose/sxp/10.4/ltsc2022/xp0/docker-compose.yml @@ -29,7 +29,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -37,6 +39,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -57,7 +62,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -67,7 +72,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-solr-init:${SITECORE_VERSION} @@ -79,9 +84,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -100,6 +105,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cm: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION} diff --git a/compose/sxp/10.4/ltsc2022/xp0/id/certs/readme b/compose/sxp/10.4/ltsc2022/xp0/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.4/ltsc2022/xp0/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/xp0/mssql/certs/readme b/compose/sxp/10.4/ltsc2022/xp0/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.4/ltsc2022/xp0/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/xp1/.env b/compose/sxp/10.4/ltsc2022/xp1/.env index fea161a5..18c59b2b 100644 --- a/compose/sxp/10.4/ltsc2022/xp1/.env +++ b/compose/sxp/10.4/ltsc2022/xp1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.4-ltsc2022 +SITECORE_ID_VERSION=8.0-ltsc2022 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= REPORTING_API_KEY= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=true @@ -21,8 +23,8 @@ SITECORE_LICENSE= CD_HOST=xp1cd.localhost CM_HOST=xp1cm.localhost ID_HOST=xp1id.localhost -TRAEFIK_IMAGE=traefik:v2.9.8-windowsservercore-1809 -TRAEFIK_ISOLATION=hyperv +TRAEFIK_IMAGE=traefik:v2.11.0-windowsservercore-ltsc2022 +TRAEFIK_ISOLATION=default ISOLATION=default SOLR_CORE_PREFIX_NAME=sitecore # You should change the shared secret to a random string and not use the default value diff --git a/compose/sxp/10.4/ltsc2022/xp1/compose-init.ps1 b/compose/sxp/10.4/ltsc2022/xp1/compose-init.ps1 index a28b66c9..1c1dfe09 100644 --- a/compose/sxp/10.4/ltsc2022/xp1/compose-init.ps1 +++ b/compose/sxp/10.4/ltsc2022/xp1/compose-init.ps1 @@ -50,7 +50,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -116,7 +125,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -136,7 +149,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -246,6 +270,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -269,7 +294,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.4/ltsc2022/xp1/docker-compose.yml b/compose/sxp/10.4/ltsc2022/xp1/docker-compose.yml index 011700ac..834a1bff 100644 --- a/compose/sxp/10.4/ltsc2022/xp1/docker-compose.yml +++ b/compose/sxp/10.4/ltsc2022/xp1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2022-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -72,7 +77,7 @@ services: environment: SOLR_MODE: solrcloud healthcheck: - test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/cores?action=STATUS -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] + test: ["CMD", "powershell", "-command", "try { $$statusCode = (iwr http://solr:8983/solr/admin/collections?action=LIST -UseBasicParsing).StatusCode; if ($$statusCode -eq 200) { exit 0 } else { exit 1} } catch { exit 1 }"] solr-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-solr-init:${SITECORE_VERSION} @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.4/ltsc2022/xp1/id/certs/readme b/compose/sxp/10.4/ltsc2022/xp1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.4/ltsc2022/xp1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.4/ltsc2022/xp1/mssql/certs/readme b/compose/sxp/10.4/ltsc2022/xp1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.4/ltsc2022/xp1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt index 7400abcd..255ededd 100644 --- a/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.4.0 \ No newline at end of file +10.4.1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt index 7400abcd..255ededd 100644 --- a/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.4/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.4.0 \ No newline at end of file +10.4.1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml index cf1783cb..3112d2c8 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xm1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml b/k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml +++ b/k8s/sxp/10.4/ltsc2019/xm1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/id.yaml b/k8s/sxp/10.4/ltsc2019/xm1/id.yaml index fa907eb3..74c6bd17 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/id.yaml +++ b/k8s/sxp/10.4/ltsc2019/xm1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 700Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml index 65bbe83b..87711f90 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xm1/init/kustomization.yaml @@ -1,6 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - images: - name: sitecore-xm1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xm1-mssql-init @@ -8,7 +7,6 @@ images: - name: sitecore-xm1-solr-init newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init newTag: 10.4-ltsc2019 - resources: - - mssql-init.yaml - - solr-init.yaml \ No newline at end of file +- mssql-init.yaml +- solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 b/k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 index a8084728..4e876398 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 +++ b/k8s/sxp/10.4/ltsc2019/xm1/k8s-init.ps1 @@ -124,7 +124,10 @@ Param ( $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] - $SpecificVersion + $SpecificVersion, + + [string] + $SqlServerCertificatePassword = "Password12345" ) $ErrorActionPreference = "Stop"; @@ -242,7 +245,9 @@ function Create-Certificates{ param( [string]$CertDataFolder, [hashtable]$CertDataFolderList, - [string]$Topology + [string]$Topology, + [string]$MsSql, + [string]$MsSqlCertPswd ) if (![string]::IsNullOrEmpty($CertDataFolder)) { @@ -259,6 +264,17 @@ function Create-Certificates{ $rootCertificate = Create-SelfSignedCertificate -Key $rootKey -CommonName "Sitecore Kubernetes Development Self-Signed Authority" Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\global-authority\root.crt" + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key file + $mssqlCertFolder = "$CertDataFolder\mssql" + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + + $selfSignedKey = [System.Security.Cryptography.X509Certificates.RSACertificateExtensions]::GetRSAPrivateKey($mssqlCertificate) + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$mssqlCertFolder\tls.key" + Create-CertificateFile -Certificate $mssqlCertificate -OutCertPath "$mssqlCertFolder\tls.crt" + # Create Certificate and Key files for each Sitecore role $CertDataFolderList.Keys | ForEach-Object { $certDataFolderName = $_ @@ -353,7 +369,7 @@ function Invoke-K8sInit { if (![string]::IsNullOrEmpty($CertDataFolder) -and (Test-Path $CertDataFolder)) { # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology -MsSql $SqlServer -MsSqlCertPswd $SqlServerCertificatePassword if ($RootCertificateCreated){ # The update for the \configmaps\*-hostname files is if Certificates were created for the custom hostnames. diff --git a/k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml index a5b795c4..0721c0b9 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xm1/kustomization.yaml @@ -1,6 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - images: - name: sitecore-xm1-cd newName: scr.sitecore.com/sxp/sitecore-xm1-cd @@ -9,15 +8,13 @@ images: newName: scr.sitecore.com/sxp/sitecore-xm1-cm newTag: 10.4-ltsc2019 - name: sitecore-xm1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.4-ltsc2019 - + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2019 resources: - - configmaps - - cm.yaml - - cd.yaml - - id.yaml - +- configmaps +- cm.yaml +- cd.yaml +- id.yaml replacements: - source: fieldPath: data.cm-hostname @@ -31,7 +28,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: '//' + delimiter: // index: 1 - select: kind: Deployment @@ -39,7 +36,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: '/' + delimiter: / index: 2 - select: kind: Deployment @@ -47,7 +44,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: '//' + delimiter: // index: 1 - source: fieldPath: data.id-hostname @@ -61,7 +58,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: '//' + delimiter: // index: 1 - select: kind: Deployment @@ -69,5 +66,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xm1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: '//' + delimiter: // index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml index 1067f9d4..28458dbb 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xm1/overlays/init/SearchStax/kustomization.yaml @@ -1,17 +1,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - resources: - ..\..\..\init - patchesStrategicMerge: - - solr-init.yaml - +- solr-init.yaml images: - name: sitecore-xm1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xm1-solr-init-searchstax newTag: 10.4-ltsc2019 - generatorOptions: disableNameSuffixHash: true secretGenerator: diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml index 99747337..187dc214 100644 --- a/k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/kustomization.yaml @@ -60,4 +60,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/mssql/mssql.conf b/k8s/sxp/10.4/ltsc2019/xm1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/mssql/readme b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xm1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml index cf1783cb..3112d2c8 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xp1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml b/k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml +++ b/k8s/sxp/10.4/ltsc2019/xp1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/id.yaml b/k8s/sxp/10.4/ltsc2019/xp1/id.yaml index 8d5b4731..3364e6b4 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/id.yaml +++ b/k8s/sxp/10.4/ltsc2019/xp1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 400Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml index b22774ad..82250bae 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xp1/init/kustomization.yaml @@ -1,6 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - images: - name: sitecore-xp1-mssql-init newName: scr.sitecore.com/sxp/sitecore-xp1-mssql-init @@ -8,7 +7,6 @@ images: - name: sitecore-xp1-solr-init newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init newTag: 10.4-ltsc2019 - resources: - - mssql-init.yaml - - solr-init.yaml \ No newline at end of file +- mssql-init.yaml +- solr-init.yaml \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 b/k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 index 9cadef50..f6bec9bd 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 +++ b/k8s/sxp/10.4/ltsc2019/xp1/k8s-init.ps1 @@ -124,7 +124,10 @@ Param ( $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] - $SpecificVersion + $SpecificVersion, + + [string] + $SqlServerCertificatePassword = "Password12345" ) $ErrorActionPreference = "Stop"; @@ -242,7 +245,9 @@ function Create-Certificates{ param( [string]$CertDataFolder, [hashtable]$CertDataFolderList, - [string]$Topology + [string]$Topology, + [string]$MsSql, + [string]$MsSqlCertPswd ) if (![string]::IsNullOrEmpty($CertDataFolder)) { @@ -259,6 +264,17 @@ function Create-Certificates{ $rootCertificate = Create-SelfSignedCertificate -Key $rootKey -CommonName "Sitecore Kubernetes Development Self-Signed Authority" Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\global-authority\root.crt" + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key file + $mssqlCertFolder = "$CertDataFolder\mssql" + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + + $selfSignedKey = [System.Security.Cryptography.X509Certificates.RSACertificateExtensions]::GetRSAPrivateKey($mssqlCertificate) + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$mssqlCertFolder\tls.key" + Create-CertificateFile -Certificate $mssqlCertificate -OutCertPath "$mssqlCertFolder\tls.crt" + # Create Certificate and Key files for each Sitecore role $CertDataFolderList.Keys | ForEach-Object { $certDataFolderName = $_ @@ -353,7 +369,7 @@ function Invoke-K8sInit { if (![string]::IsNullOrEmpty($CertDataFolder) -and (Test-Path $CertDataFolder)) { # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology -MsSql $SqlServer -MsSqlCertPswd $SqlServerCertificatePassword if ($RootCertificateCreated){ # The update for the \configmaps\*-hostname files is if Certificates were created for the custom hostnames. diff --git a/k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml index 2cc78104..17183936 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xp1/kustomization.yaml @@ -1,6 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - images: - name: sitecore-xp1-cd newName: scr.sitecore.com/sxp/sitecore-xp1-cd @@ -9,8 +8,8 @@ images: newName: scr.sitecore.com/sxp/sitecore-xp1-cm newTag: 10.4-ltsc2019 - name: sitecore-xp1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.4-ltsc2019 + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2019 - name: sitecore-xp1-cortexprocessing newName: scr.sitecore.com/sxp/sitecore-xp1-cortexprocessing newTag: 10.4-ltsc2019 @@ -46,24 +45,22 @@ images: newTag: 10.4-ltsc2019 - name: pwsh-initContainer newName: mcr.microsoft.com/powershell:lts-nanoserver-1809 - resources: - - configmaps - - cm.yaml - - cd.yaml - - id.yaml - - cortexprocessing.yaml - - cortexprocessingworker.yaml - - cortexreporting.yaml - - prc.yaml - - xdbautomation.yaml - - xdbautomationrpt.yaml - - xdbautomationworker.yaml - - xdbcollection.yaml - - xdbrefdata.yaml - - xdbsearch.yaml - - xdbsearchworker.yaml - +- configmaps +- cm.yaml +- cd.yaml +- id.yaml +- cortexprocessing.yaml +- cortexprocessingworker.yaml +- cortexreporting.yaml +- prc.yaml +- xdbautomation.yaml +- xdbautomationrpt.yaml +- xdbautomationworker.yaml +- xdbcollection.yaml +- xdbrefdata.yaml +- xdbsearch.yaml +- xdbsearchworker.yaml replacements: - source: fieldPath: data.cm-hostname @@ -77,7 +74,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_CallbackAuthority].value options: - delimiter: '//' + delimiter: // index: 1 - select: kind: Deployment @@ -85,7 +82,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl].value options: - delimiter: '/' + delimiter: / index: 2 - select: kind: Deployment @@ -93,7 +90,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1].value options: - delimiter: '//' + delimiter: // index: 1 - source: fieldPath: data.id-hostname @@ -107,7 +104,7 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-cm].env.[name=Sitecore_Identity_Server_Authority].value options: - delimiter: '//' + delimiter: // index: 1 - select: kind: Deployment @@ -115,5 +112,5 @@ replacements: fieldPaths: - spec.template.spec.containers.[name=sitecore-xp1-id].env.[name=Sitecore_Sitecore__IdentityServer__PublicOrigin].value options: - delimiter: '//' + delimiter: // index: 1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml index 2b3fd12b..fdbfdd20 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xp1/overlays/init/SearchStax/kustomization.yaml @@ -1,17 +1,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization - resources: - ..\..\..\init - patchesStrategicMerge: - - solr-init.yaml - +- solr-init.yaml images: - name: sitecore-xp1-solr-init-searchstax newName: scr.sitecore.com/sxp/sitecore-xp1-solr-init-searchstax newTag: 10.4-ltsc2019 - generatorOptions: disableNameSuffixHash: true secretGenerator: diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml b/k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml index 7612f474..35be6a61 100644 --- a/k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/kustomization.yaml @@ -86,4 +86,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/mssql/mssql.conf b/k8s/sxp/10.4/ltsc2019/xp1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/mssql/readme b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2019/xp1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.4/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt index 7400abcd..255ededd 100644 --- a/k8s/sxp/10.4/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.4/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.4.0 \ No newline at end of file +10.4.1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.4/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt index 7400abcd..255ededd 100644 --- a/k8s/sxp/10.4/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.4/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.4.0 \ No newline at end of file +10.4.1 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xm1/external/kustomization.yaml b/k8s/sxp/10.4/ltsc2022/xm1/external/kustomization.yaml index cf1783cb..3112d2c8 100644 --- a/k8s/sxp/10.4/ltsc2022/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2022/xm1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.4/ltsc2022/xm1/external/mssql.yaml b/k8s/sxp/10.4/ltsc2022/xm1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.4/ltsc2022/xm1/external/mssql.yaml +++ b/k8s/sxp/10.4/ltsc2022/xm1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xm1/id.yaml b/k8s/sxp/10.4/ltsc2022/xm1/id.yaml index fa907eb3..74c6bd17 100644 --- a/k8s/sxp/10.4/ltsc2022/xm1/id.yaml +++ b/k8s/sxp/10.4/ltsc2022/xm1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 700Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xm1/k8s-init.ps1 b/k8s/sxp/10.4/ltsc2022/xm1/k8s-init.ps1 index a8084728..4e876398 100644 --- a/k8s/sxp/10.4/ltsc2022/xm1/k8s-init.ps1 +++ b/k8s/sxp/10.4/ltsc2022/xm1/k8s-init.ps1 @@ -124,7 +124,10 @@ Param ( $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] - $SpecificVersion + $SpecificVersion, + + [string] + $SqlServerCertificatePassword = "Password12345" ) $ErrorActionPreference = "Stop"; @@ -242,7 +245,9 @@ function Create-Certificates{ param( [string]$CertDataFolder, [hashtable]$CertDataFolderList, - [string]$Topology + [string]$Topology, + [string]$MsSql, + [string]$MsSqlCertPswd ) if (![string]::IsNullOrEmpty($CertDataFolder)) { @@ -259,6 +264,17 @@ function Create-Certificates{ $rootCertificate = Create-SelfSignedCertificate -Key $rootKey -CommonName "Sitecore Kubernetes Development Self-Signed Authority" Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\global-authority\root.crt" + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key file + $mssqlCertFolder = "$CertDataFolder\mssql" + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + + $selfSignedKey = [System.Security.Cryptography.X509Certificates.RSACertificateExtensions]::GetRSAPrivateKey($mssqlCertificate) + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$mssqlCertFolder\tls.key" + Create-CertificateFile -Certificate $mssqlCertificate -OutCertPath "$mssqlCertFolder\tls.crt" + # Create Certificate and Key files for each Sitecore role $CertDataFolderList.Keys | ForEach-Object { $certDataFolderName = $_ @@ -353,7 +369,7 @@ function Invoke-K8sInit { if (![string]::IsNullOrEmpty($CertDataFolder) -and (Test-Path $CertDataFolder)) { # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology -MsSql $SqlServer -MsSqlCertPswd $SqlServerCertificatePassword if ($RootCertificateCreated){ # The update for the \configmaps\*-hostname files is if Certificates were created for the custom hostnames. diff --git a/k8s/sxp/10.4/ltsc2022/xm1/kustomization.yaml b/k8s/sxp/10.4/ltsc2022/xm1/kustomization.yaml index 333eb32b..b060788b 100644 --- a/k8s/sxp/10.4/ltsc2022/xm1/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2022/xm1/kustomization.yaml @@ -8,8 +8,8 @@ images: newName: scr.sitecore.com/sxp/sitecore-xm1-cm newTag: 10.4-ltsc2022 - name: sitecore-xm1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.4-ltsc2022 + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2022 resources: - configmaps - cm.yaml diff --git a/k8s/sxp/10.4/ltsc2022/xm1/secrets/kustomization.yaml b/k8s/sxp/10.4/ltsc2022/xm1/secrets/kustomization.yaml index 99747337..187dc214 100644 --- a/k8s/sxp/10.4/ltsc2022/xm1/secrets/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2022/xm1/secrets/kustomization.yaml @@ -60,4 +60,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xm1/secrets/mssql/mssql.conf b/k8s/sxp/10.4/ltsc2022/xm1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2022/xm1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xm1/secrets/tls/mssql/readme b/k8s/sxp/10.4/ltsc2022/xm1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2022/xm1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xp1/external/kustomization.yaml b/k8s/sxp/10.4/ltsc2022/xp1/external/kustomization.yaml index cf1783cb..3112d2c8 100644 --- a/k8s/sxp/10.4/ltsc2022/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2022/xp1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.4/ltsc2022/xp1/external/mssql.yaml b/k8s/sxp/10.4/ltsc2022/xp1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.4/ltsc2022/xp1/external/mssql.yaml +++ b/k8s/sxp/10.4/ltsc2022/xp1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xp1/id.yaml b/k8s/sxp/10.4/ltsc2022/xp1/id.yaml index 8d5b4731..3364e6b4 100644 --- a/k8s/sxp/10.4/ltsc2022/xp1/id.yaml +++ b/k8s/sxp/10.4/ltsc2022/xp1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 400Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xp1/k8s-init.ps1 b/k8s/sxp/10.4/ltsc2022/xp1/k8s-init.ps1 index 9cadef50..f6bec9bd 100644 --- a/k8s/sxp/10.4/ltsc2022/xp1/k8s-init.ps1 +++ b/k8s/sxp/10.4/ltsc2022/xp1/k8s-init.ps1 @@ -124,7 +124,10 @@ Param ( $SitecoreGalleryRepositoryLocation = "https://nuget.sitecore.com/resources/v2/", [string] - $SpecificVersion + $SpecificVersion, + + [string] + $SqlServerCertificatePassword = "Password12345" ) $ErrorActionPreference = "Stop"; @@ -242,7 +245,9 @@ function Create-Certificates{ param( [string]$CertDataFolder, [hashtable]$CertDataFolderList, - [string]$Topology + [string]$Topology, + [string]$MsSql, + [string]$MsSqlCertPswd ) if (![string]::IsNullOrEmpty($CertDataFolder)) { @@ -259,6 +264,17 @@ function Create-Certificates{ $rootCertificate = Create-SelfSignedCertificate -Key $rootKey -CommonName "Sitecore Kubernetes Development Self-Signed Authority" Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\global-authority\root.crt" + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key file + $mssqlCertFolder = "$CertDataFolder\mssql" + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + + $selfSignedKey = [System.Security.Cryptography.X509Certificates.RSACertificateExtensions]::GetRSAPrivateKey($mssqlCertificate) + Create-KeyFile -Key $selfSignedKey -OutKeyPath "$mssqlCertFolder\tls.key" + Create-CertificateFile -Certificate $mssqlCertificate -OutCertPath "$mssqlCertFolder\tls.crt" + # Create Certificate and Key files for each Sitecore role $CertDataFolderList.Keys | ForEach-Object { $certDataFolderName = $_ @@ -353,7 +369,7 @@ function Invoke-K8sInit { if (![string]::IsNullOrEmpty($CertDataFolder) -and (Test-Path $CertDataFolder)) { # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -CertDataFolderList $certDataFolderList -Topology $Topology -MsSql $SqlServer -MsSqlCertPswd $SqlServerCertificatePassword if ($RootCertificateCreated){ # The update for the \configmaps\*-hostname files is if Certificates were created for the custom hostnames. diff --git a/k8s/sxp/10.4/ltsc2022/xp1/kustomization.yaml b/k8s/sxp/10.4/ltsc2022/xp1/kustomization.yaml index 0a1acf2b..e99a23b9 100644 --- a/k8s/sxp/10.4/ltsc2022/xp1/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2022/xp1/kustomization.yaml @@ -8,8 +8,8 @@ images: newName: scr.sitecore.com/sxp/sitecore-xp1-cm newTag: 10.4-ltsc2022 - name: sitecore-xp1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.4-ltsc2022 + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2022 - name: sitecore-xp1-cortexprocessing newName: scr.sitecore.com/sxp/sitecore-xp1-cortexprocessing newTag: 10.4-ltsc2022 diff --git a/k8s/sxp/10.4/ltsc2022/xp1/secrets/kustomization.yaml b/k8s/sxp/10.4/ltsc2022/xp1/secrets/kustomization.yaml index 7612f474..35be6a61 100644 --- a/k8s/sxp/10.4/ltsc2022/xp1/secrets/kustomization.yaml +++ b/k8s/sxp/10.4/ltsc2022/xp1/secrets/kustomization.yaml @@ -86,4 +86,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xp1/secrets/mssql/mssql.conf b/k8s/sxp/10.4/ltsc2022/xp1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2022/xp1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.4/ltsc2022/xp1/secrets/tls/mssql/readme b/k8s/sxp/10.4/ltsc2022/xp1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.4/ltsc2022/xp1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file From 29c9d6852449f5461e99be3acfb24d0a79a0f62f Mon Sep 17 00:00:00 2001 From: sc-garvsudhirnair Date: Thu, 19 Jun 2025 14:57:39 +0800 Subject: [PATCH 11/17] Update Publishing Service Module 10.4.0.00703.467 --- .../ltsc2019/docker-compose.sps.override.yml | 32 ++++++++++++------- .../publishing/10.4/ltsc2019/sps/certs/readme | 2 ++ .../ltsc2022/docker-compose.sps.override.yml | 32 ++++++++++++------- .../publishing/10.4/ltsc2022/sps/certs/readme | 2 ++ 4 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 compose/publishing/10.4/ltsc2019/sps/certs/readme create mode 100644 compose/publishing/10.4/ltsc2022/sps/certs/readme diff --git a/compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml b/compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml index f7e156a4..61eb65f7 100644 --- a/compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml +++ b/compose/publishing/10.4/ltsc2019/docker-compose.sps.override.yml @@ -9,31 +9,39 @@ services: image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} sps-mssql-init: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.0-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - command: schema upgrade --force + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + command: -AppParameters "schema upgrade --force" depends_on: mssql-init: condition: service_healthy + volumes: + - type: bind + source: .\sps\certs + target: c:\certs sps: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.1-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: ASPNETCORE_URLS: "http://*:80" SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; ports: - "80" depends_on: - sps-mssql-init healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] - timeout: 300s \ No newline at end of file + timeout: 300s + volumes: + - type: bind + source: .\sps\certs + target: c:\certs \ No newline at end of file diff --git a/compose/publishing/10.4/ltsc2019/sps/certs/readme b/compose/publishing/10.4/ltsc2019/sps/certs/readme new file mode 100644 index 00000000..52eaf4b6 --- /dev/null +++ b/compose/publishing/10.4/ltsc2019/sps/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt diff --git a/compose/publishing/10.4/ltsc2022/docker-compose.sps.override.yml b/compose/publishing/10.4/ltsc2022/docker-compose.sps.override.yml index 22fdf2bc..6003bf76 100644 --- a/compose/publishing/10.4/ltsc2022/docker-compose.sps.override.yml +++ b/compose/publishing/10.4/ltsc2022/docker-compose.sps.override.yml @@ -9,31 +9,39 @@ services: image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} sps-mssql-init: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.0-ltsc2022 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2022 environment: SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - command: schema upgrade --force + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + command: -AppParameters "schema upgrade --force" depends_on: mssql-init: condition: service_healthy + volumes: + - type: bind + source: .\sps\certs + target: c:\certs sps: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.1-ltsc2022 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2022 environment: ASPNETCORE_URLS: "http://*:80" SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; ports: - "80" depends_on: - sps-mssql-init healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] - timeout: 300s \ No newline at end of file + timeout: 300s + volumes: + - type: bind + source: .\sps\certs + target: c:\certs \ No newline at end of file diff --git a/compose/publishing/10.4/ltsc2022/sps/certs/readme b/compose/publishing/10.4/ltsc2022/sps/certs/readme new file mode 100644 index 00000000..52eaf4b6 --- /dev/null +++ b/compose/publishing/10.4/ltsc2022/sps/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt From 77368398c5bdaee387bdc174793c7b10db88bfb8 Mon Sep 17 00:00:00 2001 From: sc-garvsudhirnair Date: Thu, 19 Jun 2025 15:04:58 +0800 Subject: [PATCH 12/17] Update Publishing Service Module 10.3.0.00685.472 --- .../ltsc2019/docker-compose.sps.override.yml | 32 ++++++++++++------- .../publishing/10.3/ltsc2019/sps/certs/readme | 2 ++ .../ltsc2022/docker-compose.sps.override.yml | 32 ++++++++++++------- .../publishing/10.3/ltsc2022/sps/certs/readme | 2 ++ 4 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 compose/publishing/10.3/ltsc2019/sps/certs/readme create mode 100644 compose/publishing/10.3/ltsc2022/sps/certs/readme diff --git a/compose/publishing/10.3/ltsc2019/docker-compose.sps.override.yml b/compose/publishing/10.3/ltsc2019/docker-compose.sps.override.yml index 71f84546..61eb65f7 100644 --- a/compose/publishing/10.3/ltsc2019/docker-compose.sps.override.yml +++ b/compose/publishing/10.3/ltsc2019/docker-compose.sps.override.yml @@ -9,31 +9,39 @@ services: image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} sps-mssql-init: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.0-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - command: schema upgrade --force + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + command: -AppParameters "schema upgrade --force" depends_on: mssql-init: condition: service_healthy + volumes: + - type: bind + source: .\sps\certs + target: c:\certs sps: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.0-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: ASPNETCORE_URLS: "http://*:80" SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; ports: - "80" depends_on: - sps-mssql-init healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] - timeout: 300s \ No newline at end of file + timeout: 300s + volumes: + - type: bind + source: .\sps\certs + target: c:\certs \ No newline at end of file diff --git a/compose/publishing/10.3/ltsc2019/sps/certs/readme b/compose/publishing/10.3/ltsc2019/sps/certs/readme new file mode 100644 index 00000000..52eaf4b6 --- /dev/null +++ b/compose/publishing/10.3/ltsc2019/sps/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt diff --git a/compose/publishing/10.3/ltsc2022/docker-compose.sps.override.yml b/compose/publishing/10.3/ltsc2022/docker-compose.sps.override.yml index 21f635bf..6003bf76 100644 --- a/compose/publishing/10.3/ltsc2022/docker-compose.sps.override.yml +++ b/compose/publishing/10.3/ltsc2022/docker-compose.sps.override.yml @@ -9,31 +9,39 @@ services: image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} sps-mssql-init: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.0-ltsc2022 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2022 environment: SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - command: schema upgrade --force + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + command: -AppParameters "schema upgrade --force" depends_on: mssql-init: condition: service_healthy + volumes: + - type: bind + source: .\sps\certs + target: c:\certs sps: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:7.0-ltsc2022 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2022 environment: ASPNETCORE_URLS: "http://*:80" SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; ports: - "80" depends_on: - sps-mssql-init healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] - timeout: 300s \ No newline at end of file + timeout: 300s + volumes: + - type: bind + source: .\sps\certs + target: c:\certs \ No newline at end of file diff --git a/compose/publishing/10.3/ltsc2022/sps/certs/readme b/compose/publishing/10.3/ltsc2022/sps/certs/readme new file mode 100644 index 00000000..52eaf4b6 --- /dev/null +++ b/compose/publishing/10.3/ltsc2022/sps/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt From 5b3f29b31c9c9862228caeadd9b47f49443382c8 Mon Sep 17 00:00:00 2001 From: sc-garvsudhirnair Date: Fri, 20 Jun 2025 19:16:19 +0800 Subject: [PATCH 13/17] Update Publishing Service Module 10.2.0.00665.476 --- .../ltsc2019/docker-compose.sps.override.yml | 32 ++++++++++++------- .../publishing/10.2/ltsc2019/sps/certs/readme | 2 ++ .../ltsc2022/docker-compose.sps.override.yml | 32 ++++++++++++------- .../publishing/10.2/ltsc2022/sps/certs/readme | 2 ++ 4 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 compose/publishing/10.2/ltsc2019/sps/certs/readme create mode 100644 compose/publishing/10.2/ltsc2022/sps/certs/readme diff --git a/compose/publishing/10.2/ltsc2019/docker-compose.sps.override.yml b/compose/publishing/10.2/ltsc2019/docker-compose.sps.override.yml index 87d772ff..65f7fb07 100644 --- a/compose/publishing/10.2/ltsc2019/docker-compose.sps.override.yml +++ b/compose/publishing/10.2/ltsc2019/docker-compose.sps.override.yml @@ -9,31 +9,39 @@ services: image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} sps-mssql-init: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:6.0-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - command: schema upgrade --force + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + command: -AppParameters "schema upgrade --force" depends_on: mssql-init: condition: service_healthy + volumes: + - type: bind + source: .\sps\certs + target: c:\certs sps: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:6.0-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: ASPNETCORE_URLS: "http://*:80" SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; ports: - "80" depends_on: - sps-mssql-init healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] - timeout: 300s \ No newline at end of file + timeout: 300s + volumes: + - type: bind + source: .\sps\certs + target: c:\certs \ No newline at end of file diff --git a/compose/publishing/10.2/ltsc2019/sps/certs/readme b/compose/publishing/10.2/ltsc2019/sps/certs/readme new file mode 100644 index 00000000..52eaf4b6 --- /dev/null +++ b/compose/publishing/10.2/ltsc2019/sps/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt diff --git a/compose/publishing/10.2/ltsc2022/docker-compose.sps.override.yml b/compose/publishing/10.2/ltsc2022/docker-compose.sps.override.yml index 2220c917..51fbc3c6 100644 --- a/compose/publishing/10.2/ltsc2022/docker-compose.sps.override.yml +++ b/compose/publishing/10.2/ltsc2022/docker-compose.sps.override.yml @@ -9,31 +9,39 @@ services: image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} sps-mssql-init: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:6.0-ltsc2022 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2022 environment: SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - command: schema upgrade --force + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + command: -AppParameters "schema upgrade --force" depends_on: mssql-init: condition: service_healthy + volumes: + - type: bind + source: .\sps\certs + target: c:\certs sps: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:6.0-ltsc2022 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2022 environment: ASPNETCORE_URLS: "http://*:80" SITECORE_License: ${SITECORE_LICENSE} - SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_Publishing__ConnectionStrings__Core: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=${SQL_SERVER};Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; ports: - "80" depends_on: - sps-mssql-init healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] - timeout: 300s \ No newline at end of file + timeout: 300s + volumes: + - type: bind + source: .\sps\certs + target: c:\certs \ No newline at end of file diff --git a/compose/publishing/10.2/ltsc2022/sps/certs/readme b/compose/publishing/10.2/ltsc2022/sps/certs/readme new file mode 100644 index 00000000..52eaf4b6 --- /dev/null +++ b/compose/publishing/10.2/ltsc2022/sps/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt From df3c23d9d79132fc570ded0dfef8e3b59a9555da Mon Sep 17 00:00:00 2001 From: sc-garvsudhirnair Date: Fri, 20 Jun 2025 19:22:41 +0800 Subject: [PATCH 14/17] Update Publishing Service Module 10.1.0.00632.475 --- .../ltsc2019/docker-compose.sps.override.yml | 36 ++++++++++++------- .../publishing/10.1/ltsc2019/sps/certs/readme | 2 ++ 2 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 compose/publishing/10.1/ltsc2019/sps/certs/readme diff --git a/compose/publishing/10.1/ltsc2019/docker-compose.sps.override.yml b/compose/publishing/10.1/ltsc2019/docker-compose.sps.override.yml index 7ad8410c..260c2c3e 100644 --- a/compose/publishing/10.1/ltsc2019/docker-compose.sps.override.yml +++ b/compose/publishing/10.1/ltsc2019/docker-compose.sps.override.yml @@ -6,31 +6,43 @@ services: Sitecore_Publishing_Service_Url: "http://sps/" cd: image: sitecore-sps-integration-${TOPOLOGY}-cd:${VERSION} - mssql: - image: sitecore-sps-integration-${TOPOLOGY}-mssql:${VERSION} + mssql-init: + image: sitecore-sps-integration-${TOPOLOGY}-mssql-init:${VERSION} sps-mssql-init: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:5.0-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: - SITECORE_Sitecore:Publishing:ConnectionStrings:Core: Data Source=mssql;Initial Catalog=Sitecore.Core;User ID=sa;Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Sitecore:Publishing:ConnectionStrings:Master: Data Source=mssql;Initial Catalog=Sitecore.Master;User ID=sa;Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Sitecore:Publishing:ConnectionStrings:Web: Data Source=mssql;Initial Catalog=Sitecore.Web;User ID=sa;Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - command: schema upgrade --force + SITECORE_License: ${SITECORE_LICENSE} + SITECORE_Publishing__ConnectionStrings__Core: Data Source=mssql;Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=mssql;Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=mssql;Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=mssql;Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + command: -AppParameters "schema upgrade --force" depends_on: mssql: condition: service_healthy + volumes: + - type: bind + source: .\sps\certs + target: c:\certs sps: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:5.0-ltsc2019 + image: ${SITECORE_DOCKER_REGISTRY}modules/sitecore-sps:8.0-ltsc2019 environment: ASPNETCORE_URLS: "http://*:80" - SITECORE_Sitecore:Publishing:ConnectionStrings:Core: Data Source=mssql;Initial Catalog=Sitecore.Core;User ID=sa;Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Sitecore:Publishing:ConnectionStrings:Master: Data Source=mssql;Initial Catalog=Sitecore.Master;User ID=sa;Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True - SITECORE_Sitecore:Publishing:ConnectionStrings:Web: Data Source=mssql;Initial Catalog=Sitecore.Web;User ID=sa;Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True + SITECORE_License: ${SITECORE_LICENSE} + SITECORE_Publishing__ConnectionStrings__Core: Data Source=mssql;Initial Catalog=Sitecore.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Master: Data Source=mssql;Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Service: Data Source=mssql;Initial Catalog=Sitecore.Master;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; + SITECORE_Publishing__ConnectionStrings__Web: Data Source=mssql;Initial Catalog=Sitecore.Web;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False; ports: - "80" depends_on: - sps-mssql-init healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] - timeout: 300s \ No newline at end of file + timeout: 300s + volumes: + - type: bind + source: .\sps\certs + target: c:\certs \ No newline at end of file diff --git a/compose/publishing/10.1/ltsc2019/sps/certs/readme b/compose/publishing/10.1/ltsc2019/sps/certs/readme new file mode 100644 index 00000000..52eaf4b6 --- /dev/null +++ b/compose/publishing/10.1/ltsc2019/sps/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt From 95fb79c1a858431584c7040aaad20cb881b8a099 Mon Sep 17 00:00:00 2001 From: Anton Shmigel <143785041+AntonShmigel@users.noreply.github.com> Date: Wed, 30 Jul 2025 14:10:45 +0300 Subject: [PATCH 15/17] Update 10.3 SXP Sitecore Container Deployment to 10.3.3.012336.2428 --- .../ltsc2019/upgrade/xm1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env | 2 +- .../ltsc2019/upgrade/xp1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.3/ltsc2019/xm1/.env | 2 ++ .../sxp/10.3/ltsc2019/xm1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2019/xm1/docker-compose.yml | 15 ++++++-- compose/sxp/10.3/ltsc2019/xm1/id/certs/readme | 2 ++ .../sxp/10.3/ltsc2019/xm1/mssql/certs/readme | 2 ++ compose/sxp/10.3/ltsc2019/xp0/.env | 2 ++ .../sxp/10.3/ltsc2019/xp0/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2019/xp0/docker-compose.yml | 15 ++++++-- compose/sxp/10.3/ltsc2019/xp0/id/certs/readme | 2 ++ .../sxp/10.3/ltsc2019/xp0/mssql/certs/readme | 2 ++ compose/sxp/10.3/ltsc2019/xp1/.env | 2 ++ .../sxp/10.3/ltsc2019/xp1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2019/xp1/docker-compose.yml | 15 ++++++-- compose/sxp/10.3/ltsc2019/xp1/id/certs/readme | 2 ++ .../sxp/10.3/ltsc2019/xp1/mssql/certs/readme | 2 ++ .../ltsc2022/upgrade/xm1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env | 2 +- .../ltsc2022/upgrade/xp1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env | 2 +- compose/sxp/10.3/ltsc2022/xm1/.env | 2 ++ .../sxp/10.3/ltsc2022/xm1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2022/xm1/docker-compose.yml | 15 ++++++-- compose/sxp/10.3/ltsc2022/xm1/id/certs/readme | 2 ++ .../sxp/10.3/ltsc2022/xm1/mssql/certs/readme | 2 ++ compose/sxp/10.3/ltsc2022/xp0/.env | 2 ++ .../sxp/10.3/ltsc2022/xp0/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2022/xp0/docker-compose.yml | 15 ++++++-- compose/sxp/10.3/ltsc2022/xp0/id/certs/readme | 2 ++ .../sxp/10.3/ltsc2022/xp0/mssql/certs/readme | 2 ++ compose/sxp/10.3/ltsc2022/xp1/.env | 2 ++ .../sxp/10.3/ltsc2022/xp1/compose-init.ps1 | 35 ++++++++++++++++--- .../sxp/10.3/ltsc2022/xp1/docker-compose.yml | 15 ++++++-- compose/sxp/10.3/ltsc2022/xp1/id/certs/readme | 2 ++ .../sxp/10.3/ltsc2022/xp1/mssql/certs/readme | 2 ++ .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2019/xm1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2019/xm1/external/mssql.yaml | 16 ++++++++- k8s/sxp/10.3/ltsc2019/xm1/id.yaml | 8 ++++- .../ltsc2019/xm1/ingress-nginx/ingress.yaml | 1 + k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml | 4 +-- .../ltsc2019/xm1/secrets/kustomization.yaml | 13 ++++++- .../ltsc2019/xm1/secrets/mssql/mssql.conf | 5 +++ .../xm1/secrets/tls/global-authority/readme | 2 ++ .../ltsc2019/xm1/secrets/tls/mssql/readme | 3 ++ .../ltsc2019/xp1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2019/xp1/external/mssql.yaml | 16 ++++++++- k8s/sxp/10.3/ltsc2019/xp1/id.yaml | 8 ++++- .../ltsc2019/xp1/ingress-nginx/ingress.yaml | 1 + k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml | 4 +-- .../ltsc2019/xp1/secrets/kustomization.yaml | 13 ++++++- .../ltsc2019/xp1/secrets/mssql/mssql.conf | 5 +++ .../xp1/secrets/tls/global-authority/readme | 2 ++ .../ltsc2019/xp1/secrets/tls/mssql/readme | 3 ++ .../database-upgrade-to-version.txt | 2 +- .../database-upgrade-to-version.txt | 2 +- .../ltsc2022/xm1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2022/xm1/external/mssql.yaml | 16 ++++++++- k8s/sxp/10.3/ltsc2022/xm1/id.yaml | 8 ++++- .../ltsc2022/xm1/ingress-nginx/ingress.yaml | 1 + k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml | 4 +-- .../ltsc2022/xm1/secrets/kustomization.yaml | 13 ++++++- .../ltsc2022/xm1/secrets/mssql/mssql.conf | 5 +++ .../xm1/secrets/tls/global-authority/readme | 2 ++ .../ltsc2022/xm1/secrets/tls/mssql/readme | 3 ++ .../ltsc2022/xp1/external/kustomization.yaml | 2 +- k8s/sxp/10.3/ltsc2022/xp1/external/mssql.yaml | 16 ++++++++- k8s/sxp/10.3/ltsc2022/xp1/id.yaml | 8 ++++- .../ltsc2022/xp1/ingress-nginx/ingress.yaml | 1 + k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml | 4 +-- .../ltsc2022/xp1/secrets/kustomization.yaml | 13 ++++++- .../ltsc2022/xp1/secrets/mssql/mssql.conf | 5 +++ .../xp1/secrets/tls/global-authority/readme | 2 ++ .../ltsc2022/xp1/secrets/tls/mssql/readme | 3 ++ 78 files changed, 608 insertions(+), 100 deletions(-) create mode 100644 compose/sxp/10.3/ltsc2019/xm1/id/certs/readme create mode 100644 compose/sxp/10.3/ltsc2019/xm1/mssql/certs/readme create mode 100644 compose/sxp/10.3/ltsc2019/xp0/id/certs/readme create mode 100644 compose/sxp/10.3/ltsc2019/xp0/mssql/certs/readme create mode 100644 compose/sxp/10.3/ltsc2019/xp1/id/certs/readme create mode 100644 compose/sxp/10.3/ltsc2019/xp1/mssql/certs/readme create mode 100644 compose/sxp/10.3/ltsc2022/xm1/id/certs/readme create mode 100644 compose/sxp/10.3/ltsc2022/xm1/mssql/certs/readme create mode 100644 compose/sxp/10.3/ltsc2022/xp0/id/certs/readme create mode 100644 compose/sxp/10.3/ltsc2022/xp0/mssql/certs/readme create mode 100644 compose/sxp/10.3/ltsc2022/xp1/id/certs/readme create mode 100644 compose/sxp/10.3/ltsc2022/xp1/mssql/certs/readme create mode 100644 k8s/sxp/10.3/ltsc2019/xm1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/global-authority/readme create mode 100644 k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/mssql/readme create mode 100644 k8s/sxp/10.3/ltsc2019/xp1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/global-authority/readme create mode 100644 k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/mssql/readme create mode 100644 k8s/sxp/10.3/ltsc2022/xm1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/global-authority/readme create mode 100644 k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/mssql/readme create mode 100644 k8s/sxp/10.3/ltsc2022/xp1/secrets/mssql/mssql.conf create mode 100644 k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/global-authority/readme create mode 100644 k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/mssql/readme diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 index e4febb85..07de7b61 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/upgrade/xm1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env b/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env index fa009d64..95497a53 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.3/ltsc2019/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.2 +DATABASE_UPGRADE_TO_VERSION=10.3.3 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 index f0345ac7..6dae2978 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/upgrade/xp1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env b/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env index 739cf0d4..18c06459 100644 --- a/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.3/ltsc2019/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.2 +DATABASE_UPGRADE_TO_VERSION=10.3.3 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xm1/.env b/compose/sxp/10.3/ltsc2019/xm1/.env index a6f9db6c..d6b47460 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/.env +++ b/compose/sxp/10.3/ltsc2019/xm1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xm1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.3-ltsc2019 +SITECORE_ID_VERSION=8.0-ltsc2019 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=false SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false diff --git a/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 index e4febb85..07de7b61 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xm1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml index 4009e127..f4499459 100644 --- a/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xm1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2019/xm1/id/certs/readme b/compose/sxp/10.3/ltsc2019/xm1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.3/ltsc2019/xm1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xm1/mssql/certs/readme b/compose/sxp/10.3/ltsc2019/xm1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.3/ltsc2019/xm1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xp0/.env b/compose/sxp/10.3/ltsc2019/xp0/.env index c9d4fa70..419eb60d 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/.env +++ b/compose/sxp/10.3/ltsc2019/xp0/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp0 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.3-ltsc2019 +SITECORE_ID_VERSION=8.0-ltsc2019 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=false SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false diff --git a/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 index d2be2500..474e84a2 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xp0/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml index 07cc084d..b85867d8 100644 --- a/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xp0/docker-compose.yml @@ -29,7 +29,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -37,6 +39,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -57,7 +62,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -79,9 +84,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -100,6 +105,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cm: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2019/xp0/id/certs/readme b/compose/sxp/10.3/ltsc2019/xp0/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.3/ltsc2019/xp0/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xp0/mssql/certs/readme b/compose/sxp/10.3/ltsc2019/xp0/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.3/ltsc2019/xp0/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xp1/.env b/compose/sxp/10.3/ltsc2019/xp1/.env index e6919ea1..6dde5474 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/.env +++ b/compose/sxp/10.3/ltsc2019/xp1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.3-ltsc2019 +SITECORE_ID_VERSION=8.0-ltsc2019 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2019 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= REPORTING_API_KEY= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=false diff --git a/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 index f0345ac7..6dae2978 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2019/xp1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml b/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml index 09271173..ff474c0c 100644 --- a/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2019/xp1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2019/xp1/id/certs/readme b/compose/sxp/10.3/ltsc2019/xp1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.3/ltsc2019/xp1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2019/xp1/mssql/certs/readme b/compose/sxp/10.3/ltsc2019/xp1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.3/ltsc2019/xp1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 index e4febb85..07de7b61 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/upgrade/xm1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env b/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env index 06b4c075..89ea3fa6 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env +++ b/compose/sxp/10.3/ltsc2022/upgrade/xm1/upgrade.env @@ -6,6 +6,6 @@ SQL_SERVER= SQL_USERNAME= SQL_PASSWORD= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.2 +DATABASE_UPGRADE_TO_VERSION=10.3.3 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 index f0345ac7..6dae2978 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/upgrade/xp1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env b/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env index ebdfcc6b..162476d9 100644 --- a/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env +++ b/compose/sxp/10.3/ltsc2022/upgrade/xp1/upgrade.env @@ -8,6 +8,6 @@ SQL_PASSWORD= IS_ALWAYS_ENCRYPTED= PROCESSING_ENGINE_TASKS_DATABASE_USERNAME= DATABASE_UPGRADE_FROM_VERSION=10.2.0 -DATABASE_UPGRADE_TO_VERSION=10.3.2 +DATABASE_UPGRADE_TO_VERSION=10.3.3 SITECORE_LICENSE= ISOLATION=default \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xm1/.env b/compose/sxp/10.3/ltsc2022/xm1/.env index 20d0717c..f17e475c 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/.env +++ b/compose/sxp/10.3/ltsc2022/xm1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xm1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.3-ltsc2022 +SITECORE_ID_VERSION=8.0-ltsc2022 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=false SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false diff --git a/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 index e4febb85..07de7b61 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xm1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml index 4009e127..f4499459 100644 --- a/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xm1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/xm1/id/certs/readme b/compose/sxp/10.3/ltsc2022/xm1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.3/ltsc2022/xm1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xm1/mssql/certs/readme b/compose/sxp/10.3/ltsc2022/xm1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.3/ltsc2022/xm1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xp0/.env b/compose/sxp/10.3/ltsc2022/xp0/.env index 7f08f66d..5690d8f7 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/.env +++ b/compose/sxp/10.3/ltsc2022/xp0/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp0 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.3-ltsc2022 +SITECORE_ID_VERSION=8.0-ltsc2022 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=false SITECORE_GRAPHQL_EXPOSEPLAYGROUND=false diff --git a/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 index d2be2500..474e84a2 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xp0/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml index 07cc084d..b85867d8 100644 --- a/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xp0/docker-compose.yml @@ -29,7 +29,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -37,6 +39,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -57,7 +62,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -79,9 +84,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -100,6 +105,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cm: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp0-cm:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/xp0/id/certs/readme b/compose/sxp/10.3/ltsc2022/xp0/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.3/ltsc2022/xp0/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xp0/mssql/certs/readme b/compose/sxp/10.3/ltsc2022/xp0/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.3/ltsc2022/xp0/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xp1/.env b/compose/sxp/10.3/ltsc2022/xp1/.env index 418a716b..465cc85b 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/.env +++ b/compose/sxp/10.3/ltsc2022/xp1/.env @@ -1,6 +1,7 @@ COMPOSE_PROJECT_NAME=sitecore-xp1 SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/ SITECORE_VERSION=10.3-ltsc2022 +SITECORE_ID_VERSION=8.0-ltsc2022 EXTERNAL_IMAGE_TAG_SUFFIX=ltsc2022 SITECORE_ADMIN_PASSWORD= SQL_SERVER=mssql @@ -8,6 +9,7 @@ SQL_SA_LOGIN=sa SQL_SA_PASSWORD= SQL_DATABASE_PREFIX=Sitecore SQL_CUSTOM_DATABASE_PREFIX_UPDATE_FROM= +SQL_TLS_CERTIFICATE_PASSWORD= REPORTING_API_KEY= TELERIK_ENCRYPTION_KEY= SITECORE_GRAPHQL_ENABLED=false diff --git a/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 b/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 index f0345ac7..6dae2978 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 +++ b/compose/sxp/10.3/ltsc2022/xp1/compose-init.ps1 @@ -48,7 +48,16 @@ Param ( [string] $CertDataFolder = ".\traefik\certs", - + + [string] + $IdFolder = ".\id", + + [string] + $SqlServerFolder = ".\mssql", + + [string] + $SqlServerCertificatePassword = "Password12345", + [string] $SpecificVersion ) @@ -114,7 +123,11 @@ function Create-Certificates{ [string]$Topology, [string]$CdHost, [string]$CmHost, - [string]$IdHost + [string]$IdHost, + [string]$IdFolder, + [string]$MsSql, + [string]$MsSqlFolder, + [string]$MsSqlCertPswd ) Write-Information -MessageData "Starting create certificates for '$Topology' topology..." -InformationAction Continue @@ -134,7 +147,18 @@ function Create-Certificates{ $rootKey = Create-RSAKey -KeyLength 4096 $rootCertificate = Create-SelfSignedCertificate -Key $rootKey Create-CertificateFile -Certificate $rootCertificate -OutCertPath "$CertDataFolder\RootCA.crt" - + + # Copy RootCA.crt into id\cert + Copy-Item "$CertDataFolder\RootCA.crt" -Destination "$IdFolder\certs" + + $securePswd = (ConvertTo-SecureString -String $MsSqlCertPswd -Force -AsPlainText) + $signerCertificate = Import-CertificateForSigning -SignerCertificate $rootCertificate -SignerCertificatePassword $securePswd + + # Create Sql Server Certificate and Key as PFX file + $msSqlCertPath = [System.IO.Path]::Combine((Get-Location), "$MsSqlFolder\certs\$MsSql.pfx") + $mssqlCertificate = Create-SqlServerCertificate -CommonName $MsSql -DnsName $MsSql -SignerCertificate $signerCertificate + Create-PfxFile -Certificate $mssqlCertificate -OutCertPath $msSqlCertPath -Password $securePswd + # Create Certificate and Key files for each Sitecore role $dnsNames | ForEach-Object { $selfSignedKey = Create-RSAKey @@ -208,7 +232,7 @@ function InstallModule { Install-Module -Name $ModuleName -RequiredVersion $ModuleVersion -Repository $repository.Name -AllowClobber -AllowPrerelease -Scope CurrentUser -Force -ErrorAction "Stop" } $localModulePath = ((Get-Module $ModuleName -ListAvailable) | Where-Object Version -eq $ModuleVersion.Split("-")[0]).Path - Write-Host "Importing '$moduleName' '$ModuleVersion' from '$localModulePath' ..." + Write-Host "Importing '$ModuleName' '$ModuleVersion' from '$localModulePath' ..." Import-Module -Name $localModulePath } finally { @@ -244,6 +268,7 @@ function Invoke-ComposeInit { "SQL_SERVER" = $SqlServer "SQL_USERNAME" = $SqlUserName "SQL_PASSWORD" = $SqlSaPassword + "SQL_TLS_CERTIFICATE_PASSWORD" = $SqlServerCertificatePassword "IS_ALWAYS_ENCRYPTED" = $IsAlwaysEncrypted "PROCESSING_ENGINE_TASKS_DATABASE_USERNAME" = $ProcessingEngineTasksDatabaseUserName "CD_HOST" = $CdHost @@ -267,7 +292,7 @@ function Invoke-ComposeInit { Populate-EnvironmentFile -EnvFilePath $EnvFilePath -EnvVariablesTable $envVariablesTable # Configure TLS/HTTPS certificates - $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost + $RootCertificateCreated = Create-Certificates -CertDataFolder $CertDataFolder -Topology $Topology -CdHost $CdHost -CmHost $CmHost -IdHost $IdHost -IdFolder $IdFolder -MsSql $SqlServer -MsSqlFolder $SqlServerFolder -MsSqlCertPswd $SqlServerCertificatePassword # The update for the certs_config.yaml file is if Certificates were created for the custom hostnames. if ($RootCertificateCreated){ diff --git a/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml b/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml index 09271173..ff474c0c 100644 --- a/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml +++ b/compose/sxp/10.3/ltsc2022/xp1/docker-compose.yml @@ -34,7 +34,9 @@ services: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}nonproduction/mssql-developer:2019-${EXTERNAL_IMAGE_TAG_SUFFIX} environment: + NAME: ${SQL_SERVER} SA_PASSWORD: ${SQL_SA_PASSWORD} + TLS_CERTIFICATE_PASSWORD: ${SQL_TLS_CERTIFICATE_PASSWORD} ACCEPT_EULA: "Y" ports: - "14330:1433" @@ -42,6 +44,9 @@ services: - type: bind source: .\mssql-data target: c:\data + - type: bind + source: .\mssql\certs + target: c:\certs mssql-init: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-mssql-init:${SITECORE_VERSION} @@ -62,7 +67,7 @@ services: condition: service_healthy solr: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.11.2-${EXTERNAL_IMAGE_TAG_SUFFIX} + image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:9.8.1-${EXTERNAL_IMAGE_TAG_SUFFIX} ports: - "8984:8983" volumes: @@ -84,9 +89,9 @@ services: condition: service_healthy id: isolation: ${ISOLATION} - image: ${SITECORE_DOCKER_REGISTRY}sitecore-id7:${SITECORE_VERSION} + image: ${SITECORE_DOCKER_REGISTRY}sitecore-identity:${SITECORE_ID_VERSION} environment: - Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD} + Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString: Data Source=${SQL_SERVER};Initial Catalog=${SQL_DATABASE_PREFIX}.Core;User ID=${SQL_SA_LOGIN};Password=${SQL_SA_PASSWORD};Encrypt=true;TrustServerCertificate=false; Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl: https://${CM_HOST}/sitecore/login?rc=1 Sitecore_Sitecore__IdentityServer__Clients__PasswordClient__ClientSecrets__ClientSecret1: ${SITECORE_IDSECRET} Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1: https://${CM_HOST} @@ -105,6 +110,10 @@ services: - "traefik.http.routers.id-secure.entrypoints=websecure" - "traefik.http.routers.id-secure.rule=Host(`${ID_HOST}`)" - "traefik.http.routers.id-secure.tls=true" + volumes: + - type: bind + source: .\id\certs + target: c:\certs cd: isolation: ${ISOLATION} image: ${SITECORE_DOCKER_REGISTRY}sitecore-xp1-cd:${SITECORE_VERSION} diff --git a/compose/sxp/10.3/ltsc2022/xp1/id/certs/readme b/compose/sxp/10.3/ltsc2022/xp1/id/certs/readme new file mode 100644 index 00000000..a09485af --- /dev/null +++ b/compose/sxp/10.3/ltsc2022/xp1/id/certs/readme @@ -0,0 +1,2 @@ +Add a CA certificate to the trusted root store: + RootCA.crt \ No newline at end of file diff --git a/compose/sxp/10.3/ltsc2022/xp1/mssql/certs/readme b/compose/sxp/10.3/ltsc2022/xp1/mssql/certs/readme new file mode 100644 index 00000000..a3477138 --- /dev/null +++ b/compose/sxp/10.3/ltsc2022/xp1/mssql/certs/readme @@ -0,0 +1,2 @@ +Add TLS certificates for the mssql service to this folder: + mssql.pfx \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt index f963de45..0e4ed3d8 100644 --- a/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2019/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.2 \ No newline at end of file +10.3.3 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt index f963de45..0e4ed3d8 100644 --- a/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2019/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.2 \ No newline at end of file +10.3.3 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml index e3cfc442..1e839e79 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.3/ltsc2019/xm1/external/mssql.yaml b/k8s/sxp/10.3/ltsc2019/xm1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/external/mssql.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/id.yaml b/k8s/sxp/10.3/ltsc2019/xm1/id.yaml index fa907eb3..74c6bd17 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/id.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 700Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/ingress-nginx/ingress.yaml b/k8s/sxp/10.3/ltsc2019/xm1/ingress-nginx/ingress.yaml index 3b939a42..b2923bfe 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/ingress-nginx/ingress.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/ingress-nginx/ingress.yaml @@ -3,6 +3,7 @@ kind: Ingress metadata: name: sitecore-ingress annotations: + nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "32k" nginx.ingress.kubernetes.io/proxy-buffer-size: "32k" nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/rewrite-target: / diff --git a/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml index 5643f6ca..39f54dc1 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/kustomization.yaml @@ -8,8 +8,8 @@ images: newName: scr.sitecore.com/sxp/sitecore-xm1-cm newTag: 10.3-ltsc2019 - name: sitecore-xm1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.3-ltsc2019 + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2019 resources: - configmaps - cm.yaml diff --git a/k8s/sxp/10.3/ltsc2019/xm1/secrets/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xm1/secrets/kustomization.yaml index 99747337..187dc214 100644 --- a/k8s/sxp/10.3/ltsc2019/xm1/secrets/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xm1/secrets/kustomization.yaml @@ -60,4 +60,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/secrets/mssql/mssql.conf b/k8s/sxp/10.3/ltsc2019/xm1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2019/xm1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/global-authority/readme b/k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/global-authority/readme new file mode 100644 index 00000000..e6e8c9db --- /dev/null +++ b/k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/global-authority/readme @@ -0,0 +1,2 @@ +Add generated root certificate authority to this folder: + root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/mssql/readme b/k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2019/xm1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml index e3cfc442..1e839e79 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.3/ltsc2019/xp1/external/mssql.yaml b/k8s/sxp/10.3/ltsc2019/xp1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/external/mssql.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xp1/id.yaml b/k8s/sxp/10.3/ltsc2019/xp1/id.yaml index 8d5b4731..3364e6b4 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/id.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 400Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xp1/ingress-nginx/ingress.yaml b/k8s/sxp/10.3/ltsc2019/xp1/ingress-nginx/ingress.yaml index 3b939a42..b2923bfe 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/ingress-nginx/ingress.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/ingress-nginx/ingress.yaml @@ -3,6 +3,7 @@ kind: Ingress metadata: name: sitecore-ingress annotations: + nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "32k" nginx.ingress.kubernetes.io/proxy-buffer-size: "32k" nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/rewrite-target: / diff --git a/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml index ac4dd472..84c75e8e 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/kustomization.yaml @@ -8,8 +8,8 @@ images: newName: scr.sitecore.com/sxp/sitecore-xp1-cm newTag: 10.3-ltsc2019 - name: sitecore-xp1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.3-ltsc2019 + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2019 - name: sitecore-xp1-cortexprocessing newName: scr.sitecore.com/sxp/sitecore-xp1-cortexprocessing newTag: 10.3-ltsc2019 diff --git a/k8s/sxp/10.3/ltsc2019/xp1/secrets/kustomization.yaml b/k8s/sxp/10.3/ltsc2019/xp1/secrets/kustomization.yaml index 7612f474..35be6a61 100644 --- a/k8s/sxp/10.3/ltsc2019/xp1/secrets/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2019/xp1/secrets/kustomization.yaml @@ -86,4 +86,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xp1/secrets/mssql/mssql.conf b/k8s/sxp/10.3/ltsc2019/xp1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2019/xp1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/global-authority/readme b/k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/global-authority/readme new file mode 100644 index 00000000..e6e8c9db --- /dev/null +++ b/k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/global-authority/readme @@ -0,0 +1,2 @@ +Add generated root certificate authority to this folder: + root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/mssql/readme b/k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2019/xp1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt index f963de45..0e4ed3d8 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xm1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.2 \ No newline at end of file +10.3.3 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt index f963de45..0e4ed3d8 100644 --- a/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt +++ b/k8s/sxp/10.3/ltsc2022/upgrade/xp1/configuration/database-upgrade-to-version.txt @@ -1 +1 @@ -10.3.2 \ No newline at end of file +10.3.3 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml index e3cfc442..1e839e79 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.3/ltsc2022/xm1/external/mssql.yaml b/k8s/sxp/10.3/ltsc2022/xm1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/external/mssql.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/id.yaml b/k8s/sxp/10.3/ltsc2022/xm1/id.yaml index fa907eb3..74c6bd17 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/id.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 700Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/ingress-nginx/ingress.yaml b/k8s/sxp/10.3/ltsc2022/xm1/ingress-nginx/ingress.yaml index 3b939a42..b2923bfe 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/ingress-nginx/ingress.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/ingress-nginx/ingress.yaml @@ -3,6 +3,7 @@ kind: Ingress metadata: name: sitecore-ingress annotations: + nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "32k" nginx.ingress.kubernetes.io/proxy-buffer-size: "32k" nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/rewrite-target: / diff --git a/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml index 4a55a95d..3b41fade 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/kustomization.yaml @@ -9,8 +9,8 @@ images: newName: scr.sitecore.com/sxp/sitecore-xm1-cm newTag: 10.3-ltsc2022 - name: sitecore-xm1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.3-ltsc2022 + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2022 resources: - configmaps diff --git a/k8s/sxp/10.3/ltsc2022/xm1/secrets/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xm1/secrets/kustomization.yaml index 99747337..187dc214 100644 --- a/k8s/sxp/10.3/ltsc2022/xm1/secrets/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xm1/secrets/kustomization.yaml @@ -60,4 +60,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/secrets/mssql/mssql.conf b/k8s/sxp/10.3/ltsc2022/xm1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2022/xm1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/global-authority/readme b/k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/global-authority/readme new file mode 100644 index 00000000..e6e8c9db --- /dev/null +++ b/k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/global-authority/readme @@ -0,0 +1,2 @@ +Add generated root certificate authority to this folder: + root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/mssql/readme b/k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2022/xm1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml index e3cfc442..1e839e79 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/external/kustomization.yaml @@ -10,7 +10,7 @@ images: newTag: 4.0.14-alpine - name: solr newName: solr - newTag: 8.11.2 + newTag: 9.8.1 resources: - mssql.yaml diff --git a/k8s/sxp/10.3/ltsc2022/xp1/external/mssql.yaml b/k8s/sxp/10.3/ltsc2022/xp1/external/mssql.yaml index a7781007..016d3128 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/external/mssql.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/external/mssql.yaml @@ -48,6 +48,13 @@ spec: volumeMounts: - mountPath: /var/opt/mssql name: sql + - mountPath: /etc/ssl/certs + readOnly: true + name: mssql-tls + - mountPath: /var/opt/mssql/mssql.conf + subPath: mssql.conf + readOnly: true + name: mssql-config resources: requests: memory: 2Gi @@ -57,4 +64,11 @@ spec: cpu: 700m volumes: - name: sql - emptyDir: {} \ No newline at end of file + emptyDir: {} + - name: mssql-tls + secret: + secretName: mssql-tls + optional: true + - name: mssql-config + secret: + secretName: mssql-config \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/id.yaml b/k8s/sxp/10.3/ltsc2022/xp1/id.yaml index 8d5b4731..3364e6b4 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/id.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/id.yaml @@ -74,7 +74,7 @@ spec: name: sitecore-database key: sitecore-databaseprefix.txt - name: Sitecore_Sitecore__IdentityServer__SitecoreMemberShipOptions__ConnectionString - value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password); + value: Data Source=$(Database_Server);Initial Catalog=$(Sql_Database_Prefix).Core;User ID=$(Core_Database_Username);Password=$(Core_Database_Password);Encrypt=true;TrustServerCertificate=false; - name: Sitecore_Sitecore__IdentityServer__AccountOptions__PasswordRecoveryUrl value: https://cm-placeholder-hostname/sitecore/login?rc=1 - name: Sitecore_Sitecore__IdentityServer__Clients__DefaultClient__AllowedCorsOrigins__AllowedCorsOriginsGroup1 @@ -105,6 +105,9 @@ spec: - mountPath: C:\Identity\logs name: logs subPath: id + - mountPath: C:\certs\RootCA.crt + name: global-authority + subPath: root.crt resources: requests: memory: 400Mi @@ -116,5 +119,8 @@ spec: - name: logs persistentVolumeClaim: claimName: logs + - name: global-authority + secret: + secretName: global-authority imagePullSecrets: - name: sitecore-docker-registry \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/ingress-nginx/ingress.yaml b/k8s/sxp/10.3/ltsc2022/xp1/ingress-nginx/ingress.yaml index 3b939a42..b2923bfe 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/ingress-nginx/ingress.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/ingress-nginx/ingress.yaml @@ -3,6 +3,7 @@ kind: Ingress metadata: name: sitecore-ingress annotations: + nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "32k" nginx.ingress.kubernetes.io/proxy-buffer-size: "32k" nginx.ingress.kubernetes.io/affinity: "cookie" nginx.ingress.kubernetes.io/rewrite-target: / diff --git a/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml index 9f7df7e4..4f8e637e 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/kustomization.yaml @@ -9,8 +9,8 @@ images: newName: scr.sitecore.com/sxp/sitecore-xp1-cm newTag: 10.3-ltsc2022 - name: sitecore-xp1-id - newName: scr.sitecore.com/sxp/sitecore-id7 - newTag: 10.3-ltsc2022 + newName: scr.sitecore.com/sxp/sitecore-identity + newTag: 8.0-ltsc2022 - name: sitecore-xp1-cortexprocessing newName: scr.sitecore.com/sxp/sitecore-xp1-cortexprocessing newTag: 10.3-ltsc2022 diff --git a/k8s/sxp/10.3/ltsc2022/xp1/secrets/kustomization.yaml b/k8s/sxp/10.3/ltsc2022/xp1/secrets/kustomization.yaml index 7612f474..35be6a61 100644 --- a/k8s/sxp/10.3/ltsc2022/xp1/secrets/kustomization.yaml +++ b/k8s/sxp/10.3/ltsc2022/xp1/secrets/kustomization.yaml @@ -86,4 +86,15 @@ secretGenerator: files: - tls/global-id/tls.key - tls/global-id/tls.crt - type: kubernetes.io/tls \ No newline at end of file + type: kubernetes.io/tls +- name: mssql-tls + files: + - tls/mssql/tls.key + - tls/mssql/tls.crt + type: kubernetes.io/tls +- name: mssql-config + files: + - mssql/mssql.conf +- name: global-authority + files: + - tls/global-authority/root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/secrets/mssql/mssql.conf b/k8s/sxp/10.3/ltsc2022/xp1/secrets/mssql/mssql.conf new file mode 100644 index 00000000..5b4fb945 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2022/xp1/secrets/mssql/mssql.conf @@ -0,0 +1,5 @@ +[network] + +tlscert = /etc/ssl/certs/tls.crt +tlskey = /etc/ssl/certs/tls.key +forceencryption = 0 \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/global-authority/readme b/k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/global-authority/readme new file mode 100644 index 00000000..e6e8c9db --- /dev/null +++ b/k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/global-authority/readme @@ -0,0 +1,2 @@ +Add generated root certificate authority to this folder: + root.crt \ No newline at end of file diff --git a/k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/mssql/readme b/k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/mssql/readme new file mode 100644 index 00000000..75822347 --- /dev/null +++ b/k8s/sxp/10.3/ltsc2022/xp1/secrets/tls/mssql/readme @@ -0,0 +1,3 @@ +Add TLS certificates for the mssql service to this folder: + tls.crt + tls.key \ No newline at end of file From 06def0656fb70e949c1c2e742ebec11e671a5980 Mon Sep 17 00:00:00 2001 From: Yu Han Lee Date: Tue, 26 Aug 2025 19:17:45 +0800 Subject: [PATCH 16/17] Add Sitecore Horizon Container Deployment 10.2.3.08319.864 --- compose/horizon/10.2/2009/docker-compose.override.yaml | 2 +- .../horizon/10.2/ltsc2019/docker-compose.override.yaml | 2 +- k8s/horizon/10.2/ltsc2019/horizon/kustomization.yaml | 9 ++++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compose/horizon/10.2/2009/docker-compose.override.yaml b/compose/horizon/10.2/2009/docker-compose.override.yaml index 6d11c77a..3e1f1641 100644 --- a/compose/horizon/10.2/2009/docker-compose.override.yaml +++ b/compose/horizon/10.2/2009/docker-compose.override.yaml @@ -4,7 +4,7 @@ services: environment: Sitecore_Horizon_ClientHost: https://${HRZ_HOST} hrz: - image: 'scr.sitecore.com/sxp/modules/sitecore-horizon:3.0-2009' + image: 'scr.sitecore.com/sxp/modules/sitecore-horizon:3.1-2009' isolation: ${ISOLATION} healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] diff --git a/compose/horizon/10.2/ltsc2019/docker-compose.override.yaml b/compose/horizon/10.2/ltsc2019/docker-compose.override.yaml index 93d0b4ba..a75661a4 100644 --- a/compose/horizon/10.2/ltsc2019/docker-compose.override.yaml +++ b/compose/horizon/10.2/ltsc2019/docker-compose.override.yaml @@ -4,7 +4,7 @@ services: environment: Sitecore_Horizon_ClientHost: https://${HRZ_HOST} hrz: - image: 'scr.sitecore.com/sxp/modules/sitecore-horizon:3.0-ltsc2019' + image: 'scr.sitecore.com/sxp/modules/sitecore-horizon:3.1-ltsc2019' isolation: ${ISOLATION} healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthz/live"] diff --git a/k8s/horizon/10.2/ltsc2019/horizon/kustomization.yaml b/k8s/horizon/10.2/ltsc2019/horizon/kustomization.yaml index b020d0ed..c2cd88a5 100644 --- a/k8s/horizon/10.2/ltsc2019/horizon/kustomization.yaml +++ b/k8s/horizon/10.2/ltsc2019/horizon/kustomization.yaml @@ -2,10 +2,9 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: -- name: sitecore-horizon - newName: 'scr.sitecore.com/sxp/modules/sitecore-horizon' - newTag: '3.0-ltsc2019' - + - name: sitecore-horizon + newName: "scr.sitecore.com/sxp/modules/sitecore-horizon" + newTag: "3.1-ltsc2019" + resources: - hrz.yaml - From 58323b3cd53fe64be09c6d18cb7cf4b309978399 Mon Sep 17 00:00:00 2001 From: Naveen Hedalla Arachchi Date: Tue, 11 Nov 2025 12:10:21 +0530 Subject: [PATCH 17/17] Update copyright year and owner in LICENSE file --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 261eeb9e..876fe108 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2025 Sitecore Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.