Skip to content

Commit

Permalink
Intergrate the sdk
Browse files Browse the repository at this point in the history
This is still experimental
  • Loading branch information
Toshbrown committed Sep 7, 2017
1 parent 21ebb16 commit 3a8948e
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* Re-enable docker hub builds
* removed need for remote app-store (for now)
* removed syslog loging will be done by stores
* new UI and Android app

## [0.1.2]
### Changed
Expand All @@ -22,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* moved the container manager into it own repo me-box/databox-cm
* Removed some modules and implemented mod clean to reduce container manager image size
* Docker Network API issue - when creating network first time. Fixed #29
* Integrated the graphical SDK

## [0.1.1] 2017-04-05
### Changed
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ To stop databox and clean up use ./stopDatabox.sh

## Development

### Get Started with the Graphical SDK

The graphical SDK will allow you to quickly build and test simple databox apps. To start the sdk run:

./startDatabox.sh sdk

The SDK web UI is available at http://127.0.0.1:8086

To stop the SDK run:

./stopDatabox.sh sdk


### Develop system components and custom drivers

To develop on the platform and core components you can run

./startDatabox.sh dev
Expand Down
59 changes: 59 additions & 0 deletions docker-databox-sdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: '3.1'

services:
redis:
image:
tlodge/databox-redis
ports:
- "6379"

mongo:
image:
tlodge/mongo
ports:
- "27017"
command:
/usr/bin/mongod --dbpath /data/mongo --smallfiles

app-server:
image:
tlodge/databox-app-server
ports:
- "8091"
links:
- mongo
command:
/root/start.sh


mock-datasource:
image:
tlodge/databox-datasource-mock
command:
/root/start.sh

databox-sdk:
image:
tlodge/databox-sdk
links:
- redis
- mongo
ports:
- "8086:8086"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${HOSTMOUNT}/sdk:/usr/src/app/conf
command:
node index.js

databox-test-server:
image:
tlodge/databox-test-server
links:
- redis
- mongo
ports:
- "9090:9090"
- "8435"
command:
node index.js
Empty file added sdk/donotdelete.txt
Empty file.
15 changes: 7 additions & 8 deletions startDatabox.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

if [ "$1" == "sdk" ]
then
export HOSTMOUNT=$(pwd -P)
docker stack deploy -c docker-databox-sdk.yaml sdk
exit 0
fi

docker node ls > /dev/null
if [ $? -eq 0 ]
then
Expand Down Expand Up @@ -37,14 +44,6 @@ else
export DATABOX_DEV="0"
fi

if [ "$1" == "sdk" ]
then
#enable SDK mode
export DATABOX_SDK="1"
else
export DATABOX_SDK="0"
fi

ARCH=$(uname -m)

if [ "$ARCH" == 'armv7l' ]
Expand Down
10 changes: 10 additions & 0 deletions stopDatabox.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/bin/bash

if [ "$1" == "sdk" ]
then
export HOSTMOUNT=$(pwd -P)
docker stack rm databox sdk
echo "waiting ....."
sleep 10 #give docker some time to remove the networks etc
exit 0
fi

docker stack rm databox

echo "waiting ....."
Expand Down

0 comments on commit 3a8948e

Please sign in to comment.