In this guide, we’ll walk you through the process of creating your first Private App. We’ll be building a simple app that adds a new Hello World resource to your Tempest platform using our Tempest developer tools.

Here’s what we’ll be walking through:

  • Using to CLI to:
    • Setup the structure of your app
    • Describe your app’s capabilities
    • Connect an implementation of your app to a version in Tempest
    • Serve your app’s functionality from your local machine
  • Creating a new app, resource, and version in Tempest

This app will allow you to:

  • Create a configurable self-service recipe with a Hello World resource
  • Use Tempest to provision your resource

Prerequisites

  • A Tempest account
  • A Tempest API key
  • Go 1.23+ installed

Step-by-step

1. Develop a Private App Locally

You can get started with extending Tempest by developing your first Private App locally. Technically, a Tempest account is not required to start development, but you will need one to connect your app to Tempest automation.

1

Install the Tempest CLI

go install github.com/tempestdx/cli/tempest@latest
2

Create a new Private App

We recommend creating a new directory for your app. You can add this directory to source control and manage your app as you would any other codebase.

mkdir tempest-hello-world && cd tempest-hello-world

# This will scaffold out the basic structure of a Private App
tempest app init hello-world

Take a look around in your new directory. You’ll find the basic structure of a Private App has been created for you. In the newly created apps directory, you’ll find your hello-world/v1 app has been created for you.

3

Describe your app to view it's capabilities

To view the capabilities of your app, you can use the tempest app describe command. This will give you a list of all the resources and actions that your app can perform.

tempest app describe hello-world:v1

The CLI will output a list of capabilities our app has implemented. In this case, the scaffolded code only implemnts the Create capability. Let’s make this resource more useful by adding some local storage, and the ability to read and write to it.

4

Test the create operation with the CLI

The CLI scaffolded app includes an implementation of a Example Resource with create functionality implemented. Let’s test it out.

tempest app test hello-world:v1 -o create -t example -i '{"name":"helloworld"}'

The scaffolded example code is simple and generates a random ID for each resource. It does not persist any data to disk.

This will create a new instance of our with the name “helloworld” property. Your CLI should have returned output similar to the following:

Resource created with ID: 1735934449
Properties:
{
  "name": "helloworld"
}
5

Next steps

Now that you’ve created and tested your first Private App, we’ll need to connect it with your Tempest instance to start provisioning resources.

2. Connect your app to Tempest

In order to get your local app to interact with Tempest, you’ll need to create a connection between your app and your Tempest instance. First, we’ll create our new Private App in Tempest, set up how it will be displayed, and connect our local implementation to it.

1

Create your Private App in Tempest

In your Tempest web console, navigate to Apps from your navigation menu.

From there, you can click Create an App from the top right corner of the screen. You’ll be taken to a page to fill in details about your new app.

Fill in the details about your new app and click Create. You’ll be taken to the app’s details page.

2

Create a new version of your app

Tempest apps are versioned, allowing you to gracefully control how and when your app is updated. You can also have multiple versions of your app running at the same time, allowing you to test new features in a safe and controlled manner.

To create a new version of your app, click the Create a New Version button on your app’s details page.

3

Generate an API key

If this is your first time creating a Private App in Tempest, and you haven’t already created an API key. You’ll find a notice in your UI prompting you to create an API key. Follow the instructions in app to create an API key.

If you already have an API key, but would like to create a new one, you can generate one by clicking the caret next to your organization name in the top left corner of your Tempest web console and navigate to Settings.

If you decide to create multiple apps, you can generate a new key for each app and revoke them when they are no longer needed.

Your new app version will be created with a status as Not Setup. Next, we’ll setup communication between your local code and your app in Tempest.

4

Authenticate your CLI with your API key

Once you’ve generated an API key, you’ll need to authenticate your CLI with it. Use the following command and you’ll be prompted to enter your API key.

tempest auth login

The CLI will output a prompt:

Input your API key: # Paste your API key here
5

Connect your app to Tempest

Connecting your app to Tempest is simple. Run the following command in your terminal:

tempest app connect hello-world:v1

This same command will allow you to connect your app to Tempest from deployed environments as well. You can change the implementation serving your app version at any time as long as it serves the same capabilities and schema.

You’ll be prompted to review the capabilities of your app and confirm the connnection. Hit enter to continue.

Next, we’ll serve our app locally.

6

Serve your app locally

To serve your app locally, run the following command in your terminal:

tempest app serve hello-world:v1

This will connect your app with the Tempest API and start listening for and dequeuing requests from Tempest. Your app will run as a server, and start printing logs to your console.

7

Next steps

In your Tempest web console, navigate to your app in the Apps section, and you’ll see that your is now checking in, and it’s capabilities are registered and reflected in the UI. Next, we’ll learn how to publish your version and make it available to your users via Tempest recipes.

3. Publish your app version

Publishing a version of your app will allow you to use it in your Tempest recipes. You can publish new versions from your app’s detail page in your Tempest web console. Let’s learn how.

1

Publish your app version

Visit your Hello World app’s page in your Tempest web console. Navigate to the v1 version of your app (or the version you want to publish). In the top right corner of the screen, click the Publish button.

Publishing an app version will lock it’s schema and capabilities. You can change the implementation connected to a version of your app in Tempest at any time, but you will need to publish a new version to change the schema or capabilities.

2

Set the recipe version for your app

Once published, you’ll be able to set your v1 version of the app as the active version used for your recipes. Navigate one level up to your app’s detail page, and in the sidebar on the right, you’ll see a Recipe Version section.

Once you’ve set the version, you’ll be able to use your app in recipes.

3

Testing your app in a recipe

To test your app in a recipe, navigate to the Recipes section in your Tempest web console. Click Create a Recipe from the top right corner of the screen. For this example, we’ll create a Workflow that creates a new Hello World resource.

Click the Add Resource button to add a step to your workflow. Here, you’ll find your Hello World app in the list of resources, and you’ll be able to select the Example Resource resource type created by the CLI.

From here on, Private Apps work just like any other app in Tempest. You can add your app’s resources to recipes, and share them with your team to enable self-service provisioning. Check out the guide and articles below on how to build recipes and self-service projects.