Skip to content

Commit

Permalink
v2.3.1: bug fixed; guides updated; npm postinst updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
npeditto committed Nov 2, 2018
1 parent e5958f2 commit 4041b08
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 32 deletions.
5 changes: 2 additions & 3 deletions docs/installation_ubuntu_14.04.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ during the installation the procedure asks the following information:

* ##### Install dependencies using npm
```
npm install -g --unsafe [email protected] requestify mysql nconf ip express node-uuid [email protected] [email protected] q body-parser ps-node nodemailer nodemailer-smtp-transport swagger-jsdoc cors bcrypt@3.0.0 optimist jsonwebtoken md5 crypto
npm install -g --unsafe [email protected] 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 [email protected] [email protected] 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
npm install -g --unsafe @mdslab/wstun
```
Expand All @@ -77,8 +77,7 @@ npm install -g --unsafe @mdslab/wstun
mkdir /var/lib/iotronic/
cd $NODE_PATH/
git clone git://github.com/MDSLab/s4t-iotronic-standalone.git
mv s4t-iotronic-standalone/ iotronic-standalone
git clone --depth=1 git://github.com/MDSLab/s4t-iotronic-standalone.git ./iotronic-standalone
cp $NODE_PATH/iotronic-standalone/etc/init.d/s4t-iotronic /etc/init.d/
chmod +x /etc/init.d/s4t-iotronic
Expand Down
11 changes: 5 additions & 6 deletions docs/installation_ubuntu_16.04.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ We tested this procedure on a Ubuntu 16.04 (within a LXD container also). Everyt

##### Install dependencies via apt-get
```
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
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
```

##### Install Crossbar.io router
```
pip install crossbar
pip3 install crossbar
```

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

* ##### Install dependencies using npm
```
npm install -g --unsafe [email protected] requestify mysql nconf ip express node-uuid [email protected] [email protected] q body-parser ps-node nodemailer nodemailer-smtp-transport swagger-jsdoc cors bcrypt@3.0.0 optimist jsonwebtoken md5 crypto
npm install -g --unsafe [email protected] 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 [email protected] [email protected] 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
npm install -g --unsafe @mdslab/wstun
```
Expand All @@ -73,8 +73,7 @@ npm install -g --unsafe @mdslab/wstun
mkdir /var/lib/iotronic/
cd $NODE_PATH/@mdslab/
git clone git://github.com/MDSLab/s4t-iotronic-standalone.git
mv s4t-iotronic-standalone/ iotronic-standalone
git clone --depth=1 git://github.com/MDSLab/s4t-iotronic-standalone.git ./iotronic-standalone
cp $NODE_PATH/@mdslab/iotronic-standalone/etc/systemd/system/iotronic-standalone.service /etc/systemd/system/
sed -i "s|ExecStart=<IOTRONIC-LAUNCHER>|ExecStart=$NODE_PATH/@mdslab/iotronic-standalone/bin/server|g" /etc/systemd/system/iotronic-standalone.service
Expand Down Expand Up @@ -235,7 +234,7 @@ node $NODE_PATH/@mdslab/iotronic-standalone/utils/createAdminToken.js <PASSWORD>
"encryptKey": "<ENC-KEY>",
"adminToken": "<GENERATED-BEFORE>",
"backend": "iotronic",
"expire_time": "30m"
"expire_time": "1h"
"auth_lr_mode":"basic"
}
```
Expand Down
2 changes: 1 addition & 1 deletion docs/iotronic-docs-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ if (argv.i != undefined && argv.e != undefined){
IoTronic_IP = process.env.IOTRONIC_PUB_IP;
}
else if(public_ip == undefined){
logger.error("[SYSTEM] - Iotronic public IP not defined: " + public_ip);
console.log("[SYSTEM] - Iotronic public IP not defined: " + public_ip);
process.exit();
}
else
Expand Down
2 changes: 1 addition & 1 deletion lib/init_iotronic.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ var initIoTronicModules = function() {
process.exit();
}
else
CROSSBAR_IP = crossbar_ip;
CROSSBAR_IP = crossbar_pub_ip;


logger.info("[SYSTEM] - Iotronic public endpoints:\n - WEB_IP: "+IoTronic_IP + "\n - CROSSBAR_IP: "+ CROSSBAR_IP + "\n - API_IP: " + API_IP)
Expand Down
39 changes: 19 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,27 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies":{
"nconf": ">=0.8.2",
"ip": ">=1.1.0",
"node-uuid":"<=1.4.7",
"nconf": "0.10.0",
"ip": "1.1.5",
"node-uuid":"1.4.8",
"autobahn": "18.10.2",
"ws":"6.1.0",
"express": ">=4.13.3",
"body-parser":">=1.16.1",
"log4js":"<=1.1.1",
"q":">=1.4.1",
"requestify":">=0.1.17",
"mysql":">=2.10.0",
"util":">=0.10.3",
"ps-node":"<=0.1.6",
"bcrypt":"<=1.0.3",
"optimist":"<=0.6.1",
"cors":"<=2.8.4",
"nodemailer":"<=4.1.0",
"nodemailer-smtp-transport":"<=2.7.4",
"jsonwebtoken": "<=8.1.0",
"swagger-jsdoc":"<=1.9.7",
"md5":"<=2.2.1",
"crypto":">=1.0.1"
"express": "4.16.4",
"body-parser":"1.18.3",
"log4js":"1.1.1",
"q":"1.5.1",
"requestify":"0.2.5",
"mysql":"2.16.0",
"ps-node":"0.1.6",
"bcrypt":"1.0.3",
"optimist":"0.6.1",
"cors":"2.8.4",
"nodemailer":"4.6.7",
"nodemailer-smtp-transport":"2.7.4",
"jsonwebtoken": "8.3.0",
"swagger-jsdoc":"1.9.7",
"md5":"2.2.1",
"crypto":"1.0.1"
},
"repository": {
"type": "git",
Expand Down
8 changes: 7 additions & 1 deletion scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ DISTRO=`cat /etc/*release | grep DISTRIB_RELEASE | cut -d "=" -f2`

echo "--> Server Distribution: " $DISTRO


# Services management scripts

if [ "$DISTRO" = "14.04" ]; then

# Configure init.d
Expand Down Expand Up @@ -52,7 +55,7 @@ if [ "$DISTRO" = "14.04" ]; then
fi


elif [ "$DISTRO" = "16.04" ]; then
elif [ "$DISTRO" = "16.04" ] || [ "$DISTRO" = "16.10" ] || [ "$DISTRO" = "18.04" ] || [ "$DISTRO" = "18.10" ]; then

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


mkdir -p /var/log/iotronic/plugins/
mkdir -p /var/log/wstun/
touch /var/log/iotronic/s4t-iotronic.log

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

mkdir -p /var/log/iotronic/plugins/
mkdir -p /var/log/wstun/
touch /var/log/iotronic/s4t-iotronic.log

MYSQL_PW=
Expand Down

0 comments on commit 4041b08

Please sign in to comment.