Skip to content

Commit

Permalink
Release 0.35.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Abraham Dauhajre committed Sep 14, 2019
1 parent 044803c commit 9304774
Show file tree
Hide file tree
Showing 103 changed files with 13,249 additions and 10,421 deletions.
3 changes: 0 additions & 3 deletions README.md

This file was deleted.

31 changes: 31 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Content

This directory contains usage examples for the Formant Agent with Docker.

## Setup

1. Make sure you have [Docker](https://docs.docker.com/install/) and [Docker Compose](https://docs.docker.com/compose/install/) installed.

## Usage

1. Go to the [Create Agent](https://app.formant.io/create-agent) page and enter a agent name and tags.
2. On the Installer page, copy and paste your `FORMANT_PROVISIONING_TOKEN` from the install step into the [formant.env](formant.env) file.
3. Run `docker-compose up` to start the Formant Agent container.

## Notes

### Image Repository

The full list of available images can be found on [Docker Hub](https://hub.docker.com/r/formant/agent/tags).

Our container images have support for AMD64, ARM64, and ARM. We provide both ROS Melodic and ROS Kinetic variants as well.

### ROS

We have included a ROS-based [docker-compose](ros/docker-compose.yaml) as well. This will start up two containers, one running a ROS Master and our Agent. You should note the [formant.env](ros/formant.env) file contains the `ROS_MASTER_URI` pointed to the container over the `formant` docker network.

### Container State

The agent uses a docker volume to store state and persistent data. If the volume is deleted you will need to reprovision the agent.

The provisioning token you use to initialize the agent is a one-time use token. You can remove it from the [formant.env](formant.env) file after the credentialing process is done.
4 changes: 2 additions & 2 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ volumes:
services:
formant-agent:
container_name: formant-agent
image: formant/agent:0.16.43
image: formant/agent:latest
restart: always
env_file:
- formant.env
ports:
- "5501:5501"
- "5502:5502"
volumes:
- "formant:/home/.formant"
- "formant:/root/.formant"
networks:
- formant
4 changes: 1 addition & 3 deletions docker/formant.env
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
FORMANT_EMAIL=<replace with your admin credentials>
FORMANT_PASSWORD=<replace with your admin credentials>
FORMANT_TAGS=name:formant001,location:sfo,group:production
FORMANT_PROVISIONING_TOKEN=<replace with your provisioning token>
29 changes: 29 additions & 0 deletions docker/ros/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: "2.2"

networks:
formant:
driver: bridge

volumes:
formant:

services:
ros-master:
image: ros:melodic-ros-core
command: stdbuf -o L roscore
networks:
- formant
restart: always
formant-agent:
container_name: ros-formant-agent
image: formant/agent:ros-melodic
restart: always
env_file:
- formant.env
ports:
- "5501:5501"
- "5502:5502"
volumes:
- "formant:/root/.formant"
networks:
- formant
2 changes: 2 additions & 0 deletions docker/ros/formant.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FORMANT_PROVISIONING_TOKEN=<replace with your provisioning token>
ROS_MASTER_URI=http://ros-master:11311
29 changes: 0 additions & 29 deletions examples/config.toml

This file was deleted.

2 changes: 1 addition & 1 deletion examples/cpp/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class AgentClient {
std::cout << "posting file datapoint on " << stream << std::endl;
Datapoint datapoint;
(*datapoint.mutable_tags())["annotation"] = "formant_exp_002";
datapoint.mutable_file()->set_url("file://" + filePath);
datapoint.mutable_file()->set_url(filePath);
datapoint.set_stream(stream);
datapoint.set_timestamp(GetCurrentTimestamp());
PostDataResponse response;
Expand Down
208 changes: 120 additions & 88 deletions examples/cpp/protos/agent/v1/agent.grpc.pb.cc

Large diffs are not rendered by default.

794 changes: 429 additions & 365 deletions examples/cpp/protos/agent/v1/agent.grpc.pb.h

Large diffs are not rendered by default.

2,306 changes: 1,273 additions & 1,033 deletions examples/cpp/protos/agent/v1/agent.pb.cc

Large diffs are not rendered by default.

Loading

0 comments on commit 9304774

Please sign in to comment.