How to create a job
This page shows you how to create Serverless Jobs using the Scaleway console.
You can create a job from the Scaleway Container Registry, or any other public container registry, such as Docker Hub, AWS Container registries, GitLab container registry, etc.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Created a Container Registry namespace and pushed a container image to it
Create a job from the Scaleway Container Registry
Scaleway's Serverless Jobs allows you to create jobs from several container registries, including the Scaleway Container Registry which allows you to store, secure and manage all your custom container images effortlessly.
-
Click Jobs in the Serverless section of the side menu. The jobs page displays.
-
Click Create job. The job creation wizard displays.
Job configuration
-
Select the Scaleway Container Registry.
-
Select the required Container Registry namespace from the drop-down list, and then select the container image and tag.
-
Enter a name or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes.
-
Select the region in which your job will be created.
Job resources and scaling
-
Select the resources to allocate to your job at runtime. These define the performance characteristics of your job.
-
Add a cron schedule in the
* * * * *
format, and select your time zone to run your job periodically. Refer to the cron schedules documentation for more information.
Job advanced options
- Declare environment variables you want to inject into your job. For each environment variable, click +Add variable and enter the key/value pair.
- Add secrets references for your Job. Secret references are environment variables fetched from Scaleway Secret Manager that are injected into your job, but the values are not retained or displayed by Scaleway after initial validation.
- Customize the ephemeral storage for your job according to your requirements. The data stored in your job is not retained once it is finished.
- Add a startup command to your job. It will be executed every time your job is run.
- Set a maximum duration to your job to stop it automatically if it does not complete within this limit.
Job creation and execution
-
Verify the estimated cost.
-
Click Create a job definition to finish. You are directed to the listing of your Serverless Jobs.
-
Click the name of the job you just created. The Overview tab displays.
-
Click Run job to execute it.
The execution appears in the Job runs section of the Overview tab.
Create a job from an external container registry
Scaleway Serverless Jobs allows you to create jobs from external public container registries, such as Docker Hub, AWS container registries, GitLab container registry, etc.
Private external container registries are currently not supported.
-
Click Jobs in the Serverless section of the side menu. The jobs page displays.
-
Click Create job. The job creation wizard displays.
Job configuration
-
Select the external container registry.
-
Enter the public container image URL provided by the external registry, such as
docker.io/alpine:latest
. -
Enter a name or use the automatically generated one. The name can only contain lowercase alphanumeric characters and dashes.
-
Select the region in which your job will be created.
Job resources and scaling
-
Select the resources to allocate to your job at runtime. These define the performance characteristics of your job.
-
Add a cron schedule in the
* * * * *
format, and select your time zone to run your job periodically. Refer to the cron schedules documentation for more information.
Job advanced options
- Declare environment variables you want to inject into your job. For each environment variable, click +Add variable and enter the key/value pair.
- Add secrets references for your Job. Secret references are environment variables fetched from Scaleway Secret Manager that are injected into your job, but the values are not retained or displayed by Scaleway after initial validation.
- Customize the ephemeral storage for your job according to your requirements. The data stored in your job is not retained once it is finished.
- Add a startup command to your job. It will be executed every time your job is run.
- Set a maximum duration to your job to stop it automatically if it does not complete within this limit.
Job creation and execution
-
Verify the estimated cost.
-
Click Create a job definition to finish. You are directed to the listing of your Serverless Jobs.
-
Click the name of the job you just created. The Overview tab displays.
-
Click Run job to execute it.
The execution appears in the Job runs section of the Overview tab.