Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 2.68 KB

File metadata and controls

41 lines (29 loc) · 2.68 KB

XM Cloud ASP.NET Core Starter Kit - Disconnected offline mode

Below are the instructions for how to mock a small subset of the XM Cloud Application elements in offline mode using Docker. This can allow for a disconnected development, however it is recommend to work in the default connected mode for the best experience.

Prerequisites

Base Image Versions

The containers configured here are setup to use the latest LTSC base container version released by Microsoft. If you are running a BaseOS that isn't compatible, you will need to ammend the ./local-containers/.env file and use the baseOs parameter when running the ./local-containers/scripts/init.ps1 script. You can read more about the different base container versions on the Microsoft Learn Site

Running the Containers

A number of PowerShell scripts have been provided to help you configure the repository and interact with the containers. These scripts are located in the ./local-containers/scripts folder.

Initialising the Repository

You first need to initialize the repository, which will configure how the different application elements will run. This will configure the different environment variables required for the Containers to build and run. You can do this by running the ./local-containers/scripts/init.ps1 script in a terminal with elevated privilidges:

./local-containers/scripts/init.ps1 -InitEnv -LicenseXmlPath "C:\path\to\license.xml" -AdminPassword "DesiredAdminPassword"

Running the Containers

After you have initialised the repository you can use the ./local-containers/scripts/up.ps1 script to build and run the containers:

./local-containers/scripts/up.ps1

Create a Site Collection & Site

Once the containers are running you can create a new Site Collection and Site by following the guide on the documentation site

You can either use the default Site Name of aspnet-core-starter or you can change the SITE_NAME parameter in the ./local-containers/.env file to match the Site Name you created.

Stopping the Containers

Once you have finished you can use the ./local-containers/scripts/down.ps1 script to stop the containers:

./local-containers/scripts/down.ps1

This will stop all containers, and tidy up any resources that were created.