Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] - This is a temporary deployment PR #46

Open
wants to merge 115 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
ebe7033
Code change for deployment
Gunasekar-K Mar 21, 2023
5761087
Code change for deployment
Gunasekar-K Mar 21, 2023
dbab133
Code change for deployment
Gunasekar-K Mar 21, 2023
807a058
Code change for deployment
Gunasekar-K Mar 21, 2023
b016f2c
Code change for deployment
Gunasekar-K Mar 21, 2023
689b152
Code change for deployment
Gunasekar-K Mar 21, 2023
fb627c2
Code change for deployment
Gunasekar-K Mar 21, 2023
7d537ae
Code change for deployment
Gunasekar-K Mar 21, 2023
d27dad3
Code change for deployment
Gunasekar-K Mar 21, 2023
851f913
Code change for deployment
Gunasekar-K Mar 21, 2023
5f97e3c
Code change for deployment
Gunasekar-K Mar 21, 2023
c8bf15b
Code change for deployment
Gunasekar-K Mar 21, 2023
622855c
Code change for deployment
Gunasekar-K Mar 21, 2023
883ea01
Code change for deployment
Gunasekar-K Mar 21, 2023
a50700f
Code change for deployment
Gunasekar-K Mar 21, 2023
b588ea6
Code change for deployment
Gunasekar-K Mar 21, 2023
f0d9f31
Code change for deployment
Gunasekar-K Mar 21, 2023
0cece40
Code change for deployment
Gunasekar-K Mar 21, 2023
020471b
Code change for deployment
Gunasekar-K Mar 21, 2023
39b14f0
Code change for deployment
Gunasekar-K Mar 21, 2023
c8ac6dc
fix: build with reflections
rakibansary Mar 21, 2023
1ac33a9
fix: include reflections
rakibansary Mar 21, 2023
ba358ad
fix: use reflections
rakibansary Mar 21, 2023
1ade3d5
ci: deploy to dev
rakibansary Mar 21, 2023
e99c401
ci: deploy to dev
rakibansary Mar 21, 2023
bfc7439
cyclic issue
Gunasekar-K Mar 21, 2023
d1645a3
Merge branch 'dev' of https://github.com/topcoder-platform/domain-cha…
Gunasekar-K Mar 21, 2023
36b14b0
cyclic issue
Gunasekar-K Mar 21, 2023
0257d3e
cyclic issue
Gunasekar-K Mar 21, 2023
3b94274
fix: bump version
rakibansary Mar 21, 2023
7d46e95
feat(ial): beautify sql
rakibansary Mar 21, 2023
a760446
feat(ial): beautify sql
rakibansary Mar 21, 2023
e3a5618
prod changes [skip ci]
Gunasekar-K Mar 22, 2023
baf5bef
prod changes [skip ci]
Gunasekar-K Mar 22, 2023
0a2fc8b
prod changes [skip ci]
Gunasekar-K Mar 22, 2023
49a3507
fix: phases
rakibansary Mar 22, 2023
409fe04
fix: incorrect image tag
rakibansary Mar 22, 2023
6dc584c
ci: deploy to dev
rakibansary Mar 22, 2023
cf3855c
ci: deploy to dev
rakibansary Mar 22, 2023
bfaa776
ci: deploy to dev
rakibansary Mar 22, 2023
5bfcb3a
fix: deploy
rakibansary Mar 22, 2023
c531f03
fix: deploy
rakibansary Mar 22, 2023
1dec86f
ci: deploy to dev
rakibansary Mar 23, 2023
48f8446
ci: deploy to dev
rakibansary Mar 24, 2023
fde8fcc
Deploy fix/float-numbers-in-prizes
ThomasKranitsas Mar 24, 2023
31a01dc
fix: challenge update
rakibansary Mar 24, 2023
7b4d320
fix: deploy
rakibansary Mar 24, 2023
06f8d20
fix: deploy
rakibansary Mar 24, 2023
45d6c69
fix: update to topcoder-interface v0.0.40
rakibansary Mar 25, 2023
27fac5a
ci. deploy to dev
eisbilir Mar 25, 2023
35cb32a
ci: deploy to dev
eisbilir Mar 25, 2023
042809b
ci: update ACL tag. [skip ci]
eisbilir Mar 25, 2023
d8298d3
fix: challenge update
rakibansary Mar 25, 2023
7d843ec
ci: deploy to dev
eisbilir Mar 25, 2023
4877530
ci: deploy to dev
eisbilir Mar 25, 2023
611b613
ci: deploy to dev
eisbilir Mar 25, 2023
0aaba59
fix: f2f or crash
rakibansary Mar 25, 2023
cfb00f0
ci: deploy to dev
eisbilir Mar 26, 2023
23d6a28
feat: use env file for acl
eisbilir Mar 26, 2023
6fa8cdb
ci: deploy to dev
eisbilir Mar 26, 2023
edca03a
feat: copilot fee, group contest eligibility
rakibansary Mar 26, 2023
bd26fbd
fix: remove hardcoded value
rakibansary Mar 26, 2023
7f31899
fix: prize calculation
rakibansary Mar 26, 2023
d16ae97
fix: ba & scorecard
rakibansary Mar 26, 2023
fc1f76d
fix: challenge delete
rakibansary Mar 26, 2023
305aeb2
fix: prize undefined
rakibansary Mar 26, 2023
2d64ed7
ci: deploy to dev
rakibansary Mar 26, 2023
aa6d931
chore: deploy to dev
rakibansary Mar 27, 2023
7f35e54
fix: always use prod ECR images
rakibansary Mar 28, 2023
b149d1b
ci: deploy to dev (using prod ecr)
rakibansary Mar 29, 2023
3dcbe3d
ci: deploy constraint fix
rakibansary Mar 29, 2023
6e0a7cb
ci: choose ecr env based on pr
rakibansary Mar 29, 2023
dd8112d
ci: deploy to dev
eisbilir Mar 29, 2023
7abf0e2
ci: deploy to dev
eisbilir Mar 29, 2023
bd7d153
ci: deploy to dev
eisbilir Mar 30, 2023
7a6863f
ci: deploy to dev
eisbilir Apr 3, 2023
6d8ad39
ci: deploy to dev
eisbilir Apr 5, 2023
b75c7d5
ci: deploy to dev
eisbilir Apr 5, 2023
4b16434
ci: deploy to dev
rakibansary Apr 6, 2023
0061af3
fix: deploy to dev
rakibansary Apr 6, 2023
2586220
ci: deploy to dev
rakibansary Apr 6, 2023
0fc3468
ci: deploy to dev
rakibansary Apr 6, 2023
cf065f3
ci: deploy to dev
rakibansary Apr 6, 2023
1af6592
ci: deploy to dev
eisbilir Apr 6, 2023
92bbb30
ci: deploy to dev
eisbilir Apr 6, 2023
642c062
ci: deploy to dev
eisbilir Apr 6, 2023
108d0f0
ci: deploy to dev
eisbilir Apr 6, 2023
79e14a1
ci: deploy to dev
rakibansary Apr 7, 2023
6b72dd0
ci: deploy to dev
rakibansary Apr 7, 2023
56cbc00
ci: deploy to dev
rakibansary Apr 7, 2023
ba15ff0
ci: deploy to dev
rakibansary Apr 7, 2023
e5dd9df
ci: deploy to dev
eisbilir Apr 12, 2023
ceafb96
ci: deploy to dev
eisbilir Apr 12, 2023
a3fdb26
ci: deploy to dev
eisbilir Apr 12, 2023
00a7e6c
fix: loss of precesion when converting float to integer
rakibansary Apr 14, 2023
b096096
ci: deploy to dev
eisbilir Apr 14, 2023
9b8e81b
ci: deploy to dev
eisbilir Apr 14, 2023
cdf0fd3
ci: deploy to dev
eisbilir Apr 14, 2023
d9be08b
fix: let challenge-api handle sanitization
rakibansary May 1, 2023
a89206f
feat: use scheduler
rakibansary May 8, 2023
f84dff8
ci: deploy
rakibansary May 8, 2023
e9d4ecf
ci: update config to dynamically set ecr env
rakibansary May 12, 2023
7bd05da
ci: use v1.4.15 deploy scripts
rakibansary May 12, 2023
749b30f
ci: use updated convenience image
rakibansary May 12, 2023
1837a12
ci: fix deploy suite
rakibansary May 12, 2023
7a0e939
ci: fix deploy suite
rakibansary May 12, 2023
f4fd575
ci: deploy to dev
eisbilir May 15, 2023
2d4e2b3
ci: deploy advance phase endpoint correction
rakibansary May 16, 2023
a329dca
ci: deploy to dev
rakibansary May 16, 2023
2de0636
ci: deploy to qa
rakibansary May 17, 2023
9a2d5b5
ci: deploy domain-challenge
rakibansary May 17, 2023
b9ab246
ci: deploy to qa
rakibansary May 18, 2023
a6b9bfd
ci: deploy to qa
rakibansary May 19, 2023
ca377c9
ci: deploy to qa
rakibansary Jul 12, 2023
7b66a64
Update docker-compose.yml - read only fix
Gunasekar-K Sep 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 77 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
version: 2.1
defaults: &defaults
docker:
- image: cimg/python:3.11.0-browsers
install_dependency: &install_dependency
name: Installation of build and deployment dependencies.
command: |
sudo apt update
sudo apt install jq
sudo apt install python3-pip
sudo pip3 install awscli --upgrade
sudo pip3 install docker-compose
sudo curl -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest
sudo chmod +x /usr/local/bin/ecs-cli
install_deploysuite: &install_deploysuite
name: Installation of install_deploysuite.
command: |
git clone --branch v1.4.14 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
cp ./../buildscript/master_deploy.sh .
cp ./../buildscript/buildenv.sh .
cp ./../buildscript/awsconfiguration.sh .
cp ./../buildscript/buildproperties.sh .

