Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(infra): Add market prod (#8204)

Aarushi31450fcb9c10
diff --git a/autogpt_platform/infra/helm/autogpt-market/templates/backendconfig.yaml b/autogpt_platform/infra/helm/autogpt-market/templates/backendconfig.yaml
index e7f7c8a8f1..0e7c138d37 100644
--- a/autogpt_platform/infra/helm/autogpt-market/templates/backendconfig.yaml
+++ b/autogpt_platform/infra/helm/autogpt-market/templates/backendconfig.yaml
@@ -1,7 +1,7 @@
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
- name: {{ include "autogpt-market.fullname" . }}
+ name: {{ include "autogpt-market.fullname" . }}-backend-config
spec:
customRequestHeaders:
headers:
diff --git a/autogpt_platform/infra/helm/autogpt-market/templates/deployment.yaml b/autogpt_platform/infra/helm/autogpt-market/templates/deployment.yaml
index a1b10c22e5..cb6d7faa45 100644
--- a/autogpt_platform/infra/helm/autogpt-market/templates/deployment.yaml
+++ b/autogpt_platform/infra/helm/autogpt-market/templates/deployment.yaml
@@ -41,7 +41,7 @@ spec:
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
- containerPort: {{ .Values.service.port }}
+ containerPort: {{ .Values.service.targetPort }}
protocol: TCP
livenessProbe:
{{- toYaml .Values.livenessProbe | nindent 12 }}
@@ -53,15 +53,6 @@ spec:
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
- - name: cloud-sql-proxy
- image: "{{ .Values.cloudSqlProxy.image.repository }}:{{ .Values.cloudSqlProxy.image.tag }}"
- args:
- - "--structured-logs"
- {{- if .Values.cloudSqlProxy.usePrivateIp }}
- - "--private-ip"
- {{- end }}
- - "--port={{ .Values.cloudSqlProxy.port }}"
- - "{{ .Values.cloudSqlProxy.instanceConnectionName }}"
{{- with .Values.volumes }}
volumes:
{{- toYaml . | nindent 8 }}
diff --git a/autogpt_platform/infra/helm/autogpt-market/templates/service.yaml b/autogpt_platform/infra/helm/autogpt-market/templates/service.yaml
index ca126063dc..3895c760f8 100644
--- a/autogpt_platform/infra/helm/autogpt-market/templates/service.yaml
+++ b/autogpt_platform/infra/helm/autogpt-market/templates/service.yaml
@@ -4,11 +4,15 @@ metadata:
name: {{ include "autogpt-market.fullname" . }}
labels:
{{- include "autogpt-market.labels" . | nindent 4 }}
+ {{- with .Values.service.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
- targetPort: http
+ targetPort: {{ .Values.service.targetPort }}
protocol: TCP
name: http
selector:
diff --git a/autogpt_platform/infra/helm/autogpt-market/values.dev.yaml b/autogpt_platform/infra/helm/autogpt-market/values.dev.yaml
index 27fe4b2bd4..e8588fe0f4 100644
--- a/autogpt_platform/infra/helm/autogpt-market/values.dev.yaml
+++ b/autogpt_platform/infra/helm/autogpt-market/values.dev.yaml
@@ -12,11 +12,11 @@ serviceAccount:
service:
type: ClusterIP
- port: 8000
- targetPort: 8005
+ port: 8015
+ targetPort: 8015
annotations:
cloud.google.com/neg: '{"ingress": true}'
- beta.cloud.google.com/backend-config: '{"default": "autogpt-market"}'
+ beta.cloud.google.com/backend-config: '{"default": "autogpt-market-backend-config"}'
ingress:
enabled: true
@@ -25,7 +25,7 @@ ingress:
kubernetes.io/ingress.class: gce
kubernetes.io/ingress.global-static-ip-name: "agpt-dev-agpt-market-ip"
networking.gke.io/managed-certificates: "autogpt-market-cert"
- kubernetes.io/ingress.allow-http: "false"
+ networking.gke.io/v1beta1.FrontendConfig: "autogpt-market-frontend-config"
hosts:
- host: dev-market.agpt.co
paths:
@@ -34,12 +34,12 @@ ingress:
backend:
service:
name: autogpt-market
- port: 8000
+ port: 8015
defaultBackend:
service:
name: autogpt-market
port:
- number: 8000
+ number: 8015
resources:
requests:
@@ -52,7 +52,7 @@ resources:
livenessProbe:
httpGet:
path: /health
- port: 8000
+ port: 8015
initialDelaySeconds: 60
periodSeconds: 20
timeoutSeconds: 10
@@ -60,7 +60,7 @@ livenessProbe:
readinessProbe:
httpGet:
path: /health
- port: 8000
+ port: 8015
initialDelaySeconds: 60
periodSeconds: 20
timeoutSeconds: 10
@@ -95,9 +95,14 @@ cors:
env:
APP_ENV: "dev"
+ PYRO_HOST: "0.0.0.0"
ENABLE_AUTH: "true"
SUPABASE_JWT_SECRET: ""
- SUPABASE_ANON_KEY: ""
- SUPABASE_URL: ""
DATABASE_URL: ""
+ SENTRY_DSN: ""
+ SUPABASE_SERVICE_ROLE_KEY: ""
+ GITHUB_CLIENT_ID: ""
+ GITHUB_CLIENT_SECRET: ""
+ FRONTEND_BASE_URL: "https://dev-builder.agpt.co/"
+ SUPABASE_URL: "https://adfjtextkuilwuhzdjpf.supabase.co"
BACKEND_CORS_ALLOW_ORIGINS: "https://dev-builder.agpt.co"
\ No newline at end of file
diff --git a/autogpt_platform/infra/helm/autogpt-market/values.prod.yaml b/autogpt_platform/infra/helm/autogpt-market/values.prod.yaml
new file mode 100644
index 0000000000..1ed7ad8748
--- /dev/null
+++ b/autogpt_platform/infra/helm/autogpt-market/values.prod.yaml
@@ -0,0 +1,109 @@
+# prod values, overwrite base values as needed.
+
+image:
+ repository: us-east1-docker.pkg.dev/agpt-prod/agpt-market-prod/agpt-market-prod
+ pullPolicy: Always
+ tag: "latest"
+
+serviceAccount:
+ annotations:
+ iam.gke.io/gcp-service-account: "[email protected]"
+ name: "prod-agpt-market-sa"
+
+service:
+ type: ClusterIP
+ port: 8015
+ targetPort: 8015
+ annotations:
+ cloud.google.com/neg: '{"ingress": true}'
+ beta.cloud.google.com/backend-config: '{"default": "autogpt-market-backend-config"}'
+
+ingress:
+ enabled: true
+ className: "gce"
+ annotations:
+ kubernetes.io/ingress.class: gce
+ kubernetes.io/ingress.global-static-ip-name: "agpt-prod-agpt-market-ip"
+ networking.gke.io/managed-certificates: "autogpt-market-cert"
+ networking.gke.io/v1beta1.FrontendConfig: "autogpt-market-frontend-config"
+ hosts:
+ - host: platform.agpt.co
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: autogpt-market
+ port: 8015
+ defaultBackend:
+ service:
+ name: autogpt-market
+ port:
+ number: 8015
+
+resources:
+ requests:
+ cpu: 200m
+ memory: 1Gi
+ limits:
+ cpu: 2
+ memory: 2Gi
+
+livenessProbe:
+ httpGet:
+ path: /health
+ port: 8015
+ initialDelaySeconds: 60
+ periodSeconds: 20
+ timeoutSeconds: 10
+ failureThreshold: 12
+readinessProbe:
+ httpGet:
+ path: /health
+ port: 8015
+ initialDelaySeconds: 60
+ periodSeconds: 20
+ timeoutSeconds: 10
+ failureThreshold: 12
+
+domain: "market.agpt.co"
+
+cloudSqlProxy:
+ image:
+ repository: gcr.io/cloud-sql-connectors/cloud-sql-proxy
+ tag: 2.11.4
+ instanceConnectionName: "agpt-prod:us-central1:agpt-server-prod"
+ port: 5432
+ resources:
+ requests:
+ memory: "2Gi"
+ cpu: "1"
+
+cors:
+ allowOrigin: "https://platform.agpt.co"
+ allowMethods:
+ - "GET"
+ - "POST"
+ - "PUT"
+ - "DELETE"
+ - "OPTIONS"
+ allowHeaders:
+ - "Content-Type"
+ - "Authorization"
+ maxAge: 3600
+ allowCredentials: true
+
+env:
+ APP_ENV: "prod"
+ PYRO_HOST: "0.0.0.0"
+ ENABLE_AUTH: "true"
+ SUPABASE_JWT_SECRET: ""
+ DATABASE_URL: ""
+ SENTRY_DSN: ""
+ SUPABASE_SERVICE_ROLE_KEY: ""
+ GITHUB_CLIENT_ID: ""
+ GITHUB_CLIENT_SECRET: ""
+ FRONTEND_BASE_URL: "https://platform.agpt.co/"
+ SUPABASE_URL: "https://bgwpwdsxblryihinutbx.supabase.co"
+ BACKEND_CORS_ALLOW_ORIGINS: "https://platform.agpt.co"
+
diff --git a/autogpt_platform/infra/helm/autogpt-market/values.yaml b/autogpt_platform/infra/helm/autogpt-market/values.yaml
index b5227f5f09..6b6bd1add9 100644
--- a/autogpt_platform/infra/helm/autogpt-market/values.yaml
+++ b/autogpt_platform/infra/helm/autogpt-market/values.yaml
@@ -71,15 +71,6 @@ resources: {}
# cpu: 100m
# memory: 128Mi
-livenessProbe:
- httpGet:
- path: /
- port: http
-readinessProbe:
- httpGet:
- path: /
- port: http
-
autoscaling:
enabled: false
minReplicas: 1