snapcraft-grafana
The purpose is to use snapcraft to build the grafana as snap package.
Requirement
You need to have a go 1.8+ environment by using gvm for go version control:
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source ~/.gvm/scripts/gvm
gvm install go1.8.3
gvm use go1.8.3 --defaultImportantly, installing snapcraft:
sudo apt-get update
sudo apt-get install snapcraftInstall nvm (Use LTS Release)
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejsHow to build
Run snapcraft to build a snap.
How to rebuild
snapcraft clean
snapcraftPhantomjs issue for building armhf arch
For armhf, I hit the phantomjs build failed with compiling the grafana,
and I forked the phantomjs to work around errors by refering this link [2].
After getting a successful compilation of phantomjs, just copy binary
bin/phantomjs to /usr/bin.
To fork my works:
git clone git@github.com:woodrow-shen/phantomjs.git[1] https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu
[2] https://github.com/aeberhardo/phantomjs-linux-armv6l