Challenge Overview

1.    Project Overview

1.1    System Description

The client for this project has decided to build a platform that will support the sale, exchange, and redemption of gift cards between businesses and individuals.  The goal of this platform is to help small businesses expand, using both web and mobile layouts, by giving them a simple way to raise capital and acquire new customers using gift cards.

The client needs to create a high quality platform that is easy-to-use even for business owners that don’t have a lot of technical expertise.  Many business owners are not technologically sophisticated, so creating a platform that is simple to understand and navigate is also a top priority.

The main function of the platform will be to allow business to post virtual gift cards for sale on the platform.  Individual users will be able to browse and buy these gift cards, as well as resell or trade gift cards they own.  Using the mobile layout, users will be able to redeem their gift cards at the business, and the business will be able to process gift card redemption at their point of sale.

This assembly is responsible for setting up the AWS infrastructure.

 

Since this assembly is a bit unusual - it doesn't require to develop and assembly software, but build an infrastructure - it won't affect your reliability and rating.

1.2    Competition Task Overview

A complete list of deliverables can be found in the TopCoder Assembly competition Tutorial at:

http://apps.topcoder.com/wiki/display/tc/Assembly+Competition+Tutorials

Please find attached the detailed Deployment Guide in the attached codebase. 

Note: System architecture is also attached for reference.

Time constraint
This project has tight time line so
1) the review phase is only 24 hours
2) we would like to avoid any timeline extension, please ask questions early

 

1.2.1    Scope

This assembly is responsible for the following parts.

1. Setup application server (node.js+express) including Wordpress and SMTP

2. Setup database server

Ensure app server can access the DB and configuration at the app server is relevantly updated.

3. Continuous integration setup

The provided codebase must be deployed as a proof-of-concept. Once the AWS servers are up and the codebase is initially deployed, the developer/admin must be able to deploy the updates easily doing the following:

1)    push code update into the github repository in the cloud.

2)    click a button (or run a command) in the admin console (e.g. Jenkins) and the update deployed on both application and database servers. Configuration must be updated automatically (DB IP address or whatever relevant)

Jenkins – the CI server – will be deployed at the CI server instance and accessed via web browser.

The workflow must be the following: developers pushes his code from his/her desktop to github, then push github update to the app server

S3 must be used as a file storage (incl).

4.  Backup and restore

The following features are desired:

1)    auto backup of the code every time deployment is performed;

2)    database backup on schedule (e.g. weekly)

3)    opportunity to restore the previous version of the database with a button click

4)    opportunity to roll the codebase back with a button click

5)    e-mail notification when either codebase or database backup has been launched but failed

6)    notifications persons list must be editable on the web. User must be able to add/delete the e-mail (and names/roles against it).

 

5.  Performance monitoring and notifications

In case of the services failure the notifications will be sent. Admin user must be able to set up the notification persons list.

Each service must be polled every 5 minutes.

The cases when notifications are sent is the following (to be continued):

-      any server error at the database or application server (HTTP 50x response);

-      deployment failure

-      backup failure

-      lack of memory

-      lack of storage

-      CPU overload (not enough computational capacity to respond all requests)

Successful events and errors must be logged.

Once down the servers must be able to automatically restart.

 

8.   Physical Deployment

·       The application will achieve a 99.5% uptime

·       The application will have 24x7 availability

·       The new system needs be scalable, meaning that as the volume of users and orders grow the system can scale (by adding additional app servers, web services, database, etc) to make the application run correctly.

·       All pages in the application should be loaded in 2 seconds or less after the initial hit.

Software:

·       Node.js 0.10.34

·       Wordpress 4.1

Database:

·       MongoDB 2.6 or later

Application Server:

·       Apache HTTP Server 2.4.10 or later

Operation System

·       Linux

 

12.  Initial actions to set up infrastructure

Members are welcome with own suggestions/editions to this list.

A)   Backup, CI and monitoring server (Auxiliary server for short)

1)    set up the host

2)    set up monitoring service, documenting performance metrics

3)    set up  CI service

4)    configure and test CI service

5)    documenting the host and its services

 

B)    Database server

6)    set up the host

7)    set up monitoring agent, documenting performance metrics

8)    set up MongoDB and and deploying the database dump

9)    set up backup script and backup rotation; documenting the back-up and restore procedures

10) documenting the host and its services

 

C)    Application server

11) set up the host

12) set up monitoring agent, documenting performance metrics

13) setting up environment at the application server (including installation and configuration of node.js and dependencies)

14) setting up a web server (Apache) at the application server (3 web hosts - app, CI, and monitoring)

15) documenting the host and its services

 

The infrastructure must be scalable which means that in future there must be on obstacles to setting up a cluster of app or DB servers. For this purpose load balancer setup is required.



Final Submission Guidelines

- Documentation of steps done to perform the task. Clear and detailed verification steps for all required features must be described.

- Working app at AWS

- Working mechanism of backup/restore and continuous integration

The winner will be responsible for copying all the assets to the client's environment.

 

It is supposed that you will use 3 t2.micro instances (app, DB and CI) within 10 days and thus will fit into 750 hours/months of the AWS free tier.

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30049724