diff --git a/CHANGELOG.md b/CHANGELOG.md index 4383ab0..2dde9ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/README.md b/README.md index 58bd516..e539b18 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docker-databox-sdk.yaml b/docker-databox-sdk.yaml new file mode 100644 index 0000000..5523689 --- /dev/null +++ b/docker-databox-sdk.yaml @@ -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 \ No newline at end of file diff --git a/sdk/donotdelete.txt b/sdk/donotdelete.txt new file mode 100644 index 0000000..e69de29 diff --git a/startDatabox.sh b/startDatabox.sh index 7fefaee..3b9b110 100755 --- a/startDatabox.sh +++ b/startDatabox.sh @@ -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 @@ -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' ] diff --git a/stopDatabox.sh b/stopDatabox.sh index ed1bfdb..c66b5e2 100755 --- a/stopDatabox.sh +++ b/stopDatabox.sh @@ -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 ....."