Skip to content

Commit 880450b

Browse files
docs(SRV): hamonize create function/container layout MTA-5869 (#4794)
* docs(SRV): hamonize create function/container layout MTA-5869 * Update pages/serverless-containers/how-to/deploy-container.mdx Co-authored-by: Néda <[email protected]> * Update pages/serverless-containers/how-to/deploy-container.mdx Co-authored-by: Néda <[email protected]> --------- Co-authored-by: Néda <[email protected]>
1 parent 7fd30a0 commit 880450b

File tree

2 files changed

+82
-51
lines changed

2 files changed

+82
-51
lines changed

Diff for: pages/serverless-containers/how-to/deploy-container.mdx

+57-29
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,34 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg
3030
1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays.
3131
2. Click the relevant container's namespace.
3232
3. Click **Deploy container**. The container creation wizard displays.
33-
4. Complete the following steps in the wizard:
34-
- Select the **Scaleway** Container Registry.
35-
- Choose an [image](/serverless-containers/concepts/#container-image) from your Container Registry.
36-
- Select the required Container Registry namespace from the drop-down list, and then select the container and tag.
37-
- Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the `$PORT` environment variable.
38-
- Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes.
39-
- Choose the **resources** to be allocated to your container at runtime. These define the performance characteristics of your container.
40-
<Message type="note">
41-
Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
42-
</Message>
43-
5. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences:
33+
34+
### Container image configuration
35+
36+
1. Select the **Scaleway** Container Registry.
37+
38+
2. Choose an [image](/serverless-containers/concepts/#container-image) from your Container Registry.
39+
40+
3. Select the required Container Registry namespace from the drop-down list, then select the container and tag.
41+
42+
4. Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the `$PORT` environment variable.
43+
44+
5. Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes.
45+
46+
### Container resources and scaling
47+
48+
1. Choose the **CPU** resources to be allocated to your container at runtime.
49+
50+
2. Choose the amount of **memory** to be allocated to your container. Available memory options depend on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
51+
3. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences:
4452
- **Request concurrency**: your container automatically scales up/down within the minimum and maximum values entered based on the number of concurrent requests received on each active instance of your container.
4553
- **CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
4654
- **RAM percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used.
47-
6. In the **Advanced options** section, set the following:
48-
<Tabs>
55+
56+
### Container advanced options
57+
58+
In the **Advanced options** section, set the following:
59+
60+
<Tabs>
4961
<TabsTab label="Data">
5062
- Declare [environment variables](/serverless-containers/concepts/#environment-variables) you want to inject into your container. For each environment variable, click **+Add variable** and enter the key/value pair.
5163
- Declare [secrets](/serverless-containers/concepts/#secrets) for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
@@ -75,9 +87,15 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg
7587
<TabsTab label="Storage">
7688
- Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
7789
</TabsTab>
78-
</Tabs>
79-
7. Verify the **estimated cost**.
80-
8. Click **Deploy container** to finish.
90+
</Tabs>
91+
92+
### Container cost and validation
93+
94+
1. Update the **Number of requests** and **Average request duration** fields to simulate the behavior of your function.
95+
96+
2. Verify the **estimated cost**. Refer to the [Serverless Functions pricing](/serverless-functions/faq/#how-am-i-billed-for-serverless-functions) for more information on how billing works.
97+
98+
3. Click **Create function** to finish.
8199

82100
## Deploy from an external container registry
83101

@@ -92,23 +110,33 @@ Private external container registries are currently not supported.
92110
1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays.
93111
2. Click the relevant container's namespace.
94112
3. Click **Deploy container**. The container creation wizard displays.
95-
4. Complete the following steps in the wizard:
96-
- Select the **External** container registry.
97-
- Enter the public container **image URL** provided by the external registry. For example:
113+
114+
### Container image configuration
115+
116+
1. Select the **External** Container Registry.
117+
118+
2. Enter the public container **image URL** provided by the external registry. For example:
98119
- `nginx:latest` to deploy the latest nginx image from [Docker Hub](https://hub.docker.com/)
99120
- `ghcr.io/namespace/image` to deploy an image from [GitHub Container Registry](https://github.com/features/packages)
100-
- Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the `$PORT` environment variable.
101-
- Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes.
102-
- Choose the **resources** to be allocated to your container at runtime. These define the performance characteristics of your container.
103-
<Message type="note">
104-
Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
105-
</Message>
106-
5. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences:
121+
3. Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the `$PORT` environment variable.
122+
123+
4. Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes.
124+
125+
### Container resources and scaling
126+
127+
1. Choose the **CPU** resources to be allocated to your container at runtime.
128+
129+
2. Choose the amount of **memory** to be allocated to your container. Available memory options depend on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory.
130+
3. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences:
107131
- **Request concurrency**: your container automatically scales up/down within the minimum and maximum values entered based on the number of concurrent requests received on each active instance of your container.
108132
- **CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
109133
- **RAM percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used.
110-
6. In the **Advanced options** section, set the following:
111-
<Tabs>
134+
135+
### Container advanced options
136+
137+
In the **Advanced options** section, set the following:
138+
139+
<Tabs>
112140
<TabsTab label="Data">
113141
- Declare [environment variables](/serverless-containers/concepts/#environment-variables) you want to inject into your container. For each environment variable, click **+Add variable** and enter the key/value pair.
114142
- Declare [secrets](/serverless-containers/concepts/#secrets) for your container. Secrets are environment variables that are injected into your container, but the values are not retained or displayed by Scaleway after initial validation.
@@ -138,6 +166,6 @@ Private external container registries are currently not supported.
138166
<TabsTab label="Storage">
139167
- Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
140168
</TabsTab>
141-
</Tabs>
169+
</Tabs>
142170
7. Verify the **estimated cost**.
143171
8. Click **Deploy container** to finish.

Diff for: pages/serverless-functions/how-to/create-a-function.mdx

+25-22
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,31 @@ This page shows you how to deploy a [function](/serverless-functions/concepts/#s
5656
Define a minimum of **one instance** or more to avoid [cold starts](/serverless-functions/concepts/#cold-start).
5757
</Message>
5858

59-
### Function advanced options (optional)
60-
61-
1. Click **+ Advanced options**.
62-
63-
2. Define any **environment variables** you want to inject into your function. For each environment variable, click **+ Add variable** and enter the key/value pair.
64-
65-
3. Define any **Secrets** you want to inject into your function. For each secret, click **+ Add secret** and enter the key/value pair. Secrets are environment variables which are injected into your function and stored securely, but not displayed in the console after initial validation.
66-
67-
<Message type="note">
68-
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
69-
</Message>
70-
71-
4. Set the desired **privacy policy** for your function. This defines whether a function can be executed anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-functions/#authentication) (**private**).
72-
73-
5. Tick the box under **HTTPS connections only** to prevent your function from being called from insecure HTTP connections. All HTTP traffic will be redirected to HTTPS.
74-
75-
6. Set the desired timeout for your function.
76-
77-
7. Choose the desired **Sandbox** environment for your function.
78-
<Message type="note">
79-
[Triggers](/serverless-functions/concepts/#trigger) can no longer be added from this screen. For more information, refer to the [How to add a trigger to a function](/serverless-functions/how-to/add-trigger-to-a-function/) documentation.
80-
</Message>
59+
### Function advanced options
60+
61+
In the **Advanced options** section, set the following:
62+
63+
<Tabs>
64+
<TabsTab label="Data">
65+
- Declare [environment variables](/serverless-functions/concepts/#environment-variables) you want to inject into your function. For each environment variable, click **+Add variable** and enter the key/value pair.
66+
- Declare [secrets](/serverless-functions/concepts/#secrets) for your function. Secrets are environment variables that are injected into your function, but the values are not retained or displayed by Scaleway after initial validation.
67+
<Message type="note">
68+
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
69+
</Message>
70+
</TabsTab>
71+
<TabsTab label="Security">
72+
- Set the desired [privacy policy](/serverless-functions/concepts/#privacy-policy) for your function. This defines whether function invocation may be done anonymously (**public**) or only via an authentication mechanism provided by the [Scaleway API](https://www.scaleway.com/en/developers/api/serverless-functions/#authentication) (**private**).
73+
- Tick the box under **HTTPS connections only** to prevent your function from being called from insecure HTTP connections. All HTTP traffic will be redirected to HTTPS.
74+
</TabsTab>
75+
<TabsTab label="Requests">
76+
- Set a custom [timeout](/serverless-functions/concepts/#request-timeout) for the duration of the requests received by your function.
77+
</TabsTab>
78+
<TabsTab label="Performances">
79+
- Select a [sandbox](/serverless-functions/concepts/#sandbox) version:
80+
- Sandbox v2 for shorter cold starts (recommended).
81+
- Sandbox v1 if you require full compatibility with the Linux system call interface (legacy).
82+
</TabsTab>
83+
</Tabs>
8184

8285
### Function cost and validation
8386

0 commit comments

Comments
 (0)