The Akka Serverless command-line interface (CLI) complements the Console interface and makes most deployment and configuration operations available from the command line. This page shows the use of common commands. The List of
akkasls commands page links to all commands.
Check periodically to make sure you have the latest
akkasls is followed by a command, with optional sub-commands and parameters. You may also supply flags, preceded by
-- (two hyphens) that modify the operation of the command-line client itself.
To use the
akkasls CLI, you must authenticate your command line client with your Akka Serverless account. Entering
auth login at the command line launches the Akka Serverless login screen in your default browser. The command line client prints
Waiting for UI login… and pauses. After you log in and click Authorize, the command line prompt returns.
Upon successful authentication, if your account contains:
One project, the CLI reports that it is the
currentproject, which will be the target of subsequent commands.
No projects, in this case explicitly set the target project after creating a project.
Multiple projects, you need to explicitly set the target. Use
akkasls projects listto see all of your projects.)
To log in, enter:
akkasls auth login
To set the target project to
akkasls config set project my-project
akkasls auth -h at the command line, or see akkasls auth for other authentication related commands.
akkasls projects -h at the command line.
|See akkasls projects for a complete list of commands to manage your Akka Serverless projects.|
akkasls projects new sample-project "An example project in Akka Serverless"
akkasls projects new NAME [DESCRIPTION] command creates a new
project in your Akka Serverless account.
To mark the new project as the current project and thus the target of subsequent commands, use the following command:
akkasls docker add-credentials \ --docker-server https://mydockerregistry.com \ --docker-username myself \ --docker-password secret
Allow Akka Serverless to retrieve container images from private repositories by using the
akkasls docker add-credentials [flags] command to add a set of container registry credentials to the project. The flags are:
--docker-server stringThe docker server, for example
--docker-username stringThe docker username
--docker-password stringThe docker password
--docker-email stringThe docker email address
akkasls services commands manipulate the services in your current Akka Serverless project.
akkasls services list
akkasls services list command lists a one-line summary of all services under the current project.
akkasls services deploy \ my-service \ my-container-uri/container-name:tag-name
akkasls services deploy service-name docker-image command deploys a service named
service-name using the
|For information about setting up container registry credentials to authorize Akka Serverless to pull from your image repository, see Configure container registries.|
akkasls services expose my-service --enable-cors
akkasls services expose service-name command creates a route to expose a service for inbound traffic. Optionally, you can enable HTTP CORS with the
akkasls services logs my-service
akkasls services logs service-name command returns logging output for your service.