You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/serverless-containers/how-to/deploy-container.mdx
+57-29
Original file line number
Diff line number
Diff line change
@@ -30,22 +30,34 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg
30
30
1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays.
31
31
2. Click the relevant container's namespace.
32
32
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
-
<Messagetype="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:
44
52
-**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.
45
53
-**CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
46
54
-**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>
49
61
<TabsTablabel="Data">
50
62
- 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.
51
63
- 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
75
87
<TabsTablabel="Storage">
76
88
- Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
77
89
</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.
81
99
82
100
## Deploy from an external container registry
83
101
@@ -92,23 +110,33 @@ Private external container registries are currently not supported.
92
110
1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays.
93
111
2. Click the relevant container's namespace.
94
112
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:
98
119
-`nginx:latest` to deploy the latest nginx image from [Docker Hub](https://hub.docker.com/)
99
120
-`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
-
<Messagetype="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:
107
131
-**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.
108
132
-**CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load.
109
133
-**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>
112
140
<TabsTablabel="Data">
113
141
- 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.
114
142
- 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.
138
166
<TabsTablabel="Storage">
139
167
- Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs.
Copy file name to clipboardExpand all lines: pages/serverless-functions/how-to/create-a-function.mdx
+25-22
Original file line number
Diff line number
Diff line change
@@ -56,28 +56,31 @@ This page shows you how to deploy a [function](/serverless-functions/concepts/#s
56
56
Define a minimum of **one instance** or more to avoid [cold starts](/serverless-functions/concepts/#cold-start).
57
57
</Message>
58
58
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
-
<Messagetype="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
-
<Messagetype="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
+
<TabsTablabel="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
+
<Messagetype="note">
68
+
Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns.
69
+
</Message>
70
+
</TabsTab>
71
+
<TabsTablabel="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
+
<TabsTablabel="Requests">
76
+
- Set a custom [timeout](/serverless-functions/concepts/#request-timeout) for the duration of the requests received by your function.
77
+
</TabsTab>
78
+
<TabsTablabel="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).
0 commit comments