Skip to content

Commit

Permalink
setting up for production db load
Browse files Browse the repository at this point in the history
  • Loading branch information
billmills committed Nov 7, 2023
1 parent bae870d commit 4e4e81a
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@ FROM python:3.9

RUN apt-get update -y ; apt-get install -y nano netcdf-bin
RUN pip install xarray netcdf4 numpy scipy pymongo shapely geopy argovisHelpers
WORKDIR /app
COPY populate-AR.py populate-AR.py
COPY loaddata.sh loaddata.sh
COPY parameters/basinmask_01.nc parameters/basinmask_01.nc
RUN chown -R 1000660000 /app

23 changes: 23 additions & 0 deletions loaddata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2000.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2001.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2002.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2003.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2004.nc
python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2005.nc
python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2006.nc
python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2007.nc
python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2008.nc
python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2009.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2010.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2011.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2012.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2013.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2014.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2015.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2016.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2017.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2018.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2019.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2020.nc
# python populate-AR.py /tmp/Rutz_ARCatalog_MERRA2_2021.nc

28 changes: 28 additions & 0 deletions pod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: v1
kind: Pod
metadata:
name: ar-sync
labels:
tier: api
spec:
volumes:
- name: ar
persistentVolumeClaim:
claimName: ar
containers:
- name: schema
imagePullPolicy: Always
image: argovis/ar-sync:dev
command: ['sleep', '1000000']
#command: ['bash', 'loaddata.sh']
volumeMounts:
- mountPath: "/tmp"
name: ar
resources:
requests:
memory: "0Gi"
cpu: "0m"
limits:
memory: 1Gi
cpu: 1000m
restartPolicy: Never

0 comments on commit 4e4e81a

Please sign in to comment.