Register
Submit a solution
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 Competition Engine.

But Arena VM is using old OS, we are in the processing of creating a new VM - TC VM 3.0, but it is not ready yet.

For this series of challenges, we'd like to use the power of community to help getting it ready.

Competition Task Overview

The purpose of this challenge is to make the TC API services up and function properly.

Previously, it is not easily, we normally test the new steps, and commit into the vm_setup svn, then launch a new VM to verify.

For the challenge, we'd like to create some clean utilities and create a new api_setup.sh script file, so we can repeatedly setup TC API related staff for VM maintenance.

About Current VM Setup Scripts

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

Following is the general description from my understanding.

  • /root/hook-script.sh - this is the hook script that will be called after the VM allocated, it will retrieve the main-vm-script.sh to start the vm initialization, it is installed in the VM image, no change needed.
  • /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 = unified3
  • /root/set-env-variables.sh - this setups the env variables, need to be called when you login to bash, before starting run any sh scripts related to 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/*-setup.sh - the shell scripts for setting up various part, you can get the general understanding about the name, if you have any confusion, you can ask in forum for explanation.
  • /root/startup-tmp/arena_init_script.sh - this sets up all related staff for arena (topcoder competition engine), but it is out date, which we are planning to update.
  • /root/startup-tmp/start_services.sh - it starts all the services.

Challenge Scope

For this challenge, we'd like to do some exploration.

  1. Create a new api_setup.sh for TC 3.0 VM, you can take the steps in api_init.sh used in Arena VM 2.10. An Arena VM with root access will be allocated for each member for reference.
  2. Create a new clean_api_setup.sh file, which will rollback the setup of a[.sh, you can learn from the similar script in Arena VM 2.10.
  3. Create a start_api.sh file, which will be used to start the api services
  4. Create a stop_api.sh file, which will be used to stop api related services, this can be invoked by clean_api_setup.sh before doing real cleanup.
  5. use yum if apply instead of compiling from source code for any dependency.

Verification

in order to verify the repeatly running the api_setup.sh, you can visit the corresponding http ending point for verification.

Winner Responsibility

the merging of scripts with VM initialization process is out of scope for winning, because of permission, but winner will be responsible to provide support, if we meet any merging issue.

About VMs

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.

Two VMs with root access will be granted to each competitor - One Arena VM and One TC VM 3.0 Beta.

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

and please reference VM Image 2.5 - TopCoder Wiki for similar info related to TC VM 3.0 Beta.

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/changed files
  • Detail Guide to run the scripts.
  • Working VM environment for verification.

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

ID: 30047761