You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**This repository is not a Starter Kit or Template Solution**, you should not clone this repository for the purposes of starting a new Sitecore project. This is intended as a reference example of a Sitecore XM Cloud implementation.
3
3
4
-
This repository contains the codebase for a series of sites managed by the Technical Marketing Team at Sitecore. You will find the following sites in this repository:
4
+
This repository contains the codebase for a series of sites managed by Sitecore. You will find the following sites in this repository:
5
5
-[Sitecore MVP Site](https://mvp.sitecore.com)
6
6
-[SUGCON EU Site](https://europe.sugcon.events)
7
7
-[SUGCON ANZ Site](https://anz.sugcon.events)
@@ -17,94 +17,17 @@ This repository contains the codebase for a series of sites managed by the Techn
-[Docker](https://www.docker.com/) (Not required when running in Edge Development Mode without Docker)
21
-
22
-
## Docker Compose v2
23
-
This repository uses Docker Compose v2. As of June 2023 v1 is no longer supported by Docker. You can read more about the differences between the two versions [here](https://docs.docker.com/compose/compose-v2/).
24
-
25
-
## Base Image Versions
26
-
This repositories maintainers intend to keep this repository running against the latest Docker Windows Container versions as possible to reduce image size and increase performance. You may need to downgrade to an earlier Base OS version if you are running an older Host OS. You can read more about this on the [Wiki](../../wiki/Changing-local-Docker-Image-Base-OS-Versions)
27
20
28
21
## Okta Account
29
22
If you wish to run the MVP Site you will need to provide Okta configuration details. You can generate these values for yourself by [Signing up for an Okta Developer Account](https://developer.okta.com/signup/)
30
23
31
-
## Auth0 Account
32
-
When you interact with XM Cloud you will be asked to authenticate with our Auth0 tenant. If you don't have an account already you can follow the registration flow provided by the Auth0 to create one.
33
-
34
-
# ▶️ Initializing the repository
35
-
36
-
You first need to initialize the repository, which will configure how the different application elements will run. There are a series of parameters you can pass into the `init.ps1` script to achieve this, you can find the full list of parameters with their purpose here.
37
-
38
-
You must be in "administrator mode" to run the `init.ps1` script.
39
-
40
-
Examples of how to use them can be seen in the setup guides for the different running modes below .
41
-
42
-
| Parameter | Required for MVP Site | Required for SUGCON Sites | Required for full local | Required for Edge Mode | Purpose |
| LicenseXmlPath | No | No |**Yes**| No | Used to specify the path to the license file |
45
-
| AdminPassword | No | No |**Yes**| No | Used to specify the password for the Sitecore admin user |
46
-
| InitEnv | No | No | No | No | Used to force a full initialization of the repository |
47
-
| Edge_Token | No | No | No |**Yes**| Used to authenticate with XM Cloud, when running in 'Edge Mode' |
48
-
| OKTA_Domain |**Yes**| No | No | No | Okta domain used by the MVP Rendering host |
49
-
| OKTA_Client_Id |**Yes**| No | No | No | Okta Client Id used by the MVP Rendering host |
50
-
| OKTA_Client_Secret |**Yes**| No | No | No | Okta Client Secret used by the MVP Rendering host |
51
-
| MVP_Selections_API | No | No | No | No | URL for the MVP Selections API |
52
-
| SUCGON_ANZ_CDP_CLIENT_KEY | No | No | No | No | CDP Client key for SUGCON ANZ Site |
53
-
| SUCGON_ANZ_CDP_TARGET_URL | No | No | No | No | CDP Target URL for SUGCON ANZ Site |
54
-
| SUCGON_ANZ_CDP_POINTOFSALE | No | No | No | No | CDP POS for SUGCON ANZ Site |
55
-
| SUCGON_EU_CDP_CLIENT_KEY | No | No | No | No | CDP Client key for SUGCON EU Site |
56
-
| SUCGON_EU_CDP_TARGET_URL | No | No | No | No | CDP Target URL for SUGCON EU Site |
57
-
| SUCGON_EU_CDP_POINTOFSALE | No | No | No | No | CDP POS for SUGCON EU Site |
58
-
| SUCGON_INDIA_CDP_CLIENT_KEY | No | No | No | No | CDP Client key for SUGCON India Site |
59
-
| SUCGON_INDIA_CDP_TARGET_URL | No | No | No | No | CDP Target URL for SUGCON India Site |
60
-
| SUCGON_INDIA_CDP_POINTOFSALE | No | No | No | No | CDP POS for SUGCON India Site |
61
-
| SUCGON2024_EU_CDP_CLIENT_KEY | No | No | No | No | CDP Client key for SUGCON2024 EU Site |
62
-
| SUCGON2024_EU_CDP_TARGET_URL | No | No | No | No | CDP Target URL for SUGCON2024 EU Site |
63
-
| SUCGON2024_EU_CDP_POINTOFSALE | No | No | No | No | CDP POS for SUGCON2024 EU Site |
64
-
| Edge_NoDocker | No | No | No | No | Used to initialize the repo for Edge Developer without Docker |
65
-
66
-
## Embedded Personalization
67
-
Embedded Personalization is disabled locally by default. If you wish to enable it you will need to populate the different `xx_CDP_CLIENT_KEY`, `xx_CDP_TARGET_URL` & `xx_CDP_POINTOFSALE` parameters with valid values and change the `NODE_ENV` parameter from `development` to another value.
68
-
69
-
# 🏃 Running the Repository
70
-
After you have initialized the repository, you can run it using the `up.ps1` script. There are 3 different ways you can run this repository
71
-
-[Full local development Mode](#-running-in-full-local-development-mode)
72
-
-[Edge development with Docker](#-running-in-edge-development-mode-with-docker)
73
-
-[Edge development without Docker](#-running-in-edge-development-mode-without-docker)
74
-
75
-
The different parameters on the `up.ps1` script control which mode you want to select, along with some other options.
### Bring up all the application elements for Local Mode
97
-
Next, use the `up.ps1` script to bring up all of the containers required for Local Mode.
98
-
99
-
```ps1
100
-
.\up.ps1
101
-
```
102
-
103
-
## 🐋+🌏 Running in Edge Development Mode with Docker
104
-
Running in Edge Mode with Docker will run only run the Head applications and Traefik. To be able to run the sites in this repository locally against Edge, you will need to have access to an active XM Cloud Subscription with enough entitlements to be able to create a new Project & Environment to run against.
24
+
## 🏃♀️➡️ Running the repository
25
+
To run this you will need to deploy this project to an XM Cloud environment.
105
26
106
-
### Create a new environment and deploy the codebase
107
-
You can follow these steps to create a new XM Cloud Project & Environment, then generate an Edge Token used to authenticate your Head applications with your Edge Tenant.
27
+
### Setting up an XM Cloud Environment
28
+
This can be achieved using the CLI by following the steps below from within PowerShell:
29
+
- Install the Sitecore CLI
30
+
-`dotnet tool install`
108
31
- Authenticate with the XM Cloud Deploy Application
109
32
-`dotnet sitecore cloud login`
110
33
- Create a new XM Cloud Project
@@ -116,64 +39,58 @@ You can follow these steps to create a new XM Cloud Project & Environment, then
116
39
- Create a deployment and push the local codebase into XM Cloud
If you want more information about the Cloud plugin for the CLI then you access it on the [documentation site](https://doc.sitecore.com/xmc/en/developers/xm-cloud/the-cloud-deployment-command.html).
124
44
125
-
### Initialize your repository for Edge Development Mode with Docker
126
-
First initialize your repo using the `.init/ps1` script, you will need to pass in the `-Edge_Token` parameter set to the value you generated in the previous step.
### Bring up all the application elements for Edge Mode with Docker
133
-
Once you have initialized the repository with your Edge Token, use the `up.ps1` script, ensuring to pass the `-UseEdge` parameter to bring up all of the containers required for Edge Mode.
134
-
135
-
```ps1
136
-
.\up.ps1 -UseEdge
137
-
```
138
-
139
-
## 💻+🌏 Running in Edge Development Mode without Docker
45
+
### Running the MVP Site
140
46
141
-
###Initialize your repository for Edge Development Mode without Docker
142
-
First initialize your repo using the `.init/ps1` script, you will need to pass in the `-Edge_Token` & `-EdgeNoDocker` parameters to ensure that the repository is correct initialized.
47
+
#### Populating the Application Settings
48
+
To run the MVP site you will need to populate the `./headapps/MvpSite/Mvp.Project.MvpSite.Rendering/appsettings.json`. You will need to provide the following values:
Running with the `-EdgeNoDocker` switch, will setup configuration files for each of the heads included in this repository. You can then manually run each of them using either NPM or DotNet.
57
+
After completing the populate the `appsettings.json` above you will be able to run the MVP Site either directly from within Visual Studio, or by using the DotNet CLI.
149
58
150
-
### Running the MVP Site
151
-
152
-
After completing the init setup above you will be able to run the MVP Site either directly from within Visual Studio, or by using the DotNet CLI.
153
-
154
-
- To run from within Visual Studio, open the `src\XmCloudIntroduction.sln`, ensure that the `Mvp.Project.MvpSite.Rendering` project is set as your StartUp Project, then hit F5.
59
+
- To run from within Visual Studio, open the `./headapps/MvpSite/XMC-Introduction-MVP.sln`, ensure that the `Mvp.Project.MvpSite.Rendering` project is set as your StartUp Project, then hit F5.
155
60
- The site should then be started loaded in the browser automatically
156
-
- To run from the DotNet CLI, open a new terminal window and navigate to the `src\Project\MvpSite\rendering` folder, then run `dotnet restore && dotnet run`
61
+
- To run from the DotNet CLI, open a new terminal window and navigate to the `./headapps/MvpSite/Mvp.Project.MvpSite.Rendering` folder, then run `dotnet restore && dotnet run`
157
62
- You can then access the site at `https://localhost:5001` or `http://localhost:5000`
158
63
159
64
### Running the SUGCON Sites
160
65
161
66
After completing the init setup above you will be able to run the SUGCON Sites directly using the NPM CLI, they are all built using SXA Headless so the process is the same for each of them.
162
67
163
-
1.**Start the Default Site**:
164
-
- Open a new terminal window and navigate to the `src\Project\Sugcon2024\Sugcon` folder.
68
+
- Log into the [XM Cloud Deploy Application](https://deploy.sitecorecloud.io/)
69
+
- Locate the Project and Environment you created earlier
70
+
- Choose the Site you wish to load from the dropdown, e.g. EU for the SUGCON Europe Site.
71
+
- Copy the Environment variables that are displayed there
72
+
- Create a new `.env` file in the root of the `./headapps/Sugcon2024` folder
73
+
- Paste the Environment variables into the `.env` file you just created.
74
+
- Start the Default Site
75
+
- Open a new terminal window and navigate to the `./headapps/Sugcon2024` folder.
165
76
- Run the following command to install dependencies and start the site:
166
77
```bash
167
78
npm i && npm run start:connected
168
79
```
169
80
- You can then access the default site at [http://localhost:3000](http://localhost:3000).
170
81
171
-
2. **Switching Between SUGCON Sites**:
172
-
- The default site is set to the EU version. To switch to another SUGCON site, update the `JSS_APP_NAME` variable in the `.env` file.
82
+
- Switching Between SUGCON Sites
83
+
- To switch to another SUGCON site, update the `JSS_APP_NAME` variable in the `.env` file.
173
84
- Available site options include:
174
85
- `ANZ`
175
86
- `EU`
176
87
- `India`
177
88
- `NA`
89
+
- `Events`
178
90
179
91
Simply change the `JSS_APP_NAME`in the `.env` file to your desired site, save the changes, and restart the site using the steps above.
92
+
93
+
## Disconnected offline development
94
+
It is possible to mock a small subset of the XM Cloud Application elements to enable offline development. This can allow fora disconnected development experience, however it is recommend to workin the default connected mode.
95
+
96
+
You can find more information about how setup the offline development experience [here](./local-containers/README.md)
0 commit comments