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

Merge Aquaveo master which includes V2 PR #22

Open
wants to merge 109 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
341d130
remove assets, rename folders
rileyhales Nov 20, 2023
4d358ef
organize versions into subpackages
rileyhales Nov 20, 2023
c630e12
dates default return format as csv, json still available
rileyhales Nov 21, 2023
1dc7199
option to not send index in csv responses
rileyhales Nov 21, 2023
7b48b61
remove aws token
rileyhales Nov 21, 2023
2f58d4d
remove aws token
rileyhales Nov 21, 2023
b444802
put configs in ignored file
rileyhales Nov 21, 2023
e5aa0f7
reimplement getreachid and organize module names
rileyhales Nov 21, 2023
128f11b
use pygeoglows for historical, drop forecast anomalies
rileyhales Nov 21, 2023
1b48ecd
uncomment logging
rileyhales Nov 21, 2023
ecaff05
correct forecast data structures
rileyhales Nov 22, 2023
0518ecd
Merge branch 'byumaster'
msouff Dec 6, 2023
bc5cfe0
postponed v2 updates
msouff Jan 3, 2024
4dbd27e
updated helm-docker
msouff Jan 4, 2024
cd3ae4b
build helm only on merge to master
msouff Jan 4, 2024
da3f45c
build helm only on merge to master
msouff Jan 4, 2024
5dad9a7
build helm only on merge to master
msouff Jan 4, 2024
3a679a1
Merge branch 'helm-docker_update' into 'master'
msouff Jan 4, 2024
3a3ca0f
build commit only on merge to master
msouff Jan 4, 2024
859a89a
Merge branch 'helm-docker_update' into 'master'
msouff Jan 4, 2024
258a48c
reversed ci triggers
msouff Jan 4, 2024
040c3a5
Merge branch 'helm-docker_update' into 'master'
msouff Jan 4, 2024
5c464ce
include unified tethys ci
msouff Jan 4, 2024
dc62afb
include unified tethys ci
msouff Jan 4, 2024
980be3b
include unified tethys ci
msouff Jan 4, 2024
ac17d34
updated helm-check credentials
msouff Jan 4, 2024
1e094a7
added ECCR credentials
msouff Jan 4, 2024
87e1763
added ECCR credentials
msouff Jan 5, 2024
8274d4f
test ECCR user
msouff Jan 5, 2024
ff6381d
test all ECCR credentials
msouff Jan 5, 2024
5ef941a
test all ECCR credentials
msouff Jan 5, 2024
ce00863
test all ECCR credentials
msouff Jan 5, 2024
8ab9245
test all ECCR credentials
msouff Jan 5, 2024
18f0fe5
test all ECCR credentials
msouff Jan 5, 2024
35f19a9
wrap variables in double quotes
msouff Jan 5, 2024
d0a7179
wrap variables in double quotes
msouff Jan 5, 2024
b83d46b
escape '$' in HELM_REPO_USERNAME with backslash
msouff Jan 5, 2024
dbac99d
escape '$' in HELM_REPO_USERNAME with backslash
msouff Jan 5, 2024
3be8136
escape '$' in HELM_REPO_USERNAME with backslash
msouff Jan 5, 2024
776f175
escape '$' on CI
msouff Jan 5, 2024
6ef7a28
testing user variable
msouff Jan 5, 2024
d1fc32b
testing user variable
msouff Jan 5, 2024
15d804e
escape '$' on CI
msouff Jan 5, 2024
8037b40
hardcode user for helm check and upload
msouff Jan 5, 2024
c7ac71d
hardcode user for helm check and upload
msouff Jan 5, 2024
f473709
hardcode user for helm check and upload
msouff Jan 5, 2024
f122d14
revert to using CI var
msouff Jan 5, 2024
5ad7e5a
revert to using CI var
msouff Jan 5, 2024
cc490d4
revert to using CI var
msouff Jan 6, 2024
45d0204
revert to using local check_helm_chart
msouff Jan 6, 2024
ff0e534
Helm docker update
msouff Jan 6, 2024
c4afd82
Merge branch 'helm-docker_update' into 'master'
msouff Jan 6, 2024
d1cea8c
upload helm
msouff Jan 6, 2024
713ec27
Merge branch 'master' into 'helm-docker_update'
msouff Jan 6, 2024
29422d5
upload helm
msouff Jan 6, 2024
9e66a9b
Helm docker update
msouff Jan 6, 2024
c7e0ffe
Merge branch 'helm-docker_update' into 'master'
msouff Jan 6, 2024
36b21c6
upload helm
msouff Jan 8, 2024
6a2ddc3
Merge branch 'helm-docker_update' into 'master'
msouff Jan 8, 2024
cbbb93f
upload helm
msouff Jan 8, 2024
bc4055a
Merge branch 'helm-docker_update' into 'master'
msouff Jan 8, 2024
a858069
updated endpoints
msouff Jan 8, 2024
8ec48c2
Merge branch 'endpoints' into 'master'
msouff Jan 8, 2024
6826b58
updated license to cc; updated geoglows spelling
msouff Jan 23, 2024
7bb3a30
correct historical retrieval and static pages
rileyhales Feb 29, 2024
117e692
update publication list
rileyhales Feb 29, 2024
ece148c
re-enable analytics on v2
rileyhales Feb 29, 2024
14e2155
update capitalization of GEOGLOWS
rileyhales Mar 13, 2024
c71f3b1
consolidate logging
rileyhales Mar 13, 2024
9cff8f2
remove logging
rileyhales Mar 14, 2024
9fd9591
Merge branch 'creative_commons' into 'master'
msouff Mar 15, 2024
d83421e
Revert "consolidate logging"
rileyhales Mar 19, 2024
f2ed65f
update geographic properties table
rileyhales Mar 19, 2024
769c9fd
remove assets, rename folders
rileyhales Nov 20, 2023
169323b
rebased v2 to latest aquaveo master
msouff Mar 19, 2024
f9a3578
dates default return format as csv, json still available
rileyhales Nov 21, 2023
c7b2d38
option to not send index in csv responses
rileyhales Nov 21, 2023
93fe459
remove aws token
rileyhales Nov 21, 2023
e191960
remove aws token
rileyhales Nov 21, 2023
a2b4ba0
put configs in ignored file
rileyhales Nov 21, 2023
7645dd8
add missing imports
rileyhales Mar 19, 2024
19e0436
reimplement getreachid and organize module names
rileyhales Nov 21, 2023
d34209a
use pygeoglows for historical, drop forecast anomalies
rileyhales Nov 21, 2023
faf96a1
uncomment logging
rileyhales Nov 21, 2023
6914bbc
correct forecast data structures
rileyhales Nov 22, 2023
ea71075
correct historical retrieval and static pages
rileyhales Feb 29, 2024
d389e0e
re-enable analytics on v2
rileyhales Feb 29, 2024
a4f0589
update capitalization of GEOGLOWS
rileyhales Mar 13, 2024
ef79400
consolidate logging
rileyhales Mar 13, 2024
729b63e
remove logging
rileyhales Mar 14, 2024
48cd563
Revert "consolidate logging"
rileyhales Mar 19, 2024
5dd0c44
update geographic properties table
rileyhales Mar 19, 2024
d969ea5
Merge branch 'v2' of https://github.com/BYU-Hydroinformatics/geoglows…
msouff Mar 19, 2024
0ee848c
fixes from rebases
rileyhales Mar 19, 2024
f72b731
fixed lincense and docs
msouff Mar 19, 2024
369bddb
updated helm char version
msouff Mar 19, 2024
95f3595
Merge branch 'v2' into 'master'
msouff Mar 19, 2024
1504beb
updated to harbor v2 endpoint for uploads
msouff Mar 20, 2024
1c7c181
Merge branch 'harbor_updates' into 'master'
msouff Mar 20, 2024
57be8e7
updated to harbor v2 endpoint for uploads
msouff Mar 20, 2024
00546b1
Merge branch 'harbor_updates' into 'master'
msouff Mar 20, 2024
9535592
correct forecast path errors
rileyhales Mar 26, 2024
5442828
correct retrospective bucket names
rileyhales Mar 26, 2024
1426c13
add subdirectory for v2 outputs
rileyhales Mar 26, 2024
f6a7923
update file path for v2 forecast outputs
rileyhales Mar 27, 2024
e32ab3d
correct dtypes for json responses
rileyhales Mar 27, 2024
23cde35
update openapi specs
rileyhales Mar 27, 2024
5016081
pass start and end dates to retrospective
rileyhales Mar 27, 2024
94a018d
swagger yaml to html
rileyhales Mar 27, 2024
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,9 @@ dmypy.json
# pytype static role analyzer
.pytype/

