Commit 9e791ff3 authored by David Mendez's avatar David Mendez
Browse files

Remove status daemon container k8s configuration

parent 951d923e
...@@ -4,8 +4,6 @@ variables: ...@@ -4,8 +4,6 @@ variables:
REGISTRY_USER: chembl/chembl REGISTRY_USER: chembl/chembl
SERVER_APPLICATION: delayed-jobs/delayed-jobs-api/delayed-jobs-server SERVER_APPLICATION: delayed-jobs/delayed-jobs-api/delayed-jobs-server
SERVER_IMAGE_TAG: ${CI_REGISTRY}/${REGISTRY_USER}/${SERVER_APPLICATION}:${CI_COMMIT_SHORT_SHA} SERVER_IMAGE_TAG: ${CI_REGISTRY}/${REGISTRY_USER}/${SERVER_APPLICATION}:${CI_COMMIT_SHORT_SHA}
JOB_STATUS_APPLICATION: delayed-jobs/delayed-jobs-api/delayed-jobs-status-daemon
STATUS_DAEMON_IMAGE_TAG: ${CI_REGISTRY}/${REGISTRY_USER}/${JOB_STATUS_APPLICATION}:${CI_COMMIT_SHORT_SHA}
DOCKER_DRIVER: overlay DOCKER_DRIVER: overlay
CONFIGS_FOLDER: run_config CONFIGS_FOLDER: run_config
# Config unit tests # Config unit tests
...@@ -65,29 +63,6 @@ build_docker_image_server: ...@@ -65,29 +63,6 @@ build_docker_image_server:
- echo Deploying $SERVER_IMAGE_TAG - echo Deploying $SERVER_IMAGE_TAG
- docker push $SERVER_IMAGE_TAG - docker push $SERVER_IMAGE_TAG
build_docker_image_status_daemon:
image:
name: docker/compose:1.24.1
entrypoint: ["/bin/sh", "-c"]
stage: build
variables:
DOCKER_HOST: tcp://docker:2375
except:
- schedules
services:
- docker:dind
tags:
- dind
script:
- set -x
- docker version # verify docker cli is there. Also prints server info
- echo $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- echo $DOCKERHUB_REGISTRY_PASSWORD | docker login -u $DOCKERHUB_REGISTRY_USER --password-stdin $DOCKERHUB_REGISTRY
- echo building $STATUS_DAEMON_IMAGE_TAG
- docker-compose build delayed-job-status-daemon-prod
- echo Deploying $STATUS_DAEMON_IMAGE_TAG
- docker push $STATUS_DAEMON_IMAGE_TAG
# ---------------------------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------------------------
# QA # QA
# ---------------------------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------------------------
...@@ -190,7 +165,6 @@ deploy_to_staging: ...@@ -190,7 +165,6 @@ deploy_to_staging:
- sed -i "s~<UID>~${CBL_ADM_UID}~" k8s-deployment.yaml - sed -i "s~<UID>~${CBL_ADM_UID}~" k8s-deployment.yaml
- sed -i "s~<GID>~${CBL_PUB_GID}~" k8s-deployment.yaml - sed -i "s~<GID>~${CBL_PUB_GID}~" k8s-deployment.yaml
- sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml - sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<STATUS_DAEMON_IMAGE_TAG>~${STATUS_DAEMON_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<NFS_MOUNT_PATH>~${NFS_MOUNT_PATH_STAGING}~" k8s-deployment.yaml - sed -i "s~<NFS_MOUNT_PATH>~${NFS_MOUNT_PATH_STAGING}~" k8s-deployment.yaml
- sed -i "s~<NFS_FQDN>~${NFS_FQDN_HX}~" k8s-deployment.yaml - sed -i "s~<NFS_FQDN>~${NFS_FQDN_HX}~" k8s-deployment.yaml
- sed -i "s~<NFS_PATH>~${NFS_PATH_HX}~" k8s-deployment.yaml - sed -i "s~<NFS_PATH>~${NFS_PATH_HX}~" k8s-deployment.yaml
...@@ -277,7 +251,6 @@ deploy_to_prod_hx: ...@@ -277,7 +251,6 @@ deploy_to_prod_hx:
- sed -i "s~<UID>~${CBL_ADM_UID}~" k8s-deployment.yaml - sed -i "s~<UID>~${CBL_ADM_UID}~" k8s-deployment.yaml
- sed -i "s~<GID>~${CBL_PUB_GID}~" k8s-deployment.yaml - sed -i "s~<GID>~${CBL_PUB_GID}~" k8s-deployment.yaml
- sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml - sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<STATUS_DAEMON_IMAGE_TAG>~${STATUS_DAEMON_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<NFS_MOUNT_PATH>~${NFS_MOUNT_PATH_PROD_HX}~" k8s-deployment.yaml - sed -i "s~<NFS_MOUNT_PATH>~${NFS_MOUNT_PATH_PROD_HX}~" k8s-deployment.yaml
- sed -i "s~<NFS_FQDN>~${NFS_FQDN_HX}~" k8s-deployment.yaml - sed -i "s~<NFS_FQDN>~${NFS_FQDN_HX}~" k8s-deployment.yaml
- sed -i "s~<NFS_PATH>~${NFS_PATH_HX}~" k8s-deployment.yaml - sed -i "s~<NFS_PATH>~${NFS_PATH_HX}~" k8s-deployment.yaml
...@@ -359,7 +332,6 @@ deploy_to_prod_hh: ...@@ -359,7 +332,6 @@ deploy_to_prod_hh:
- sed -i "s~<UID>~${CBL_ADM_UID}~" k8s-deployment.yaml - sed -i "s~<UID>~${CBL_ADM_UID}~" k8s-deployment.yaml
- sed -i "s~<GID>~${CBL_PUB_GID}~" k8s-deployment.yaml - sed -i "s~<GID>~${CBL_PUB_GID}~" k8s-deployment.yaml
- sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml - sed -i "s~<SERVER_IMAGE_TAG>~${SERVER_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<STATUS_DAEMON_IMAGE_TAG>~${STATUS_DAEMON_IMAGE_TAG}~" k8s-deployment.yaml
- sed -i "s~<NFS_MOUNT_PATH>~${NFS_MOUNT_PATH_PROD_HH}~" k8s-deployment.yaml - sed -i "s~<NFS_MOUNT_PATH>~${NFS_MOUNT_PATH_PROD_HH}~" k8s-deployment.yaml
- sed -i "s~<NFS_FQDN>~${NFS_FQDN_HH}~" k8s-deployment.yaml - sed -i "s~<NFS_FQDN>~${NFS_FQDN_HH}~" k8s-deployment.yaml
- sed -i "s~<NFS_PATH>~${NFS_PATH_HH}~" k8s-deployment.yaml - sed -i "s~<NFS_PATH>~${NFS_PATH_HH}~" k8s-deployment.yaml
......
...@@ -30,7 +30,4 @@ ENTRYPOINT FLASK_APP=app flask run --host=0.0.0.0 ...@@ -30,7 +30,4 @@ ENTRYPOINT FLASK_APP=app flask run --host=0.0.0.0
FROM base AS production-server FROM base AS production-server
# Take into account that the app will get the configuration from the variable DELAYED_JOBS_RAW_CONFIG if the config.yml # Take into account that the app will get the configuration from the variable DELAYED_JOBS_RAW_CONFIG if the config.yml
# file is not found. # file is not found.
ENTRYPOINT gunicorn wsgi:FLASK_APP -c ${GUNICORN_CONFIG_FILE_PATH} ENTRYPOINT gunicorn wsgi:FLASK_APP -c ${GUNICORN_CONFIG_FILE_PATH}
\ No newline at end of file
FROM base AS job-status-daemon
ENTRYPOINT /app/run_daemon.sh
\ No newline at end of file
...@@ -15,15 +15,6 @@ services: ...@@ -15,15 +15,6 @@ services:
- CONFIG_FILE_PATH=/app/config.yml - CONFIG_FILE_PATH=/app/config.yml
ports: ports:
- "5000:5000" - "5000:5000"
delayed-job-status-daemon-dev:
build:
context: .
target: job-status-daemon
args:
<<: *build_args
image: chembl/delayed-jobs-status-daemon:dev
environment:
- CONFIG_FILE_PATH=/app/config.yml # make sure to copy the config.yml file when using this
delayed-jobs-server-prod: delayed-jobs-server-prod:
build: build:
context: . context: .
...@@ -32,11 +23,4 @@ services: ...@@ -32,11 +23,4 @@ services:
<<: *build_args <<: *build_args
image: "${SERVER_IMAGE_TAG:-chembl/delayed-jobs-server:prod}" image: "${SERVER_IMAGE_TAG:-chembl/delayed-jobs-server:prod}"
ports: ports:
- "5000:5000" - "5000:5000"
delayed-job-status-daemon-prod: \ No newline at end of file
build:
context: .
target: job-status-daemon
args:
<<: *build_args
image: "${STATUS_DAEMON_IMAGE_TAG:-chembl/delayed-jobs-status-daemon:prod}"
\ No newline at end of file
...@@ -36,25 +36,6 @@ spec: ...@@ -36,25 +36,6 @@ spec:
- name: gunicorn-config - name: gunicorn-config
mountPath: '/etc/gunicorn_config/' mountPath: '/etc/gunicorn_config/'
readOnly: true readOnly: true
- name: delayed-jobs-status-daemon
image: <STATUS_DAEMON_IMAGE_TAG>
resources:
limits:
cpu: <CPU_LIMIT>
requests:
cpu: <CPU_REQUESTED>
volumeMounts:
- name: nfs-volume
mountPath: <NFS_MOUNT_PATH>
- name: id-rda-lsf
mountPath: '/etc/lsf_config/'
readOnly: true
- name: run-config
mountPath: '/etc/run_config/'
readOnly: true
- name: gunicorn-config
mountPath: '/etc/gunicorn_config/'
readOnly: true
volumes: volumes:
- name: nfs-volume - name: nfs-volume
nfs: nfs:
......
#!/usr/bin/env bash #!/usr/bin/env bash
set -x set -x
PYTHONPATH=$PYTHONPATH:$(pwd) python3 -u app/job_status_daemon/run_daemon.py PYTHONPATH=$PYTHONPATH:$(pwd) python3 -u app/job_status_daemon/run_daemon.py $1
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment