Hello World Tutorial

This tutorial guides you step-by-step through deploying a simple “Hello World!” application to a fleet of edge devices using Orchestra.

Pre-requisites

Before you begin, ensure you have:

  1. Orchestra Subscription: An active Orchestra subscription. For more information, see more.

  2. Edge Devices in Orchestra: Your edge devices added to Orchestra Manager (see How to add a Device) or running Orchestra Daemon (orchestrad) version 1.4.13 or higher (refer to Updating Orchestra Daemon for updates).

  3. Docker Engine: Docker Engine installed on each of your edge devices. For installation instructions, see the official Docker documentation: Install Docker Engine.

  4. Docker Compose File: The following Docker Compose file (docker-compose.yaml) ready in your working directory:

services:
  static-response-server:
    environment:
      HTTP_BODY: "Hello World!\n"
      HTTP_CODE: 200
    image: colinodell/static-response-server
    ports:
    - 8080:8080

Steps

Step 1: Create a New Fleet

  1. Open the Orchestra web application: Orchestra Manager .

  2. Use the sidebar to navigate to Fleets.

    If you haven’t created any fleets yet, the page will look like this:

Fleets empty
  1. Click Add in the top right corner.

  2. In the “Create a new fleet” dialog, give your fleet a name and select the devices you want to include.

Creating Hello World Fleet

Step 2: Create a Composition

A composition defines your application and manages its versions. (Learn more: Create a Composition)

  1. Use the sidebar to navigate to Compositions.

  2. Click Add in the top right corner.

  3. In the “Create a new composition” dialog, enter a name for your composition.

Creating Hello World Application

Step 3: Create the First Composition Version

  1. Click Create first version.

Newly created composition
  1. Enter a version number according to semantic versioning principles.

  2. Upload the docker-compose.yaml file you prepared earlier (provided at the beginning of this tutorial here) .

Create a first version of your newly created composition

The composition overview page now shows details and displays the uploaded Docker Compose file.

First version fo your composition

Step 4: Attach Composition to the Fleet

  1. Go to the fleet you created in Step 1.

  1. In the Compositions table, click Add.

  2. Select your new composition from the dropdown.

Step 5: Release Your Composition

  1. On the fleet page, go to the Compositions tab.

  2. Select your Hello World composition.

  1. Click Create new release.

Your composition is now deploying to all devices in the fleet.

Check Your Deployment

To make sure your application is running:

  1. On the fleet page, go to the Compositions tab and find the Devices table.

  2. Click the ID of a device in your fleet.

  3. This takes you to the device page. Go to the Terminal tab and start a terminal.

  4. In the terminal, type docker ps to see running containers.

  5. Now, test your Hello World application:

$ curl localhost:8080

You should see:

Hello World!

Using Variables

You can use variables to customize your deployments. Let’s add a global variable:

  1. In the sidebar, go to Global variables.

  2. Click Add to create a new variable.

  3. Set the Key to HTTP_BODY and the Value to Awesome response

We have created first global variable.

  1. Back in your fleet’s Compositions tab, select your Hello World application and click Restart composition. This restarts the containers, applying the new variable.

  2. Test your application again as we did in the previous step (Check Your Deployment).

$ curl localhost:8080

You’ll see the updated output:

Awesome response

That’s it! Thank you for following this tutorial.

Note

If you are facing any problems or have suggestions please contact us through our Customer Portal.