deploy_steps: &deploy_steps
- checkout
- setup_remote_docker
- run: *install_dependency
- run: *install_deploysuite
- deploy:
name: Running MasterScript.
command: "#./awsconfiguration.sh $DEPLOY_ENV\n./awsconfiguration.sh $DEPLOY_ENV\nsource awsenvconf\n./buildproperties.sh -e $BUILD_ENV -k grpc\n./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-deployvar\nsource buildenvvar\n#./buildimage.sh\n./buildimage.sh ${DEPLOY_ENV}\n#./master_deploy.sh -d ECS -e $DEPLOY_ENV -m CLI -t latest -i ${APPNAME} \necs-cli configure --region us-east-1 --cluster $AWS_ECS_CLUSTER\necs-cli compose --project-name domain-challenge service up\n#magic___^_^___line\n"
jobs:
publish-image:
docker:
- image: cimg/aws:2023.01
environment:
CODEARTIFACT_ENV: PROD
ECR_ENV: DEV
ECR_ENV: QA
SERVICE_NAME: "domain-challenge"
OUT_DIR: "buildscripts"
steps:
Expand All @@ -16,7 +45,7 @@ jobs:
- run:
name: "Setup deploy scripts"
command: |
git clone -b v1.4 https://github.com/topcoder-platform/tc-deploy-scripts ../${OUT_DIR}
git clone -b v1.4.15 https://github.com/topcoder-platform/tc-deploy-scripts ../${OUT_DIR}
cp ./../${OUT_DIR}/awsconfiguration.sh .
- run:
name: "Authenticate with AWS CodeArtifact and Build Docker Image"
Expand All @@ -39,6 +68,34 @@ jobs:
docker tag ${SERVICE_NAME}:${CIRCLE_SHA1} $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/${SERVICE_NAME}:${CIRCLE_SHA1}
docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/${SERVICE_NAME}:${CIRCLE_SHA1}

