Deploying a packaged service

Once you have created an Akka Serverless project, use the Akka Serverless Console or the akkasls CLI to deploy container images.

Akka Serverless services are automatically fault-tolerant and highly available. When you deploy a service, Akka Serverless creates multiple service instances. When the service load increases, Akka Serverless automatically scales up by adding more instances, and when the load decreases, it automatically scales down.

Deploy

To deploy a packaged service:

  1. Log in:

    Console
    1. Navigate to: https://console.akkaserverless.com new tab and log in.

    2. Select or create a project.

    CLI
    1. In a command or terminal window, if you haven’t authorized akkasls, enter the following command:

      akkasls auth login

      The Akka Serverless Console opens in a browser window.

    2. If you are not logged into the Console, log in.

    3. Click Authorize.

      The akkasls prompt confirms the successful authorization attempt.

    4. Set your project to be the current Akka Serverless project:

      akkasls config set project <project name>

      Subsequent commands apply to the current project, as defined with config set project. Alternatively you can append --project <project name> to work with service commands.

  2. Deploy:

    Console
    1. In the Services pane, click +.

    2. Enter a name and click Next.

    3. Enter the path to your container image and click Next.

    4. If required, add environment variables and click Next.

    5. If required, move the sliders to add a route and enable CORS, click Next.

    6. Click Finish.

    CLI

    Assuming a service name of my-service, enter the following:

    akkasls service deploy \
        my-service \
        my-container-uri/container-name:tag-name

Verify service status

To verify the status of a service:

Console

From the Dashboard, the Services card displays the Status of all services in a project:

Services card
CLI

Use the following command:

akkasls service list

A service status can be one of the following:

  • Ready — All service instances are up to date and fully available

  • UpdateInProgress — Service is updating

  • Unavailable — No service instances are available

  • PartiallyReady — Some, but not all, service instances are available

Update a deployed service

First, package and tag the changes to your service. When you redeploy, Akka Serverless performs a rolling update.

To re-deploy:

Console
  1. Select the service you want to update.

  2. Click …​ and select Re-deploy service:

    • Select redeploy

    • Redeploy service

  3. Enter the new Docker image.

  4. Optionally, provide environment variables.

  5. Click Update.

CLI
  • Update the deployed my-service service with a new package tagged tag-name-2:

    akkasls service deploy \
        my-service \
        my-container-uri/container-name:tag-name-2

Removing a deployed service

Remove a deployed service using the CLI delete command. The following example removes a deployed service, where my-service is the service name:

akkasls service delete my-service