Skip to content

Commit

Permalink
upgrade to v10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihaly Arvai committed Feb 26, 2021
1 parent 8e2ab10 commit 899d049
Show file tree
Hide file tree
Showing 16 changed files with 365 additions and 25 deletions.
12 changes: 12 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"sitecore.cli": {
"version": "3.0.0",
"commands": [
"sitecore"
]
}
}
}
10 changes: 6 additions & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ ID_HOST=id.blazorui.localhost
SITECORE_DOCKER_REGISTRY=scr.sitecore.com/sxp/
SITECORE_TOOLS_REGISTRY=scr.sitecore.com/tools/
SITECORE_MODULE_REGISTRY=scr.sitecore.com/sxp/modules/
SITECORE_VERSION=10.0-2004
TOOLS_VERSION=10.0.0-1809
SPE_VERSION=6.1.1-1809
SXA_VERSION=10.0.0-1809
SITECORE_VERSION=10.1-ltsc2019
TOOLS_VERSION=10.1-1809
MANAGEMENT_SERVICES_IMAGE=scr.sitecore.com/sxp/modules/sitecore-management-services-xp1-assets:3.0.0-1809
SPE_VERSION=6.2-1809
SXA_VERSION=10.1-1809

SITECORE_ADMIN_PASSWORD=b
SQL_SA_PASSWORD=Password12345
Expand All @@ -33,3 +34,4 @@ TRAEFIK_ISOLATION=hyperv
ISOLATION=hyperv
SOLR_CORE_PREFIX_NAME=sitecore
CD_HOST=cd.blazorui.localhost
MEDIA_REQUEST_PROTECTION_SHARED_SECRET=
42 changes: 42 additions & 0 deletions .sitecore/schemas/ModuleFile.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ModuleFile",
"description": "Sitecore module definition file schema",
"allOf": [
{
"title": "ModuleConfiguration",
"type": "object",
"description": "Defines a \"DevEx Module\" that is a Helix-like module that can contain serialized item configurations, etc.\nThis class is overridden with Serialization-specific derived versions that provide access to their module-specific settings.",
"additionalProperties": {},
"required": [
"namespace"
],
"properties": {
"$schema": {
"type": "string"
},
"namespace": {
"type": "string",
"description": "The namespace of the module. All resources in the module inherit this namespace.\nNamespaces can contain letters, numbers, dots (.), and hyphens (-).",
"minLength": 1,
"pattern": "^[A-Za-z0-9\\.\\-\\$\\{\\}\\(\\)]+$"
},
"description": {
"type": "string",
"description": "Description of the module, for reference/docs purposes only"
},
"references": {
"type": "array",
"description": "Names of other modules that are referenced by resources in this module. Wildcards are allowed, i.e. Foundation.*.",
"items": {
"type": "string"
}
},
"source": {
"type": "string",
"description": "Generic identifier as to where the module came from. Used internally for error messaging. Do not set in a module file; it will be ignored."
}
}
}
]
}
57 changes: 57 additions & 0 deletions .sitecore/schemas/RootConfigurationFile.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "RootConfigurationFile",
"type": "object",
"description": "Defines the root Sitecore Developer Configuration file",
"additionalProperties": false,
"required": [
"modules"
],
"properties": {
"$schema": {
"type": "string"
},
"modules": {
"type": "array",
"description": "Sitecore module file resolution globs",
"minItems": 1,
"items": {
"type": "string"
}
},
"plugins": {
"type": "array",
"description": "Contains a list of Sitecore Plugin NugetPackages. The format of the name is [NugetPackageName]@[NugetPackageVersion]. These entries are normally managed using\nthe 'Sitecore Plugin Add' and 'Sitecore Plugin Remove' commands",
"items": {
"type": "string"
}
},
"serialization": {
"description": "Global item serialization default settings",
"oneOf": [
{
"$ref": "#/definitions/SerializationRootConfiguration"
}
]
}
},
"definitions": {
"SerializationRootConfiguration": {
"type": "object",
"additionalProperties": false,
"properties": {
"defaultMaxRelativeItemPathLength": {
"type": "integer",
"description": "Max relative item path length to serialize before considering path too long (and requiring aliasing to shorten).\nOverridable on a per-module basis; this is the default when it is unspecified.",
"format": "int32",
"default": 120
},
"defaultModuleRelativeSerializationPath": {
"type": "string",
"description": "The default relative physical path from a module file where serialized items for that module will be stored.\nFor example given module /c/foo/bar.module.json, and default '/serialization/items' path,\nthe serialized items for bar would be stored at /c/foo/bar/serialization/items.\nPrefix the path with ~/ for a root configuration relative path instead of a module-relative path.\nUse '$(module)' to insert the module name when using a root relative path.\nOverridable on a per-module basis; this is the default when it is unspecified.",
"default": "serialization"
}
}
}
}
}
79 changes: 79 additions & 0 deletions .sitecore/schemas/UserConfiguration.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "UserConfiguration",
"type": "object",
"description": "Sitecore user configuration file",
"additionalProperties": false,
"properties": {
"endpoints": {
"type": "object",
"description": "Sitecore instance base URL to fetch or push data to",
"additionalProperties": {
"$ref": "#/definitions/EnvironmentConfiguration"
}
},
"$schema": {
"type": "string"
}
},
"definitions": {
"EnvironmentConfiguration": {
"type": "object",
"description": "Configures named Sitecore API endpoint",
"additionalProperties": false,
"required": [
"host",
"authority"
],
"properties": {
"allowWrite": {
"type": "boolean",
"description": "Whether writing data to this endpoint is allowed (i.e. to prevent accidental writes to production)"
},
"host": {
"type": "string",
"description": "Base URL to the Sitecore instance to connect to (i.e. http://my.site.core)",
"format": "uri",
"minLength": 1
},
"authority": {
"type": "string",
"description": "Base URL to authentication server (IdentityServer, AAD, etc - i.e. https://my.site.core.identityserver - to test, $url/.well-known/openid-configuration should work)",
"format": "uri",
"minLength": 1
},
"useClientCredentials": {
"type": [
"boolean",
"null"
],
"description": "If true, use client credentials (client id and secret) instead of device (username/password). This is good for CI."
},
"accessToken": {
"type": "string",
"description": "OAuth access token for this endpoint (use login command to get this)"
},
"refreshToken": {
"type": "string",
"description": "OAuth refresh token for this endpoint (use login command to get this)"
},
"clientId": {
"type": "string",
"description": "OAuth client ID for this endpoint",
"default": "SitecoreCLI"
},
"clientSecret": {
"type": "string",
"description": "OAuth client secret for this endpoint (when useClientCredentials is true; ignored for device auth mode)"
},
"variables": {
"type": "object",
"description": "Defines variables that are specific to this environment. Variables defined here override any definitions in the root configuration for this environment.",
"additionalProperties": {
"type": "string"
}
}
}
}
}
}
19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"files.associations": {
"*.sicpackage": "json"
},
"json.schemas": [
{
"fileMatch": ["/sitecore.json"],
"url": "./.sitecore/schemas/RootConfigurationFile.schema.json"
},
{
"fileMatch": ["/.sitecore/user.json"],
"url": "./.sitecore/schemas/UserConfiguration.schema.json"
},
{
"fileMatch": ["*.module.json"],
"url": "./.sitecore/schemas/ModuleFile.schema.json"
}
]
}
Binary file added Sitecore.BlazorUI.Serialization.json
Binary file not shown.
17 changes: 11 additions & 6 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ services:
volumes:
- ${LOCAL_DATA_PATH}\mssql:c:\data

