Skip to content

Commit

Permalink
Merge pull request platformsh#3423 from platformsh/preview-environments
Browse files Browse the repository at this point in the history
Preview environments update
  • Loading branch information
chadwcarlson authored Sep 8, 2023
2 parents c876ea2 + a76bd0b commit dd0834d
Show file tree
Hide file tree
Showing 47 changed files with 165 additions and 142 deletions.
9 changes: 5 additions & 4 deletions sites/platform/.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ elixir:
- '1.10'
- '1.9'
supported:
- '1.15'
- '1.14'
- '1.13'
- '1.12'
Expand Down Expand Up @@ -573,18 +574,18 @@ opensearch:
runtime: false
type: opensearch
versions:
deprecated: []
supported:
- '2'
deprecated:
- '1.2'
- '1.1'
supported:
- '2'
- '1'
legacy:
- '1.1'
versions-dedicated-gen-2:
deprecated: []
supported:
- '2.5'
- '2.4'
- '1.2'
versions-dedicated-gen-3:
deprecated: []
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ By default, {{< vendor/name >}} allocates CPU and memory resources to each conta
Some services are optimized for high CPU load, some for high memory load.
If your plan is sufficiently large for bigger containers, you can increase the size of your service container.

Note that service containers in development environments are always set to size `S`.
Note that service containers in preview environments are always set to size `S`.

### 2. Connect the service

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ and are no longer receiving security updates from upstream.

Downgrades of MongoDB aren't supported.
MongoDB updates its own data files to a new version automatically but can't downgrade them.
If you want to experiment with a later version without committing to it use a non-production environment.
If you want to experiment with a later version without committing to it use, a preview environment.

{{< /note >}}

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/mysql/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ If not, make a backup or do a database export before importing.
## Sanitizing data

To ensure people who review code changes can't access personally identifiable information stored in your database,
[sanitize your development environments](../../development/sanitize-db/mariadb.md).
[sanitize your preview environments](../../development/sanitize-db/mariadb.md).

## Replication

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/add-services/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ Taking a backup or a database export before doing so is strongly recommended.
## Sanitizing data

To ensure people who review code changes can't access personally identifiable information stored in your database,
[sanitize your development environments](../development/sanitize-db/postgresql.md).
[sanitize your preview environments](../development/sanitize-db/postgresql.md).

## Multiple databases

Expand Down
16 changes: 9 additions & 7 deletions sites/platform/src/administration/pricing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ choose [another plan](../pricing/_index.md) to go live.
Production environments are the live environments available to your users.
Each Production plan has one Production environment that can be mapped to a [custom domain name](../../domains/steps/_index.md).

