-
Notifications
You must be signed in to change notification settings - Fork 267
docs(srv): jobs commands and args MTA-6609 #6000
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SamyOubouaziz
wants to merge
4
commits into
main
Choose a base branch
from
MTA-6609
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
pages/serverless-jobs/how-to/migrate-startup-command-to-command-args.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,70 @@ | ||||||
| --- | ||||||
| title: How to migrate from startup command to command and arguments | ||||||
| description: How to migrate from the legacy startup command system to the modern commands and arguments for Scaleway Serverless Jobs. | ||||||
| tags: containers | ||||||
| dates: | ||||||
| validation: 2025-12-23 | ||||||
| posted: 2025-12-23 | ||||||
| --- | ||||||
|
|
||||||
| import Requirements from '@macros/iam/requirements.mdx' | ||||||
|
|
||||||
| The Serverless Jobs `v1alpha2` API introduces a new startup execution mechanism based on [commands and arguments](/serverless-containers/concepts/#commands-and-arguments), replacing the legacy startup command. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| The Scaleway console allows you to quickly and easily migrate your existing jobs to the new system. | ||||||
|
|
||||||
| <Requirements /> | ||||||
|
|
||||||
| - A Scaleway account logged into the [console](https://console.scaleway.com) | ||||||
| - [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization | ||||||
| - An existing job that uses a startup command | ||||||
|
|
||||||
| ## How to migrate from startup command to commands and arguments | ||||||
|
|
||||||
| 1. Click **Jobs** in the **Serverless** section of the side menu. The jobs page displays. | ||||||
|
|
||||||
| 2. Click the name of the job you want to manage, then click the **Settings** tab. | ||||||
|
|
||||||
| 3. Scroll down to the **Configure advanced options**, then click the **Execution** tab. | ||||||
|
|
||||||
| 4. Click the **Upgrade** button. A pop-up displays. | ||||||
|
|
||||||
| 5. Split your existing startup command into a command (which corresponds to the `ENTRYPOINT` Docker instruction), and arguments (which correspond to the `CMD` Docker instruction). | ||||||
|
|
||||||
| 6. Click **Upgrade to the new format** to finish. | ||||||
|
|
||||||
| Your Serverless Job now uses the command and arguments mechanism. | ||||||
|
|
||||||
| ## Migration examples | ||||||
|
|
||||||
| ### Simple command | ||||||
|
|
||||||
| **Legacy startup command** | ||||||
|
|
||||||
| ```bash | ||||||
| sleep 60s | ||||||
| ``` | ||||||
|
|
||||||
| **Corresponding command and arguments** | ||||||
|
|
||||||
| ```yaml | ||||||
| command: [sleep] | ||||||
| args: [60s] | ||||||
| ``` | ||||||
|
|
||||||
| ### Complex command | ||||||
|
|
||||||
| **Legacy startup command** | ||||||
|
|
||||||
| ```bash | ||||||
| /app/migrate up --database "$DB_URL" --password "$DB_PASSWORD" --port 3002 | ||||||
| ``` | ||||||
|
|
||||||
| **Corresponding command and arguments** | ||||||
|
|
||||||
| ```yaml | ||||||
| command: [/app/migrate] | ||||||
| args: [up, --database, "$(DB_URL)", --password, "$(DB_PASSWORD)", --port, 3002] | ||||||
| ``` | ||||||
|
|
||||||
| Refer to the [official Kubernetes documentation](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/) for more information on command and arguments behavior and syntax. | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.