Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit ae0f7e6

Browse files
committed
2 parents c550aa2 + 45dd303 commit ae0f7e6

File tree

13 files changed

+137
-55
lines changed

13 files changed

+137
-55
lines changed

docker/online_review/README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,20 @@ docker build -t appiriodevops/online-review:build local
1515
The `env.sh` file in the submission defined the following variables:
1616
* ONLINE_REVIEW_SOURCE_ROOT - the root directory of the online-review codebase
1717
* ONLINE_REVIEW_DEPLOYMENT_DIR - the deployment directory that will contain the build the results
18+
* DISABLE_ONLINE_REVIEW - disable online review or not. 1 - disabled, 0 - enabled.
19+
* DISABLE_AUTO_PILOT - disable auto pilot or not. 1 - disabled, 0 - enabled.
20+
* DISABLE_LATE_DELIVERABLES_TRACKER - disable the late deliverables tracker or not. 1 - disabled, 0 - enabled.
21+
* DISABLE_REVIEW_ASSIGNMENT - disable review assignment or not. 1 - disabled, 0 - enabled.
1822

1923
The `docker-compose.yml` file in the submission defined the following services:
2024
* tc-informix - the topcoder informix database server
21-
* build-online-review - it will build the online-review and create a `jboss-4.0.2` directory containing the jboss and online-review deployment files in the configured deployment directory
22-
* build-auto-pilot - it will build the auto-pilot and create a `auto_pilot` directory containing the auto-pilot deployment files in the configured deployment directory
23-
* build-online-review-auto-pilot - it will build both online-review and auto-pilot as the `build-online-review` and `build-auto-pilot` services above.
24-
* run-online-review - it will run the online-review
25-
* run-auto-pilot - it will run auto-pilot
26-
* run-online-review-auto-pilot - it will run both the online-review and auto-pilot.
25+
* build-online-review - it will build services depending upon the DISABBLE_XXX flags
26+
* run-online-review - it will run services depending upon the DISABBLE_XXX flags
2727

2828
You need to update the variables' values in `env.sh` files, and then execute `source env.sh`.
2929
Then execute the following commands:
30-
* `docker-compose up build-online-review` to build online review
31-
* `docker-compose up build-auto-pilot` to build auto pilot
32-
* `docker-compose up build-online-review-auto-pilot` to build both online review and auto pilot
33-
34-
After they are built successfully, execute the following commands:
35-
* `docker-compose up run-online-review` to run online review (the online review must built first)
36-
* `docker-compose up run-auto-pilot` to run auto pilot (the auto pilot must be built first)
37-
* `docker-compose up run-online-review-auto-pilot` to run both online review and auto pilot (the online review and auto pilot must be built first)
30+
* `docker-compose up build-online-review` to build various services
31+
* `docker-compose up run-online-review` to run various services
3832

3933
## Verification
4034
Update your hosts file with appropriate IP address
@@ -49,3 +43,5 @@ Login with heffan/password, and the page will be like this: http://take.ms/NFkBI
4943
Click a contest to open it: http://take.ms/o48Kha
5044
Edit this contest to turn on auto-pilot and set registration start date to a value in near future: http://take.ms/y6GIG and http://take.ms/jLCZT
5145
Save the changes, and if the auto-pilot is running, after a while, you will see the registration and submission phase are open: http://take.ms/H9gdn
46+
47+
For late deliverables tracker and review assignment tool, you can login into the running container, and check their processes are running.

docker/online_review/docker-compose.yml

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,49 +19,23 @@ services:
1919
volumes:
2020
- "${ONLINE_REVIEW_SOURCE_ROOT}:/root/online_review"
2121
- "${ONLINE_REVIEW_DEPLOYMENT_DIR}:/root/deployment"
22-
entrypoint: /root/scripts/build-online-review.sh
23-
24-
build-auto-pilot:
25-
image: "appiriodevops/online-review:build"
26-
volumes:
27-
- "${ONLINE_REVIEW_SOURCE_ROOT}:/root/online_review"
28-
- "${ONLINE_REVIEW_DEPLOYMENT_DIR}:/root/deployment"
29-
entrypoint: /root/scripts/build-auto-pilot.sh
30-
31-
build-online-review-auto-pilot:
32-
image: "appiriodevops/online-review:build"
33-
volumes:
34-
- "${ONLINE_REVIEW_SOURCE_ROOT}:/root/online_review"
35-
- "${ONLINE_REVIEW_DEPLOYMENT_DIR}:/root/deployment"
22+
environment:
23+
- DISABLE_ONLINE_REVIEW=${DISABLE_ONLINE_REVIEW}
24+
- DISABLE_AUTO_PILOT=${DISABLE_AUTO_PILOT}
25+
- DISABLE_LATE_DELIVERABLES_TRACKER=${DISABLE_LATE_DELIVERABLES_TRACKER}
26+
- DISABLE_REVIEW_ASSIGNMENT=${DISABLE_REVIEW_ASSIGNMENT}
3627
entrypoint: /root/scripts/build.sh
3728

