Key Information

Register
Submit
The challenge is finished.

Challenge Overview

For this challenge, we'd like to improve the experience for launching AWS EC2 Iinstances by creating tags.

When launching EC2 instances, we'd like to create a Name tag, the value should be the AMI name (basically what we have in the VM manager dropdown) and the challenge ID.

In order to implement this, we need to upgrade the aws Java SDK first, because the old version  (direct-app/lib/third_party/aws-java-sdk/aws-java-sdk-1.0.004.jar) does not support this functionality.

So we'd like to do

1. Upgrade the AWS Java SDK for EC2, please use 1.10.72 release. You don't need to use all the SDK, just include the library for EC2.

2. Update the cloud_vm_service component in case there is any incompatibility, and make sure the current functionality is working.

3. Add the logic for creating Name tag when launching EC2 instance,  the value should be the AMI name and the challenge ID, like STUDIO VM 2.9 - 30035285 

             // Tag EC2 Instance

              CreateTagsRequest createTagsRequest = new CreateTagsRequest();

              createTagsRequest.withResources(instance.getInstanceId()).withTags(new Tag("Name", vmImage.getTcName() + " - " + vmInstance.getContestId()));

              client.createTags(createTagsRequest);

4. For custom user data, we'd like to pass two more values - challenge id and challenge name, so we can customize the notification email.

About Testing

In order to properly test the VM allocation functionality, you need to setup your AWS account, as you need to see the Name in your EC2 Dashboard, and in EC2 instance to check the metadata, see the challenge id and challenge name is properly exposed.

Luckily, for new AWS account, there will be Free Tier to use, so you don't need to pay any for testing.

An sample sqls will be provided in forum, so you can replace with your setttings and setup properly for your testing.

For checking the ec2 metadata, please check http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

once you login in VM, do

#Download metadata tool
echo getting metadata tool...
wget -q -O ec2-metadata http://s3.amazonaws.com/ec2metadata/ec2-metadata
chmod +x ec2-metadata

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

  • New/Updated files
  • Deployment Guide and Verification Steps

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30053864