User Tools

Site Tools


docker

This is an old revision of the document!


DOCKER

WORK IN PROGRESS NOTES

Setup docker:

 docker run ubuntu:16.04 cat /etc/issue

Prepare

Clone sources's cloud-interface branch

Pick change from:

Build cloud examples:

scons cloud WITH_TCP=yes RELEASE=yes TARGET_TRANSPORT=IP WITH_CLOUD=yes WITH_MQ=PUB,SUB

Start Cloud

Install docker and docker-compose

 sudo apt-get install docker-engine

Make sure port 80 is available:

sudo service stop apache2

Start services:

cd cloud && sudo docker-compose up
iotivity-accountserver_1      | press 'q' to terminate
iotivity-interface_1          | {...} Connected, Address: iotivity-resourcedirectory/172.18.0.6:5684
iotivity-interface_1          | {...} Connected, Address: iotivity-messagequeue/172.18.0.4:5686
iotivity-interface_1          | {...} Connected, Address: iotivity-accountserver/172.18.0.5:5685
iotivity-messagequeue_1       | {...} Connected, Address: /172.18.0.7:52502
iotivity-resourcedirectory_1  | {...} Connected, Address: /172.18.0.7:36638
iotivity-accountserver_1      | {...} Connected, Address: /172.18.0.7:54526
iotivity-interface_1          | press 'q' to terminate

Use Cloud

Try examples as detailed on :

cd out/linux/x86_64/release/cloud/samples/client/

Start controlee:

./aircon_controlee
 Put "[host-ipaddress:port] [authprovider] [authcode]" for sign-up and sign-in and publish resources
 Put "[host-ipaddress:port] [uid] [accessToken] 1" for sign-in and publish resources
code=76e992b254d32689fda7 # adapt
host=172.18.0.1 # adapt
url=$host:5683
provider=github

./aircon_controlee $url $provider $code

uid=83516e13-2e7a-424a-a3df-6043889b5d85 # adapt
token=292c1e6c45407857fc582a4a827fb2d0549154ce # adapt

./aircon_controlee $url $uid $token 1

Start controller:

./aircon_controller
Put "[host-ipaddress:port] [authprovider] [authcode]" for sign-up and sign-in and discover resources
Put "[host-ipaddress:port] [uid] [accessToken] 1" for sign-in and discover resources
host=172.18.0.1 # adapt
url=$host:5683
auth=github
code=3e651d0ce9bd1b8536e0 # adapt with new code 
./aircon_controller $url $auth $code
docker.1485951618.txt.gz · Last modified: 2017/02/01 12:20 by Phil Coval