Create A Deployment
Creates a new deployment for a specified app. A deployment defines which server configurations (and therefore which images) are being deployed at which location and with how many instances.
We have a flexible system of selecting locations. In your deployment you provide a country and a city. The system will automatically select the best location for you based on the available locations in the selected country and city.
Usage
odin fleet deployments create [--name=IMAGE_NAME] [--deployment-id=DEPLOYMENT_ID][--num-instances=
NUM_INSTANCES] [--country=COUNTRY] [--city=CITY] [payload=JSON_PAYLOAD] [--dry-run]
Examples
Create a new deployment interactively:
Create a new deployment with a specific configuration:
Flags
If you want to create a deployment interactively, you can run the command without any flags. The CLI will prompt you for the required information.
-
--dry-run:
An optional flag that shows the JSON payload that would be sent to the API without actually creating the image. You can use that payload to create the image with the--payloadflag. -
--payload=<string>:
An optional flag that allows you to specify a JSON payload to create the image. This is useful for non-interactive mode and if you want to create an image with a specific configuration.
Instead of providing a JSON payload, you can use the following options to create an image:
--name=<string>:
The name of the image. This is a required option to identify the image.--config-id=<number>:
The ID of the configuration that should be used for the deployment.--num-instances=<number>:
The number of instances that should be deployed.--country=<string>:
The country where the deployment should be created.--city=<string>:
The city where the deployment should be created.
Use the odin fleet locations command to get a list of available locations.
Global Flags
The following flags can be used with any ODIN CLI command:
-
--api-key=<string>The API key to use for authentication. If omitted, the CLI will use the api-key stored in the configuration file on your system. Use odin login to store the API key for subsequent commands. -
--app-id=<string>The ID of the app to use for the command. If omitted, the CLI will use the currently selected app. Use odin apps select to select an app interactively. -
--format=<string>The output format to use for the command. Supported formats arejson,value,flattenedandtable. If omitted, the CLI will use the default format specified in the configuration file. Learn more about output formatting. -
--forceForces the command to execute without prompting for confirmation. Use with caution. -
--quietSuppresses all informational output except for errors. Useful for scripting and automation.