Deploy a project and environment

Timing 10 minutes

This is part one of the getting started walkthrough series. After you complete this step, move on to create a site and page.

When you create a new project in the Deploy app, it automatically creates an environment and runs an initial deployment. In this topic, we'll create a project that uses the XM Cloud starter foundation template. You can also create a project using the Sitecore CLI or the XM Cloud Deploy API.

This walkthrough describes how to:

Before you begin
  • Make sure you have an email invite to an XM Cloud instance, and you've been assigned an Organization Admin or Organization Owner role in the organization where you want to create a project.

  • Prepare a GitHub or Azure DevOps service account and its authentication details.

Open the XM Cloud Deploy app

You access XM Cloud for the first time by accepting the invitation you received to a Cloud Portal environment. This opens the Sitecore Cloud Portal, from which you navigate to XM Cloud.

To open the Deploy app:

  1. In the invitation email, click Accept invitation.

  2. Your browser opens. Follow the authorization process on screen and accept the terms and conditions.

  3. You are now logged in to the Cloud Portal. It shows the apps and actions available to you, depending on your access rights. The portal is where you manage users, invite team members, and assign permissions. Now that you've accepted the invitation, you can access the portal directly at https://portal.sitecorecloud.io, and read the documentation to learn more about using it.

  4. To start creating your first project, open the Deploy app by clicking XM Cloud Deploy under the quick links in the menu on the right. The Deploy app can also be accessed directly by opening https://deploy.sitecorecloud.io/.

    Note

    After you create an environment, you can access it from the portal by clicking the tile in the Apps section.

Deploy a project

When you create a new project in the Deploy app, it automatically creates an environment and runs an initial deployment there. In this walkthrough series, we'll deploy a project that uses the XM Cloud starter foundation template.

Note

If you've enabled the beta feature that lets you deploy your authoring environments and editing hosts separately, follow these instructions to deploy a project when the beta feature is enabled.

To create a project in the Deploy app using the foundation template:

  1. In the XM Cloud Deploy app, on the Projects page, click Create project.

    The 'create project' button in the XM Cloud Deploy app
  2. Name the project XMC Getting Started, then click Continue.

  3. To choose the source control provider you want to use for your project click Connect, then Continue. The Deploy app will create a new repository there to store your environment code.

  4. In the Set up repository window, make sure Use XM Cloud template is selected.

  5. Assuming there is no existing connection, click Connect to a new account, and follow the steps to authorize the Deploy app in your account. You can later manage the connection for the source control provider.

  6. Enter a name for the repository, such as XMC-Getting-Started, then click Continue.

    Note

    Your repository name can only contain alphanumeric characters, underscores, periods, or hyphens, and a maximum of 100 characters. It must also follow the repository naming convention of your source control provider.

  7. Name the environment XMC Getting Started.

  8. In the Production SaaS SLA field, select No.

    Important

    A production environment is optimized for production traffic and is covered by the Sitecore SaaS Service Level Agreement. This setting cannot be changed later.

  9. In the Auto deploy on push to repository field, select Yes.

  10. Review the configuration and click Start deployment.

  11. The deployment runs for a few minutes, and you are redirected to the deployment log screen to see the progress (this might take a few seconds). After it completes, you can click Go to XM Cloud to open the Sites dashboard in a new tab and create a new site.

The deployment process:

  • Creates a new repository in the connected source control account and copies the source code from the XM Cloud foundation template to the new repository.

  • Provisions the infrastructure and SaaS tenants to host the Content Management (CM) instance in the environment you defined.

  • Pulls the source code from the repository to a hosted XM Cloud build server and builds the solution.

  • Deploys the XM Cloud build artifacts on the provisioned CM instance.

Now that you've provisioned the project and environment, the environment appears as an XM Cloud app in the Sitecore Cloud Portal. The next thing you'll do is create a site and page.

Deploy a project when you've enabled the beta feature that lets you deploy your authoring environments and editing hosts separately

The beta feature lets you:

  • Create and manage editing hosts from the Deploy app.

  • Build and deploy the authoring environment and editing host separately, resulting in faster deployments and independent logging.

  • Use the source code from different repositories when adding additional authoring environments and editing hosts to a project.

  • Add custom environment variables during project or environment creation.

To create a project in the Deploy app using the foundation template when the beta feature is enabled:

  1. In the XM Cloud Deploy app, on the Projects page, click Create project.

    The 'create project' button in the XM Cloud Deploy app
  2. Name the project XMC Getting Started, make sure Use starter kit is selected, then click Continue.

  3. In the Set up authoring environment window, name the authoring environment XMC Getting Started.

  4. Select the source control provider you want to use for your project. Assuming there is no existing connection, click Add GitHub account or Add Azure DevOps account, and follow the steps to authorize the Deploy app in your account. You can manage the connection for the source control provider later.

  5. After authorizing the Deploy app in your source control provider account, enter a name for the repository the Deploy app will create to store your environment code, such as XMC-Getting-Started.

    Note

    Your repository name can only contain alphanumeric characters, underscores, periods, or hyphens, and a maximum of 100 characters. It must also follow the repository naming convention of your source control provider.

  6. Select the Auto deploy on push to repository checkbox and make sure the Production SaaS SLA checkbox is clear.

    Important

    A production environment is optimized for production traffic and is covered by the Sitecore SaaS Service Level Agreement. This setting cannot be changed later.

    At this point, you can add environment variables to your authoring environment, however, it is not needed for this getting started guide, so click Continue.

  7. In the Set up editing host window, select the Auto deploy on push to repository checkbox. Since you are using the starter kit, the Editing host name is preselected for you.

    Note

    If you bring your own code instead of using the starter kit, setting up an editing host is optional.

    To select the editing host source code, in the Editing host name field, enter name of the rendering host defined in the xmcloud.build.json file of the editing host code repository. Then choose the source control account and repository that contains the editing host code.

    For more information, see manage an editing host.

    At this point, you can add environment variables to your editing host, however, it is not needed for this getting started guide, so click Continue.

  8. Review the configuration and click Start deployment.

  9. The deployment runs for a few minutes, and you are redirected to the deployment log screen to see the progress (this might take a few seconds). After it completes, you can click Go to XM Cloud to open the Sites dashboard in a new tab and create a new site.

The deployment process:

  • Creates a new repository in the connected source control account and copies the source code from the XM Cloud foundation template to the new repository.

  • Provisions the infrastructure and SaaS tenants to host the Content Management (CM) instance in the environment you defined.

  • Pulls the source code from the repository to a hosted XM Cloud build server and builds the solution.

  • Deploys the XM Cloud build artifacts on the provisioned CM instance.

Now that you've provisioned the project and environment, the next thing you'll do is create a site and page.

Do you have some feedback for us?

If you have suggestions for improving this article,