38-
run-auto-pilot:
39-
image: "appiriodevops/online-review:build"
40-
volumes:
41-
- "${ONLINE_REVIEW_DEPLOYMENT_DIR}:/root/deployment"
42-
links:
43-
- tc-informix:db
44-
entrypoint: /root/scripts/run-auto-pilot.sh
45-
4629
run-online-review:
4730
image: "appiriodevops/online-review:build"
4831
volumes:
4932
- "${ONLINE_REVIEW_DEPLOYMENT_DIR}:/root/deployment"
5033
environment:
5134
- JAVA_OPTS=-Xms256m -Xmx512m
52-
ports:
53-
- "8080:8080"
54-
- "443:443"
55-
links:
56-
- tc-informix:db
57-
entrypoint: /root/scripts/run-online-review.sh
58-
59-
run-online-review-auto-pilot:
60-
image: "appiriodevops/online-review:build"
61-
volumes:
62-
- "${ONLINE_REVIEW_DEPLOYMENT_DIR}:/root/deployment"
63-
environment:
64-
- JAVA_OPTS=-Xms256m -Xmx512m
35+
- DISABLE_ONLINE_REVIEW=${DISABLE_ONLINE_REVIEW}
36+
- DISABLE_AUTO_PILOT=${DISABLE_AUTO_PILOT}
37+
- DISABLE_LATE_DELIVERABLES_TRACKER=${DISABLE_LATE_DELIVERABLES_TRACKER}
38+
- DISABLE_REVIEW_ASSIGNMENT=${DISABLE_REVIEW_ASSIGNMENT}
6539
ports:
6640
- "8080:8080"
6741
- "443:443"
@@ -71,3 +45,5 @@ services:
7145

7246

7347

48+
49+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#######################################################
2+
# Build parameters for Late Deliverables Tracker tool #
3+
#######################################################
4+
5+
# The online_review_home is the directory where the development distribution for
6+
# Online Review application is checked to
7+
online_review_home=/root/online_review
8+
9+
# A deployment directory for Late Deliverables Tracker tool
10+
deploy-dir=/root/deployment/late_deliverables_tracker
11+
12+
# A path to file to signal to Late Deliverables Tracker to stop the job
13+
guard_file=@late_deliverables_tracker_guard_file@
14+
15+
# A path to file to signal to Late Deliverables Tracker that there is another tool instance already running
16+
running_file=@late_deliverables_tracker_running_file@
17+
18+
# An interval (in seconds) between Late Deliverables Tracker job executions
19+
tracking_interval=@late_deliverables_tracking_interval@
20+
21+
# An interval (in seconds) between sending PM emails about unresolved late deliverables
22+
pm_notification_interval=@late_deliverables_pm_notification_interval@
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#######################################################
2+
# Build parameters for Review Assignment tool #
3+
#######################################################
4+
5+
# The online_review_home is the directory where the development distribution for
6+
# Online Review application is checked to
7+
online_review_home=/root/online_review
8+
9+
# A deployment directory for Review Assignment tool
10+
deploy-dir=/root/deployment/review_assignment
11+
12+
# A path to file to signal to Review Assignment to stop the job
13+
guard_file=@review_assignment_guard_file@
14+
15+
# A path to file to signal to Review Assignment that there is another tool instance already running
16+
running_file=@review_assignment_running_file@
17+
18+
# An interval (in seconds) between Review Assignment executions
19+
tracking_interval=@review_assignment_interval@

