Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
pulled out mqt related code
Browse files Browse the repository at this point in the history
  • Loading branch information
greyarch committed Sep 26, 2017
1 parent 31ec790 commit 1814455
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 76 deletions.
8 changes: 2 additions & 6 deletions index.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
fs = require 'fs-extra'
path = require 'path'
server = require 'docker-dashboard-agent-api'
Mqtt = require './src/coffee/mqtt'
Mqtt = require 'bigboat-mqtt-client'
env = require './src/coffee/env'
packageJson = require './package.json'

Expand All @@ -17,10 +17,6 @@ config =
tld: env.assert 'TLD'
dataDir: env.assert 'DATA_DIR'
remotefsUrl: env.assert 'REMOTEFS_URL'
mqtt:
url: env.assert 'MQTT_URL'
user: env.get 'MQTT_USER'
pass: env.get 'MQTT_PASS'
docker:
graph:
path: env.get 'DOCKER_GRAPH_PATH', '/var/lib/docker'
Expand Down Expand Up @@ -59,7 +55,7 @@ catch err

libcompose = (require './src/coffee/compose') config

mqtt = Mqtt.connect config.mqtt
mqtt = Mqtt()

publishState = (instance, state) ->
mqtt.publish '/instance/state', {instance: instance, state: state}
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "./node_modules/.bin/forever --minUptime 2500 --spinSleepTime 5000 ./node_modules/.bin/coffee index.coffee",
"test": "mocha --recursive --compilers coffee:coffee-script/register --require coffee-coverage/register-istanbul tests && istanbul report text lcov",
"test:html": "mocha --recursive --compilers coffee:coffee-script/register --require coffee-coverage/register-istanbul tests && istanbul report html lcov",
"test:watch": "mocha --recursive --compilers coffee:coffee-script/register --watch-extensions test.coffee --watch tests ",
"start":
"./node_modules/.bin/forever --minUptime 2500 --spinSleepTime 5000 ./node_modules/.bin/coffee index.coffee",
"test":
"mocha --recursive --compilers coffee:coffee-script/register --require coffee-coverage/register-istanbul tests && istanbul report text lcov",
"test:html":
"mocha --recursive --compilers coffee:coffee-script/register --require coffee-coverage/register-istanbul tests && istanbul report html lcov",
"test:watch":
"mocha --recursive --compilers coffee:coffee-script/register --watch-extensions test.coffee --watch tests ",
"precommit": "npm test",
"prepush": "npm test"
},
"author": "",
"license": "Apache-2.0",
"dependencies": {
"bigboat-mqtt-client": "^1.0.0",
"coffee-script": "^1.12.4",
"docker-dashboard-agent-api": "^4.5.1",
"forever": "^0.15.2",
"fs-extra": "^0.30.0",
"js-yaml": "^3.6.1",
"lodash": "^4.15.0",
"mkdirp": "^0.5.1",
"mqtt": "^2.4.0",
"os-monitor": "^1.0.5",
"path": "^0.12.7",
"random-mac": "0.0.4",
Expand Down
6 changes: 3 additions & 3 deletions run-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ DOCKER_HOST=unix:///var/run/docker.sock \
AUTH_TOKEN=innovation \
HTTP_PORT=8080 \
MQTT_URL=mqtt://localhost \
MQTT_USER=user \
MQTT_PASS=pass \
MQTT_USERNAME=user \
MQTT_PASSWORD=pass \
DOMAIN=acc \
TLD=ictu \
SCRIPT_BASE_DIR=/local/data/scripts \
DATA_DIR=/local/data \
REMOTEFS_URL=http://10.19.88.248:8000 \
REMOTEFS_URL=http://localhost:8000 \
NETWORK_NAME=bigboat-apps-3080 \
NETWORK_PARENT_NIC=eth0 \
NETWORK_SCAN_INTERVAL=60000 \
Expand Down
17 changes: 0 additions & 17 deletions src/coffee/mqtt.coffee

This file was deleted.

45 changes: 0 additions & 45 deletions tests/coffee/mqtt.test.coffee

This file was deleted.

0 comments on commit 1814455

Please sign in to comment.