CompilingInfluxDBForPOWER

Here are my notes on compiling InfluxDB

  • I was using Ubuntu on POWER9 in a PowerVM LPAR and my user name is nag (appears in directory names):
  • I got to compile influxd (the actual Time-Series database) and influx (the command line program to access and alter influx)
  • Not completed was the tools to build a package - in this case a Ubuntu .deb install file.
Virgin fresh install of Ubuntu 18.04 Linux on Power

sudo apt update
sudo apt upgrade

Not sure if these required but they were previously installed
gcc
libncurses-dev*
wget
ssh
nmon


Install gvm - a Go version fetcher

sudo apt install bison
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

Check gvm works and use it to download Go version 1.11
gvm
gvm install go1.11
gvm use go1.11 --default

Use go to get dep - some dependancy check
go get github.com/golang/dep/cmd/dep
sudo apt install git-all
sudo apt install mercurial

Setup GOPATH to point your your local Go enviroment
echo $HOME
mkdir $HOME/gocodez
export GOPATH=$HOME/gocodez

Get InfluxDB
go get github.com/influxdata/influxdb

influxdb has loads of other Go tools it depends on so we need to get them
pwd
cd $GOPATH/src/github.com/influxdata/influxdb
dep ensure

Nowstart the build
go clean ./...
go install ./...

The install put the binaries in a local bin
ls $GOPATH/bin

Attempt making a package - includes fixing a missing link to dep
python build.py --help
ls /home/nag/gocodez/bin/dep
which dep
ln /home/nag/.gvm/pkgsets/go1.11/global/bin/dep /home/nag/gocodez/bin/dep
python build.py --package

Now we have a missing package ruby gem to sort out - https://rubygems.org/

  cd $GOPATH/bin

Run the binary service
sudo ./influxd

Run the admin tool
./influx
> create database njmon;
^D

Connecting Grafana:
browse to <hostname>:3000/login
Added the new influxDB data source to Grafana = Worked OK