Deploy prebuilt samples

Before you begin

Deploy one of the samples

The table provided below displays samples along with the container image URL required for deploying each sample. By clicking on the respective programming language, you will be directed to the GitHub repository containing the source code.

Sample Container image URL

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

Java: gcr.io/kalix-public/samples-java-spring-valueentity-shopping-cart:0.0.1

Java/Protobuf: gcr.io/kalix-public/samples-java-value-entity-shopping-cart:0.0.3

JavaScript/Protobuf: gcr.io/kalix-public/samples-js-value-entity-shopping-cart:0.0.4

A shopping cart based on an Event Sourced Entity

Java: gcr.io/kalix-public/samples-java-spring-eventsourced-shopping-cart:0.0.1

Java/Protobuf: gcr.io/kalix-public/samples-java-eventsourced-shopping-cart:0.0.3

JavaScript/Protobuf: gcr.io/kalix-public/samples-js-event-sourced-shopping-cart:0.0.2

CLI
  1. Log into your account:

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

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

    kalix services expose <name> --enable-cors

Invoke your service

Once the service has started successfully, start a proxy locally to invoke the service:

kalix service proxy <service name> --grpcui

The --grpcui option also starts and opens a gRPC web UI for exploring and invoking the service (available at http://127.0.0.1:8080/ui/).

Alternatively, command line clients such as grpcurl or curl can be used to invoke the service through the proxy at localhost:8080, using plaintext connections.

Next steps