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
> As we do not expose a web server and we do not require features such as auto-scaling, Serverless Jobs are perfect for this use case.
30
35
31
-
Note about Serverless Containers versus Serverless Jobs. As we do not expose a web server and we do not
32
-
require features such as auto-scaling, Serverless Jobs are perfect for this use case.
33
-
34
-
To check if everyting is ok, on the Console you can verify if your tag is present in Container Registry.
36
+
To check if everyting is ok, on the Scaleway Console you can verify if your tag is present in Container Registry.
35
37
36
38
## Step 2: Creating the Job Definition
37
39
@@ -44,25 +46,33 @@ On Scaleway Console on the following link you can create a new Job Definition: h
44
46
1. To schedule your job for example every night at 2am, you can set the cron to `0 2 * * *`.
45
47
1. Important: advanced option, you need to set the following environment variables:
46
48
49
+
> [!TIP]
50
+
> For sensitive data like `SCW_ACCESS_KEY` and `SCW_SECRET_KEY` we recommend to inject them via Secret Manager, [more info here](https://www.scaleway.com/en/docs/serverless/jobs/how-to/reference-secret-in-job/).
51
+
47
52
-`INSTANCE_ID`: grab the instance ID you want to create snapshots from
48
53
-`INSTANCE_ZONE`: you need to give the ZONE of you instance, like `fr-par-2`
49
54
-`SCW_ACCESS_KEY`: your access key
50
55
-`SCW_SECRET_KEY`: your secret key
51
56
-`SCW_DEFAULT_ORGANIZATION_ID`: your organzation ID
52
57
53
-
1. Click "create job"
58
+
* Then click "create job"
54
59
55
60
## Step 3: Run the job
56
61
57
62
On your created Job Definition, just click the button "Run Job" and within seconds it should be successful.
58
63
64
+
## Troubleshooting
65
+
66
+
If your Job Run state goes in error, you can use the "Logs" tab in Scaleway Console to get more informations about the error.
67
+
59
68
# Possible improvements
60
69
61
70
You can exercice by adding the following features:
62
71
63
72
- Instead of managing a single instance, make it account wide
64
73
- Add disk backups
65
74
- Add alerts if something goes wrong
75
+
- Use secret manager instead of job environment variables
0 commit comments