Topcoder - Create Dockerfile for Setup Base Image To Build and Run Online Review

Register
Submit a solution
The challenge is finished.

Challenge Overview

Scope

For this challenge, we'd like to build a docker image which contains the necessory environment for building and running online review similar as in Topcoder Consolidated VM.

There will be two Dockerfiles to be built.

1. A Dockerfile will be used to build the docker image which setup the necessory software and packages, so after the docker image is built, this image can be reused.

2. Another Dockerfile will be created to build and run online review.

Requirements 

Please check http://apps.topcoder.com/wiki/display/docs/Online+Review+Setup+Guide for general setup, and if you need an Topcoder Consolidated VM for reference and recheck, please request in forum.

Environment Setup Dockerfile

this Dockerfile will be used to create the base environment for building and running Online review.  It is basically going to mimic the similar environment in  Topcoder Consolidated VM under the tcs user. But we will use root user in docker container.

1. The base image should be FROM centos:6

2. jboss 4.0.2 should be retrieved and unzip to /root/ directory

3. Oralce JDK 1.7 and Apache Ant should be retrieved and unzip to /opt/ directory

4. Environment variables settings in home/tcs/.bash_profile (in VM) should be properly set in Dockerfile, this will be provided in forum.

5. Don't use CP command to copy over the software and packages locally, please use official site as much as possible, like jboss 4.0.2, apache ant 1.7.0, JDK 1.7 etc.

Build and Run Dockerfile

1. This Dockerfile will be built based on the Environment Setup Dockerfile, that is say you can replicate steps in the above Dockerfile, or use the above Dockerfile to build a image and push to docker hub for reuse.

2. The source code will be checkout out locally, and mount to the docker container. It should be mount to /root/online_review directory

3. create a new token.properties.docker which contains configuration for docker environment setup.

3. after mount, it will do 'ant first_deploy' and 'ant deploy' to deploy the online_review into jboss 4.0.2 instance

4. it will start the jboss service and start the auto_pilot

5. The 8080 port should be exposed by the Dockerfile, so we can visit the Online Review application outside the docker containers.

DOCKER_SETUP.md file

Please document the clear steps that every user can read and follow the setup the docker environment, use the Dockerfiles to run the Online Review application locally.

About Informix Database

For local setup, we are going to use informix docker (https://hub.docker.com/r/appiriodevops/informix/tags/), you can run it locally, and use  --link option to make it linked with Online Review docker container. so the online review application can access the informix database properly.

Verification

As stated in the scope section, with the built docker image by using your solution, we can follow the given steps to build and run online review inside the docker container.

and we can visit the Online Review application outside the docker image, and used it as usual.

VM ENVIRONMENT

If you need a Topcoder VM to work on this challenge, Please request the VM in the challenge forum.

Information about VM can be found below:

VM specific information is found here: http://www.topcoder.com/wiki/display/docs/VM+Image+2.5

Upon registration as a submitter or reviewer you will need to request a VM based on the new TopCoder Cockpit/Direct image. To request your image, please use the forum. Before requesting your VM, you need to ensure that you have an SSH key created and in your member profile. If you don't have your SSH key set in your profile, please follow https://help.github.com/articles/generating-an-ssh-key/, and send the public ssh key to support@topcoder.com, once it is setup, you can request your VM in forum.



Final Submission Guidelines

  • Two Dockerfiles with necessory setup files, which can not be downloaded from public network.
  • A Markdown document, clearly described the usage and way to run the online inside the docker.

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30053881