attempt to add airflow ini 3
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: AppProject
|
kind: AppProject
|
||||||
metadata: { name: ai-stack, namespace: argocd }
|
metadata:
|
||||||
|
name: ai-stack
|
||||||
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
destinations:
|
destinations:
|
||||||
- server: https://kubernetes.default.svc
|
- server: https://kubernetes.default.svc
|
||||||
@@ -13,14 +15,23 @@ spec:
|
|||||||
---
|
---
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: ai-stack, namespace: argocd }
|
metadata:
|
||||||
|
name: ai-stack
|
||||||
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
source:
|
source:
|
||||||
repoURL: https://git.ion606.com/ion606/ollama-plus
|
repoURL: https://git.ion606.com/ion606/ollama-plus
|
||||||
targetRevision: argo
|
targetRevision: argo
|
||||||
path: apps/children
|
path: apps/children
|
||||||
directory: { recurse: true }
|
directory:
|
||||||
|
recurse: true
|
||||||
syncPolicy:
|
syncPolicy:
|
||||||
automated: { prune: true, selfHeal: true }
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: airflow, namespace: ai }
|
metadata:
|
||||||
|
name: airflow
|
||||||
|
namespace: ai
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
sources:
|
sources:
|
||||||
- repoURL: https://airflow.apache.org
|
- repoURL: https://airflow.apache.org
|
||||||
chart: airflow
|
chart: airflow
|
||||||
@@ -15,4 +21,7 @@ spec:
|
|||||||
- repoURL: https://git.ion606.com/ion606/ollama-plus
|
- repoURL: https://git.ion606.com/ion606/ollama-plus
|
||||||
targetRevision: argo
|
targetRevision: argo
|
||||||
ref: values
|
ref: values
|
||||||
syncPolicy: { automated: { prune: true, selfHeal: true } }
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: browser, namespace: ai }
|
metadata:
|
||||||
|
name: browser
|
||||||
|
namespace: ai
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
source:
|
source:
|
||||||
repoURL: https://your.git/repo.git
|
repoURL: https://your.git/repo.git
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: manifests/browser
|
path: manifests/browser
|
||||||
syncPolicy: { automated: { prune: true, selfHeal: true } }
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: coderunner, namespace: ai }
|
metadata:
|
||||||
|
name: coderunner
|
||||||
|
namespace: ai
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
source:
|
source:
|
||||||
repoURL: https://git.ion606.com/ion606/ollama-plus
|
repoURL: https://git.ion606.com/ion606/ollama-plus
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: manifests/coderunner
|
path: manifests/coderunner
|
||||||
syncPolicy: { automated: { prune: true, selfHeal: true } }
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: openwebui, namespace: ai }
|
metadata:
|
||||||
|
name: openwebui
|
||||||
|
namespace: ai
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "0"
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
source:
|
source:
|
||||||
repoURL: https://helm.openwebui.com
|
repoURL: https://helm.openwebui.com
|
||||||
chart: open-webui
|
chart: open-webui
|
||||||
@@ -11,4 +17,7 @@ spec:
|
|||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- apps/values/openwebui.yaml
|
- apps/values/openwebui.yaml
|
||||||
syncPolicy: { automated: { prune: true, selfHeal: true } }
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: postgresql, namespace: ai }
|
metadata:
|
||||||
|
name: postgresql
|
||||||
|
namespace: ai
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-wave: "-10"
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination:
|
destination:
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: rag-server, namespace: ai }
|
metadata:
|
||||||
|
name: rag-server
|
||||||
|
namespace: ai
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
source:
|
source:
|
||||||
repoURL: https://git.ion606.com/ion606/ollama-plus
|
repoURL: https://git.ion606.com/ion606/ollama-plus
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: manifests/rag-server
|
path: manifests/rag-server
|
||||||
syncPolicy: { automated: { prune: true, selfHeal: true } }
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: searxng, namespace: ai }
|
metadata:
|
||||||
|
name: searxng
|
||||||
|
namespace: ai
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
source:
|
source:
|
||||||
repoURL: https://charts.kubito.dev
|
repoURL: https://charts.kubito.dev
|
||||||
chart: searxng
|
chart: searxng
|
||||||
@@ -11,4 +15,7 @@ spec:
|
|||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- apps/values/searxng.yaml
|
- apps/values/searxng.yaml
|
||||||
syncPolicy: { automated: { prune: true, selfHeal: true } }
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|||||||
@@ -1,11 +1,18 @@
|
|||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata: { name: tools, namespace: ai }
|
metadata:
|
||||||
|
name: tools
|
||||||
|
namespace: ai
|
||||||
spec:
|
spec:
|
||||||
project: ai-stack
|
project: ai-stack
|
||||||
destination: { server: https://kubernetes.default.svc, namespace: ai }
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: ai
|
||||||
source:
|
source:
|
||||||
repoURL: https://git.ion606.com/ion606/ollama-plus
|
repoURL: https://git.ion606.com/ion606/ollama-plus
|
||||||
targetRevision: main
|
targetRevision: main
|
||||||
path: manifests/tools
|
path: manifests/tools
|
||||||
syncPolicy: { automated: { prune: true, selfHeal: true } }
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
|||||||
+32
-20
@@ -11,26 +11,26 @@ env:
|
|||||||
|
|
||||||
# using external postgres and not the subchart
|
# using external postgres and not the subchart
|
||||||
postgresql:
|
postgresql:
|
||||||
enabled: false;
|
enabled: false
|
||||||
|
|
||||||
data:
|
data:
|
||||||
metadataConnection:
|
metadataConnection:
|
||||||
user: postgres;
|
user: postgres
|
||||||
pass: mypassword;
|
pass: mypassword
|
||||||
protocol: postgresql;
|
protocol: postgresql
|
||||||
host: postgresql-primary.ai.svc.cluster.local;
|
host: postgresql-primary.ai.svc.cluster.local
|
||||||
port: 5432;
|
port: 5432
|
||||||
db: airflow; # better to keep airflow separate from other apps
|
db: airflow # better to keep airflow separate from other apps
|
||||||
sslmode: disable;
|
sslmode: disable
|
||||||
|
|
||||||
# enable pgbouncer and sync with extraIni
|
# enable pgbouncer and sync with extraIni
|
||||||
pgbouncer:
|
pgbouncer:
|
||||||
enabled: true;
|
enabled: true
|
||||||
# official default is scram-sha-256, but bitnami uses md5 so...
|
# official default is scram-sha-256, but bitnami uses md5 so...
|
||||||
auth_type: md5;
|
auth_type: md5
|
||||||
maxClientConn: 200;
|
maxClientConn: 200
|
||||||
metadataPoolSize: 20; # server connections to metadata db
|
metadataPoolSize: 20 # server connections to metadata db
|
||||||
resultBackendPoolSize: 5;
|
resultBackendPoolSize: 5
|
||||||
# general pgbouncer section stuffs
|
# general pgbouncer section stuffs
|
||||||
extraIni: |
|
extraIni: |
|
||||||
pool_mode = transaction
|
pool_mode = transaction
|
||||||
@@ -39,7 +39,7 @@ pgbouncer:
|
|||||||
ignore_startup_parameters = extra_float_digits
|
ignore_startup_parameters = extra_float_digits
|
||||||
server_tls_sslmode = prefer
|
server_tls_sslmode = prefer
|
||||||
metricsExporterSidecar:
|
metricsExporterSidecar:
|
||||||
enabled: true;
|
enabled: true
|
||||||
|
|
||||||
logs:
|
logs:
|
||||||
persistence:
|
persistence:
|
||||||
@@ -50,8 +50,12 @@ allowPodLaunching: true
|
|||||||
|
|
||||||
scheduler:
|
scheduler:
|
||||||
resources:
|
resources:
|
||||||
requests: { cpu: "200m", memory: "512Mi" }
|
requests:
|
||||||
limits: { cpu: "1", memory: "1Gi" }
|
cpu: "200m"
|
||||||
|
memory: "512Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
memory: "1Gi"
|
||||||
|
|
||||||
webserver:
|
webserver:
|
||||||
webserverSecretKeySecretName: airflow-webserver-secret
|
webserverSecretKeySecretName: airflow-webserver-secret
|
||||||
@@ -59,13 +63,21 @@ webserver:
|
|||||||
type: NodePort
|
type: NodePort
|
||||||
nodePort: 30082 # 30000–32767
|
nodePort: 30082 # 30000–32767
|
||||||
resources:
|
resources:
|
||||||
requests: { cpu: "100m", memory: "256Mi" }
|
requests:
|
||||||
limits: { cpu: "500m", memory: "512Mi" }
|
cpu: "100m"
|
||||||
|
memory: "256Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "500m"
|
||||||
|
memory: "512Mi"
|
||||||
|
|
||||||
triggerer:
|
triggerer:
|
||||||
resources:
|
resources:
|
||||||
requests: { cpu: "50m", memory: "128Mi" }
|
requests:
|
||||||
limits: { cpu: "200m", memory: "256Mi" }
|
cpu: "50m"
|
||||||
|
memory: "128Mi"
|
||||||
|
limits:
|
||||||
|
cpu: "200m"
|
||||||
|
memory: "256Mi"
|
||||||
|
|
||||||
# bc using nodeport
|
# bc using nodeport
|
||||||
ingress:
|
ingress:
|
||||||
|
|||||||
+9
-9
@@ -32,18 +32,18 @@ kubectl apply -n argocd -f apps/0-project-and-root.yaml;
|
|||||||
# kubectl -n ai create secret generic airflow-webserver-secret --from-literal="webserver-secret-key=$(python3 -c 'import secrets;print(secrets.token_hex(16))')";
|
# kubectl -n ai create secret generic airflow-webserver-secret --from-literal="webserver-secret-key=$(python3 -c 'import secrets;print(secrets.token_hex(16))')";
|
||||||
|
|
||||||
# airflow stuffs
|
# airflow stuffs
|
||||||
kubectl -n ai exec -it svc/postgresql-primary -- bash -lc "psql -U postgres -c 'CREATE DATABASE airflow;'";
|
# kubectl -n ai exec -it svc/postgresql-primary -- bash -lc "psql -U postgres -c 'CREATE DATABASE airflow;'";
|
||||||
set -l PGBOUNCER_SVC (kubectl -n ai get svc -l tier=airflow,component=pgbouncer -o jsonpath='{.items[0].metadata.name}');
|
# set -l PGBOUNCER_SVC (kubectl -n ai get svc -l tier=airflow,component=pgbouncer -o jsonpath='{.items[0].metadata.name}');
|
||||||
echo $PGBOUNCER_SVC;
|
# echo $PGBOUNCER_SVC;
|
||||||
|
|
||||||
# stats (used by the metrics sidecar and also points to pgbouncer itself on 127.0.0.1:6543)
|
# # stats (used by the metrics sidecar and also points to pgbouncer itself on 127.0.0.1:6543)
|
||||||
kubectl -n ai create secret generic airflow-pgbouncer-stats \
|
# kubectl -n ai create secret generic airflow-pgbouncer-stats \
|
||||||
--from-literal=connection="postgresql://postgres:mypassword@127.0.0.1:6543/pgbouncer?sslmode=disable";
|
# --from-literal=connection="postgresql://postgres:mypassword@127.0.0.1:6543/pgbouncer?sslmode=disable";
|
||||||
|
|
||||||
kubectl -n ai create secret generic airflow-metadata \
|
# kubectl -n ai create secret generic airflow-metadata \
|
||||||
--from-literal=connection="postgresql+psycopg2://postgres:mypassword@$PGBOUNCER_SVC:6543/airflow";
|
# --from-literal=connection="postgresql+psycopg2://postgres:mypassword@$PGBOUNCER_SVC:6543/airflow";
|
||||||
|
|
||||||
minikube service -n ai airflow-webserver --url || echo "FAILED TO FIND SERVICE"
|
# minikube service -n ai airflow-webserver --url || echo "FAILED TO FIND SERVICE"
|
||||||
|
|
||||||
# port-forward argocd ui
|
# port-forward argocd ui
|
||||||
echo "";
|
echo "";
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
|---------------|-----------------------------------------|--------------|---------------------------|
|
||||||
|
| NAMESPACE | NAME | TARGET PORT | URL |
|
||||||
|
|---------------|-----------------------------------------|--------------|---------------------------|
|
||||||
|
| argocd | argocd-applicationset-controller | No node port | |
|
||||||
|
| argocd | argocd-dex-server | No node port | |
|
||||||
|
| argocd | argocd-metrics | No node port | |
|
||||||
|
| argocd | argocd-notifications-controller-metrics | No node port | |
|
||||||
|
| argocd | argocd-redis | No node port | |
|
||||||
|
| argocd | argocd-repo-server | No node port | |
|
||||||
|
| argocd | argocd-server | No node port | |
|
||||||
|
| argocd | argocd-server-metrics | No node port | |
|
||||||
|
| default | kubernetes | No node port | |
|
||||||
|
| ingress-nginx | ingress-nginx-controller | http/80 | http://192.168.49.2:31684 |
|
||||||
|
| | | https/443 | http://192.168.49.2:31486 |
|
||||||
|
| ingress-nginx | ingress-nginx-controller-admission | No node port | |
|
||||||
|
| kube-system | kube-dns | No node port | |
|
||||||
|
|---------------|-----------------------------------------|--------------|---------------------------|
|
||||||
Reference in New Issue
Block a user