deploy-dev:
!!merge <<: *defaults
environment:
DEPLOY_ENV: "DEV"
LOGICAL_ENV: "dev"
BUILD_ENV: "dev"
APPNAME: "domain-challenge"
steps: *deploy_steps

deploy-qa:
!!merge <<: *defaults
environment:
DEPLOY_ENV: "QA"
LOGICAL_ENV: "qa"
BUILD_ENV: "qa"
APPNAME: "domain-challenge"
steps: *deploy_steps

deploy-prod:
!!merge <<: *defaults
environment:
DEPLOY_ENV: "PROD"
LOGICAL_ENV: "prod"
BUILD_ENV: "prod"
APPNAME: "domain-challenge"
steps: *deploy_steps


workflows:
version: 2
publish:
Expand All @@ -49,3 +106,21 @@ workflows:
branches:
only:
- main
- "deploy-dev":
context: "org-global"
filters:
branches:
only:
- deploy/dev
- "deploy-qa":
context: "org-global"
filters:
branches:
only:
- deploy/qa
- "deploy-prod":
context: "org-global"
filters:
branches:
only:
- deploy/prod
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ COPY yarn*.lock ./
COPY package*.json ./
COPY tsconfig*.json ./
COPY .npmrc ./
COPY reflections ./reflections
RUN yarn install --frozen-lockfile --production=false
COPY . ./
RUN yarn build:app
Expand All @@ -30,11 +31,14 @@ ENV GRPC_NOSQL_SERVER_PORT=50052
ENV REGISTRATION_PHASE_ID=""
ENV SUBMISSION_PHASE_ID=""
ENV CHECKPOINT_SUBMISSION_PHASE_ID=""
ENV TOPCODER_API_URL=""
ENV AUTH_SECRET=""
ENV AUTH0_AUDIENCE=""
ENV AUTH0_CLIENT_ID=""
ENV AUTH0_CLIENT_SECRET=""
ENV AUTH0_PROXY_SERVER_URL=""
ENV AUTH0_URL=""
ENV TOPCODER_SCHEDULER_LAMBDA_ARN=""
ENV KAFKA_ERROR_TOPIC=""