The Production environment has more resources than the project's development environments.
The Production environment has more resources than the project's preview environments.
See the main [pricing page](https://platform.sh/pricing) for the resources available per plan for Production environments.

### Development environments
### Preview environments

Development environments can't be mapped to [custom domain names](../../domains/steps/_index.md).
Their resources are separate from Production environments.
Preview environments can't use the same custom domain as a production environment.
Instead, you can set up specific [custom domains for each of your preview environments](../../domains/steps/custom-domains-preview-environments.md).

App containers on development environments default to a size of {{< partial "plans/default-dev-env-size" >}}.
Preview environments use resources that are separate from production environments.

App containers on preview environments default to a size of {{< partial "plans/default-dev-env-size" >}}.
If you have the [manage plans permission](../users.md#organization-permissions),
you can increase the size to match your production environment.
To do so, follow these steps:
Expand Down Expand Up @@ -81,9 +83,9 @@ you're billed around 1/3 of the current price for a full month.
You can add the following extras:

* Users -- for an additional fee per user, except at certain [agency levels](#agencies).
* Environments -- extra staging/development environments can be added in multiples of 3.
* Environments -- extra preview environments can be added in multiples of 3.
* Storage -- extra storage can be added for a fee per 5&nbsp;GB per environment.
So if you have added 3 additional environments for a total of 6 development environments,
So if you have added 3 additional environments for a total of 6 preview environments,
the fee is multiplied by 6.
To ensure environments are available on demand, the fee applies to all environments you have added
even if you aren't currently actively using them.
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/administration/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ An environment type (Production, Staging, and Development) groups one or more en
- Only one environment per project can be of the type: Production.
It is set automatically as the default branch and can't be overridden separately.
- You can change an environment's type (except for the Production environment).
- You can have multiple Staging and Development environments.
- You can have multiple Staging and Development environments (also called [preview environments](../other/glossary.md#preview-environment)).

A user can have one of the following roles on an environment type which grants them permissions on all environments of this type:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Under **Status**, you can check whether or not your environment is [active](../.

![Environment status](/images/management-console/env-status.png "0.5")

For non-Production environments, you can [change their status](../../environments/deactivate-environment.md).
For preview environments, you can [change their status](../../environments/deactivate-environment.md).

### Outgoing emails

Expand Down
14 changes: 7 additions & 7 deletions sites/platform/src/create-apps/app-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ These are used in the format `runtime:version`:

Resources are distributed across all containers in an environment from the total available from your [plan size](../administration/pricing/_index.md).
So if you have more than just a single app, it doesn't get all of the resources available.
Each environment has its own resources and there are different [sizing rules for non-production environments](#sizes-in-non-production-environments).
Each environment has its own resources and there are different [sizing rules for preview environments](#sizes-in-preview-environments).

By default, resource sizes (CPU and memory) are chosen automatically for an app
based on the plan size and the number of other containers in the cluster.
Expand All @@ -88,12 +88,12 @@ To do so, set `size` to one of the following values:

The total resources allocated across all apps and services can't exceed what's in your plan.

### Sizes in non-production environments
### Sizes in preview environments

Containers in development environments don't follow the `size` specification.
Containers in preview environments don't follow the `size` specification.
Application containers are set based on the plan's setting for **Environments application size**.
The default is **{{< partial "plans/default-dev-env-size" >}}**, but you can increase it by editing your plan.
(Service containers in development environments are always set to {{< partial "plans/default-dev-env-size" >}} size.)
(Service containers in preview environments are always set to {{< partial "plans/default-dev-env-size" >}} size.)

## Relationships

Expand Down Expand Up @@ -782,15 +782,15 @@ To run cron jobs in a timezone other than UTC, set the [timezone property](#top-

### Paused crons

Development environments are often used for a limited time and then abandoned.
[Preview environments](../other/glossary.md#preview-environment) ([development type](../other/glossary.md#environment-type)) are often used for a limited time and then abandoned.
While it's useful for environments under active development to have scheduled tasks,
unused environments don't need to run cron jobs.
To minimize unnecessary resource use,
crons on environments with no deployments are paused.

This affects all environments that aren't live environments.
This means all environments on Development plans
and all non-Production environments on higher plans.
and all preview environments on higher plans.

Such environments with deployments within 14 days have crons with the status `running`.
If there haven't been any deployments within 14 days, the status is `paused`.
Expand All @@ -800,7 +800,7 @@ or using the CLI by running `{{% vendor/cli %}} environment:info` and looking un

#### Restarting paused crons

If the crons on your development environment are paused but you're still using them,
If the crons on your preview environment are paused but you're still using them,
you can push changes to the environment or redeploy it.

To restart crons without changing anything:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Change what runs in your hooks depending on the current environment
---

You might have certain commands you want to run only in certain environments.
For example enabling detailed logging in development environments
For example enabling detailed logging in preview environments
or purging your CDN cache for production environments.

The `deploy` and `post_deploy` hooks can access all [runtime environment variables](../../development/variables/use-variables.md#use-provided-variables).
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/create-apps/source-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ The following source operation syncronizes your branch with an upstream Git repo
If there’s a conflict merging from the upstream repository,
the source operation fails and doesn't update from the upstream repository.

Run the `upstream-update` operation on a Development environment rather than directly on Production.
Run the `upstream-update` operation on a preview environment rather than directly on Production.

### Revert to the last commit

Expand Down
16 changes: 8 additions & 8 deletions sites/platform/src/dedicated-gen-2/architecture/development.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
title: "{{< vendor/name >}} development environments"
title: "{{< vendor/name >}} {{% names/dedicated-gen-2 %}} preview environments"
weight: 2
sidebarTitle: "Dev environments"
description: "{{% names/dedicated-gen-2 %}} customers have a development environment for their project that consists of a {{< vendor/name >}} Grid project, typically provisioned by the {{< vendor/name >}} team to reflect the amount of storage in your contract. This environment provides you with all the DevOps, Continuous Integration, Continuous Deployment, and other workflow tooling of the professional product, but segregates the performance impacts from your production hardware."
---

## Architecture (Development Environments)
## Architecture (preview environments)

![{{< vendor/name >}} Professional architecture](/images/dedicated/PS-Arch-NoHA.svg "0.6")

## Default limits

The Development Environment for a {{% names/dedicated-gen-2 %}} project provides `production` and `staging` branches linked to the {{% names/dedicated-gen-2 %}} cluster
{{% names/dedicated-gen-2 %}} projects provide `production` and `staging` branches linked to the {{% names/dedicated-gen-2 %}} cluster
and 3 additional active environments for development.
This number can be increased if needed for an additional fee.

The default storage for {{% names/dedicated-gen-2 %}} contracts is 50GB per environment (production, staging, and each development environment).
This comprises total storage for your project and is inclusive of any databases, uploaded files,
writable application logging directories, search index cores, and so on.
The storage amount for your development environment reflects the amount in your Enterprise contract.
The storage amount dedicated to your preview environments depends on the terms of your Enterprise contract.

A project may have up to six (6) users associated with it at no additional charge.
A project may have up to six users associated with it at no additional charge.
Additional users may be added for an additional fee.
These users have access to both the Development environment and the {{% names/dedicated-gen-2 %}} cluster.
These users have access to both the preview environments and the {{% names/dedicated-gen-2 %}} cluster.

## Larger developments environments
## Larger preview environments

By default, all containers in development environments are {{< partial "plans/default-dev-env-size" >}} sized, as they have limited traffic needs.
By default, all containers in preview environments are {{< partial "plans/default-dev-env-size" >}} sized, as they have limited traffic needs.
For more resource-intensive applications this size can be increased for an additional fee.
8 changes: 4 additions & 4 deletions sites/platform/src/define-routes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ And you can use an absolute URL:

In both cases, the URLs for your Production environment are the same.

#### URLs in non-Production environments
#### URLs in preview environments

URLs in non-Production environments follow a different pattern.
URLs in preview environments follow a different pattern.

No matter how you have set your default domain (even if you don't have one),
using either the absolute URL or the `{default}` placeholder results in the same URL.
Expand All @@ -160,7 +160,7 @@ Note that the `example.com` prefix isn't part of the generated URL.

{{< note title="Previous behavior" >}}

Before April 7, 2022, URLs in non-Production environments differed depending on whether or not you used the `{default}` placeholder.
Before April 7, 2022, URLs in preview environments differed depending on whether or not you used the `{default}` placeholder.

If you used the `{default}` placeholder:

Expand Down Expand Up @@ -241,7 +241,7 @@ Prefix a route with an asterisk (`*`), for example `*.{default}`.
If you have configured `example.com` as your default domain,
HTTP requests to `www.example.com`, `blog.example.com`, and `us.example.com` are all routed to the same endpoint.

It also works on development environments.
It also works on preview environments.
If you have a `feature` branch, it's `{default}` domain looks something like:
`feature-def123-vmwklxcpbi6zq.us.platform.sh` (depending on the project's region).
So requests to `blog.feature-def123-vmwklxcpbi6zq.us.platform.sh` and `us.feature-def123-vmwklxcpbi6zq.eu.platform.sh`
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/development/email.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The SMTP proxy is intended as a zero-configuration, best-effort service.

{{< note >}}

All non-production environments are limited to 12,000 email credits per calendar month.
All preview environments are limited to 12,000 email credits per calendar month.

{{< /note >}}

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/development/sanitize-db/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Sanitize databases
description: Remove sensitive information from databases on non-production environments to control access.
description: Remove sensitive information from databases on preview environments to control access.
layout: list
toc: false
keywords:
Expand Down
4 changes: 2 additions & 2 deletions sites/platform/src/development/sanitize-db/mariadb.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Sanitizing databases: MariaDB and Drupal"
sidebarTitle: MariaDB and Drupal
description: Sanitize MariaDB data in non-production environments directly or by using Drush.
description: Sanitize MariaDB data in preview environments directly or by using Drush.
layout: list
---

Expand All @@ -23,7 +23,7 @@ title=With Drupal and Drush

To sanitize your database and get rid of sensitive, live information, use the `drush sql:sanitize` command.
Add your script to sanitize the database to [a `deploy` hook](../../create-apps/hooks/hooks-comparison.md#deploy-hook)
for non-production environments:
for preview environments:

```yaml {configFile="app"}
hooks:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Sanitizing databases: PostgreSQL and Symfony"
sidebarTitle: PostgreSQL and Symfony
description: Sanitize PostgreSQL data in non-production environments for Symfony apps.
description: Sanitize PostgreSQL data in preview environments for Symfony apps.
layout: list
---

Expand Down Expand Up @@ -122,7 +122,7 @@ Set up a script by following these steps:
```

Push the changes to `staging` and verify that environment's database was sanitized.
Once merged to production, all data from future non-production environments are sanitized on environment creation.
Once merged to production, all data from future preview environments are sanitized on environment creation.

<--->
+++
Expand All @@ -146,7 +146,7 @@ Set up a script by following these steps:
3. Make the script sanitize environments with an [environment type](../../administration/users.md#environment-type-roles)
other than `production`.

The following example runs only in non-production environments
The following example runs only in preview environments
and sanitizes data using the Symfony Command from previous tab, already pushed to all of your environments.

```bash {location="sanitize_fleet.sh"}
Expand Down Expand Up @@ -286,7 +286,7 @@ You can find the organization identifier for a specific project, within the {{<
```

Push the changes to `staging` and verify that environment's database was sanitized.
Once merged to production, all data from future non-production environments are sanitized on environment creation.
Once merged to production, all data from future preview environments are sanitized on environment creation.

{{< /codetabs >}}

Expand Down
6 changes: 3 additions & 3 deletions sites/platform/src/development/sanitize-db/postgresql.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Sanitizing databases: PostgreSQL and Django"
sidebarTitle: PostgreSQL and Django
description: Sanitize PostgreSQL data in non-production environments for Django apps.
description: Sanitize PostgreSQL data in preview environments for Django apps.
layout: list
---

Expand Down Expand Up @@ -49,7 +49,7 @@ Set up a script by following these steps:
3. Make the script sanitize environments with an [environment type](../../administration/users.md#environment-type-roles)
other than `production`.

The following example runs only in non-production environments
The following example runs only in preview environments
and sanitizes the `display_name` and `email` columns of the `users` table.
Adjust the details to fit your data.

Expand Down Expand Up @@ -93,7 +93,7 @@ Set up a script by following these steps:
```

Push the changes to `staging` and verify that environment's database was sanitized.
Once merged to production, all data from future non-production environments are sanitized on environment creation.
Once merged to production, all data from future preview environments are sanitized on environment creation.
{{< /codetabs >}}
Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/development/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Typical causes and potential solutions include:

## Site outage

If you can't access some part of your project, whether it's the live site, development environment, or Console,
If you can't access some part of your project, whether it's the live site, a preview environment, or the Console,
check the [{{< vendor/name >}} status page](https://status.platform.sh/).
There you can see planned maintenance and subscribe to updates for any potential outages.

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/development/variables/set-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Environment variables are a good place to store values that apply only on {{< ve
This includes API credentials for third-party services, mode settings, and which server (development vs. production) to use.

One example would be to define a Node.js application's build on a production branch (`NODE_ENV=production`),
but use development mode (`NODE_ENV=development`) for each of your development environments.
but use development mode (`NODE_ENV=development`) for each of your preview environments.
Assuming you have a `main` environment for production and a `staging` environment with more child environments for development,
run the following commands:

Expand Down
2 changes: 1 addition & 1 deletion sites/platform/src/domains/steps/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ layout: single
Once your project is ready for production, replace the automatically generated domain with your own custom domain.

Note that adding a domain disables the automatically generated URL for your Production environment only.
If you are an Enterprise or Elite customer and have a Grid or {{% names/dedicated-gen-3 %}} project, you can [customize the URLs for your non-production environments](/domains/steps/custom-non-production-domains).
If you are an Enterprise or Elite customer and have a Grid or {{% names/dedicated-gen-3 %}} project, you can [customize the URLs for your preview environments](/domains/steps/custom-domains-preview-environments).
{{% names/dedicated-gen-2 %}} customers can also customize the domain for their Staging environment.

## Before you begin
Expand Down
Loading

0 comments on commit dd0834d

Please sign in to comment.