Sitecore
XP to XM Cloud Phase 2: Environment Setup
This phase typically takes 1-2 weeks and establishes your XM Cloud environment, tooling, and deployment pipeline.
Step 1: Provision XM Cloud Tenant
Section titled “Step 1: Provision XM Cloud Tenant”- Log in to Sitecore Cloud Portal
- Create new project
- Select region (US, EU, APAC)
- Choose environment tier (Standard, Premium)
Step 2: Set Up Project Structure
Section titled “Step 2: Set Up Project Structure”Install Sitecore CLI (local project tool — recommended over global):
cd <project-folder>dotnet new tool-manifestdotnet tool install Sitecore.CLIOther developers restore with dotnet tool restore.
Initialize project:
dotnet sitecore initThis creates sitecore.json configuration file:
{ "$schema": "https://sitecore.io/schemas/sitecore.json", "modules": [ "src/*/*.module.json" ], "plugins": [ "Sitecore.DevEx.Extensibility.Serialization" ]}Step 3: Configure Serialization (SCS)
Section titled “Step 3: Configure Serialization (SCS)”Create MyProject.module.json for your project (convention: <name>.module.json):
{ "$schema": "https://sitecore.io/schemas/module.json", "namespace": "MyProject", "items": { "includes": [ { "name": "content", "path": "/sitecore/content/MyProject", "allowedPushOperations": "createUpdateAndDelete" }, { "name": "templates", "path": "/sitecore/templates/MyProject" }, { "name": "renderings", "path": "/sitecore/layout/Renderings/MyProject" } ] }}Step 4: Set Up Rendering Host
Section titled “Step 4: Set Up Rendering Host”Recommended: Vercel (fastest, best DX)
Alternative: Azure Static Web Apps
Vercel Setup:
- Create Vercel account
- Connect GitHub repository (Next.js app)
- Configure environment variables:
SITECORE_API_KEY=your-edge-api-keySITECORE_API_HOST=https://xmc-your-tenant.sitecorecloud.ioGRAPH_QL_ENDPOINT=https://edge.sitecorecloud.io/api/graphql/v1
- Deploy
Step 5: Configure CI/CD Pipeline
Section titled “Step 5: Configure CI/CD Pipeline”GitHub Actions Example:
name: Deploy to XM Cloud
on: push: branches: [main]
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v2 with: dotnet-version: '8.x' - name: Restore Sitecore CLI run: dotnet tool restore - name: Deploy to XM Cloud run: dotnet sitecore cloud deployment create --environment-id ${{ secrets.ENVIRONMENT_ID }} --upload env: SITECORE_API_KEY: ${{ secrets.SITECORE_API_KEY }}