# Mount our Solr data folder
solr:
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-solr:${VERSION:-latest}
build:
context: ./docker/build/solr
args:
BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr:${SITECORE_VERSION}
mem_limit: 1GB
volumes:
- ${LOCAL_DATA_PATH}\solr:c:\data

# Some modules (like SXA) also require additions to the Solr image.
solr-init:
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-xm1-solr-init:${VERSION:-latest}
build:
context: ./docker/build/solr-init
args:
BASE_IMAGE: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr-init:${SITECORE_VERSION}
id:
image: ${REGISTRY}${COMPOSE_PROJECT_NAME}-id:${VERSION:-latest}
build:
Expand All @@ -54,9 +56,12 @@ services:
SPE_IMAGE: ${SITECORE_MODULE_REGISTRY}spe-assets:${SPE_VERSION}
TOOLING_IMAGE: ${SITECORE_TOOLS_REGISTRY}sitecore-docker-tools-assets:${TOOLS_VERSION}
SOLUTION_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-solution:${VERSION:-latest}
MANAGEMENT_SERVICES_IMAGE: ${MANAGEMENT_SERVICES_IMAGE}
depends_on:
- solution
volumes:
- ${LOCAL_DEPLOY_PATH}\website:C:\deploy
- ${LOCAL_DATA_PATH}\cm:C:\inetpub\wwwroot\App_Data\logs
environment:
SITECORE_DEVELOPMENT_PATCHES: CustomErrorsOff
entrypoint: powershell -Command "& C:\tools\entrypoints\iis\Development.ps1"
16 changes: 14 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,24 @@ services:
target: c:\data
solr:
isolation: ${ISOLATION}
image: ${SITECORE_DOCKER_REGISTRY}nonproduction/solr:8.4.0-${SITECORE_VERSION}
ports:
- "8984:8983"
image: ${SITECORE_DOCKER_REGISTRY}sitecore-xm1-solr:${SITECORE_VERSION}
volumes:
- type: bind
source: .\solr-data
target: c:\data
environment:
SOLR_MODE: solrcloud
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-id:${SITECORE_VERSION}
Expand Down Expand Up @@ -82,7 +93,7 @@ services:
Sitecore_ConnectionStrings_Master: Data Source=mssql;Initial Catalog=Sitecore.Master;User ID=sa;Password=${SQL_SA_PASSWORD}
Sitecore_ConnectionStrings_Web: Data Source=mssql;Initial Catalog=Sitecore.Web;User ID=sa;Password=${SQL_SA_PASSWORD}
Sitecore_ConnectionStrings_ExperienceForms: Data Source=mssql;Initial Catalog=Sitecore.ExperienceForms;User ID=sa;Password=${SQL_SA_PASSWORD}
Sitecore_ConnectionStrings_Solr.Search: http://solr:8983/solr
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}
Expand All @@ -93,6 +104,7 @@ services:
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}
healthcheck:
test: ["CMD", "powershell", "-command", "C:/Healthchecks/Healthcheck.ps1"]
timeout: 300s
Expand Down
5 changes: 5 additions & 0 deletions docker/build/cm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ ARG BASE_IMAGE
ARG SPE_IMAGE
ARG TOOLING_IMAGE
ARG SOLUTION_IMAGE
ARG MANAGEMENT_SERVICES_IMAGE

FROM ${SOLUTION_IMAGE} as solution
FROM ${TOOLING_IMAGE} as tooling
FROM ${MANAGEMENT_SERVICES_IMAGE} AS management_services
FROM ${SPE_IMAGE} as spe
FROM ${BASE_IMAGE}

Expand All @@ -24,6 +26,9 @@ WORKDIR C:\inetpub\wwwroot
COPY --from=spe \module\cm\content .\


# Copy the Sitecore Management Services Module
COPY --from=management_services C:\module\cm\content C:\inetpub\wwwroot

# Copy solution website files
COPY --from=solution \artifacts\website\ .\

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# escape=`

ARG BASE_IMAGE

FROM ${BASE_IMAGE}

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
Loading

0 comments on commit 899d049

Please sign in to comment.