Skip to content

Commit d3239b3

Browse files
authored
Merge pull request #7362 from umbraco/cloud/CleanUp
More cleanup in the Cloud Docs
2 parents b16b8fb + 39eda27 commit d3239b3

File tree

12 files changed

+73
-54
lines changed

12 files changed

+73
-54
lines changed

.github/styles/UmbracoDocs/Acronyms.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ exceptions:
2626
- CDN # Content Delivery Network
2727
- CI # Continuous Integration
2828
- CLI # Command Line Interface
29+
- CNAME #
2930
- CMD # Command (Windows shell)
3031
- CMS # Content Management System
3132
- CPU # Central Processing Unit

umbraco-cloud/build-and-customize-your-solution/handle-deployments-and-environments/umbraco-cicd/v1-umbraco-cloud-api.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ hidden: true
66

77
The Umbraco Cloud API serves as a publicly accessible endpoint that customers can utilize to execute relevant tasks.
88

9-
While its initial focus is on automating and managing deployments in Umbraco Cloud projects via the "Umbraco CI/CD Flow," future enhancements will broaden its capabilities to encompass a wider range of activities and options for Umbraco Cloud users.
10-
119
For the scope of this discussion, we will concentrate solely on the endpoints associated with interactions within the Umbraco CI/CD Flow.
1210

1311
## Getting started
@@ -34,7 +32,9 @@ The two elements to be used for the authentication are:
3432

3533
By including the API key header in your HTTP requests, you ensure secure access to your Umbraco Cloud project's resources.
3634

37-
For enhanced security, it's crucial to store the provided API key in a secure location. Options include a variable group in Azure DevOps or using the Secrets feature in GitHub Actions. It's important to note that each API key is tightly coupled with a specific Umbraco Cloud project and can only be used for deployments related to that project.
35+
For enhanced security, it's crucial to store the provided API key in a secure location. Options include a variable group in Azure DevOps or using the Secrets feature in GitHub Actions.
36+
37+
Each API key is tightly coupled with a specific Umbraco Cloud project and can only be used for deployments related to that project.
3838

3939
### How to authenticate your requests
4040

@@ -64,9 +64,9 @@ curl -s -X GET $url -H "Umbraco-Cloud-Api-Key: $apiKey"
6464

6565
### Create the deployment
6666

67-
The Create Deployment endpoint initiates a new deployment and returns a unique `deploymentId`. This call serves as the initial step in the deployment process. It requires a `projectId` specified in the URL path and a commit message included in the request body. Essentially, this establishes the metadata necessary for initiating the deployment process. If a deployment is already underway, initiating a new one will be possible but should be avoided.
67+
The Create Deployment endpoint initiates a new deployment and returns a unique `deploymentId`. This call serves as the initial step in the deployment process. It requires a `projectId` specified in the URL path and a commit message included in the request body. This establishes the metadata necessary for initiating the deployment process. If a deployment is already underway, initiating a new one will be possible but should be avoided.
6868

69-
To create a deployment, you'll need to make an HTTP POST request. The request body should contain a simple JSON object with the commit message:
69+
To create a deployment, you'll need to make an HTTP POST request. The request body should contain a JSON object with the commit message:
7070

