Skip to content

Instantly share code, notes, and snippets.

@tpmccallum
Last active September 29, 2018 02:27
Show Gist options
  • Save tpmccallum/64a0d69f456118ef0b44a68937776c10 to your computer and use it in GitHub Desktop.
Save tpmccallum/64a0d69f456118ef0b44a68937776c10 to your computer and use it in GitHub Desktop.
Installing CyberMiles Travis Testnet on a test instance of Ubuntu 16.04 LTS

Disclaimer: These instructions are for a brand-new disposable 16.04 Ubuntu test instance which has the sole purpose of running and testing the CyberMiles Lity compiler, CyberMiles libENI framework and the CyberMiles testnet called Travis.

This file now lives at the following URL

Housekeeping

#/bin/bash
#System preparation Ubuntu 16.04 LTS
cd ~
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y autoremove
sudo apt-get -y install gcc
sudo apt-get -y install git
sudo apt-get -y install make
sudo apt-get -y install curl
sudo apt-get -y install wget
sudo apt-get -y install cmake
sudo apt-get -y install bison
sudo apt-get -y install openssl
sudo apt-get -y install binutils
sudo apt-get -y install automake
sudo apt-get -y install libssl-dev
sudo apt-get -y install libboost-dev
sudo apt-get -y install libaudit-dev
sudo apt-get -y install libblkid-dev
sudo apt-get -y install e2fslibs-dev
sudo apt-get -y install build-essential
sudo apt-get -y install libboost-all-dev

Installing the CyberMiles Lity compiler

#/bin/bash
cd ~
git clone https://github.com/CyberMiles/lity.git
cd lity
mkdir build
cd build
cmake ..
make
./lityc/lityc --help

Installing libENI

#/bin/bash
cd ~
wget https://github.com/skymizer/SkyPat/archive/v3.1.1.tar.gz
tar -zxvf v3.1.1.tar.gz
cd SkyPat-3.1.1
./autogen.sh
./configure
make
sudo make install

cd ~
git clone https://github.com/CyberMiles/libeni.git
cd libeni
mkdir build
cd build
cmake ..
make

Installing Golang and the CyberMiles Travis TestNet

#/bin/bash
cd ~
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
source $HOME/.gvm/scripts/gvm
gvm install go1.10.3 -B
gvm use go1.10.3 --default
echo 'export GOPATH=~/.gvm/pkgsets/go1.10.3/global' >> ~/.bashrc
echo 'export GOBIN=$GOPATH/go/bin' >> ~/.bashrc
echo 'export PATH=$GOBIN:$PATH' >> ~/.bashrc
source ~/.bashrc
go get github.com/CyberMiles/travis

#PLEASE NOTE: The above will return an error such as "can't load package ... no Go file in ...",
#Please just ignore this error and continue on with the installation

cd $GOPATH/src/github.com/CyberMiles/travis
git checkout master
make all

Testnet Config

#/bin/bash
cd ~
rm -rf .travis
git clone https://github.com/CyberMiles/testnet.git
cp -r testnet/travis/init .travis

Start Testnet

#/bin/bash
cd ~
# Please ensure that the system paths are known, or else the travis command will not be found (you will get an error like this "The program 'travis' is currently not installed")

echo 'export GOPATH=~/.gvm/pkgsets/go1.10.3/global' >> ~/.bashrc
echo 'export GOBIN=$GOPATH/go/bin' >> ~/.bashrc
echo 'export PATH=$GOBIN:$PATH' >> ~/.bashrc
source ~/.bashrc

travis node start --home=./.travis

Attach to Travis console

#/bin/bash

# Again, please ensure that the system paths are known, or else the travis command will not be found (you will get an error like this "The program 'travis' is currently not installed")

echo 'export GOPATH=~/.gvm/pkgsets/go1.10.3/global' >> ~/.bashrc
echo 'export GOBIN=$GOPATH/go/bin' >> ~/.bashrc
echo 'export PATH=$GOBIN:$PATH' >> ~/.bashrc
source ~/.bashrc

travis attach http://localhost:8545
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment