Skip to content

Commit 4041b08

Browse files
committed
v2.3.1: bug fixed; guides updated; npm postinst updated.
1 parent e5958f2 commit 4041b08

File tree

6 files changed

+35
-32
lines changed

6 files changed

+35
-32
lines changed

docs/installation_ubuntu_14.04.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ during the installation the procedure asks the following information:
6767

6868
* ##### Install dependencies using npm
6969
```
70-
npm install -g --unsafe log4js@1.1.1 requestify mysql nconf ip express node-uuid autobahn@18.10.2 ws@6.1.0 q body-parser ps-node nodemailer nodemailer-smtp-transport swagger-jsdoc cors bcrypt@3.0.0 optimist jsonwebtoken md5 crypto
70+
npm install -g --unsafe log4js@1.1.1 requestify@0.2.5 mysql@2.16.0 nconf@0.10.0 ip@1.1.5 express@4.16.4 node-uuid@1.4.8 autobahn@18.10.2 ws@6.1.0 q@1.5.1 body-parser@1.18.3 ps-node@0.1.6 nodemailer@4.6.7 nodemailer-smtp-transport@2.7.4 swagger-jsdoc@1.9.7 cors@2.8.4 bcrypt@1.0.3 optimist@0.6.1 jsonwebtoken@8.3.0 md5@2.2.1 crypto@1.0.1
7171
7272
npm install -g --unsafe @mdslab/wstun
7373
```
@@ -77,8 +77,7 @@ npm install -g --unsafe @mdslab/wstun
7777
mkdir /var/lib/iotronic/
7878
cd $NODE_PATH/
7979
80-
git clone git://github.com/MDSLab/s4t-iotronic-standalone.git
81-
mv s4t-iotronic-standalone/ iotronic-standalone
80+
git clone --depth=1 git://github.com/MDSLab/s4t-iotronic-standalone.git ./iotronic-standalone
8281
8382
cp $NODE_PATH/iotronic-standalone/etc/init.d/s4t-iotronic /etc/init.d/
8483
chmod +x /etc/init.d/s4t-iotronic

docs/installation_ubuntu_16.04.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ We tested this procedure on a Ubuntu 16.04 (within a LXD container also). Everyt
66

77
##### Install dependencies via apt-get
88
```
9-
apt -y install build-essential python-dev python-setuptools libyaml-dev libpython2.7-dev mysql-server nmap apache2 unzip socat bridge-utils python-pip python-httplib2 libssl-dev libffi-dev
9+
apt -y install build-essential python-dev python-setuptools libyaml-dev libpython2.7-dev mysql-server nmap apache2 unzip socat bridge-utils python-pip python-httplib2 libssl-dev libffi-dev python3-pip
1010
```
1111

1212
##### Install Crossbar.io router
1313
```
14-
pip install crossbar
14+
pip3 install crossbar
1515
```
1616

1717
##### Install latest LTS NodeJS (and npm) distribution:
@@ -63,7 +63,7 @@ during the installation the procedure asks the following information:
6363

