Deploy Bitnobi - myantandco/RA-BitnobiPilotJuly2020 GitHub Wiki
These instructions are for first time installation of Bitnobi. If you already have Bitnobi installed and want to upgrade to a new version refer to the page Upgrading Bitnobi in the Administration section.
Please Deploy JupyterHub server first before following the steps below. The JupyterHub API token will be needed during Bitnobi initialization.
By default, Bitnobi is bundled with a self-signed certificate to support HTTPS and this page describes the deployment steps with the bundled certificate. Self-signed certificates will generate browser warnings the first time that a user connects to your Bitnobi site. If you have a CA signed certificate and wish to use it instead, please see this page after completing the deployment steps below.
Log into the server and open a terminal window for the following steps.
Bitnobi is distributed as docker images and so docker community edition must be installed on your target server. To test if docker is installed type the command docker -v
and it should return something like:
Docker version 19.03.5, build 633a0ea838
If you need to install docker, Here is the condensed sequence of commands. Note that you need to type y
after some of them. :
sudo apt update
sudo apt install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt update
sudo apt install docker-ce
sudo groupadd docker
sudo usermod -aG docker $USER
After executing the above commands, you need to logout and login again for the usermod
change to take effect.
These were extracted from the following links:
- https://docs.docker.com/install/linux/docker-ce/ubuntu/
- https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user
Login to the dockerhub repository using your assigned userid/password and then pull the following images to your server.
docker login
docker pull bitnobico/ra-bitnobi-backend
docker pull bitnobico/ra-bitnobi-frontend
docker pull bitnobico/bitnobi-jupyter
docker pull bitnobico/bitnobi-mongodb
The pull requests can take a few minutes to complete. Once they are available use the following docker commands to give them an alternative set of tags:
docker image tag bitnobico/ra-bitnobi-backend ra-bitnobi-backend
docker image tag bitnobico/ra-bitnobi-frontend ra-bitnobi-frontend
docker image tag bitnobico/bitnobi-jupyter bitnobi-jupyter
docker image tag bitnobico/bitnobi-mongodb bitnobi-mongodb
Go to your home directory and extract the Bitnobi scripts from the bitnobi-backend docker image by temporarily mounting a container:
cd ~
docker run --name temp-container-name ra-bitnobi-backend /bin/true
docker cp temp-container-name:/home/Bitnobi-V1/hostScripts ra-bitnobi
docker rm temp-container-name
Before starting Bitnobi the first time you must run an initialization script to create additional subdirectories and initialize services. This script will prompt you for details for:
- an email delivery service (used for the "forgot password" functionality),
- URL for the Replica Synthesis service
- password to be used for the MongoDB database
cd ra-bitnobi
./init.sh
The initialization will create files in the config
subdirectory. The bitnobi_env.list
file is created to set the environment variables for the Bitnobi backend container during startup.
Start Bitnobi process with the following command:
./start.sh
You can use the docker stats
command to verify that all the containers are running.
Now open a Chrome browser and navigate to https://<server name>/
. This should open the Bitnobi main page. Please note that because you are using a self-signed certificate the browser will generate warnings the first time that you access the Bitnobi site.
The first user to sign up to Bitnobi will become the admin
user. Please sign up now and define a username and password for the admin user.