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

Fix/single table job fixes #2657

Merged
merged 26 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
835a1ca
(Chore): Improve Single Table Migration Job Script
BinamB Oct 14, 2024
9671171
add param for creds
BinamB Oct 14, 2024
92f3dd1
Add priority class
BinamB Oct 15, 2024
eda0c17
Add comments
BinamB Oct 22, 2024
73ab91a
Merge branch 'master' into fix/single-table-job-fixes
BinamB Oct 22, 2024
edf5925
Making ES7 domain default (#2655)
EliseCastle23 Oct 23, 2024
a4e9a63
Update README.md (#2662)
smvgarcia Nov 5, 2024
b3b2f0b
adding changes for new al image changes (#2661)
EliseCastle23 Nov 7, 2024
66adf83
updating alembic logic to work with the new al images that manage ale…
EliseCastle23 Nov 7, 2024
e217e67
fix to include special characters in db name (#2664)
ajoaugustine Nov 7, 2024
b099d24
updating userdb job to work with new al images (#2665)
EliseCastle23 Nov 8, 2024
308f04b
Update web_whitelist
emalinowski Nov 11, 2024
7fe48a5
Feat/team project cost tracking (#2658)
AidanHilt Nov 11, 2024
de9cb3e
modifying gdcdb create job (#2668)
EliseCastle23 Nov 12, 2024
3130a30
Update squid.conf (#2641)
EliseCastle23 Nov 13, 2024
972a69d
Adding "poetry run" (#2673)
EliseCastle23 Nov 18, 2024
134803e
removing old squid file from cloud auto as it now lives in "base_imag…
EliseCastle23 Nov 20, 2024
960444f
Add GH action workflow for integration tests (#2670)
krishnaa05 Nov 21, 2024
f4b0287
fix: use /auth/request instead of /auth/mapping Arborist endpoint (#2…
pieterlukasse Dec 2, 2024
49a2d53
Merge branch 'master' into fix/single-table-job-fixes
BinamB Dec 4, 2024
48a14fc
Merge branch 'master' into fix/single-table-job-fixes
BinamB Dec 5, 2024
442a921
Merge branch 'master' into fix/single-table-job-fixes
BinamB Dec 18, 2024
a2ba4fc
Update Dockerfile env key=value format
MaribelleHGomez Dec 18, 2024
4c445dd
Update Dockerfile
MaribelleHGomez Dec 18, 2024
a9db2d7
Revert "Update Dockerfile"
BinamB Jan 7, 2025
e1bd5f0
Revert "Update Dockerfile env key=value format"
BinamB Jan 7, 2025
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
2 changes: 1 addition & 1 deletion Docker/awshelper/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ RUN git config --global user.email gen3 \
RUN export GEN3_HOME="$HOME/cloud-automation" \
&& bash -c 'source "$GEN3_HOME/gen3/gen3setup.sh" && gen3 help'

CMD /bin/bash
CMD ["/bin/bash"]
16 changes: 8 additions & 8 deletions Docker/python-nginx/python3.10-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
FROM quay.io/cdis/python:3.10-buster

# https://github.com/nginxinc/docker-nginx/blob/f958fbacada447737319e979db45a1da49123142/mainline/debian/Dockerfile
ENV NGINX_VERSION 1.21.1
ENV NJS_VERSION 0.6.1
ENV PKG_RELEASE 1~buster
ENV NGINX_VERSION=1.21.1
ENV NJS_VERSION=0.6.1
ENV PKG_RELEASE=1~buster

RUN set -x \
# create nginx user/group first, to be consistent throughout docker variants
Expand Down Expand Up @@ -126,7 +126,7 @@ RUN apt-get update && apt-get install -y supervisor \
COPY supervisord.ini /etc/supervisor.d/supervisord.ini

# Which uWSGI .ini file should be used, to make it customizable
ENV UWSGI_INI /app/uwsgi.ini
ENV UWSGI_INI=/app/uwsgi.ini

# By default, disable uwsgi cheaper mode and run 2 processes.
# If UWSGI_CHEAPER=N and UWSGI_PROCESSES=M, N is the min and M is the max
Expand All @@ -138,16 +138,16 @@ ENV UWSGI_PROCESSES=2
# By default, allow unlimited file sizes, modify it to limit the file sizes
# To have a maximum of 1 MB (Nginx's default) change the line to:
# ENV NGINX_MAX_UPLOAD 1m
ENV NGINX_MAX_UPLOAD 0
ENV NGINX_MAX_UPLOAD=0

# By default, Nginx will run a single worker process, setting it to auto
# will create a worker for each CPU core
ENV NGINX_WORKER_PROCESSES 1
ENV NGINX_WORKER_PROCESSES=1

# By default, Nginx listens on port 80.
# To modify this, change LISTEN_PORT environment variable.
# (in a Dockerfile or with an option for `docker run`)
ENV LISTEN_PORT 80
ENV LISTEN_PORT=80

# Copy the entrypoint that will generate Nginx additional configs
COPY entrypoint.sh /entrypoint.sh
Expand All @@ -165,4 +165,4 @@ ENTRYPOINT ["sh", "/entrypoint.sh"]
COPY ./app /app
WORKDIR /app

CMD ["/usr/bin/supervisord"]
CMD ["/usr/bin/supervisord"]
29 changes: 27 additions & 2 deletions kube/services/jobs/indexd-single-table-migration-job.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Setup for running this migration https://github.com/uc-cdis/indexd/blob/master/docs/migration_to_single_table_indexd.md
# Need to apply PriorityClass before running this job. Run kubectl apply -f indexd-single-table-migration-priority-class.yaml
apiVersion: batch/v1
kind: Job
metadata:
Expand All @@ -9,6 +10,7 @@ spec:
labels:
app: gen3job
spec:
priorityClassName: indexd-single-table-migration-priority # Assigning the priority class
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -46,6 +48,12 @@ spec:
env:
- name: START_DID
GEN3_START_DID|-value: ""-|
- name: BATCH_SIZE
GEN3_BATCH_SIZE|-value: ""-|
- name: OFFSET_VALUE
GEN3_OFFSET_VALUE|-value: ""-|
- name: USE_DEFAULT_CREDS
GEN3_USE_DEFAULT_CREDS|-value: "false"-|
volumeMounts:
- name: "config-volume"
readOnly: true
Expand All @@ -72,11 +80,28 @@ spec:
args:
- "-c"
- |
flags="--creds-path /var/www/indexd/creds_new.json"
$flags=""

if [[ "$USE_DEFAULT_CREDS" == "false" ]]; then
echo "Using new creds"
flags="$flags --creds-file /var/www/indexd/creds_new.json"
else
echo "using default creds"
flags="$flags --creds-file /var/www/indexd/creds.json"
fi

if [[ -n "$START_DID" ]]; then
flags="$flags --start-did $START_DID"
fi
time poetry run python /indexd/bin/migrate_to_single_table.py $flags
if [[ -n "$BATCH_SIZE" ]]; then
flags="$flags --batch-size $BATCH_SIZE"
fi

if [[ -n "$OFFSET_VALUE" ]]; then
flags="$flags --start-offset $OFFSET_VALUE"
fi

time python /indexd/bin/migrate_to_single_table.py $flags
echo "Exit code: $?"
restartPolicy: Never

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: indexd-single-table-migration-priority
value: 100000 # High value for high priority
globalDefault: false
description: "Priority class for Indexd migration job"
Loading