Run Symphony as a Single Process

This tutorial shows you how to launch Symphony as a single process and call the Symphony APIs. Since all state is kept in memory, you can shut it down safely with no cleanup and no leftovers.

Part 1: Launch Symphony in a Process

  1. Install Maestro and launch Symphony as a process (enabled by the --no-k8s switch):

        wget -q https://raw.githubusercontent.com/eclipse-symphony/symphony/master/cli/install/install.sh -O - | /bin/bash
        maestro up --no-k8s
        
        powershell -Command "iwr -useb https://raw.githubusercontent.com/eclipse-symphony/symphony/master/cli/install/install.ps1 | iex"
        maestro up --no-k8s
        
  2. In a separate Terminal Window, Invoke the greeting endpoint which doesn’t require authentication:

        curl -L http://localhost:8082/v1alpha2/greetings
        
        (iwr http://localhost:8082/v1alpha2/greetings -UseBasicParsing).Content
        maestro up --no-k8s
        

    You shoulde see a string reponse:

    Hello from Symphony K8s control plane (S8C)
    

Part 2: Deploying a Docker container

NOTE: You need Docker for this part

  1. Use maestro to deploy the hello-world sample, which deploys a Prometheus server Docker container to your machine:

    maestro samples run hello-world
    

    You should see outputs like this:

    Creating target sample-local-target ... done
    Creating solution sample-prometheus-server ... done
    Creating solutionversion sample-prometheus-server-v-v1 ... done
    Creating instance sample-prometheus-instance ... done
    ⣟  NOTE: Navigate to http://localhost:9090/ to access the Promethus portal (it may take a few seconds for the Prometheus server to be ready)
    
  2. After a few moments, you should be able to see the Docker container deployed:

    docker ps
    

    you should see a sample-prometheus-server container in the list.

  3. Symphony does continuous state seeking. If you delete the container, Symphony brings it back because that’s what the desired state is. To test this, manually shut down the container:

    docker rm -f sample-prometheus-server
    

    Then, after a few moments (during next reconcilation loop), the container should be brought back.

    docker ps
    

    You should see something like:

    ... IMAGE           ... CREATED          STATUS             PORTS                       NAMES
    ... prom/prometheus ... 18 seconds ago   Up 17 seconds      0.0.0.0:9090->9090/tcp      sample-prometheus-server
    
  4. (Optional) Open a browser and navigate to http://localhost:9090 to see the Prometheus interface.

Part 3: Clean up

  1. Kill the Symphony process with Ctrl+C.
  2. (Optional) Remove the container:
    docker rm -f sample-prometheus-server