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

Mage setup #511

Merged
merged 51 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
447f0cb
added project and workflow
May 2, 2024
a8e7eaa
added workflow
May 2, 2024
b739be7
updated directory
amanda-eames May 2, 2024
5235594
allow changes on workflow
amanda-eames May 2, 2024
33fe18e
added raw data
May 2, 2024
a615c1c
added workflow
May 2, 2024
9a2e842
Merge branch 'mage-setup' of github.com:Open-Earth-Foundation/CityCat…
May 2, 2024
f2c50bb
added raw_data
May 2, 2024
c384679
removed gdal
May 2, 2024
bd3dd2f
changed image name
May 2, 2024
67fd80c
updated values with GHCR
May 2, 2024
7015318
updated scripts
May 21, 2024
b3f99ca
updated github actions
May 21, 2024
eb0a645
test github actions
May 23, 2024
b24522f
added raw data file
May 23, 2024
d8b3bdd
no data copy in dockerfile
May 23, 2024
ceb12c5
test mage github actions
May 23, 2024
9a9aff3
test mage github actions upgrade helm
May 23, 2024
537d0eb
added db details
May 24, 2024
a9c62cf
github actions test
May 24, 2024
149435e
github actions test
May 24, 2024
6e742c8
github actions test
May 24, 2024
2c9403b
fix: github actions
May 24, 2024
f2a1f83
fix: usernameacess for mageai
Jun 5, 2024
ee0f5f0
fix migration files
Jun 5, 2024
484d32e
feat: added pipeline for s3
Jun 10, 2024
4d96d65
test: githubactions
Jun 10, 2024
e3552a0
test: githubactions
Jun 10, 2024
d487d09
test: githubactions
Jun 10, 2024
5c0a10c
test: githubactions
Jun 10, 2024
fbd0a7a
test: githubactions
Jun 10, 2024
b9f72d3
test: githubactions
Jun 10, 2024
a2c32da
test: githubactions
Jun 10, 2024
f32c93e
test: githubactions
Jun 10, 2024
7f6a675
test: githubactions
Jun 10, 2024
d2aecce
test: githubactions
Jun 10, 2024
5f38ae2
test: githubactions
Jun 10, 2024
cb36be0
test: githubactions
Jun 10, 2024
0bf6938
test: githubactions
Jun 10, 2024
0bfccf2
test: githubactions
Jun 10, 2024
426b9af
test: githubactions
Jun 10, 2024
adc3d4f
fix: dockerfile for mage
Jun 11, 2024
475a2f7
fix: dockerfile for mage
Jun 11, 2024
eb151a0
fix: dockerfile for mage
Jun 11, 2024
18a5375
fix: dockerfile for mage
Jun 11, 2024
436682f
fix: gitignore
Jun 11, 2024
c504211
fix: gitignore
Jun 11, 2024
baf58ac
fix: gitignore
Jun 11, 2024
ddefd09
fix: gitignore
Jun 11, 2024
cb56a57
fix: gitignore
Jun 11, 2024
ce844ae
Merge branch 'develop' into mage-setup
amanda-eames Jun 11, 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
Binary file added .DS_Store
Binary file not shown.
41 changes: 41 additions & 0 deletions .github/workflows/mage-ai-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Push mageai to the latest deploy helm chart to Amazon EKS

on:
workflow_dispatch:
push:
paths:
- global-api/importer-mage/**
- charts/mage-ai/**
- .github/workflows/mage-ai-develop.yml
branches: ["develop"]
pull_request:
paths:
- global-api/importer-mage/**

jobs:

pushToGHCR:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./global-api/importer-mage

steps:
- uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Pushing mageai to GHCR
env:
VERSION: ${{ github.sha }}
IMAGE: ghcr.io/open-earth-foundation/citycatalyst-mage-ai
run: |
docker build -t $IMAGE:$VERSION .
docker tag $IMAGE:$VERSION $IMAGE:latest
docker push $IMAGE:$VERSION
docker push $IMAGE:latest
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,6 @@ global-api/importer/osm/cache/**
global-api/importer/osm/data/**
global-api/data/**


#Python virtual env
global-api/env
global-api/env
164 changes: 164 additions & 0 deletions charts/mage-ai/values.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
# Default values for mageai.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1
standaloneScheduler: false

# Effective if standaloneScheduler is true
scheduler:
replicaCount: 1
name: mageai-schedulers


# Effective if standaloneScheduler is true
webServer:
replicaCount: 1
name: mageai-webserver

# Enable redis if you want more replica
redis:
enabled: false
architecture: standalone
auth:
enabled: false
# Your custom redis url (make sure redis.enabled is set to false)
customRedisURL: ""

image:
repository: ghcr.io/open-earth-foundation/citycatalyst-mage-ai
pullPolicy: Always
tag: latest

serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: "mageai"

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 6789
# Annotations to add to the service
annotations: {}

# Configure extra options for containers' liveness probes
# If not configured, the probe is enabled using the following values
livenessProbe:
enabled: true
path: /api/status
port: http
initialDelaySeconds: 5
# failureThreshold:
# periodSeconds:
# successThreshold:
# terminationGracePeriodSeconds:
timeoutSeconds: 10

# Configure extra options for containers' readiness probes
# If not configured, the probe is enabled using the following values
readinessProbe:
enabled: true
path: /api/status
port: http
initialDelaySeconds: 5
# failureThreshold:
# periodSeconds:
# successThreshold:
# terminationGracePeriodSeconds:
timeoutSeconds: 1

# Custom liveness probe
customLivenessProbe: {}

# Custom readiness probe
customReadinessProbe: {}

# We recommend creating the ingress separately instead of creating it using this chart.
# There is a corresponding Mage-Ingress chart to create an ingress for Mage if needed.
# This section is kept here for backwards compatibility.
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

# extraVolumeMounts:
# - name: mage-fs
# mountPath: /home/src

extraVolumes:
- name: mage-fs
persistentVolumeClaim:
claimName: mage-fs-pvc

# config: Default configuration for mageai as environment variables. These get injected directly in the container.
config: {}

# existingSecret: Specifies an existing secret to be used as environment variables. These get injected directly in the container.
existingSecret: ""

# secrets: Default secrets for mageai as environment variables. These get injected directly in the container.
# Consider using a secret manager first, before sourcing secrets as environment variables.
secrets: {}

# extraEnvs: Extra environment variables
extraEnvs:
- name: KUBE_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace

env:
- name: REQUIRE_USER_AUTHENTICATION
value: "1"
- name: DEFAULT_OWNER_EMAIL
value: ""
- name: DEFAULT_OWNER_PASSWORD
value: ""
- name: DEFAULT_OWNER_USERNAME
value: ""
7 changes: 4 additions & 3 deletions global-api/import_everything.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ popd


# Import EDGAR extract
# no longer require sample data to be loaded.

pushd importer/edgar/pilot_cities
$python_cmd load_edgar_pilot_city.py --database_uri $DB_URI
popd
# pushd importer/edgar/pilot_cities
# $python_cmd load_edgar_pilot_city.py --database_uri $DB_URI
# popd
Loading
Loading