Deploying a packaged service

You can use the Akka Serverless Console or the akkasls CLI to deploy service images to a project.

Deploying

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 should open in a browser window.

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

    3. Click Authorize.

      The akkasls prompt should return, confirming that you are now authorized.

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

      akkasls config set project <project name>

      Now subsequent commands will apply to the project you set above. Alternatively you can append --project <project name> to 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
  3. Verify the status of the 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

Updating a deployed service

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

To update:

Console
  1. From any screen, 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 your deployed service my-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

To remove a deployed service, use the CLI’s delete command. The following example removes a deployed service, where my-service is the service name:

akkasls service delete my-service