Skip to content

Document greener region discount #3888

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
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
9 changes: 6 additions & 3 deletions sites/friday/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions sites/friday/src/development/regions.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ For example, to get a list of the regions and their carbon intensities, run the

See all available information in the [API documentation](https://api.platform.sh/docs/#tag/Regions).

### Greener Region Discount

You can get a 3% discount on your resource usage if you host your project in one of Upsun's eco-friendly regions:

- Quebec, Canada (`ca-central-1`),
- Stockholm, Sweden (`eu-north-1`),
- Paris, France (`francecentral`),
- OVH (`gra7`),
- Quincy, Washington (`westus2`),
- Zurich, Switzerland (`europe-west6`).

The 3% discount covers application CPU, application memory, service CPU, service memory, and build resources.
It **doesn’t** apply to the project fee or other billing aspects.
It can be combined with other offers or discounts.

See [more information on the greener region discount](https://platform.sh/company/press/a-first-for-cloud-industry-platformsh-greener-region-discount/).

## Region availability

The regions listed here may be different from those available to you when you create a new project.
Expand Down
4 changes: 4 additions & 0 deletions sites/friday/src/get-started/here/set-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,9 @@ To do so, follow these steps:

{{% vendor/name %}} grabs the previous built images from earlier, applies your resource selections to them, and deploys your full application!

{{% note %}}
If the deployment fails, you may need to set the resources again.
{{% /note %}}

{{< guide-buttons previous="Back" next="Revisions" type="*" >}}

32 changes: 16 additions & 16 deletions sites/friday/src/integrations/activity/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Activity scripts are configured as integrations.
That means they're at the *project level*, not at the level of an individual environment.
While you can store the scripts in your Git repository for access, they have no effect there.

To install a new activity script, use the [{{% vendor/name %}} CLI](/administration/cli/_index.md).
To install a new activity script, use [`integration:add` command](/administration/cli/reference.md#integrationadd) from the [{{% vendor/name %}} CLI](/administration/cli/_index.md).

```bash
{{% vendor/cli %}} integration:add --type script --file ./my_script.js
Expand Down Expand Up @@ -53,9 +53,9 @@ To update an existing activity script, follow these steps:
{{% vendor/cli %}} integration:update --file ./my_script.js {{<variable "SCRIPT_ID" >}}
```

That updates the integration in place, permanently overwriting the previous version.
This [`integration:update` command](/administration/cli/reference.md#integrationupdate) updates the integration in place, permanently overwriting the previous version.

3. Test the activity script update by triggering a redeployment with the following command:
3. Test the activity script update by [triggering a redeployment](/administration/cli/reference.md#environmentredeploy) with the following command:

```bash
{{% vendor/cli %}} redeploy
Expand Down Expand Up @@ -83,7 +83,7 @@ To disable an activity script, follow these steps:
+---------------+--------------+--------------+
```

2. Delete the integration by running the following command:
2. [Delete the integration](/administration/cli/reference.md#integrationdelete) by running the following command:

```bash
{{% vendor/cli %}} integration:delete {{<variable "SCRIPT_ID" >}}
Expand Down Expand Up @@ -117,13 +117,14 @@ That trigger is configurable via command line switches when adding or updating a
For example, to have a script trigger any time an environment is activated or deactivated, run:

```bash
{{% vendor/cli %}} integration:update --events='environment.activate, environment.deactivate' {{<variable "SCRIPT_ID" >}}
{{% vendor/cli %}} integration:update --events='environment.activate,environment.deactivate' {{<variable "SCRIPT_ID" >}}
```

A complete list of possible events is available in the [webhook documentation](/integrations/activity/reference.md).
A complete list of possible events is available in the [Activity script type documentation](/integrations/activity/reference.md#type).
Any of those Activity Script types can be added to the `--events=event1,event2,...` option.

Scripts can also trigger only when an action reaches a given state, such as `pending`, `in_progress`, or `complete`.
The default is only when they reach "complete".
Scripts can also trigger only when an action reaches a [given state](/integrations/activity/reference.md#state), such as `pending`, `in_progress`, `complete`, `cancelled`, or `scheduled`.
The default is only when they reach `complete`.
To have a script execute when a synchronize action first starts, for example, you would run:

```bash
Expand Down Expand Up @@ -157,13 +158,13 @@ inside the `variables` variable.
To add a variable to your activity script at the integration level,
use the following `POST` request:

```
```bash
POST /api/projects/{{< variable "PROJECT_ID" >}}/integrations/{{< variable "INTEGRATION_ID" >}}/variables
```

You get a payload similar to the following:

```
```json
{
"name": "string",
"attributes": {
Expand Down Expand Up @@ -226,15 +227,15 @@ An example of this object is below:
```json
{
"attributes": {},
"created_at": "2020-04-15T19:50:09.514267+00:00",
"created_at": "2024-03-15T19:50:09.514267+00:00",
"default_domain": null,
"description": "",
"id": "kpyhl5f8nuzef",
"id": "azertyuiopqsdfghjklm",
"owner": "...",
"region": "eu-3.{{< vendor/urlraw "host" >}}",
"region": "eu-1.{{< vendor/urlraw "host" >}}",
"repository": {
"client_ssh_key": "ssh-rsa ...",
"url": "kqyhl5f5nuzky@git.eu-3.{{< vendor/urlraw "host" >}}:kqyhl5f5nuzky.git"
"url": "azertyuiopqsdfghjklm@git.eu-1.{{< vendor/urlraw "host" >}}:kqyhl5f5nuzky.git"
},
"status": {
"code": "provisioned",
Expand Down Expand Up @@ -264,7 +265,7 @@ The API is similar to the JavaScript `LocalStorage` API.

```javascript
// Access the storage API.
It isn't pre-required.
// It isn't pre-required.
var storage = require("storage");

// Retrieve a stored value. If the value isn't set it will return null.
Expand Down Expand Up @@ -365,4 +366,3 @@ HMAC(HMAC(HMAC(HMAC("AWS4" + kSecret,"20150830"),"us-east-1"),"iam"),"aws4_reque
```

> Example taken from the [AWS documentation for signing API requests](https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html).

Loading
Loading