The current iteration of the "sMAP stack" has changed since the original conception:
Though the installation/setup instructions for all of these exist in some form across many links, this page will bring them all together for a single definitive installation document for The Once And Future Stack.
This installation assumes a Debian-based distro such as Ubuntu. These instructions have been developed and tested on Ubuntu 14.04, 14.10.x and 15.04, but installing these packages on other systems should be straightforward.
These are the required packages on the system for the rest of the instructions to work.
If you do not have apt-get
on your system, you can try brew
for Mac OS X or yum
for RPM systems.
If you are on Windoze, you are on your own.
sudo apt-get install python-dev python-pip build-essential librados-dev git mongodb nodejs nodejs-legacy npm supervisor mercurial curl
There are several Go-based components. Occasional binary releases are available
for these, but it is recommended to compile them from source while still under
active development. It is recommended to follow the official installation
instructions, including setting up your $GOROOT
environment variable.
I prefer to place all environment variables in my ~/.bashrc
file.
Make sure that your $GOPATH
environment variable is configured correctly and
is on your $PATH
. Also, add $GOPATH/bin
to the end of your $PATH
as well.
This is how I do it:
$ mkdir $HOME/go
# inside .bashrc
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
Once nodejs
and npm
are installed, you will need to install both
bower and
react-tools in a special way so
that they are generally accessible on your system. The other node packages can
be installed "locally".
$ sudo npm install -g bower react-tools
curl https://install.meteor.com/ | sh
Mongo will have been installed by the above aptitude command. For deployments, it is recommended to use the Mongo service handler, which will handle everything for you:
$ sudo service mongodb start
For development, it can be helpful to run MongoDB in the foreground:
$ mkdir mongodb_data
$ mongod --dbpath mongodb_data
Be aware that if this crashes, you will need to manually restart.
$ go get -u -a github.com/SoftwareDefinedBuildings/quasar/qserver
$ go install -a github.com/SoftwareDefinedBuildings/quasar/qserver
$ curl -O https://raw.githubusercontent.com/SoftwareDefinedBuildings/quasar/master/quasar.conf
$ qserver -makedb
# /etc/supervisor/conf.d/quasar.conf
[program:quasar]
command=/home/gabe/go/bin/qserver
autostart=true
autorestart=true
stderr_logfile=/var/log/quasar.err.log
stdout_logfile=/var/log/quasar.out.log
$ go get -u -a github.com/gtfierro/giles
$ go install -a github.com/gtfierro/giles
$ curl -O https://raw.githubusercontent.com/gtfierro/giles/master/giles.cfg
# /etc/supervisor/conf.d/giles.conf
[program:giles]
command=/home/gabe/go/bin/giles
autostart=true
autorestart=true
stderr_logfile=/var/log/giles.err.log
stdout_logfile=/var/log/giles.out.log
$ git clone https://github.com/SoftwareDefinedBuildings/upmu-plotter.git
Edit upmuplot/settings.json
and upmuplot/client/home.js
. The addresses can be hostnames
or IP addresses. All ports below are default, but if you have changed them in your installation,
change them here.
upmuplot/settings.json
{
"archiverUrl": "http://<address of btrdb>:9000",
"public": { "archiverUrl": "http://<address of btrdb>:9000" }
}
upmuplot/client/home.js
tagsURL: 'http://<address of giles>:8079/api/query',
dataURLStart: 'http://<address of btrdb>:9000/data/uuid/',
bracketURL: 'http://<address of btrdb>:9000/q/bracket',
csvURL: 'http://<address of btrdb>:9000/wrappedcsv',
# /etc/supervisor/conf.d/plotter.conf
[program:plotter]
command=/usr/local/bin/meteor --settings settings.json
directory=/srv/plotter/upmuplot
autostart=true
autorestart=true
stderr_logfile=/var/log/plotter.err.log
stdout_logfile=/var/log/plotter.out.log
$ npm install
$ bower install
$ jsx react_src public/build
# /etc/supervisor/conf.d/deckard.conf
[program:deckard]
command=/usr/bin/npm start
directory=/srv/deckard
autostart=true
autorestart=true
stderr_logfile=/var/log/deckard.err.log
stdout_logfile=/var/log/deckard.out.log