Skip to content

Commit

Permalink
Hotfix/remote state logs (#170)
Browse files Browse the repository at this point in the history
* 🔧refactor: Migrate to python 3.11

* 🔧refactor: outputs

* 🔧refactor: outputs symbol colors

* 🔧refactor: outputs symbol colors update in place

* 🔧refactor: deploy set pagination and search

* 🔧refactor: add stack pagination and search

* 🔧refactor: add pagination and search component js

* 🔧refactor: add pagination and search component js for users

* 🐛fix: edit deploy

* 🐛fix: edit users

* 🐛fix: add destroy for plan UI

* 🔧refactor: stacks forms

* 🔧refactor: stacks forms variables

* 🔧refactor: Dockerfiles for use asdf and python3.11

* 🔧refactor: github action bump version

* 🔧refactor: k8s images

* 🐛fix: fix remote state baseconfig pydantic

* 🐛fix: set mongo to remote state by default
  • Loading branch information
D10S0VSkY-OSS authored Nov 11, 2023
1 parent f0225d6 commit b8580da
Show file tree
Hide file tree
Showing 12 changed files with 55 additions and 28 deletions.
13 changes: 13 additions & 0 deletions play-with-sld/kubernetes/k8s/add-env-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# add-env-patch.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: ""
spec:
template:
spec:
containers:
- name: ""
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
2 changes: 1 addition & 1 deletion play-with-sld/kubernetes/k8s/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ resources:
- sld-schedule-service.yml
- db-secret.yml
- dashboard-secret.yml
- rabbit-secret.yml
- rabbit-secret.yml
33 changes: 18 additions & 15 deletions play-with-sld/kubernetes/k8s/sld-api-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ spec:
spec:
subdomain: primary
containers:
- name: api-backend
image: d10s0vsky/sld-api:latest
imagePullPolicy: Always
command: ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
ports:
- containerPort: 8000
livenessProbe:
httpGet:
path: /api/v1/
port: 8000
httpHeaders:
- name: status
value: healthy
initialDelaySeconds: 60
periodSeconds: 60
- name: api-backend
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
command: ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
ports:
- containerPort: 8000
livenessProbe:
httpGet:
path: /api/v1/
port: 8000
httpHeaders:
- name: status
value: healthy
initialDelaySeconds: 60
periodSeconds: 60
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
4 changes: 3 additions & 1 deletion play-with-sld/kubernetes/k8s/sld-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ spec:
- name: sld-dashboard
image: d10s0vsky/sld-dashboard:latest
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- name: DEBUG
value: "True"
- name: SECRET_KEY
Expand All @@ -42,6 +44,6 @@ spec:
name: db
key: password
imagePullPolicy: Always
command: ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
command: ["python", "-m", "gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
ports:
- containerPort: 5000
4 changes: 3 additions & 1 deletion play-with-sld/kubernetes/k8s/sld-remote-state.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ spec:
subdomain: primary
containers:
- name: remote-state
image: d10s0vsky/sld-remote-state:latest
image: d10s0vsky/sld-remote-state:2.11.0
env:
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
- name: SLD_STORAGE_BACKEND
value: mongodb
- name: SLD_MONGODB_URL
Expand Down
6 changes: 4 additions & 2 deletions play-with-sld/kubernetes/k8s/sld-worker-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ spec:
subdomain: primary
containers:
- name: stack-deploy-worker-default
image: d10s0vsky/sld-api:latest
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
env:
- name: TF_WARN_OUTPUT_ERRORS
value: "1"
command: ["celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "10", "-E", "-Q", "squad"]
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
command: ["python", "-m", "celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "squad"]
6 changes: 4 additions & 2 deletions play-with-sld/kubernetes/k8s/sld-worker-squad1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ spec:
subdomain: primary
containers:
- name: stack-deploy-worker-squad1
image: d10s0vsky/sld-api:latest
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
env:
- name: TF_WARN_OUTPUT_ERRORS
value: "1"
command: ["celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad1"]
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
command: ["python", "-m", "celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad1"]
6 changes: 4 additions & 2 deletions play-with-sld/kubernetes/k8s/sld-worker-squad2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ spec:
subdomain: primary
containers:
- name: stack-deploy-worker-squad2
image: d10s0vsky/sld-api:latest
image: d10s0vsky/sld-api:2.18.0
imagePullPolicy: Always
env:
- name: TF_WARN_OUTPUT_ERRORS
value: "1"
command: ["celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad2"]
- name: PATH
value: "/home/sld/.asdf/shims:/home/sld/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
command: ["python", "-m", "celery", "--app", "src.worker.tasks.terraform_worker", "worker", "--loglevel=info", "-c", "8", "-E", "-Q", "any,squad2"]
3 changes: 2 additions & 1 deletion sld-remote-state/configs/azure_blob_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings



class Settings(BaseSettings):
Expand Down
2 changes: 1 addition & 1 deletion sld-remote-state/configs/bucket_s3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down
2 changes: 1 addition & 1 deletion sld-remote-state/configs/gcp_cloud_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down
2 changes: 1 addition & 1 deletion sld-remote-state/configs/mongo_db.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from pydantic import BaseSettings
from pydantic_settings import BaseSettings


class Settings(BaseSettings):
Expand Down

0 comments on commit b8580da

Please sign in to comment.