CMD ["server.js"]
38 changes: 0 additions & 38 deletions bin/nosql-client.js

This file was deleted.

40 changes: 0 additions & 40 deletions bin/server.js

This file was deleted.

25 changes: 25 additions & 0 deletions buildimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

set -eo pipefail

ENV=$1
ENV=`echo "$ENV" | tr '[:upper:]' '[:lower:]'`

informix_access_layer_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/informix-access-layer:06c1f275bcd1d3083f7cee14ed7cebf14590a027
dynamo_access_layer_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/dynamo-access-layer:6f987a97bae1242e577b7d812fd250875a41cb6d
anticorruption_layer_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/anticorruption-layer:87b2b14a9ef986ed87394e3b67f026c2996289f1
domain_challenge_TAG=$AWS_ACCOUNT_ID.dkr.ecr.$AWS_REGION.amazonaws.com/domain-challenge:579570b726af7e284bee49a64e84483df0cc492e

sed -i='' "s|dynamo-access-layer:latest|$dynamo_access_layer_TAG|" docker-compose.yml

sed -i='' "s|informix-access-layer:latest|$informix_access_layer_TAG|" docker-compose.yml

sed -i='' "s|anticorruption-layer:latest|$anticorruption_layer_TAG|" docker-compose.yml

sed -i='' "s|domain-challenge:latest|$domain_challenge_TAG|" docker-compose.yml

if [[ "$ENV" == prod ]]; then
sed -i='' "s|grpcserver.topcoder-dev.com|grpcserver.topcoder.com|" docker-compose.yml
fi


79 changes: 79 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
version: "3"
services:
dynamo-access-layer:
image: dynamo-access-layer:latest
read_only: true
container_name: dynamo-access-layer
hostname: dynamo-access-layer
restart: always
ports:
- "0:50052"
logging:
driver: awslogs
options:
awslogs-group: /aws/ecs/grpc-services
awslogs-region: us-east-1
awslogs-stream-prefix: dynamo-access-layer
environment:
- GRPC_SERVER_HOST=0.0.0.0
- GRPC_SERVER_PORT=50052
informix-access-layer:
image: informix-access-layer:latest
read_only: true
container_name: informix-access-layer
hostname: informix-access-layer
restart: always
ports:
- "0:9090"
logging:
driver: awslogs
options:
awslogs-group: /aws/ecs/grpc-services
awslogs-region: us-east-1
awslogs-stream-prefix: informix-access-layer
env_file:
- ia_env.ini
anticorruption-layer:
image: anticorruption-layer:latest
read_only: true
container_name: anticorruption-layer
hostname: anticorruption-layer
restart: always
ports:
- "0:40020"
links:
- informix-access-layer
logging:
driver: awslogs
options:
awslogs-group: /aws/ecs/grpc-services
awslogs-region: us-east-1
awslogs-stream-prefix: anticorruption-layer
env_file:
- acl_env.ini
depends_on:
- informix-access-layer
domain-challenge:
image: domain-challenge:latest
read_only: true
container_name: domain-challenge
hostname: domain-challenge
restart: always
ports:
- "0:8888"
links:
- anticorruption-layer
- informix-access-layer
- dynamo-access-layer
logging:
driver: awslogs
options:
awslogs-group: /aws/ecs/grpc-services
awslogs-region: us-east-1
awslogs-stream-prefix: domain-challenge
env_file:
- dc_env.ini
depends_on:
- dynamo-access-layer
- informix-access-layer
- anticorruption-layer
16 changes: 16 additions & 0 deletions ecs-params.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 1
task_definition:
task_role_arn: ${GRPC_ROLE}
services:
dynamo-access-layer:
cpu_shares: 100
mem_limit: 1G
informix-access-layer:
cpu_shares: 100
mem_limit: 1G
anticorruption-layer:
cpu_shares: 100
mem_limit: 1G
domain-challenge:
cpu_shares: 100
mem_limit: 1GB
52 changes: 0 additions & 52 deletions package.json

This file was deleted.

Loading