7171
```json
7272
{
@@ -121,25 +121,30 @@ Part of the returned response will be the actual `deploymentId`. The response fr
121121

122122
### Upload zip source file
123123

124-
To deploy content to the Umbraco Cloud repository, you need to perform an HTTP POST request to the Umbraco Cloud API. The deployment content should be packaged as a ZIP file, which must mirror the expected structure of the Umbraco Cloud repository. This ZIP file should include all relevant files such as project and solution files, and compiled frontend code. If your setup includes a frontend project with custom elements, the build artifacts from that project should also be included in the ZIP file, and placed in the appropriate directory within the repository structure.
124+
To deploy content to the Umbraco Cloud repository, you need to perform an HTTP POST request to the Umbraco Cloud API. The deployment content should be packaged as a ZIP file, which must mirror the expected structure of the Umbraco Cloud repository. This ZIP file should include all relevant files such as project and solution files, and compiled frontend code.
125+
126+
If your setup includes a frontend project with custom elements, the build artifacts from that project should be:
127+
128+
* Included in the ZIP file, and
129+
* Placed in the appropriate directory within the repository structure.
125130

126131
The HTTP POST request should be made using the `multipart/form-data` content type. The request URL should incorporate both the `projectId` and `deploymentId` obtained from the previous step in the API path.
127132

128133
The ZIP file must be structured the same way as described in the `Readme.md` included in all cloud projects starting from Umbraco 9. This also means if you need to change the name and/or structure of the project, you should follow the guide in the same Readme.
129134

130-
By adhering to these guidelines, you ensure that the uploaded content is an exact match with what is expected in the Umbraco Cloud repository, facilitating a seamless deployment process.
135+
By adhering to these guidelines, you ensure that the uploaded content is an exact match with what is expected in the Umbraco Cloud repository. You also ensure a seamless deployment process.
131136

132137
The purpose of packaging your content into a ZIP file is to replace the existing content in the Umbraco Cloud repository upon unpackaging. This ensures that the repository is updated with the latest version of your project files.
133138

134139
Make sure your ZIP archive does not contain .git folder. If you're using the `.zipignore` file, you can add the following line `.git/*` to exclude it.
135140

136141
#### A note about .gitignore
137142

138-
Umbraco Cloud environments are using git internally. This means you should be careful about the .gitignore file you add to the package. If you have “git ignored” build js assets locally, you need to handle this so that this is not being ignored in the cloud repository.
143+
Umbraco Cloud environments are using git internally. This means you should be careful about the .gitignore file you add to the package. If you have “git ignored” build JavaScrips assets locally, you need to handle this so that this is not being ignored in the cloud repository.
139144

140-
**Note:** If the `.gitignore` file within the ZIP package does not exclude bin/ and obj/ directories, these will also be committed to the Umbraco Cloud repository.
145+
**Note:** If the `.gitignore` file within the ZIP package does not exclude `bin/` and `obj/` directories, these will also be committed to the Umbraco Cloud repository.
141146

142-
**Best Practice:** If you have frontend assets your local repository's .gitignore file will most likely differ from the one intended for the Umbraco Cloud repository, it's advisable to create a separate .cloud\_gitignore file. Include this file in the ZIP package and rename it to .gitignore before packaging. This ensures that only the necessary files and directories are uploaded and finally committed to the Umbraco Cloud repository.
147+
**Best Practice:** If you have frontend assets, your local repository's `.gitignore` file will most likely differ from the one intended for the Umbraco Cloud repository. It's recommended to create a separate `.cloud\_gitignore` file. Include this file in the ZIP package and rename it to `.gitignore` before packaging. This ensures that only the necessary files and directories are uploaded and finally committed to the Umbraco Cloud repository.
143148

144149
In curl uploading the source file will be:
145150

@@ -153,7 +158,7 @@ curl -s -X POST $url \
153158
--form "file=@$file"
154159
```
155160

156-
The response of this call will be the same deployment object (in JSON) as when creating a new deployment, but the deploymentState should now be 'Pending':
161+
The response of this call will be the same deployment object (in JSON) as when creating a new deployment. The `deploymentState` should now be 'Pending':
157162

158163
```json
159164
{
@@ -171,7 +176,7 @@ The response of this call will be the same deployment object (in JSON) as when c
171176

172177
### Start Deployment
173178

174-
After the source file has been uploaded the deployment can be started. This will queue the deployment in the Umbraco Cloud services which will start the deployment as soon as possible. Starting the deployment is an HTTP PATCH request to the Umbraco Cloud API. `projectId` and the `deploymentId` from the previous step must be included in the path, and the deployment state set to 'Queued' in the request body.
179+
After the source file has been uploaded the deployment can be started. This will queue the deployment in the Umbraco Cloud services which will start the deployment as soon as possible. Starting the deployment is an `HTTP PATCH` request to the Umbraco Cloud API. `projectId` and the `deploymentId` from the previous step must be included in the path, and the deployment state set to 'Queued' in the request body.
175180

176181
In curl starting a deployment will be:
177182

@@ -185,7 +190,7 @@ curl -s -X PATCH $url \
185190
-d "{\"deploymentState\": \"Queued\"}"
186191
```
187192

188-
The response of this call will be the same deployment object (in JSON) as when creating a new deployment, but the deploymentState should now be 'Queued':
193+
The response of this call will be the same deployment object (in JSON) as when creating a new deployment. The deploymentState should now be 'Queued':
189194

190195
```json
191196
{
@@ -203,9 +208,9 @@ The response of this call will be the same deployment object (in JSON) as when c
203208

204209
### Get Deployment status
205210

206-
To monitor the status of a deployment—whether it's completed, successful, or otherwise — you can periodically query the 'Get Deployment Status' API. This API endpoint is an HTTP GET request to the Umbraco Cloud API, and it requires both the `projectId` and the `deploymentId` obtained from previous steps to be included in the path.
211+
To monitor the status of a deployment—whether it's completed, successful, or otherwise — you can periodically query the 'Get Deployment Status' API. This API endpoint is an HTTP GET request to the Umbraco Cloud API. It requires both the `projectId` and the `deploymentId` obtained from previous steps to be included in the path.
207212

208-
Deployments in Umbraco services can take varying amounts of time to complete. Therefore, it's advisable to poll this API at regular intervals to stay updated on the deployment's current state. For example, in a simple project, you might choose to poll the API every 15 seconds for a duration of 15 minutes. These figures are just a starting point; the optimal polling frequency and duration may differ for your specific pipeline. Based on initial experience, a 15-minute window generally suffices, but we welcome your feedback to fine-tune these parameters.
213+
Deployments in Umbraco services can take varying amounts of time to complete. Therefore, it's advisable to poll this API at regular intervals to stay updated on the deployment's current state. For example, you might choose to poll the API every 15 seconds for a duration of 15 minutes. These figures are a starting point; the optimal polling frequency and duration may differ for your specific pipeline. Based on initial experience, a 15-minute window generally suffices, but we welcome your feedback to fine-tune these parameters.
209214

210215
Using a curl command, polling for the deployment status would look like this:
211216

@@ -339,11 +344,11 @@ fi
339344

340345
```
341346

342-
The API response will vary based on whether or not there are changes to report. If no changes are detected, you'll receive an HTTP 204 No Content status. On the other hand, if there are changes, the API will return an HTTP 200 OK status along with a git-patch file as the content. This git-patch file can then be applied to your local repository to sync it with the changes.
347+
The API response will vary based on whether or not there are changes to report. If no changes are detected, you'll receive an HTTP 204 No Content status. If there are changes, the API will return an HTTP 200 OK status along with a git-patch file as the content. This git-patch file can then be applied to your local repository to sync it with the changes.
343348

344349
### Possible errors
345350

346-
When interacting with the Umbraco Cloud API, you may encounter various HTTP status codes that indicate the success or failure of your API request. Below is a table summarizing the possible status codes, their corresponding errors, and basic root causes to guide your troubleshooting:
351+
When interacting with the Umbraco Cloud API, you may encounter HTTP status codes that indicate the success or failure of your API request. Below is a table summarizing the possible status codes, their corresponding errors, and basic root causes to guide your troubleshooting:
347352

348353
| Status Code | Error | Basic Root Cause |
349354
| ----------- | ------------------- | ----------------------------------------------------------------------------------- |

umbraco-cloud/build-and-customize-your-solution/set-up-your-project/databases/backups.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ When restoring a database backup on Umbraco Cloud, certain elements may cause is
1818
* **Complex Database Objects** - Custom complex database objects in SQL is an element with external dependencies or special server configurations, which may result in conflicts when restoring the database in our hosting platform.
1919

2020
{% hint style="info" %}
21-
Restoring a database replaces the existing database with a fresh one containing the restored content. Once a Restore has run, you cannot create database backups with a **Date and Time for snapshot (UTC)** earlier than the time of the Restore-operation. However, any existing backups are still available.
21+
Restoring a database replaces the existing database with a fresh one containing the restored content. Once a Restore has run, you cannot create database backups with a **Date and Time for snapshot (UTC)** going back before the Restore-operation. However, any existing backups are still available.
2222
{% endhint %}
2323

2424
## Backup on Umbraco Cloud
@@ -125,7 +125,7 @@ If a `bacpac` restore fails in SQL server, ensure the 'Contained Database Authen
125125

126126
If it is not set the import will fail.
127127

128-
To Enable Contained Database Authentication, run the following SQL against your SQL server on the Master database.
128+
To Enable Contained Database Authentication, run the following SQL against your SQL server on the main database.
129129

130130
```sql
131131
sp_configure 'contained database authentication', 1;

umbraco-cloud/build-and-customize-your-solution/set-up-your-project/databases/cloud-database/local-database.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ Since Umbraco 10, **SQL CE** is no longer supported, instead, Umbraco now comes
1717

1818
When cloning down your Umbraco project and restoring its content, it will create a `Umbraco.sqlite.db` file in `~/umbraco/Data/Umbraco.sqlite.db`.
1919

20-
To view your local SQLite database, you will need to use a program like [DB Browser for SQLite](https://sqlitebrowser.org/) or a Visual Studio extension like [SQLite and SQL Server Compact Toolbox](https://marketplace.visualstudio.com/items?itemName=ErikEJ.SQLServerCompactSQLiteToolbox).
20+
To view your local SQLite database, you need to use software that supports reading that type of database:
21+
22+
* A program like [DB Browser for SQLite](https://sqlitebrowser.org/)
23+
* A Visual Studio extension like [SQLite and SQL Server Compact Toolbox](https://marketplace.visualstudio.com/items?itemName=ErikEJ.SQLServerCompactSQLiteToolbox)
2124

2225
You can also configure your project to prefer SQL Server LocalDb when it's available on your local machine by enabling the Deploy [`PreferLocalDbConnectionString`](https://docs.umbraco.com/umbraco-deploy/deploy-settings#preferlocaldbconnectionstring) setting.
2326

2427
To configure your database, you can add the connection string in the 'appsettings.json' file. For more information, see the [Configure your database](https://docs.umbraco.com/umbraco-cms/fundamentals/setup/install/unattended-install#configure-your-database) section in the [Unattended Installs](https://docs.umbraco.com/umbraco-cms/fundamentals/setup/install/unattended-install) article.
2528

2629
## Using Custom Tables with Umbraco Cloud
2730

28-
Umbraco Cloud will ensure that your Umbraco-related data is always up to date, but it won't know anything about data in custom tables unless told. This is like any other host when it comes to non-Umbraco data.
31+
Umbraco Cloud ensures that your Umbraco-related data is always up to date, but it won't know anything about data in custom tables. This is like any other host when it comes to non-Umbraco data.
2932

3033
However, you have full access to the SQL Azure databases running on Umbraco Cloud. You can create custom tables like you'd expect on any other hosting provider. The easiest way to do this is to [connect using SQL Management Studio](./#connecting-to-your-cloud-database-locally).
3134

0 commit comments

Comments
 (0)