6464
* ##### Install dependencies using npm
6565
```
66-
npm install -g --unsafe log4js@1.1.1 requestify mysql nconf ip express node-uuid autobahn@18.10.2 ws@6.1.0 q body-parser ps-node nodemailer nodemailer-smtp-transport swagger-jsdoc cors bcrypt@3.0.0 optimist jsonwebtoken md5 crypto
66+
npm install -g --unsafe log4js@1.1.1 requestify@0.2.5 mysql@2.16.0 nconf@0.10.0 ip@1.1.5 express@4.16.4 node-uuid@1.4.8 autobahn@18.10.2 ws@6.1.0 q@1.5.1 body-parser@1.18.3 ps-node@0.1.6 nodemailer@4.6.7 nodemailer-smtp-transport@2.7.4 swagger-jsdoc@1.9.7 cors@2.8.4 bcrypt@1.0.3 optimist@0.6.1 jsonwebtoken@8.3.0 md5@2.2.1 crypto@1.0.1
6767
6868
npm install -g --unsafe @mdslab/wstun
6969
```
@@ -73,8 +73,7 @@ npm install -g --unsafe @mdslab/wstun
7373
mkdir /var/lib/iotronic/
7474
cd $NODE_PATH/@mdslab/
7575
76-
git clone git://github.com/MDSLab/s4t-iotronic-standalone.git
77-
mv s4t-iotronic-standalone/ iotronic-standalone
76+
git clone --depth=1 git://github.com/MDSLab/s4t-iotronic-standalone.git ./iotronic-standalone
7877
7978
cp $NODE_PATH/@mdslab/iotronic-standalone/etc/systemd/system/iotronic-standalone.service /etc/systemd/system/
8079
sed -i "s|ExecStart=<IOTRONIC-LAUNCHER>|ExecStart=$NODE_PATH/@mdslab/iotronic-standalone/bin/server|g" /etc/systemd/system/iotronic-standalone.service
@@ -235,7 +234,7 @@ node $NODE_PATH/@mdslab/iotronic-standalone/utils/createAdminToken.js <PASSWORD>
235234
"encryptKey": "<ENC-KEY>",
236235
"adminToken": "<GENERATED-BEFORE>",
237236
"backend": "iotronic",
238-
"expire_time": "30m"
237+
"expire_time": "1h"
239238
"auth_lr_mode":"basic"
240239
}
241240
```

docs/iotronic-docs-gen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ if (argv.i != undefined && argv.e != undefined){
243243
IoTronic_IP = process.env.IOTRONIC_PUB_IP;
244244
}
245245
else if(public_ip == undefined){
246-
logger.error("[SYSTEM] - Iotronic public IP not defined: " + public_ip);
246+
console.log("[SYSTEM] - Iotronic public IP not defined: " + public_ip);
247247
process.exit();
248248
}
249249
else

lib/init_iotronic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ var initIoTronicModules = function() {
251251
process.exit();
252252
}
253253
else
254-
CROSSBAR_IP = crossbar_ip;
254+
CROSSBAR_IP = crossbar_pub_ip;
255255

256256

257257
logger.info("[SYSTEM] - Iotronic public endpoints:\n - WEB_IP: "+IoTronic_IP + "\n - CROSSBAR_IP: "+ CROSSBAR_IP + "\n - API_IP: " + API_IP)

package.json

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,27 @@
99
"test": "echo \"Error: no test specified\" && exit 1"
1010
},
1111
"dependencies":{
12-
"nconf": ">=0.8.2",
13-
"ip": ">=1.1.0",
14-
"node-uuid":"<=1.4.7",
12+
"nconf": "0.10.0",
13+
"ip": "1.1.5",
14+
"node-uuid":"1.4.8",
1515
"autobahn": "18.10.2",
1616
"ws":"6.1.0",
17-
"express": ">=4.13.3",
18-
"body-parser":">=1.16.1",
19-
"log4js":"<=1.1.1",
20-
"q":">=1.4.1",
21-
"requestify":">=0.1.17",
22-
"mysql":">=2.10.0",
23-
"util":">=0.10.3",
24-
"ps-node":"<=0.1.6",
25-
"bcrypt":"<=1.0.3",
26-
"optimist":"<=0.6.1",
27-
"cors":"<=2.8.4",
28-
"nodemailer":"<=4.1.0",
29-
"nodemailer-smtp-transport":"<=2.7.4",
30-
"jsonwebtoken": "<=8.1.0",
31-
"swagger-jsdoc":"<=1.9.7",
32-
"md5":"<=2.2.1",
33-
"crypto":">=1.0.1"
17+
"express": "4.16.4",
18+
"body-parser":"1.18.3",
19+
"log4js":"1.1.1",
20+
"q":"1.5.1",
21+
"requestify":"0.2.5",
22+
"mysql":"2.16.0",
23+
"ps-node":"0.1.6",
24+
"bcrypt":"1.0.3",
25+
"optimist":"0.6.1",
26+
"cors":"2.8.4",
27+
"nodemailer":"4.6.7",
28+
"nodemailer-smtp-transport":"2.7.4",
29+
"jsonwebtoken": "8.3.0",
30+
"swagger-jsdoc":"1.9.7",
31+
"md5":"2.2.1",
32+
"crypto":"1.0.1"
3433
},
3534
"repository": {
3635
"type": "git",

scripts/postinst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ DISTRO=`cat /etc/*release | grep DISTRIB_RELEASE | cut -d "=" -f2`
66

77
echo "--> Server Distribution: " $DISTRO
88

9+
10+
# Services management scripts
11+
912
if [ "$DISTRO" = "14.04" ]; then
1013

1114
# Configure init.d
@@ -52,7 +55,7 @@ if [ "$DISTRO" = "14.04" ]; then
5255
fi
5356

5457

55-
elif [ "$DISTRO" = "16.04" ]; then
58+
elif [ "$DISTRO" = "16.04" ] || [ "$DISTRO" = "16.10" ] || [ "$DISTRO" = "18.04" ] || [ "$DISTRO" = "18.10" ]; then
5659

5760
# Configure systemctl
5861
echo " - systemd configuration..."
@@ -105,7 +108,9 @@ then
105108
cp $NODE_PATH/@mdslab/iotronic-standalone/utils/templates/settings.example.json /var/lib/iotronic/settings.json
106109
cp $NODE_PATH/@mdslab/iotronic-standalone/utils/templates/board_settings_template.json /var/lib/iotronic/board_settings_template.json
107110

111+
108112
mkdir -p /var/log/iotronic/plugins/
113+
mkdir -p /var/log/wstun/
109114
touch /var/log/iotronic/s4t-iotronic.log
110115

111116
MYSQL_PW=
@@ -135,6 +140,7 @@ else
135140
cp $NODE_PATH/@mdslab/iotronic-standalone/utils/templates/board_settings_template.json /var/lib/iotronic/board_settings_template.json
136141

137142
mkdir -p /var/log/iotronic/plugins/
143+
mkdir -p /var/log/wstun/
138144
touch /var/log/iotronic/s4t-iotronic.log
139145

140146
MYSQL_PW=

0 commit comments

Comments
 (0)