Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion umbraco-cloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The easiest way to start with an Umbraco Cloud project is to take a [14-day free

Since everything is already set up for you, it is recommended that you get to know your project before you start building.

To start working with and building your site, you can either work directly in the backoffice on the Cloud environment or [clone down the project to your local machine](set-up/working-locally.md).
You can either work directly in the backoffice on the Cloud environment or [clone down the project to your local machine](set-up/working-locally.md).

### Umbraco Cloud Portal Project

Expand Down
2 changes: 1 addition & 1 deletion umbraco-cloud/databases/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Working with databases

{% hint style="info" %}
The databases on your Umbraco Cloud environments are specific to their environment. This means that no matter what you have configured in the `connectionstring` in your `web.config` or `appSettings.json` file, we overwrite the connectionstring to use the SQL Azure Server we provide.
The databases on your Umbraco Cloud environments are specific to their environment. This means that the connectionstring to use the SQL Azure Server is overwritten no matter what else is configured.
{% endhint %}

When working with Umbraco Cloud, the way you work with databases might differ from what you're used to. One important aspect of Umbraco Cloud is that you always work isolated to avoid interfering with colleagues or a running website. This includes the database as well.
Expand Down
11 changes: 4 additions & 7 deletions umbraco-cloud/databases/backups.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ Once you have uploaded a backup, you might want to restore it to one of your env

<figure><img src="../.gitbook/assets/image (72).png" alt="Choose which environment to restore the backup on"><figcaption><p>Choose which environment to restore the backup on</p></figcaption></figure>




3. **Optional:** Create a Cloud Backup of the selected environment's database before restoring the backup.
4. Click **"Restore backup"**

Expand All @@ -93,10 +90,10 @@ Make sure to check your environment and see if everything works as expected and

Use the following steps:

* Connect to your SQL Server using SQL Server Management Studio (SSMS).
* Expand "Databases", right-click "Databases", then select "Import Data-tier Application...".
* Proceed through the dialog, by browsing to the saved location of your `bacpac` file, and then setting the options appropriate to your configuration
* Complete the import dialog and the database will be restored.
1. Connect to your SQL Server using SQL Server Management Studio (SSMS).
2. Expand "Databases", right-click "Databases", then select "Import Data-tier Application...".
3. Proceed through the dialog, by browsing to the saved location of your `bacpac` file, and then setting the options appropriate to your configuration
4. Complete the import dialog and the database will be restored.

{% hint style="info" %}
If a `bacpac` restore fails in SQL server, ensure the 'Contained Database Authentication' flag is set to true for resolution.
Expand Down
18 changes: 9 additions & 9 deletions umbraco-cloud/deployment/cloud-to-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,34 @@ updatedLinks: true

# Deploying between environments

When your are Working in your Development environment, changes made through the Backoffice are automatically detected and committed to the site's Git repository. This includes Umbraco-specific items like Document types and templates.
When your are working in your Cloud environment, changes made through the Backoffice are automatically detected and committed to the site's Git repository. This includes Umbraco-specific items like Document types and templates. These changes are also referred to as metadata.

Changes made on your Cloud environments will show up in the Umbraco Cloud portal. You'll be able to see what files have been added/changed and who made the changes.
Changes made on your Cloud environments will show up in the Umbraco Cloud portal. You'll can see what files have been added/changed and who made the changes.

To deploy metadata changes from one Cloud environment to another, click the **'Deploy changes to ..'** button on the environment where the changes have been made.
To deploy metadata changes from one Cloud environment to another, click the **Deploy changes** button on the environment where the changes have been made.

<figure><img src="../.gitbook/assets/image (39).png" alt=""><figcaption></figcaption></figure>

The deployment initiates, and you can see the process in the **Overview of your project.**
The deployment initiates, and you can follow the process in the **Overview of your project.**

<figure><img src="../.gitbook/assets/image (41).png" alt="Deployment in progress"><figcaption><p>Deployment in progress</p></figcaption></figure>

Once it's done, the changes will be deployed to the next Cloud environment. If you have more Cloud environments, follow the same procedure to deploy the changes up to your Live site.
Once it's done, the changes will be deployed to the next Cloud environment in the deployment flow. If you have more Cloud environments, follow the same procedure to deploy the changes through each environment.

## Important Notes

When you deploy, for example, from your Development environment to your Live environment, changes are made to the Live environment. These changes will then be merged back into the Development environment.
When you deploy, for example, from your left-most mainline environment to your Live environment, changes are made to the Live environment. These changes will then be merged back into the left-most mainline environment.

Here are the automatic steps Umbraco Cloud goes through when you hit the _"Deploy changes to .."_ button:
Here are the automatic steps Umbraco Cloud goes through when you hit the _"Deploy changes"_ button:

* Before pushing your changes from the source environment, the engine running Umbraco Cloud - **Umbraco Deploy** - looks for changes in the repository on the target environment
* If changes are found, Umbraco Deploy _merges_ the changes from the target environment into the repository on the source environment.
* After the merge, the changes from the source environment are pushed to the repository on the target environment.
* Finally, the changes pushed to the target repository are extracted to the site, and you will now see your changes reflected in the Backoffice and on the Frontend.

If you have more than one Umbraco Cloud environment, we strongly recommend that you **only make changes to metadata on the Development environment**. Making changes directly on your Staging and/or Live environments can cause merge conflicts when you deploy from your Development environment.
It is recommended that you **only make changes to metadata on the left-most mainline environment or a flexible environment**. Making changes directly on other mainline environments can cause merge conflicts when you deploy.

{% hint style="danger" %}
{% hint style="warning" %}
It is important to be aware of how deletions work between environments. Some deletions are environment-specific and others are not. For more information see the [Deploying Deletions article](deploying-deletions.md).
{% endhint %}

Expand Down
65 changes: 30 additions & 35 deletions umbraco-cloud/deployment/deploying-deletions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,36 @@ The databases are environment specific. During deployment across environments, U

The workflow described above does not recognize deletions of content and schema from the database. You'll need to delete the content and/or schema on all your environments to fully complete the deletion.

The main reason we do not delete schema and content on deployments is that it could lead to an unrecoverable loss of data. Imagine you delete a Document Type in your Development environment. Then, push this deletion to your Live environment, where many content nodes depend on the deleted Document Type. When the deployments go through, all those content nodes would be instantly removed. There is no option to roll back because the Document Type they rely on no longer exists. To prevent such situations, manual deletion is necessary. You must actively decide on each environment for the process to occur.
The main reason not to delete schema and content on deployments is that it could lead to an unrecoverable loss of data.

Here's an example of what can happen when a Document Type is deleted and deployed:

* A Document Type is deleted in the left-most mainline environment.
* This deletion is then pushed to the Live environment, where many content nodes depend on the deleted Document Type.
* When the deployment is completed, all those content nodes would be instantly removed.

In the scenario described above, there is no option to roll back because the Document Type they rely on no longer exists. To prevent such situations, manual deletion is necessary. You must actively decide on each environment for the process to occur. Below is the same scenario explained in more detail.

## Example scenario

Let's say you've deleted a Document Type on your Development environment. Now, you want to deploy this deletion to the Live environment, along with some other changes you've made.
The following example will build in the scenario outlined above, calling the left-most mainline environment the **Development** environment. In addition to the deletion, additional changes that have been made will also be deployed.

Before you deploy the changes, the Development environment will show that the following changes are ready to be deployed:

<figure><img src="../.gitbook/assets/image (42).png" alt=""><figcaption><p>Changes ready for deployment</p></figcaption></figure>

Following the **Activity log** in the browser, you'll notice the UDA file for the Document Type gets deleted. Additionally, other files with changes are copied to the new environment.
Following the **Activity log** in the browser, you'll notice that the `.uda` file for the Document Type gets deleted. Additionally, other files with changes are copied to the Live environment.

Once the deployment is completed, you will notice the following:
Once the deployment is completed, the following changes has taken place:

* The template is correctly updated
* The Document Type you deleted on Development is still present in the backoffice on the Live environment
* The template is correctly updated.
* The Document Type you deleted on the Development environment is still present in the backoffice on the Live environment.

You might wonder why the Document Type that you have deleted, is still there. The reason is, that we only delete the associated UDA file and not the actual Document Type in the database.
The reason for the Document Type to still be there is, that the associated `.uda` file is deleted. The Document Type still exists in the database.

To delete the Document Type from your entire project, you need to delete it from the backoffice of the other environments. When the Document Type has been deleted from the Backoffice of all the environments and no UDA file exists, you can consider it gone.
To delete the Document Type from your entire project, you need to delete it from the backoffice of the other environments. When the Document Type has been deleted from the backoffice of all the environments and no `.uda` file exist, it is fully removed.

You should keep in mind that if you save your Document Type during the process, a UDA file is regenerated. This can recreate your deleted Document Type when deploying changes between environments.
If you save your Document Type during the process, a new `.uda` file is generated. This can recreate your deleted Document Type when deploying changes between environments.

## Which deletions are deployed?

Expand All @@ -41,44 +49,31 @@ Here's an overview of what happens when you deploy deletions to the next environ

### Deleting Schema (Document Types, Datatypes, etc.)

Deleted:

* The associated `.UDA` file

Not deleted:

* The entry in the database
* The item will still be visible in the backoffice
| Deleted | Not Deleted |
| --------------------------- | ------------------------------------------------ |
| The associated `.uda` file. | The entry in the database. |
| | The item will still be visible in the backoffice.|

### Deleting a Template

Deleted:

* The associated `.UDA` file
* The associated `.cshtml` file (the view file)

Not deleted:

* The entry in the database
* The template file will be empty, but still be visible in the backoffice
| Deleted | Not Deleted |
| -------------------------------------------- | ----------------------------------------------------------------------- |
| The associated `.uda` file. | The entry in the database. |
| The associated `.cshtml` file (the view file)| The template file will be empty, but still be visible in the backoffice.|

### Deleting Files (CSS files, config files, etc.)

As these are **only** files, everything will be deleted in the next environment upon deployment.
All files are deleted in the next environment upon deployment.

### Deleting Content and/or Media

Deletions of content and media won't be detected during deployments. You must manually delete them on each environment where removal is desired.

### Deleting Backoffice Languages

Deleted:

* The associated `.UDA` file

Not deleted:

* The entry in the database
* The language will still be visible in the Backoffice/Content dashboard (for multilingual content)
| Deleted | Not Deleted |
| -------------------------- | ------------------------------------------------------------------------------------------------- |
| The associated `.uda` file.| The entry in the database. |
| | The language will still be visible in the Backoffice/Content dashboard (for multilingual content).|

Deleting the language in the backoffice on the target environment will ensure the environments are in sync.
13 changes: 5 additions & 8 deletions umbraco-cloud/deployment/deployment-webhook.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
---
---

# Deployment Webhook

You can now configure a deployment webhook to be triggered upon successful deployments to any of your Umbraco Cloud environments. For example, when deploying from your local environment to your Cloud Development environment. Upon successful deployment, general information about the deployment will be posted in a JSON format to the specific URL you have configured.
You can now configure a deployment webhook to be triggered upon successful deployments to any of your Umbraco Cloud environments. For example, when deploying from your local environment to one of your Cloud environments. Upon successful deployment, general information about the deployment will be posted in a JSON format to the specific URL you have configured.

## Use cases

There are many use cases for deployment webhooks such as providing a detailed audit trail. Here are some scenarios where Webhooks could be useful:
There are many use cases for deployment webhooks such as providing a detailed audit trail. Here are some scenarios where webhooks could be useful:

1. Any deployments to the Live site could be relevant for many parties in a company. Posting information about a deployment in internal communication channels like _Slack_ is made possible using this feature.
2. Monitoring of the whole deployment cycle. A successful deployment might cause an error to show on the website! Integrating the webhook with other monitoring services, you could find out which deployment caused the issue.
1. Any deployments to the Live site could be relevant for many parties in a company. Posting information about a deployment in internal communication channels like Slack is made possible using this feature.
2. Monitoring of the whole deployment cycle. A successful deployment might cause an error to show on the website. Integrating the webhook with other monitoring services, you could find out which deployment caused the issue.
3. Letting content editors know about particular deployments such as when a new Document Type was added. Will inform them that they can now use the new Document Type.

## Configuration steps
## How to set up a webhook

![Adding deployment webhook](images/Post-deployment-webhooks.gif)

Expand Down
Loading