Quickstart: Deploy prebuilt examples

Before you begin

  • If you’re new to Akka Serverless, create an account so you can try out Akka Serverless for free.

  • You’ll also need install the Akka Serverless CLI if you want to deploy from a command line.

Deploying the sample

Akka Serverless has several ready made sample applications for you to try out! In the table below you can see the available samples and the container image URL you’ll need if you want to deploy that sample. Clicking on the language will take you to the GitHub repository with the source code.

Sample Container image URL

A shopping cart based on a Value Entity (Key/Value store)

JavaScript: gcr.io/akkaserverless-public/samples-js-value-entity-shopping-cart:0.0.3

Java: gcr.io/akkaserverless-public/samples-java-value-entity-shopping-cart:0.0.1

A shopping cart based on an Event Sourced Entity

JavaScript: gcr.io/akkaserverless-public/samples-js-event-sourced-shopping-cart:0.0.1

Java: gcr.io/akkaserverless-public/samples-java-event-sourced-shopping-cart:0.0.1

  1. Log into your account:

    akkasls auth login
  2. Choose the sample you want to deploy from the above table and run:

    akkasls services deploy <name> <Container image URL from above table>
  3. To get an HTTP endpoint and enable CORS run:

    akkasls services expose <name> --enable-cors
  1. Sign in to your Akka Serverless account at: https://console.akkaserverless.com/

  2. Click on the project you want to deploy your service to

  3. On the project dashboard click the "+" next to services to start the deployment wizard

  4. Choose a name for your service and click Next

  5. Enter the container image URL from the above table and click Next

  6. Click Next (no environment variables are needed for these samples)

  7. Check both Add a route to this service and Enable CORS and click Next

  8. Click Finish to start the deployment

  9. Click Go to Service to see your newly deployed service

Invoke your service

If you have deployed your service using the Akka Serverless CLI do these three steps first:

  1. Sign in to your Akka Serverless account

  2. Click on the project you deployed your service to

  3. Click on your service in the "Services" section

Now that you have deployed your service, the next step is to invoke it using cURL

  1. From the "Service Explorer" click on the method you want to invoke

  2. Click on "cURL"

  3. In the bottom section of the dialog, fill in the values you want to send to your service

  4. In the top section of the dialog, click the "Copy to clipboard" button

  5. Open a new command line and paste the content you just copied