Workbench on Google Cloud Platform

Workbench on Google Cloud Platform

Requirements:



Create Virtual Machine


   Allow HTTP traffic  
   Allow HTTPS traffic

Settings before VM Creation


Post creation steps


Here is your created vm. In the green rectangle you will find public IP of your virtual machine.

Settings before VM Creation

Settings before VM Creation


Install workbench


SSH to the created virtual machine

$> gcloud compute --project <project-id> ssh --zone <vm-zone> <vm-name>

Login as root user

$> sudo -i

Install docker

$> curl -fsSL get.docker.com | sh

Install docker-compose

$> curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose  
$> chmod +x /usr/local/bin/docker-compose

Install dependencies

$> apt-get update -y
$> apt-get install -y git autoconf bison build-essential libssl-dev \
                                                              libyaml-dev libreadline6-dev zlib1g-dev \
                                                              libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

Create user

$> useradd --create-home -g users -G docker --shell /bin/bash workbench
$> su workbench 
$> cd $HOME

Install rbenv and ruby

$> git clone git://github.com/sstephenson/rbenv.git .rbenv
$> git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build  

$> echo 'export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
$> echo 'eval "$(rbenv init -)"' >> ~/.bash_profile 

$> source ~/.bash_profile\

$> rbenv install -v 2.5.1
$> rbenv global 2.5.1

$> echo "gem: --no-document" > ~/.gemrc

$> gem install bundler

Download workbench

$> git clone --recursive https://www.github.com/rubykube/workbench.git && cd workbench

Download submodules

$> make update

Download workbench dependencies

$> bundle install

Replace domain

Set $new_domain variable equal to your domain and run bash script:

#!/bin/bash
 
old_domain="wb.local" 
new_domain="your.domain"

files=(
    "compose/proxy.yaml"
    "compose/backend.yaml"
    "compose/app.yaml"
    "config/trading-ui.env"
    "compose/cryptonodes.yaml"
    "config/integration/fixtures/barong.json"
    "config/integration/fixtures/peatio.json"
    "config/peatio.env"
    "config/barong/seeds.yml"
    "config/toolbox.yaml"
)

for file in files; do
    sed -i "s/${old_domain}/${new_domain}/g" ${file}
done

Build images

$> make build

Run the application

$> make run