Command-line Interface
daeploy
Command-line tool for Daeploy. Initialize a new project, deploy services, list them and kill them in a convenient package.
- Arguments:
context (Context): Callback context. version (bool): If asking for the version of SDK and manager.
- Returns:
None
daeploy [OPTIONS] COMMAND [ARGS]...
Options
- --version
Show version of the SDK and the Manager
- --install-completion <install_completion>
Install completion for the specified shell.
- Options
bash | zsh | fish | powershell | pwsh
- --show-completion <show_completion>
Show completion for the specified shell, to copy it or customize the installation.
- Options
bash | zsh | fish | powershell | pwsh
assign
Change main version of a service.
- Args:
name (str): Name of the service to change to primary. version (str): Version of the service to change to primary. validation (bool, optional): Give confirmation to assign service.
Skips prompt, use with caution.
- Raises:
Exit: If the user does not validate the assign.
daeploy assign [OPTIONS] NAME VERSION
Options
- --yes
Give confirmation to assign service. Skips prompt, use with caution.
- Default
False
Arguments
- NAME
Required argument
- VERSION
Required argument
deploy
Deploy a new service.
- Args:
name (str): Name of the new service. version (str): Version of the new service. source (str): Path to the source of the service. port (int, optional): Internal port for the service. envvars (List[str], optional): List of environment variable
key-value strings. Default None
- build_image (str, optional): S2I build image to use when building
the service image. Default None
- image_flag (bool, optional): Indicate that an image is
being used for creating the service. Default False.
- local_image_flag (bool, optional): Indicate that a local image
is being used for creating the service. Default False.
- git_flag (bool, optional): Indicate that a git repository
is being used for creating the service. Default False.
- Raises:
- Exit: If given an invalid path or user specifies both the -i
and the -g option.
daeploy deploy [OPTIONS] NAME VERSION SOURCE
Options
- -p, --port <port>
Internal port for the service.
- Default
8000
- -e, --environment <envvars>
Set an environment variable in the service as NAME=VALUE
- --build-image <build_image>
S2I build image to use when building the service image
- -i, --image
Deploy service from an docker image.
- Default
False
- -I, --image-local
Deploy service from a local docker image (requires docker installation).
- Default
False
- -g, --git
Deploy service from a git repository URL.
- Default
False
Arguments
- NAME
Required argument
- VERSION
Required argument
- SOURCE
Required argument
init
Generates skeleton code for a new Daeploy project.
- Args:
path (Path, optional): Project generation output directory. project_name (str, optional): Name of the project to skip prompt.
- Raises:
Exit: If the output directory could not be found
daeploy init [OPTIONS] [PATH]
Options
- -n, --name <project_name>
Name of the project to skip prompt.
Arguments
- PATH
Optional argument
kill
Kill one or multiple services by name and version.
- Args:
name (str, optional): Name of the service(s) to kill. Defaults to None. version (str, optional): Version of the service to kill. Defaults to None. all_ (bool, optional): Kill all services. Defaults to False. validation (bool, optional): Give confirmation to kill services at runtime.
Skips prompt, use with caution. Defaults to False.
keep_image (bool, optional): Keep the image(s) of the killed service(s).
- Raises:
Exit: If there are no services to kill matching the given description.
daeploy kill [OPTIONS] [NAME] [VERSION]
Options
- -a, --all
Kill all services
- Default
False
- --yes
Give confirmation to kill services. Skips prompt, use with caution.
- Default
False
- -i, --keep-image
Keep the image(s) of the killed service(s). Might result in dangling images.
- Default
False
Arguments
- NAME
Optional argument
- VERSION
Optional argument
login
Log in to the specified host.
- Args:
- host (str, optional): Host address to log in to. Defaults to None
in which case you will be prompted.
- username (str, optional): Username. Defaults to None in
which case you will be prompted.
- password (str, optional): Password. Use with caution because input
will be saved in terminal history. Defaults to None in which case you will be prompted.
- _token (str, optional): Log in to a manager using a token instead
of username and password. Defaults to None.
- Raises:
Exit: If given invalid login credentials or host
daeploy login [OPTIONS]
Options
- -h, --host <host>
Host address to log in to.
- -u, --username <username>
Username
- -p, --password <password>
Password. Use with caution because input will be saved in terminal history.
- -t, --token <_token>
Log in to a manager using a token instead of username and password.
logout
Log out from a host
daeploy logout [OPTIONS] [HOST]
Arguments
- HOST
Optional argument
logs
Shows the logs for a service.
- Args:
name (str): Name of the service. Defaults to None. version (str, optional): Version of the service. Defaults to None. tail (int, optional): Output specified number of lines at the end of logs.
Default to 50
follow (bool, optional): If the logs should be followed. Defaults to False. date (datetime, optional): Show logs since given datetime.
Valid forrmats: [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]. Default to None.
- Raises:
Exit: If the tail input has a wrong type.
daeploy logs [OPTIONS] NAME [VERSION]
Options
- -n, --tail <tail>
Output specified number of lines at the end of logs.Use “all” to get all logs.
- Default
50
- -f, --follow
If the logs should be followed
- Default
False
- -d, --date <date>
Show logs since given datetime.
Arguments
- NAME
Required argument
- VERSION
Optional argument
ls
List running services, filtered by name and version.
- Args:
name (str, optional): List services with this name. Defaults to None. version (str, optional): List services of a certain name with this
version. Defaults to None.
daeploy ls [OPTIONS] [NAME] [VERSION]
Arguments
- NAME
Optional argument
- VERSION
Optional argument
test
Test a service before deployment.
- Args:
- service_path (Path, optional): Path to the directory of the service
to test. Defaults to Path.cwd().
- Raises:
Exit: Exits with exit code 0 if all tests pass, otherwise 1-5
daeploy test [OPTIONS] [SERVICE_PATH]
Arguments
- SERVICE_PATH
Optional argument
token
Generate a new authentication token.
- Args:
- lifetime (Optional[int], optional): Number of days the token should be valid.
Default to None which correpsonds to a long-lived token.
daeploy token [OPTIONS] [LIFETIME]
Arguments
- LIFETIME
Optional argument
user
Collection of user management commands
daeploy user [OPTIONS] COMMAND [ARGS]...
add
Add a new user to the active host
daeploy user add [OPTIONS] USERNAME
Options
- -p, --password <password>
Give password in command instead of in prompt. Warning: Insecure
Arguments
- USERNAME
Required argument
ls
List all users for the active host
daeploy user ls [OPTIONS]
rm
Delete a user from the active host
daeploy user rm [OPTIONS] USERNAME
Options
- --yes
Give confirmation to delete user. Skips prompt, use with caution.
- Default
False
Arguments
- USERNAME
Required argument
update
Change the password of a user on the active host
daeploy user update [OPTIONS] USERNAME
Options
- -p, --password <password>
Give password in command instead of in prompt. Warning: Insecure
Arguments
- USERNAME
Required argument