Web Development Container

Compute Resources

Assumptions

Software Included

Build Web Development Docker Container

Before building the web devlopment Docker Container, we must clone the public GitHub repository. The web development GitHub repository contains all the requisite files required for building the web development Docker container for use on compute1.

  1. Log onto compute1 (replacing wustlkey with your assigned WUSTL Key)

> ssh wustlkey@compute1-client-1.ris.wustl.edu
  1. Clone the RIS web development Docker repository to $HOME on compute1

> cd $HOME && git clone https://github.com/nhatas/ris_webdev_docker_container
  1. Build and push your Docker container to Docker Hub. Documentation on how to do this can be found here.

Submitting the Web Devlopment Job

  1. Set the MYSQL_PATH environment variable to the path you wish to store your database files. In the example below the database files will be stored in the user’s home folder.

    Note

    Please refer to our documentation for more information on the available home folder disk space.

> export MYSQL_PATH="$HOME/mysql"

Warning

Complete export MYSQL_PATH= with a path to a folder you have access to. Do not leave this blank.

  1. Set the LSF_DOCKER_VOLUMES environment variable to mount the location of your webserver files, as well as any other folders you wish to have access to inside of the docker container. Documentation on this environment variable can be found here.

> export LSF_DOCKER_VOLUMES="/storage1/fs1/${STORAGE_ALLOCATION}/Active/webserver/:/var/www/html/"
  1. Submit the job using bsub and the LSF_DOCKER_PORTS environment variable to allow web access to the Docker container. In the example below, port 8080 is used to access the Docker container. Documentation on this environment variable can be found here.

> LSF_DOCKER_PORTS="8080:8081" bsub -Is -R "select[port8080=1]" -q general-interactive -a 'docker(location-of-docker-image)' /bin/bash

You are a member of multiple LSF User Groups

If you are a member of more than one compute group, you will be prompted to specify an LSF User Group with -G group_name or by setting the LSB_SUB_USER_GROUP variable.

  • Since LSF is running interactively, it will output the name of the host it’s running on in the terminal.

  • The host will be the IP address needed to access the webserver files.

  • For example: <<Starting on compute1-exec-187.ris.wustl.edu>> translates to the IP being https://compute1-exec-187.compute.ris.wustl.edu:8080

  • Please see our documentation for more information on selecting a port.

  1. Once connected, run a script to start the Apache 2 server and generate MYSQL configuration files.

> /app/script.sh
  1. Access PHPMyAdmin by appending /phpmyadmin to the address of the host from step 3.

../../../../_images/phpmyadmin-success.png

Version Control

Git is available in the Docker container to track and commit changes to your web development files.