# vscode
.vscode/

## Misc
sample_data/**
/aws_config.json
87 changes: 30 additions & 57 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,80 +2,43 @@ stages:
- Build
- Deploy

include:
- project: "tethys/kubernetes/gl-k8s-integration"
ref: 1.6.1
file: "/helm-check.yml"
- project: "tethys/kubernetes/gl-k8s-integration"
ref: 1.6.1
file: "/kaniko-build.yml"

### Build ###
"Check Helm":
stage: Build
image: docker.aquaveo.com/tethys/kubernetes/helm-docker:0.7.1
variables:
GIT_SUBMODULE_STRATEGY: none
HELM_REPO_URL: https://eccr.ecmwf.int
HELM_REPO_CHANNEL: geoglows_api
HELM_REPO_USERNAME: $ECCR_USER
HELM_REPO_PASSWORD: $ECCR_PASSWORD
HELM_CHART: $CI_PROJECT_DIR/helm/gsprestapi
script:
# Ensure all required variables are set
- ": \"${HELM_CHART:?must be set}\""
- helm lint $HELM_CHART
- chmod +x ./check_helm_chart
- ./check_helm_chart $HELM_CHART
except:
- tags
- master

"Update Helm":
stage: Build
image: docker.aquaveo.com/tethys/kubernetes/helm-docker:0.7.1
variables:
GIT_SUBMODULE_STRATEGY: none
HELM_REPO_USERNAME: aquaveo
HELM_REPO_URL: https://eccr.ecmwf.int
HELM_REPO_CHANNEL: geoglows_api
HELM_REPO_USERNAME: $ECCR_USER
HELM_REPO_PASSWORD: $ECCR_PASSWORD
HELM_CHART: $CI_PROJECT_DIR/helm/gsprestapi
script:
# Ensure all required variables are set
- ": \"${HELM_CHART:?must be set}\""
- ": \"${HELM_KEY_PASSPHRASE:?must be set}\""
- ": \"${HELM_REPO_PASSWORD:?must be set}\""
- helm lint $HELM_CHART
- chmod +x ./check_helm_chart
- ./check_helm_chart $HELM_CHART --upload
only:
- master

.kaniko_build:
stage: Build
image:
name: gcr.io/kaniko-project/executor:debug-v0.23.0
entrypoint: [""]
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- >
echo "{\"auths\":{
\"$CI_REGISTRY\": {\"username\":\"$CI_REGISTRY_USER\", \"password\":\"$CI_REGISTRY_PASSWORD\"},
\"eccr.ecmwf.int/harbor\": {\"username\":\"$ECCR_USER\", \"password\":\"$ECCR_PASSWORD\"}
}}" > /kaniko/.docker/config.json
script:
# Ensure all required variables are set
- ": \"${KANIKO_DOCKERFILE:?must be set}\""
- ": \"${KANIKO_CONTEXT:?must be set}\""
- ": \"${KANIKO_DESTINATIONS:?must be set}\""
# Run Kaniko
- export KANIKO_CMD="/kaniko/executor
--context $KANIKO_CONTEXT
--dockerfile $KANIKO_DOCKERFILE
$(for DEST in $KANIKO_DESTINATIONS; do echo "--destination $DEST "; done)
--cache=true
--cache-repo $CI_REGISTRY_IMAGE/cache
--force"
- echo $KANIKO_CMD
- $KANIKO_CMD

"Build Commit":
extends: .kaniko_build
variables:
GIT_SUBMODULE_STRATEGY: recursive
KANIKO_CONTEXT: $CI_PROJECT_DIR
KANIKO_DOCKERFILE: $CI_PROJECT_DIR/Dockerfile
KANIKO_DESTINATIONS: $CI_REGISTRY_IMAGE/dev:$CI_COMMIT_SHORT_SHA

except:
- tags

"Build Tag":
extends: .kaniko_build
Expand All @@ -86,6 +49,12 @@ stages:
KANIKO_DESTINATIONS: >
eccr.ecmwf.int/geoglows_api/geoglows_api:$CI_COMMIT_TAG
eccr.ecmwf.int/geoglows_api/geoglows_api:latest
before_script:
- >
echo "{\"auths\":{
\"$CI_REGISTRY\": {\"username\":\"$CI_REGISTRY_USER\", \"password\":\"$CI_REGISTRY_PASSWORD\"},
\"eccr.ecmwf.int/harbor\": {\"username\":\"$ECCR_USER\", \"password\":\"$ECCR_PASSWORD\"}
}}" > /kaniko/.docker/config.json
only:
- tags

Expand All @@ -95,13 +64,19 @@ stages:
KANIKO_CONTEXT: $CI_PROJECT_DIR
KANIKO_DOCKERFILE: $CI_PROJECT_DIR/Dockerfile
KANIKO_DESTINATIONS: eccr.ecmwf.int/geoglows_api/geoglows_api:stable
before_script:
- >
echo "{\"auths\":{
\"$CI_REGISTRY\": {\"username\":\"$CI_REGISTRY_USER\", \"password\":\"$CI_REGISTRY_PASSWORD\"},
\"eccr.ecmwf.int/harbor\": {\"username\":\"$ECCR_USER\", \"password\":\"$ECCR_PASSWORD\"}
}}" > /kaniko/.docker/config.json
only:
- /^stable$/

### DEPLOY ###
"Deploy to Staging":
stage: Deploy
image: docker.aquaveo.com/tethys/kubernetes/helm-docker:2.0.0-rc1
image: aquaveollc/helm-docker:0.3.1
dependencies: [] # Deploys do not depend on the Build phase artifacts
variables:
GIT_SUBMODULE_STRATEGY: none
Expand All @@ -115,7 +90,7 @@ stages:

"Deploy to Production":
stage: Deploy
image: docker.aquaveo.com/tethys/kubernetes/helm-docker:2.0.0-rc1
image: aquaveollc/helm-docker:0.3.1
dependencies: [] # Deploys do not depend on the Build phase artifacts
variables:
GIT_SUBMODULE_STRATEGY: none
Expand All @@ -126,5 +101,3 @@ stages:
when: manual
only:
- tags


21 changes: 4 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,23 @@ FROM continuumio/miniconda3:latest

ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 PATH=/opt/conda/envs/gsp_api/bin:$PATH API_PREFIX=/api

# For Development On Analytics Only:
# ENV AWS_ACCESS_KEY_ID=
# ENV AWS_SECRET_ACCESS_KEY=
# ENV AWS_LOG_GROUP_NAME=
# ENV AWS_LOG_STREAM_NAME=
# ENV AWS_REGION=

RUN mkdir /var/uwsgi

RUN apt-get update -qq && apt-get install -yqq supervisor vim

COPY ./environment.yml ./startup.sh ./
COPY environment.yaml ./startup.sh ./

RUN conda config --set channel_priority strict && \
conda config --add channels conda-forge && \
conda env create -f environment.yml && \
echo "conda activate gsp_api" >> ~/.bashrc
conda env create -f environment.yaml && \
echo "conda activate app-env" >> ~/.bashrc

RUN mkdir -p /mnt/output/forecasts && \
mkdir -p /mnt/output/era-interim && \
mkdir -p /mnt/output/era-5 && \
mkdir -p /mnt/output/forecast-records

# COPY ./sample_data/forecasts /mnt/output/forecasts
# COPY ./sample_data/era-interim /mnt/output/era-interim
# COPY ./sample_data/era-5 /mnt/output/era-5
# COPY ./sample_data/forecast-records /mnt/output/forecast-records

# Copy API code
COPY ./GSP_API /app/GSP_API/
COPY app /app
COPY ./supervisord.conf /etc/supervisor/conf.d/uwsgi.conf

# startup.sh is a helper script
Expand Down
200 changes: 0 additions & 200 deletions GSP_API/app.py

This file was deleted.

Loading