GIVE Tutorial 2.1: Easy local deployment of GIVE with GIVE-Docker

Table of Contents

Introduction to GIVE-Docker

The traditional way to deploy web service needs to install dependencies and configure environment at the operating system level. Although we already supplied a comprehensive tutorial for system-level custom installation of GIVE, it’s hard for users who lack experience in Linux administration to follow. Even expert users find it annoying.

Here, we provide a modern approach to deploy GIVE, GIVE-Docker. We built GIVE-Docker based on Docker container technology. It’s an operating-system-level virtualization technology that makes, build, ships and deploys standardized software and web service much easier as well as more elegantly without performance drop. Following this tutorial, you can set a completed genome browser on your computer in minutes. We recommend all users to use GIVE-Docker for deployment.

The GIVE-Docker image is published on DockerHub. It’s built on a LAMP on Ubuntu container. Scripts for building GIVE-Docker can be found in our GIVE-Docker GitHub Repo. The GIVE-Docker image delivers an already configured GIVE with LAMP environment (Apache2, MySQL and PHP on Linux), data hub and GIVE-HUG, GIVE-Toolbox, a pre-built demo genome browser of Demo2-ENCODE2_ChIA-PET, and a set of example data for learning the usages of GIVE-Toolbox. Besides, the root account password of MySQL in GIVE-Docker is Admin2015.

How to use GIVE-Docker?

4-steps to deploy GIVE

Configure The Host Server for Web Accessibility

After the 4 steps of deployment, you will get a local GIVE service. You can use it like a standalone application without internet access. If your host server is web accessible (can be accessed by other people through internet with HTTP/HTTPS), then you can configure the GIVE Docker container for using GIVE service remotely, like using our GIVE Data Hub.

In fact, you only need to set the give.Host variable to the domain name (with protocol and/or port if necessary) of your host server. We provide a shell script tool config_host.sh for configuring the host server. Just run the following command line in the give container. Learn how to login to the container using docker exec command in the essential tips section. To learn more about config_host.sh and other tools in GIVE-Toolbox, please read GIVE-Toolbox tutorial.

  docker exec -t -i give /bin/bash
  bash config_host.sh -r /var/www/give -d "http://give.genemo.org:40080"

The default value in GIVE-Docker is set as give.Host = 'http://localhost:40080'. You need to replace the default the value with your <host_url>, such as give.Host = 'http://give.genemo.org:40080'.


Note: You can consult the IT department of your organization for a subdomain, or buy a domain name from one of the domain name registrars (for example, NameCheap, enom or Go Daddy, you may also search for “domain name registrar” and pick the one you like). Once you have a domain/subdomain pointing to your server, you may use the URL as your host_url.

Although not recommended for security reasons, you may also use your server’s public IP address (together with the protocol and the port if needed) as the host_url value. An easy way of finding your public IP address would be to search “My IP” in Google from a browser launched on your server. If you cannot launch a browser from the server for any reason, you may get your IP from terminal/console instead:

If your IP is an IPv6 address (values like 01ab:23cd:45ef:6789:f0:0:1234:5678), please add square brackets [ and ] beside the IPv6 address before replacing give.Host. For example: give.Host = 'http://[01ab:23cd:45ef:6789:f0:0:1234:5678]:40080' ***

You may also directly edit the file  /var/www/give/html/components/basic-func/constants.js in GIVE-Docker to update your give.Host value if you want.

Use GIVE-HUG in GIVE-Docker

You should know the GIVE-HUG in GIVE Data Hub, which makes customizing and sharing gneome browser much easier in single HTML file. The GIVE-HUG is also integrated in GIVE-Docker. You can use the URL “http://<domain name>:<port>/data-hub.html” to access the local data hub on your host server and utilize GIVE-HUG to generate customized genome browser in single HTML file. Please check the tutorial of GIVE Data Hub for more information.

Tips:

Essential tips for adding data to GIVE container

After successfully deploying GIVE, you can utilize the power of GIVE to build your own genome browser. You can learn how to add your own data to your GIVE data source using GIVE-Toolbox in GIVE Tutorial 3. If you want to directly use MySQL commands (NOT recommended), you can read manual 3.2. MySQL commands for managing data in GIVE data source.

Here, we give you some essential tips on using GIVE container. You can read Docker official docs to learn more of Docker usage.

 You can login to the running GIVE container give as root for further operations.

  docker exec -t -i give /bin/bash

Alternatively, you can also directly login to the MySQL database of the container give.

  docker exec -t -i give mysql -u root -p

The password of MySQL root account is Admin2015.

Update to the latest GIVE

As we are continuously developing GIVE, the GIVE-Docker image will be rebuilt when we made important changes to GIVE. The latest version of GIVE-Docker image is released in the DockerHub with latest tags and the default pull is the latest version. Hence, if you want to update to the latest GIVE-Docker, you need to run pull command docker pull zhonglab/give again and re-run a new GIVE container. Keep in mind that those existing containers will not be affect by the updated image. So if you have already built a lot of data in existing GIVE container, you might not want to update GIVE-Docker because you don’t want to re-built all those data in a new container again. Here, we provide two approaches to update GIVE-Docker or GIVE. ** *In fact, if you are using Docker Volume or Data Container, it’s much easier to share or transfer your data between different containers. It’s a good strategy for specific users very familiar with Docker. ***