Developing lightweight computation at the DSG edge

Commit 984ce7fe authored by deepthidevaki's avatar deepthidevaki
Browse files

docker setup

parent 16f81e7e
#!/usr/bin/env escript
%%! -smp enable -sname erlshell -setcookie antidote
main(_Args) ->
rpc:call(antidote@antidote1, inter_dc_manager, start_bg_processes, [stable]),
ok = rpc:call(antidote@antidote1, application, set_env, [antidote, txn_cert, false]),
rpc:call(antidote@antidote2, inter_dc_manager, start_bg_processes, [stable]),
{ok, Desc1} = rpc:call(antidote@antidote1, inter_dc_manager, get_descriptor, []),
{ok, Desc2} = rpc:call(antidote@antidote2, inter_dc_manager, get_descriptor, []),
Descriptors = [Desc1, Desc2],
rpc:call(antidote@antidote1, inter_dc_manager, observe_dcs_sync, [Descriptors]),
rpc:call(antidote@antidote2, inter_dc_manager, observe_dcs_sync, [Descriptors]),
io:format("Connection setup!").
version: "2"
services:
antidote1:
image: mweber/antidotedb:latest
ports:
- "8087:8087"
environment:
NODE_NAME: "antidote@antidote1"
SHORT_NAME: "true"
cap_add:
- NET_ADMIN
networks:
- interdc
- local1
antidote2:
image: mweber/antidotedb:latest
ports:
- "8088:8087"
environment:
NODE_NAME: "antidote@antidote2"
SHORT_NAME: "true"
cap_add:
- NET_ADMIN
networks:
- interdc
- local2
server1:
image: java:8
volumes:
- ../bookstore/build/libs:/code
command: "java -jar bookstore.jar"
working_dir: /code
cap_add:
- NET_ADMIN
networks:
- local1
server2:
image: java:8
volumes:
- ../bookstore/build/libs:/code
command: "java -jar bookstore.jar"
working_dir: /code
cap_add:
- NET_ADMIN
networks:
- local2
link:
image: erlang:19
volumes:
- .:/code
command: '/code/link.sh'
links:
- antidote1
- antidote2
cap_add:
- NET_ADMIN
networks:
- local1
- local2
networks:
interdc:
local1:
local2:
#!/bin/bash
echo "linking.."
sleep 10
escript /code/connect-dcs.erl
echo "done.."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment