Skip to content

Chronicle SUSE Rancher Cookbook

Recipe for installing Chronicle from the SUSE Rancher marketplace

Prerequisites

You will need the following:

Important

Chronicle uses Sawtooth as it backing ledger. This means it needs a minimum of 4 standard nodes, each with at least 4 vCPU and 16GB memory.

  • 4 node Kubernetes cluster managed by SUSE Rancher v2.6 or later.

  • kubectl configured to access your cluster

Install Chronicle

Log in to Rancher and select the cluster you want to install Chronicle on. In our example, this will be the local cluster

From the left menu, select Apps and then Charts. Choose the Chronicle chart from the list of partner charts:

Partner Charts

This will take you to the following screen, click on the Install button on the top right of the page:

Chart Details

Here, you will need to specify the namespace for your Chronicle installation. In our example, we will use the existing chronicle namespace.

Now, click the Next button on the bottom right of the page:

Install Namespace

On this screen you can configure your Chronicle installation. On the left hand side, you will find three options:

  • Chronicle Settings - Here you can configure the Chronicle image and tag that you want to use. We will leave these as the defaults for now, using the untyped version of Chronicle. You can also enable a development GraphQL playground, however in this example we will leave this disabled, and use the Altair GraphQL client instead.

  • Ingress Settings - If you'd like to enable an ingress for Chronicle, you can specify this here. This is optional.

  • Database Settings - If you'd like to use an external Postgres database, you can specify this here. This is also optional.

Click the Install button on the bottom right of the page:

Install Details

Rancher will now install Chronicle on your chosen cluster, in our example the local cluster. It may take a few minutes for the Chronicle images to be pulled down, and for the underlying Sawtooth network to be deployed.

Installing Chronicle

We will now switch to a local terminal window to test our Chronicle install.

Once you've opened a local terminal, start by confirming that you can connect to your Kubernetes cluster using kubectl by running this command:

kubectl get pods -n chronicle

Check kubectl

We now need to set up a port forward so that we can access the Chronicle api on our local machine. Run the following command to set up a port forward:

kubectl port-forward chronicle-chronicle-0 9982:9982 -n chronicle

This will set up a port forward to your Chronicle install, and make it accessible on your local machine:

Port forward

You can now access the Chronicle GraphQL API using the following URL at http://127.0.0.1:9982

We will use the Altair GraphQL client to test our Chronicle install in the browser

Open the Altair GraphQL client in your browser, and paste in the following URL http://127.0.0.1:9982

Altair GraphQL Client

Copy and paste the following query into the Altair GraphQL client:

mutation {
  defineAgent(externalId: "test", namespace: "test", attributes: {}) {
    context
    txId
  }
}

Click the Send Request button to run the query, and you should see a response on the right hand side:

Altair Response

Congratulations, you have successfully installed Chronicle on your Kubernetes cluster using Rancher!

By default the Chronicle docker image deployed is the untyped version of Chronicle. This should only be used for testing deployments.

You should now build a docker image using your own domain, or one of the Chronicle examples.

Once you've built this image, you can edit your running Chronicle deployment using SUSE Rancher and update the repository/tag details. Once you confirm these changes Rancher will automatically update the deployment. The same process can be employed whenever you rebuild your image.

The Chronicle Bootstrap repo provides instructions and example scripts for building your own docker image.

For more details on modeling your domain, see the Chronicle Docs.