🔨(tilt) fix local k8s deployment
Removes the docs references and fix the helmfile extension to work with newest version.
This commit is contained in:
@@ -21,10 +21,10 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
HELMFILE=src/helm/helmfile.yaml
|
HELMFILE=src/helm/helmfile.yaml.gotmpl
|
||||||
environments=$(awk 'BEGIN {in_env=0} /^environments:/ {in_env=1; next} /^---/ {in_env=0} in_env && /^ [^ ]/ {gsub(/^ /,""); gsub(/:.*$/,""); print}' "$HELMFILE")
|
environments=$(awk 'BEGIN {in_env=0} /^environments:/ {in_env=1; next} /^---/ {in_env=0} in_env && /^ [^ ]/ {gsub(/^ /,""); gsub(/:.*$/,""); print}' "$HELMFILE")
|
||||||
for env in $environments; do
|
for env in $environments; do
|
||||||
echo "################### $env lint ###################"
|
echo "################### $env lint ###################"
|
||||||
helmfile -e $env -f $HELMFILE lint || exit 1
|
helmfile -e $env -f $HELMFILE lint || exit 1
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
done
|
done
|
||||||
|
|||||||
+3
-7
@@ -10,10 +10,6 @@ docker_build(
|
|||||||
target = 'backend-production',
|
target = 'backend-production',
|
||||||
live_update=[
|
live_update=[
|
||||||
sync('../src/backend', '/app'),
|
sync('../src/backend', '/app'),
|
||||||
run(
|
|
||||||
'pip install -r /app/requirements.txt',
|
|
||||||
trigger=['./api/requirements.txt']
|
|
||||||
)
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -28,9 +24,9 @@ docker_build(
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
k8s_resource('conversations-conversations-backend-migrate', resource_deps=['postgres-postgresql'])
|
k8s_resource('conversations-backend-migrate', resource_deps=['postgres-postgresql'])
|
||||||
k8s_resource('conversations-conversations-backend-createsuperuser', resource_deps=['conversations-conversations-backend-migrate'])
|
k8s_resource('conversations-backend-createsuperuser', resource_deps=['conversations-backend-migrate'])
|
||||||
k8s_resource('conversations-conversations-backend', resource_deps=['conversations-conversations-backend-migrate'])
|
k8s_resource('conversations-backend', resource_deps=['conversations-backend-migrate'])
|
||||||
k8s_yaml(local('cd ../src/helm && helmfile -n conversations -e dev template .'))
|
k8s_yaml(local('cd ../src/helm && helmfile -n conversations -e dev template .'))
|
||||||
|
|
||||||
migration = '''
|
migration = '''
|
||||||
|
|||||||
@@ -112,25 +112,28 @@ def create_demo(stdout):
|
|||||||
queue = BulkQueue(stdout)
|
queue = BulkQueue(stdout)
|
||||||
|
|
||||||
with Timeit(stdout, "Creating users"):
|
with Timeit(stdout, "Creating users"):
|
||||||
name_size = int(math.sqrt(defaults.NB_OBJECTS["users"]))
|
if models.User.objects.filter(email="user0@example.com").exists():
|
||||||
first_names = [fake.first_name() for _ in range(name_size)]
|
stdout.write("Users already exist, skipping user creation.")
|
||||||
last_names = [fake.last_name() for _ in range(name_size)]
|
else:
|
||||||
for i in range(defaults.NB_OBJECTS["users"]):
|
name_size = int(math.sqrt(defaults.NB_OBJECTS["users"]))
|
||||||
first_name = random.choice(first_names)
|
first_names = [fake.first_name() for _ in range(name_size)]
|
||||||
queue.push(
|
last_names = [fake.last_name() for _ in range(name_size)]
|
||||||
models.User(
|
for i in range(defaults.NB_OBJECTS["users"]):
|
||||||
admin_email=f"user{i:d}@example.com",
|
first_name = random.choice(first_names)
|
||||||
email=f"user{i:d}@example.com",
|
queue.push(
|
||||||
password="!",
|
models.User(
|
||||||
is_superuser=False,
|
admin_email=f"user{i:d}@example.com",
|
||||||
is_active=True,
|
email=f"user{i:d}@example.com",
|
||||||
is_staff=False,
|
password="!",
|
||||||
short_name=first_name,
|
is_superuser=False,
|
||||||
full_name=f"{first_name:s} {random.choice(last_names):s}",
|
is_active=True,
|
||||||
language=random.choice(settings.LANGUAGES)[0],
|
is_staff=False,
|
||||||
|
short_name=first_name,
|
||||||
|
full_name=f"{first_name:s} {random.choice(last_names):s}",
|
||||||
|
language=random.choice(settings.LANGUAGES)[0],
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
queue.flush()
|
||||||
queue.flush()
|
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ WORKDIR /home/frontend/apps/conversations
|
|||||||
ARG API_ORIGIN
|
ARG API_ORIGIN
|
||||||
ENV NEXT_PUBLIC_API_ORIGIN=${API_ORIGIN}
|
ENV NEXT_PUBLIC_API_ORIGIN=${API_ORIGIN}
|
||||||
|
|
||||||
ARG SW_DEACTIVATED
|
|
||||||
ENV NEXT_PUBLIC_SW_DEACTIVATED=${SW_DEACTIVATED}
|
|
||||||
|
|
||||||
ARG PRODUCT_NAME
|
ARG PRODUCT_NAME
|
||||||
ENV NEXT_PUBLIC_PRODUCT_NAME=${PRODUCT_NAME}
|
ENV NEXT_PUBLIC_PRODUCT_NAME=${PRODUCT_NAME}
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ spec:
|
|||||||
{{- if .Values.backend.themeCustomization.enabled }}
|
{{- if .Values.backend.themeCustomization.enabled }}
|
||||||
- name: theme-customization
|
- name: theme-customization
|
||||||
configMap:
|
configMap:
|
||||||
name: docs-theme-customization
|
name: conversations-theme-customization
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- range .Values.backend.extraVolumes }}
|
{{- range .Values.backend.extraVolumes }}
|
||||||
- name: {{ .name }}
|
- name: {{ .name }}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: docs-theme-customization
|
name: conversations-theme-customization
|
||||||
namespace: {{ .Release.Namespace }}
|
namespace: {{ .Release.Namespace }}
|
||||||
data:
|
data:
|
||||||
default.json: |
|
default.json: |
|
||||||
{{ .Values.backend.themeCustomization.file_content | toJson | indent 4 }}
|
{{ .Values.backend.themeCustomization.file_content | toJson | indent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -33,11 +33,11 @@ backend:
|
|||||||
LOGGING_LEVEL_LOGGERS_APP: INFO
|
LOGGING_LEVEL_LOGGERS_APP: INFO
|
||||||
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
|
OIDC_USERINFO_SHORTNAME_FIELD: "given_name"
|
||||||
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
|
OIDC_USERINFO_FULLNAME_FIELDS: "given_name,usual_name"
|
||||||
OIDC_OP_JWKS_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/certs
|
OIDC_OP_JWKS_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/certs
|
||||||
OIDC_OP_AUTHORIZATION_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/auth
|
OIDC_OP_AUTHORIZATION_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/auth
|
||||||
OIDC_OP_TOKEN_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/token
|
OIDC_OP_TOKEN_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/token
|
||||||
OIDC_OP_USER_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/userinfo
|
OIDC_OP_USER_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/userinfo
|
||||||
OIDC_OP_LOGOUT_ENDPOINT: https://docs-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/logout
|
OIDC_OP_LOGOUT_ENDPOINT: https://conversations-keycloak.127.0.0.1.nip.io/realms/conversations/protocol/openid-connect/logout
|
||||||
OIDC_RP_CLIENT_ID: conversations
|
OIDC_RP_CLIENT_ID: conversations
|
||||||
OIDC_RP_CLIENT_SECRET: ThisIsAnExampleKeyForDevPurposeOnly
|
OIDC_RP_CLIENT_SECRET: ThisIsAnExampleKeyForDevPurposeOnly
|
||||||
OIDC_RP_SIGN_ALGO: RS256
|
OIDC_RP_SIGN_ALGO: RS256
|
||||||
@@ -122,6 +122,7 @@ frontend:
|
|||||||
envVars:
|
envVars:
|
||||||
PORT: 8080
|
PORT: 8080
|
||||||
NEXT_PUBLIC_API_ORIGIN: https://conversations.127.0.0.1.nip.io
|
NEXT_PUBLIC_API_ORIGIN: https://conversations.127.0.0.1.nip.io
|
||||||
|
NEXT_PUBLIC_PRODUCT_NAME: "Assistant"
|
||||||
|
|
||||||
replicas: 1
|
replicas: 1
|
||||||
command:
|
command:
|
||||||
|
|||||||
Reference in New Issue
Block a user