We will need linux OS, Ubuntu 18.04 LTS is recommended. We need physical or virtual server with at least 16GB RAM, some 50GB storage for the operating system, and a 200GB block storage volume for a ZFS pool.
ZFS is a feature-rich filesystem developed by Sun Mycrosystems, and currently is is available in Linux. ZFS allows quick and lightweight snapshots, and fast rollbacks to existing snapshots. Also it supports compression and adjustable record size suitable for the application.
A is a set of one or more processes that are isolated from the rest of the system.
LXC containers run natively on the operating system, sharing it across all of your containers, so our apps and services stay lightweight and run swiftly in parallel.
# Optionally, a parent filesystem. You either create child entries, or
# you can also use a flat naming scheme, like zdata/lightapi_lxc
zfs create zdata/lightapi
zfs set recordsize=128k zdata/lightapi
zfs set atime=off zdata/lightapi
# LXC container contents
zfs create -o mountpoint=/var/lib/lxc/lightapi zdata/lightapi/lxc
# SHINE blocks log, compressed, with 8KB records
zfs set compression=lz4 zdata/lightapi/shinedata
zfs set primarycache=all zdata/lightapi/shinedata
zfs set recordsize=8k zdata/lightapi/shinedata
# SHINE state shared memory. 4KB records, uncompressed, content is not cached
zfs create -o mountpoint=/var/lib/lxc/lightapi/rootfs/home/shine/data/state zdata/lightapi/shinestate
zfs set recordsize=4k zdata/lightapi/shinestate
zfs set primarycache=metadata zdata/lightapi/shinestate
Download Ubuntu 18.04 packages and set up a new container
# if needed, also adjust the MAC address to be unique
echo "lxc.start.auto = 1" >> /var/lib/lxc/lightapi/config
lxc-start -n lightapi
lxc-attach -n lightapi
Create shine user inside the container.
# this user was in default template
userdel -r ubuntu
useradd -G sudo -s /bin/bash shine
sed -i -e 's,^\%sudo.*,%sudo ALL=(ALL:ALL) NOPASSWD:ALL,' /etc/sudoers
chown -R shine:shine /home/shine
chmod 700 /home/shine/.ssh/
chmod 600 /home/shine/.ssh/authorized_keys
# out of LXC container
exit
# in again, as shine user
ssh -A shine@10.0.11.10
Build SHINE from Source
mkdir -p ~/shine && cd ~/shine
# Download SHINE Source
git clone git@gitlab.com:shine-traceability/shine-blockchain.git
cd ~/shine/shine-blockchain/
# Update Submodules
git submodule update --init --recursive
# Pull Changes
git pull --recurse-submodules
# Build SHINE Binaries
cd ~/shine/shine-blockchain/
./scripts/shine_build.sh
# Change the desired installation location to as per your env, example: ~/shine-blockchain/2.0
# SHINE install script
cd ~/shine/shine-blockchain/
sudo ./scripts/shine_install.sh
# SHINE manual install instead of above script
cd ~/shine/shine-blockchain/build
sudo make install
## you can find nodeeos and other binaries in ~/shine/shine-blockchain/build/bin
# Test SHINE Binaries
cd ~/shine/shine-blockchain/build
make test
# Uninstall SHINE
cd ~/shine/shine-blockchain
sudo ./scripts/shine_uninstall.sh