-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update user experience, pipeline, and README.md
- Loading branch information
SergeRadinovich
committed
May 13, 2019
1 parent
a502346
commit 034ea64
Showing
7 changed files
with
81 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,28 @@ | ||
# ioFog Demo | ||
|
||
This repository orchestrates ioFog Agent, Controller, and Connector in a Docker Compose environment for the purpose of demonstrating a deployment of the ioFog stack. | ||
|
||
# Usage | ||
|
||
To spin up Agent, Controller, and Connector containers within a virtual network: | ||
``` | ||
./start.sh | ||
``` | ||
|
||
To verify the services are provisioned correctly: | ||
``` | ||
./test.sh | ||
``` | ||
|
||
To interact with Agent, Controller, and Connector you must exec into each respective container and use the CLI: | ||
``` | ||
docker exec -it iofog-controller /bin/bash | ||
iofog-controller help | ||
``` | ||
|
||
Note that if you would like to use Agent, Controller, and Connector's REST APIs, you will have to modify the Compose environment to deploy with network_mode "host". | ||
|
||
When you are finished, it is recommended that you teardown: | ||
``` | ||
./run.sh | ||
./stop.sh | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
# | ||
# Includes a Test Runner image that is launched and will execute a suite of smoke tests against the ioFog cluster. | ||
# | ||
# NOTE: On it's own this config does nothing, it should be launched at the same time the main docker-compose.yml config. | ||
# | ||
version: "3" | ||
services: | ||
|
||
# Test Runner, runs our test suite | ||
test-runner: | ||
image: iofog/test-runner-develop:latest | ||
container_name: test-runner | ||
environment: | ||
- LOCAL=1 | ||
volumes: | ||
- ./conf:/conf | ||
test-runner: | ||
container_name: test-runner | ||
environment: | ||
- LOCAL=1 | ||
external_links: | ||
- iofog-controller | ||
- iofog-connector | ||
- iofog-agent | ||
image: iofog/test-runner-develop:latest | ||
network_mode: bridge | ||
volumes: | ||
- ./conf:/conf | ||
version: '3' | ||
volumes: | ||
conf: | ||
conf: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
rm conf/id_ecdsa* || true | ||
ssh-keygen -t ecdsa -N "" -f conf/id_ecdsa -q | ||
cp conf/id_ecdsa.pub iofog-agent | ||
|
||
docker-compose -f docker-compose.yml up --build --detach |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
docker-compose down -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,16 @@ | ||
# | ||
# Launch script to run our Smoke Test Suite | ||
# | ||
#!/usr/bin/env sh | ||
|
||
set -e | ||
|
||
# Output the config for our Test suite config | ||
echo 'iofog-connector:8080' > conf/connector.conf | ||
echo 'iofog-controller:51121' > conf/controller.conf | ||
echo 'root@iofog-agent' > conf/agents.conf | ||
|
||
rm conf/id_ecdsa* | ||
|
||
ssh-keygen -t ecdsa -N "" -f conf/id_ecdsa -q | ||
|
||
cp conf/id_ecdsa.pub iofog-agent | ||
|
||
docker-compose -f docker-compose-test.yml pull test-runner | ||
docker-compose -f docker-compose.yml -f docker-compose-test.yml up \ | ||
docker-compose -f docker-compose-test.yml up \ | ||
--build \ | ||
--abort-on-container-exit \ | ||
--exit-code-from test-runner \ | ||
--force-recreate \ | ||
--renew-anon-volumes | ||
|
||
ERR="$?" | ||
|
||
docker-compose down -v | ||
|
||
exit "$ERR" | ||
--renew-anon-volumes |