Skip to content

Commit

Permalink
Merge pull request #45 from TheJacksonLaboratory/task/update-kustomiz…
Browse files Browse the repository at this point in the history
…ation-definitions

Task/update kustomization definitions
  • Loading branch information
bergsalex authored Mar 29, 2024
2 parents d3c5fd4 + 157e7d8 commit cba64cc
Show file tree
Hide file tree
Showing 45 changed files with 291 additions and 115 deletions.
103 changes: 103 additions & 0 deletions .compass/compass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: geneweaver-api
id: 'ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:component/90bb0329-f6c5-429a-abbc-8d174535ad21/ac8655e4-ce94-4576-adb6-15a785b0161b'
description: null
configVersion: 1
typeId: SERVICE
ownerId: 'ari:cloud:teams::team/0d1a489d-e157-4c61-8d94-7e5c651eb9cc'
fields:
tier: 2
lifecycle: Active
links:
- name: null
type: REPOSITORY
url: 'https://github.com/TheJacksonLaboratory/geneweaver-api'
- name: null
type: PROJECT
url: 'https://jacksonlaboratory.atlassian.net/browse/G3'
- name: ''
type: DOCUMENT
url: 'https://thejacksonlaboratory.github.io/geneweaver-docs/'
- name: Swagger Page
type: OTHER_LINK
url: 'https://geneweaver.jax.org/api/docs'
- name: GeneWeaver Slack
type: CHAT_CHANNEL
url: 'https://thejacksonlaboratory.slack.com/archives/GGKCSAWCF'
- name: GeneWeaver JCPG Slack
type: CHAT_CHANNEL
url: 'https://thejacksonlaboratory.slack.com/archives/C05G32L2SLX'
relationships:
DEPENDS_ON:
- 'ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:component/90bb0329-f6c5-429a-abbc-8d174535ad21/f1375e59-b539-46b4-a44c-2cf1bce3637a'
- 'ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:component/90bb0329-f6c5-429a-abbc-8d174535ad21/a95bd6b6-cf4f-4635-bb62-693ef9df2f69'
- 'ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:component/90bb0329-f6c5-429a-abbc-8d174535ad21/37625f97-0774-42ba-9e0e-9a6b4c87a707'
- 'ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:component/90bb0329-f6c5-429a-abbc-8d174535ad21/43044a89-087b-4469-86a8-34f9ded06b4c'
- 'ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:component/90bb0329-f6c5-429a-abbc-8d174535ad21/71eb9358-bf9c-4bb2-b30f-2918b099ed57'
labels: null
customFields:
- name: 'FIN: Funding End Date'
type: text
value: null
- name: 'FIN: Funding Sources'
type: text
value: null
- name: 'FIN: Hosting Cost'
type: number
value: null
- name: 'FIN: Incurred Development Cost'
type: number
value: null
- name: 'FIN: Maintenance Cost'
type: number
value: null
- name: 'INFO: Business Owner'
type: text
value: 'Erich Baker, Elissa Chesler'
- name: 'INFO: Creation Date'
type: text
value: null
- name: 'INFO: Data Type(s)'
type: text
value: null
- name: 'INFO: FAIR Compliance'
type: text
value: null
- name: 'INFO: Usage Statistics'
type: text
value: null
- name: 'INFO: User Statistics'
type: text
value: null
- name: 'TECH: Authentication Type'
type: text
value: null
- name: 'TECH: Authorization'
type: text
value: null
- name: 'TECH: Automated Deployments'
type: boolean
value: true
- name: 'TECH: Containerized'
type: boolean
value: false
- name: 'TECH: Deployment Location'
type: text
value: jax-cluster
- name: 'TECH: Deployment OS'
type: text
value: null
- name: 'TECH: Open Source Code'
type: boolean
value: true
- name: 'TECH: Other'
type: text
value: null
- name: 'TECH: Point of Contact'
type: text
value: null
- name: 'TECH: Public Domain Name'
type: boolean
value: false
- name: 'TECH: Stack'
type: text
value: 'python, fastapi'
26 changes: 26 additions & 0 deletions .github/workflows/_check-coverage-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,32 @@ jobs:
with:
name: coverage-report-html
path: htmlcov
- name: Upload coverage to Compass
run: |
METRIC_VALUE=$(cat coverage_report.txt | grep 'Total coverage:' | awk '{print $NF}' | sed 's/%//')
curl --request POST \
--url https://jacksonlaboratory.atlassian.net/gateway/api/compass/v1/metrics \
--user "${{ vars.ATLASSIAN_COMPASS_EMAIL }}:${{ secrets.ATLASSIAN_COMPASS_KEY }}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"metricSourceId\": \"ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:metric-source/90bb0329-f6c5-429a-abbc-8d174535ad21/f2a60ca2-5065-4c10-ae99-cb844715b5e3\",
\"value\": $METRIC_VALUE,
\"timestamp\": \"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\"
}"
- name: Upload complexity to Compass
run: |
METRIC_VALUE=$(poetry run radon cc src --total-average | grep 'Average complexity:' | awk '{print $NF}' | sed 's/[\(\)]//g')
curl --request POST \
--url https://jacksonlaboratory.atlassian.net/gateway/api/compass/v1/metrics \
--user "${{ vars.ATLASSIAN_COMPASS_EMAIL }}:${{ secrets.ATLASSIAN_COMPASS_KEY }}" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data "{
\"metricSourceId\": \"ari:cloud:compass:44257862-6c68-4d47-8211-da38d2bb001b:metric-source/90bb0329-f6c5-429a-abbc-8d174535ad21/480dd6d8-7e86-492f-b929-3cea59711691\",
\"value\": $METRIC_VALUE,
\"timestamp\": \"$(date -u +'%Y-%m-%dT%H:%M:%SZ')\"
}"
comment-coverage-report:
needs: [ check_coverage ]
runs-on: ubuntu-latest
Expand Down
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
The full contribution guide can be found at [Geneweaver Documentation](https://thejacksonlaboratory.github.io/geneweaver-docs/reference/contributing-guide/).

This package is developed and maintained by the Computational Sciences department at
the Jackson Laboratory.

For more information, please visit
[our website](https://www.jax.org/research-and-faculty/resources/scientific-research-services/computational-sciences).

For questions, comments, bug reports and security vulnerability reporting, please reach
out to us as [email protected].

Other Geneweaver packages are community developed and can be found at on GitHub:
- [Geneweaver Testing](https://github.com/bergsalex/geneweaver-testing)
- [Geneweaver Tools](https://github.com/bergsalex/geneweaver-tools)
- [Geneweaver AON](https://github.com/bergsalex/geneweaver-aon)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Geneweaver 3 API

[![GitHub deployments](https://img.shields.io/github/deployments/thejacksonlaboratory/geneweaver-api/jax-cluster-prod-10--prod?style=for-the-badge&label=Deployment%20Status)](https://geneweaver.jax.org/aon/api/docs)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fgeneweaver.jax.org%2Fapi%2Fdocs&up_message=available&down_message=down&style=for-the-badge&logo=swagger&label=Swagger%20Page&link=https%3A%2F%2Fgeneweaver.jax.org%2Fapi%2Fdocs)](https://geneweaver.jax.org/api/docs)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fthejacksonlaboratory.github.io%2Fgeneweaver-docs%2F&up_message=AVAILABLE&style=for-the-badge&logo=materialformkdocs&label=Documentation)](https://thejacksonlaboratory.github.io/geneweaver-docs/)

Description: The API for the Geneweaver v3 application ecosystem.

## Setup
Expand Down
14 changes: 14 additions & 0 deletions deploy/k8s/base/global-labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: builtin
kind: LabelTransformer
metadata:
name: global-labels
labels:
jax.org/owner-team: geneweaver
jax.org/owner-team-id: 0d1a489d-e157-4c61-8d94-7e5c651eb9cc
jax.org/billing-group: geneweaver
jax.org/system-group: geneweaver
jax.org/component-id: ac8655e4-ce94-4576-adb6-15a785b0161b
jax.org/component-tier: 2
fieldSpecs:
- path: metadata/labels
create: true
13 changes: 0 additions & 13 deletions deploy/k8s/base/ingress.yaml

This file was deleted.

5 changes: 2 additions & 3 deletions deploy/k8s/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

transformers:
- global-labels.yaml
resources:
- configmap.yaml
- deployment.yaml
- service.yaml
# TODO: Uncomment the following line to enable ingress
# - ingress.yaml
11 changes: 1 addition & 10 deletions deploy/k8s/overlays/jax-cluster-dev-10--dev/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: dev

bases:
- ../../base

# NOTE: When applying production ingress, replace this with a patch
resources:
- ../../base
- ingress.yaml

#patchesStrategicMerge:
# - configmap.yaml
# - ingress.yaml
11 changes: 1 addition & 10 deletions deploy/k8s/overlays/jax-cluster-dev-10--sqa/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: sqa

bases:
- ../../base

# NOTE: When applying production ingress, replace this with a patch
resources:
- ../../base
- ingress.yaml

#patchesStrategicMerge:
# - configmap.yaml
# - ingress.yaml
11 changes: 3 additions & 8 deletions deploy/k8s/overlays/jax-cluster-prod-10--prod/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: prod

bases:
- ../../base

resources:
- ../../base
- ingress.yaml
patchesStrategicMerge:
- configmap.yaml

resources:
- ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: stage

bases:
- ../../base

resources:
- ../../base
- ingress.yaml
patchesStrategicMerge:
- configmap.yaml

resources:
- ingress.yaml
Loading

0 comments on commit cba64cc

Please sign in to comment.