diff --git a/pages/serverless-containers/how-to/deploy-container.mdx b/pages/serverless-containers/how-to/deploy-container.mdx index 2df1d85dca..2ad27f4fd0 100644 --- a/pages/serverless-containers/how-to/deploy-container.mdx +++ b/pages/serverless-containers/how-to/deploy-container.mdx @@ -30,22 +30,34 @@ You can deploy a container from the [Scaleway Container Registry](/container-reg 1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays. 2. Click the relevant container's namespace. 3. Click **Deploy container**. The container creation wizard displays. -4. Complete the following steps in the wizard: - - Select the **Scaleway** Container Registry. - - Choose an [image](/serverless-containers/concepts/#container-image) from your Container Registry. - - Select the required Container Registry namespace from the drop-down list, and then select the container and tag. - - Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the `$PORT` environment variable. - - Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes. - - Choose the **resources** to be allocated to your container at runtime. These define the performance characteristics of your container. - - Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory. - -5. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences: + +### Container image configuration + +1. Select the **Scaleway** Container Registry. + +2. Choose an [image](/serverless-containers/concepts/#container-image) from your Container Registry. + +3. Select the required Container Registry namespace from the drop-down list, then select the container and tag. + +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. + +5. Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes. + +### Container resources and scaling + +1. Choose the **CPU** resources to be allocated to your container at runtime. + +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. +3. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences: - **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. - **CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load. - **RAM percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used. -6. In the **Advanced options** section, set the following: - + +### Container advanced options + +In the **Advanced options** section, set the following: + + - 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. - 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 - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. - -7. Verify the **estimated cost**. -8. Click **Deploy container** to finish. + + +### Container cost and validation + +1. Update the **Number of requests** and **Average request duration** fields to simulate the behavior of your function. + +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. + +3. Click **Create function** to finish. ## Deploy from an external container registry @@ -92,23 +110,33 @@ Private external container registries are currently not supported. 1. Click **Containers** in the **Serverless** section of the side menu. The containers page displays. 2. Click the relevant container's namespace. 3. Click **Deploy container**. The container creation wizard displays. -4. Complete the following steps in the wizard: - - Select the **External** container registry. - - Enter the public container **image URL** provided by the external registry. For example: + +### Container image configuration + +1. Select the **External** Container Registry. + +2. Enter the public container **image URL** provided by the external registry. For example: - `nginx:latest` to deploy the latest nginx image from [Docker Hub](https://hub.docker.com/) - `ghcr.io/namespace/image` to deploy an image from [GitHub Container Registry](https://github.com/features/packages) - - Choose the [port](/serverless-containers/concepts/#port) your container is listening on. We recommend configuring your container to listen on the `$PORT` environment variable. - - Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes. - - Choose the **resources** to be allocated to your container at runtime. These define the performance characteristics of your container. - - Available memory depends on allocated vCPU, and the maximum ephemeral storage value depends on allocated memory. - -5. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences: +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. + +4. Choose a **name** for your container and, optionally, a **description**. The name must only contain alphanumeric characters and dashes. + +### Container resources and scaling + +1. Choose the **CPU** resources to be allocated to your container at runtime. + +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. +3. Set your [autoscaling](/serverless-containers/concepts/#autoscaling) preferences: - **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. - **CPU percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the CPU load. - **RAM percentage**: your container automatically scales up/down within the minimum and maximum values entered based on the RAM used. -6. In the **Advanced options** section, set the following: - + +### Container advanced options + +In the **Advanced options** section, set the following: + + - 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. - 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. - Modify the [ephemeral storage](/serverless-containers/concepts/#ephemeral-storage) according to your needs. - + 7. Verify the **estimated cost**. 8. Click **Deploy container** to finish. diff --git a/pages/serverless-functions/how-to/create-a-function.mdx b/pages/serverless-functions/how-to/create-a-function.mdx index 6f6b2a42a7..c71df2184f 100644 --- a/pages/serverless-functions/how-to/create-a-function.mdx +++ b/pages/serverless-functions/how-to/create-a-function.mdx @@ -56,28 +56,31 @@ This page shows you how to deploy a [function](/serverless-functions/concepts/#s Define a minimum of **one instance** or more to avoid [cold starts](/serverless-functions/concepts/#cold-start). -### Function advanced options (optional) - -1. Click **+ Advanced options**. - -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. - -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. - - - Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. - - -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**). - -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. - -6. Set the desired timeout for your function. - -7. Choose the desired **Sandbox** environment for your function. - - [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. - +### Function advanced options + +In the **Advanced options** section, set the following: + + + + - 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. + - 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. + + Encode your environment variables and secrets to `base64` if they are too large, and contain carriage returns. + + + + - 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**). + - 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. + + + - Set a custom [timeout](/serverless-functions/concepts/#request-timeout) for the duration of the requests received by your function. + + + - Select a [sandbox](/serverless-functions/concepts/#sandbox) version: + - Sandbox v2 for shorter cold starts (recommended). + - Sandbox v1 if you require full compatibility with the Linux system call interface (legacy). + + ### Function cost and validation