Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
ES Subset Generator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ChEMBL
C
ChEMBL
Main Web Interface
ES Subset Generator
Commits
b3a4590d
Commit
b3a4590d
authored
Aug 20, 2020
by
David Mendez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start to create step to deploy to prod hh
parent
95241fb9
Pipeline
#93469
failed
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
47 deletions
+48
-47
.gitlab-ci.yml
.gitlab-ci.yml
+48
-47
No files found.
.gitlab-ci.yml
View file @
b3a4590d
...
...
@@ -37,7 +37,6 @@ stages:
-
test_staging
-
deploy_to_prod_hx
-
test_prod_hx
# - prepare_config_hh
# - deploy_to_prod_hh
# - test_prod_hh
# - functional_tests_prod_public
...
...
@@ -271,52 +270,54 @@ functional_tests_prod_hx:
-
sleep
30
# Give some time for the deployment to take effect.
-
functional_tests/run_functional_tests.py ${SERVER_URL_PROD_HX}
### ----------------------------------------------------------------------------------------------------------------------
### Deployment to prod hh
### ----------------------------------------------------------------------------------------------------------------------
#prepare_config_prod_hh:
# stage: prepare_config_hh
# image:
# name: alpine/git
# entrypoint: ["/bin/sh", "-c"]
# only:
# - master
# except:
# - schedules
# script:
# - rm -rf ${CONFIGS_FOLDER} || true
# - mkdir -p ${CONFIGS_FOLDER}
# - git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
# - ls ${CONFIGS_FOLDER}
# artifacts:
# paths:
# - ${CONFIG_PROD_HH_FILE_PATH}
# - ${CONFIG_GUNICORN_PROD_HH_FILE_PATH}
# - ${INGRESS_PROD_HH_FILE_PATH}
# - ${AUTOSCALER_PROD_HH_FILE_PATH}
#
#deploy_to_prod_hh:
# stage: deploy_to_prod_hh
# image:
# name: lachlanevenson/k8s-kubectl:latest
# entrypoint: ["/bin/sh", "-c"]
# only:
# - master
# except:
# - schedules
# environment:
# name: prod_hh
# script:
# - set -x
# - echo "$KUBE_CA_PEM_HH" > "$(pwd)/kube.ca.pem"
# - kubectl config set-cluster ${KUBE_CLUS_NAME_HH} --server="${KUBE_URL_HH}" --certificate-authority="$(pwd)/kube.ca.pem"
# - kubectl config set-credentials ${KUBE_USER_HH} --token="${KUBE_TOKEN_HH}"
# - kubectl config set-context ${CHEMBL_NS_PROD} --cluster=${KUBE_CLUS_NAME_HH} --user=${KUBE_USER_HH}
# - kubectl config use-context ${CHEMBL_NS_PROD}
# - echo ${CHEMBL_NS_PROD} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HH} ${KUBE_USER_HH}
# - kubectl get pods -n ${CHEMBL_NS_PROD}
# - kubectl create secret generic ${RUN_CONFIG_SECRET_NAME_PROD_HH} --from-file=RUN_CONFIG.yml=${CONFIG_PROD_HH_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl replace -f -
# - kubectl create secret generic ${GUNICORN_CONFIG_SECRET_NAME_PROD_HH} --from-file=GUNICORN_CONFIG.py=${CONFIG_GUNICORN_PROD_HH_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl replace -f -
## ----------------------------------------------------------------------------------------------------------------------
## Deployment to prod hh
## ----------------------------------------------------------------------------------------------------------------------
prepare_config_prod_hh
:
stage
:
prepare_config_hh
image
:
name
:
alpine/git
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
only
:
-
master
except
:
-
schedules
script
:
-
rm -rf ${CONFIGS_FOLDER} ||
true
-
mkdir -p ${CONFIGS_FOLDER}
-
git clone https://${CONFIG_DEPLOY_GITLAB_USERNAME}:${CONFIG_DEPLOY_GITLAB_TOKEN}@${CONFIGURATIONS_REPO} ${CONFIGS_FOLDER}
-
ls ${CONFIGS_FOLDER}
artifacts
:
paths
:
-
${CONFIG_PROD_HH_FILE_PATH}
-
${CONFIG_GUNICORN_PROD_HH_FILE_PATH}
-
${INGRESS_PROD_HH_FILE_PATH}
-
${AUTOSCALER_PROD_HH_FILE_PATH}
deploy_to_prod_hh
:
stage
:
deploy_to_prod_hh
image
:
name
:
lachlanevenson/k8s-kubectl:latest
entrypoint
:
[
"
/bin/sh"
,
"
-c"
]
only
:
-
master
except
:
-
schedules
environment
:
name
:
prod_hh
script
:
-
set -x
-
echo "$KUBE_CA_PEM_HH" > "$(pwd)/kube.ca.pem"
-
kubectl config set-cluster ${KUBE_CLUS_NAME_HH} --server="${KUBE_URL_HH}" --certificate-authority="$(pwd)/kube.ca.pem"
-
kubectl config set-credentials ${KUBE_USER_HH} --token="${KUBE_TOKEN_HH}"
-
kubectl config set-context ${CHEMBL_NS_PROD} --cluster=${KUBE_CLUS_NAME_HH} --user=${KUBE_USER_HH}
-
kubectl config use-context ${CHEMBL_NS_PROD}
-
echo ${CHEMBL_NS_PROD} ${KUBE_URL_HH} ${KUBE_CLUS_NAME_HH} ${KUBE_USER_HH}
-
kubectl get pods -n ${CHEMBL_NS_PROD}
-
kubectl create secret generic ${RUN_CONFIG_SECRET_NAME_PROD_HH} --from-file=RUN_CONFIG.yml=${CONFIG_PROD_HH_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl apply -f -
-
kubectl create secret generic ${GUNICORN_CONFIG_SECRET_NAME_PROD_HH} --from-file=GUNICORN_CONFIG.py=${CONFIG_GUNICORN_PROD_HH_FILE_PATH} -o yaml -n ${CHEMBL_NS_PROD} --dry-run=client | kubectl apply -f -
# - cat ${CONFIG_PROD_HH_FILE_PATH}
# - cat ${CONFIG_GUNICORN_PROD_HH_FILE_PATH}
# - sed -i "s~<NAMESPACE>~${CHEMBL_NS_PROD}~" k8s-deployment.yaml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment