Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Project Overview

TopCoder Competition Engine is a system used for Single Round Matches (SRM) and Marathon Matches (MM). 

Currently, Arena VM is heavily used to challenges related to TopCoder Competiton Engine.

Competition Task Overview

Currently, the Arena VM is still using old JDK, if you try to run the following commands under user accounts, like apps, farm, deployer and mm, you can see 

JDK 1.5 is used.

The purpose of this challenge is to update the Arena VM initialization scripts to install and setup the latest update of JDK 7.0 properly, and retest that the TopCoder Competition Engine is still properly working for SRM and MM.

Arena VM Initialization Update

For this challenge, every competitor will be grant root access to the Arena VM, so you can find the vm setup scripts at home directory of root user.

Following is the general description from my understanding for Arena VM initialization scripts.

  • /root/hook-script.sh - this is the hook script that will be called after the Arena VM allocated, it will retrieve the main-vm-script.sh to start the vm initialization - no changes should be applied to this, as it is hardly installed to the AMI image.
  • /root/main-vm-script.sh - the main vm initialization script for setting up TC VMs, not just the Arena VM, the INIT_TYPE will determine the scope for initialization, for this challenge, you just need to focus on INIT_TYPE = arena
  • /root/startup-tmp - the directory contains the shell scripts checkout by main-vm-scripts.sh.
  • /root/startup-tmp/common-init.sh - this inits the common setup like softwares.
  • /root/startup-tmp/db-init.sh - this inits the informix database and mysql database.
  • /root/startup-tmp/arena_init_script.sh - this sets up all related staff for arena (topcoder competitition engine) and start service.
  • /root/startup-tmp/api-init.sh - this sets up the TC API under api account.
  • /root/startup-tmp/setup-env-variables.sh - this sets up the env variables, so you can re-run the init scripts, like arena_init_scripts.sh

Investigate Existing JDK 7

Currently, there is a JDK 7 (Update 17) installed to the Arena VM by common-init.sh, please investigate if this is used somewhere, if yes, let's retain it.

If no, let remove it.

Install Latest Update of JDK 7 

If you check common-init.sh (this can not repeatly executed), you can see 

# get updated Java 1.7
echo "getting updated java 1.7"
/usr/bin/scp -o StrictHostKeyChecking=no -B -i /root/.ssh/id_rsa-redhat_test-keypair root@$MASTERIP:/mnt/tcs/jdk-7u17-linux-i586.tar.gz /opt/
cd /opt
tar zxf jdk-7u17-linux-i586.tar.gz
rm /opt/jdk-7u17-linux-i586.tar.gz
cd /mnt

so we'd like you to provide an similar package like jdk7-7u18-linux-i586.tar.gz. then we can easily upload ot master server,and use in VM setup.

You don't need to upload it to master server. Just put in some public place, like Dropbox etc, which can be easily accessed.

Update .bash_profile to use JDK 7

If you check arena_init_script.sh, you can see the setup of the various accounts, like apps, deployer, farm and mm account, is unzipped for package files, like 

#################################################################
# apps user initialization
#################################################################
echo 'Initializing apps user'
/usr/bin/scp -o StrictHostKeyChecking=no -B -i /root/.ssh/id_rsa-redhat_test-keypair root@$MASTERIP:/mnt/$APPS_FILE /mnt/
rm -rf /home/apps
/usr/bin/unzip -q -u /mnt/$APPS_FILE -d /home
chown -R apps.apps /home/apps
su - apps -c "ln -s jboss-4.0.5.GA jboss"
chmod 600 /home/apps/.ssh/id_rsa
chmod 600 /home/apps/.ssh/id_rsa_github

We'd like you to update the $APP_FILE or similar by updating the .bash_profile in it to setup PATH properly. the updated files can be put in some public place, like Dropbox etc.

for testing, you can replace the 

/usr/bin/scp -o StrictHostKeyChecking=no -B -i /root/.ssh/id_rsa-redhat_test-keypair root@$MASTERIP:/mnt/$APPS_FILE /mnt/

by wget command.

Generally, files reference by $MM_FILE, $APPS_FILE, $FARM_FILE and $DEPLOYER_FILE should be all updated.

Verifying TopCoder Competition Engine with JDK 7

Previously, we have tried a POC Assembly - TopCoder Competition Engine System Upgrade - JDK 7, the winning submission will be attached in forum.

but the submission is based on old code, we'd like you to update based on the latest source code, and make sure the TopCoder Competition Engine is working properly with JDK 7 for both SRM and MM.

please check the DG in submission for details.

Arena VM Usage

Before asking your own VM, you need to have a public key on your profile before asking for the VM.

You can find more details on how to generate a key http://apps.topcoder.com/wiki/display/projects/Generate+SSH+Key and how to connect using it http://apps.topcoder.com/wiki/display/projects/Connect+Using+SSH+Key.

Please reference http://apps.topcoder.com/wiki/display/docs/Competition+Engine+VM+Setup for general usage.

Previously, we have made several update for the Arena VM.  So when the Arena VM allocated is available for you, there is a problem and a SRM contest already setup, you can reuse that for testing.



Final Submission Guidelines

Submission Deliverables

Below is an overview of the deliverables:

  • new files for arena vm initialization
  • updated shell scripts for arena vm initialization
  • Code and configuration changes for JDK 7 upgrade
  • A complete and detailed documentation documented explaining how to deploy the application including configuration information.

Final Submission

For each member, the final submission should be uploaded to the Online Review Tool.

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30046920