docker/online_review/docker/build/scripts/build-auto-pilot.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#! /bin/bash
2+
echo 'build auto-pilot'
23
rm -rf /root/deployment/auto_pilot
34

45
cp -n /root/config/online_review/build.properties.docker /root/online_review/build.properties
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /bin/bash
2+
echo 'build late deliverables tracker'
3+
rm -rf /root/deployment/late_deliverables_tracker
4+
5+
cp -n /root/config/online_review/build.properties.docker /root/online_review/build.properties
6+
cp -n /root/config/online_review/token.properties.docker /root/online_review/token.properties
7+
8+
cp -n /root/config/late_deliverables_tracker/build.properties.docker /root/online_review/scripts/late_deliverables_tracker/build.properties
9+
10+
cd /root/online_review/scripts/late_deliverables_tracker
11+
ant clean dist deploy

docker/online_review/docker/build/scripts/build-online-review.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#! /bin/bash
2+
echo 'build online-review'
23
rm -rf /root/deployment/jboss-4.0.2
34

45
cp -n /root/config/online_review/build.properties.docker /root/online_review/build.properties
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /bin/bash
2+
echo 'build review assignment'
3+
rm -rf /root/deployment/review_assignment
4+
5+
cp -n /root/config/online_review/build.properties.docker /root/online_review/build.properties
6+
cp -n /root/config/online_review/token.properties.docker /root/online_review/token.properties
7+
8+
cp -n /root/config/review_assignment/build.properties.docker /root/online_review/scripts/review_assignment/build.properties
9+
10+
cd /root/online_review/scripts/review_assignment
11+
ant clean dist deploy
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
#! /bin/bash
2-
/root/scripts/build-online-review.sh
32

4-
/root/scripts/build-auto-pilot.sh
3+
if [ "$DISABLE_ONLINE_REVIEW" = "0" ]
4+
then
5+
root/scripts/build-online-review.sh
6+
fi
7+
8+
if [ "$DISABLE_AUTO_PILOT" = "0" ]
9+
then
10+
/root/scripts/build-auto-pilot.sh
11+
fi
12+
13+
if [ "$DISABLE_LATE_DELIVERABLES_TRACKER" = "0" ]
14+
then
15+
/root/scripts/build-late-deliverables-tracker.sh
16+
fi
17+
18+
if [ "$DISABLE_REVIEW_ASSIGNMENT" = "0" ]
19+
then
20+
/root/scripts/build-review-assignment.sh
21+
fi
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/bash
2+
cd /root/deployment/late_deliverables_tracker
3+
ant test_ldt
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/bash
2+
cd /root/deployment/review_assignment
3+
ant test_ra
Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
#! /bin/bash
2-
cd /root/deployment/auto_pilot
3-
ant test_ap &
2+
if [ "$DISABLE_AUTO_PILOT" = "0" ]
3+
then
4+
cd /root/deployment/auto_pilot
5+
ant test_ap &
6+
fi
47

5-
cd /root/deployment/jboss-4.0.2
6-
bin/run.sh -b 0.0.0.0 &
8+
if [ "$DISABLE_LATE_DELIVERABLES_TRACKER" = "0" ]
9+
then
10+
cd /root/deployment/late_deliverables_tracker
11+
ant test_ldt &
12+
fi
13+
14+
if [ "$DISABLE_REVIEW_ASSIGNMENT" = "0" ]
15+
then
16+
cd /root/deployment/review_assignment
17+
ant test_ra &
18+
fi
19+
20+
if [ "$DISABLE_ONLINE_REVIEW" = "0" ]
21+
then
22+
cd /root/deployment/jboss-4.0.2
23+
bin/run.sh -b 0.0.0.0 &
24+
fi
725

826
tail -f /dev/null & wait ${!}

docker/online_review/env.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
export ONLINE_REVIEW_SOURCE_ROOT=/home/na/Assembly/online-review-docker/tc-online-review
22
export ONLINE_REVIEW_DEPLOYMENT_DIR=/home/na/Assembly/online-review-docker/deployment
3+
export DISABLE_ONLINE_REVIEW=0
4+
export DISABLE_AUTO_PILOT=0
5+
export DISABLE_LATE_DELIVERABLES_TRACKER=0
6+
export DISABLE_REVIEW_ASSIGNMENT=0

0 commit comments

Comments
 (0)