Manage an environment

An environment represents a single Sitecore Content Management (CM) instance along with all the services and supporting tenants for hosting a Sitecore solution. Every environment belongs to a project.

Create a new environment

A project can contain multiple environments. When you create a project in the Deploy app, it will also create an environment.

To create a new environment in an existing project:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment where you want to view the developer settings.

  3. On the project page, click Create environment.

  4. In the Create environment dialog, in the Environment name field, enter a name for your environment.

  5. In the Is this a production environment? drop-down menu, choose if you want to create a production or non-production environment.

    Note

    A production environment is optimized for production traffic and is covered by the Sitecore SaaS Service Level Agreement.

  6. In the Link to branch drop-down menu, click the repository branch that you want to link to your environment.

  7. If you linked your environment to a branch, in the Trigger deployment on commit to branch drop-down menu, choose whether you want to trigger an automatic deployment when you push to the linked repository branch.

  8. Click Create. A new environment appears.

Create a build and deploy it to an environment

You can create a new build and deploy it to an environment. If there is manually uploaded source code from the CLI, the build and deployment is based on the current artifacts. If the environment is linked to a repository, the build is based on the latest commits.

To create a build and deploy it to an environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment where you want to create a new build and deployment.

  3. On the project page, locate the environment where you want to create a new build and deployment. Click Actions > Build and deploy.

You can also create a build and deploy it to an environment from the Deployments page:

  1. In the navigation pane of the Deploy app, click Deployments.

  2. On the Projects page, click Create deployment.

  3. In the Create deployment dialog, in the Select project drop-down menu, choose the project that contains the environment where you want to create a deployment.

  4. In the Select environment drop-down menu, select the environment where you want to create a deployment, then click Deploy.

Deploy a build to another environment

You can deploy a build to another environment, for example, when you want to promote your dev build to the QA or staging environment.

To deploy a build to another environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the build you want to deploy.

  3. On the project page, click the environment that contains the build you want to deploy.

  4. On the environment page, locate the build you want to deploy. Click Actions > Deploy build artifact to another environment.

  5. In the Deploy build to another environment dialog, click the environment that you want to deploy the build to, then click Deploy.

Restart an environment

Note

Modifying environment variables requires a build and deploy of your environment for the changes to take effect.

To restart an environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment you want to restart.

  3. On the project page, click Actions > Restart environment.

  4. In the Restart environment dialog, click Restart.

If your environment is linked to a repository, when you create a build and deploy it to an environment, the Deploy app uses the code in the linked repository branch of your environment. You can link an environment to a different branch within the same repository.

To link an environment to a different branch:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment you want to link to a different branch.

  3. On the project page, click the environment you want to link to a different branch.

  4. On the environment page, click Options > Link environment to another branch.

  5. In the Link environment to another branch dialog, click the branch that you want, then click Link.

Note

Alternatively, on the environment page click Options > Edit environment details. In the Edit environment details dialog, in the Link to branch drop-down menu, click the branch you want to link to the environment, then click Save.

Change an environment name

To change the name of an environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment you want to change.

  3. On the project page, click the environment you want to change.

  4. On the environment page, click Options > Edit environment details.

  5. In the Edit environment details dialog, in the Environment name field, enter the environment name you want, then click Save.

Enable automatic deployment when you push to the linked repository branch

To keep your environment updated with the latest code, you can enable an automatic deployment every time you push to the repository branch linked to your environment.

To enable automatic deployment when you push to your repository branch:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment where you want to enable automatic deployment.

  3. On the project page, click the environment you want.

  4. On the environment page, click Options > Edit environment details.

  5. In the Edit environment details dialog, in the Trigger deployment on commit to branch drop-down menu, click Yes, then click Save.

Note

To disable automatic deployment, in the Edit environment details dialog, in the Trigger deployment on commit to branch drop-down menu, click No, then click Save.

Delete an environment

To delete an environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment you want to delete.

  3. On the project page, locate the environment you want to delete, then click Actions > Delete.

  4. In the Delete environment dialog, enter the environment name, then click Delete.

View environment details

From the environment page, you can view environment details or generate an Edge API key.

To view the details of an environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment whose details you want to view.

  3. On the project page, click the environment you want.

  4. On the environment page, click Details.

View environment logs

Note

Log files are stored for 90 days. If you need to retain log files for longer than 90 days, you can download them using the CLI or from the Deploy app.

From the environment logs page, you can view the Sitecore logs of each XM Cloud environment, including all CM logs and Rendering Host logs.

To view the logs of an environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment whose logs you want to view.

  3. On the project page, click the environment you want.

  4. On the environment page, click Logs.

Open the XM Cloud dashboard

After you deploy an environment, you can open its XM Cloud dashboard.

To open the XM Cloud dashboard of an environment:

  1. On the navigation pane of the XM Cloud Deploy app, click Projects.

  2. On the Projects page, click the project that contains the environment you want to open.

  3. On the project page, click the environment you want.

  4. On the environment page, click Options > Open dashboard.

Do you have some feedback for us?

If you have suggestions for improving this article,