Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,29 +162,3 @@ x
- The CronJob handles only Let’s Encrypt–issued certificates.
- The default renewal schedule is every **85 days**.
- Always ensure your domain DNS records are properly configured and reachable before renewal.

# Grafana Alloy Helm Chart

```bash
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm search repo grafana/alloy
helm pull grafana/alloy
```

This will download the Helm chart as a `.tgz` file.

## Installation Steps

1. Extract the downloaded `.tgz` file.
2. Replace the extracted folder in the following directory:

```text
sunbird-ed-installer/helmcharts/monitoring/charts/alloy
```

3. Update the image version in the following file to match the latest version available in the Grafana Alloy Helm chart:

```text
sunbird-ed-installer/helmcharts/images.yaml
```
6 changes: 3 additions & 3 deletions helmcharts/edbb/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.8.3
- name: cassandra
repository: https://charts.bitnami.com/bitnami
version: 10.1.0
- name: kafka
repository: https://charts.bitnami.com/bitnami
version: 20.0.2
- name: yugabyte
repository: https://charts.yugabyte.com
version: 2025.2.0
digest: sha256:b58587093240b8d6005314af318d4cbfecdca635dc7d8066d495a24fbed191f9
generated: "2024-01-12T11:37:46.219743493+01:00"
11 changes: 6 additions & 5 deletions helmcharts/edbb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
version: 17.8.3
condition: redis.enabled
- name: cassandra
repository: https://charts.bitnami.com/bitnami
version: 10.1.0
condition: cassandra.enabled
- name: kafka
version: 20.0.2
condition: kafka.enabled
condition: kafka.enabled
- name: yugabyte
repository: https://charts.yugabyte.com
version: 2025.2.0 # Chart version
condition: yugabyte.enabled

Binary file removed helmcharts/edbb/charts/cassandra-10.1.0.tgz
Binary file not shown.
5 changes: 2 additions & 3 deletions helmcharts/edbb/charts/knowledgemw/configs/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ sunbird_dial_code_registry_url: "https://{{.Values.global.domain}}/dial/"
sunbird_language_service_api_base_url: "https://{{.Values.global.domain}}/api/language"
sunbird_cache_store: memory
sunbird_cache_ttl: "1800"
sunbird_cassandra_consistency_level: "{{ .Values.global.cassandra.consistency_level }}"
sunbird_cassandra_replication_strategy: '{"class":"SimpleStrategy","replication_factor":"1"}'
sunbird_cassandra_urls: "{{.Values.global.cassandra.host}}:{{.Values.global.cassandra.port}}"
sunbird_cassandra_urls: "{{ .Values.global.yugabyte.host }}:{{ .Values.global.yugabyte.port }}"
sunbird_content_repo_api_base_url: "http://content-service:9000"
sunbird_assessment_service_base_url: "http://assessment-service:9000"
sunbird_content_service_blacklisted_channels: "ALL"
Expand Down Expand Up @@ -50,4 +49,4 @@ sunbird_learner_service_local_base_url: "{{ .Values.sunbird_learner_service_loca
sunbird_contnet_service_base_url: "{{ .Values.sunbird_contnet_service_base_url | default "http://content-service:9000"}}"
# release-7.0.0
sunbird_taxonomy_service_api_base_url: http://taxonomy-service:9000
sunbird_assessment_service_base_url: http://assessment-service:9000
sunbird_assessment_service_base_url: http://assessment-service:9000
15 changes: 13 additions & 2 deletions helmcharts/edbb/charts/kong-apis/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,19 @@ spec:
image: busybox
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/sh", "-c"]
# Wait for Kong admin endpoint to be reachable (port 8001) before seeding APIs
args:
- "timeout 300 sh -c 'until nc -z kong 8000; do echo waiting for kong; sleep 10; done'"
- |
timeout 300 sh -c '
until nc -z kong 8001; do
echo "waiting for kong admin...";
sleep 10;
done;
# Extra check: wait for /status to return 200
until wget -qO- http://kong:8001/status >/dev/null 2>&1; do
echo "waiting for kong /status ...";
sleep 5;
done'
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand All @@ -39,4 +50,4 @@ spec:
configMap:
name: {{ include "common.names.fullname" . }}
{{- end }}
restartPolicy: Never
restartPolicy: Never
7 changes: 4 additions & 3 deletions helmcharts/edbb/charts/kong/configs/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ KONG_RATELIMIT_CACHE_SIZE: "{{ .Values.kong_ratelimit_cache_size }}"
KONG_TRUSTED_IPS: "{{ .Values.kong_trusted_ips }}"
KONG_UPSTREAM_KEEPALIVE: "{{ .Values.kong_upstream_keepalive }}"
KONG_PG_DATABASE: "{{ .Values.kong_pg_database }}"
KONG_PG_HOST: "{{ .Values.global.postgresql.host }}"
KONG_PG_USER: "{{ .Values.global.postgresql.postgresqlUsername }}"
KONG_PG_PASSWORD: "{{ .Values.global.postgresql.postgresqlPassword }}"
KONG_PG_HOST: "{{ .Values.global.yugabyte.host }}"
KONG_PG_PORT: "{{ .Values.global.yugabyte.postgresql_port }}"
KONG_PG_USER: "{{ .Values.global.yugabyte.username }}"
KONG_PG_PASSWORD: "{{ .Values.global.yugabyte.password }}"
4 changes: 2 additions & 2 deletions helmcharts/edbb/charts/kong/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: wait-for-postgres
- name: wait-for-yugabytepostgres
image: busybox
command: ["/bin/sh", "-c"]
args:
- "timeout 300 sh -c 'until nc -z {{.Values.global.postgresql.host}} {{.Values.global.postgresql.port}}; do echo waiting for postgres; sleep 10; done'"
- "timeout 300 sh -c 'until nc -z {{.Values.global.yugabyte.host}} {{.Values.global.yugabyte.postgresql_port}}; do echo waiting for yugabyte; sleep 10; done'"
{{- with .Values.initContainers }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
14 changes: 9 additions & 5 deletions helmcharts/edbb/charts/kong/templates/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ spec:
template:
spec:
initContainers:
- name: wait-for-postgres
- name: wait-for-yugabytepostgres
image: busybox
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: ["/bin/sh", "-c"]
args:
- "timeout 300 sh -c 'until nc -z {{.Values.global.postgresql.host}} {{.Values.global.postgresql.port}}; do echo waiting for postgres; sleep 10; done'"
- "timeout 300 sh -c 'until nc -z {{.Values.global.yugabyte.host}} {{.Values.global.yugabyte.postgresql_port}}; do echo waiting for yugabytepostgres; sleep 10; done'"
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand All @@ -33,11 +33,15 @@ spec:
- name: KONG_PG_DATABASE
value: {{ .Values.kong_pg_database }}
- name: KONG_PG_HOST
value: {{ .Values.kong_pg_host }}
value: {{ .Values.global.yugabyte.host }}
- name: KONG_PG_PORT
value: {{ .Values.global.yugabyte.postgresql_port | quote }}
- name: KONG_PG_PASSWORD
value: {{ .Values.kong_pg_password }}
value: {{ .Values.global.yugabyte.password }}
- name: KONG_PG_USER
value: {{ .Values.kong_pg_user }}
value: {{ .Values.global.yugabyte.username }}
- name: KONG_PG_SSL
value: {{ .Values.kong_pg_ssl | quote }}
- name: KONG_PROXY_ACCESS_LOG
value: "/dev/stdout"
- name: KONG_ADMIN_ACCESS_LOG
Expand Down
11 changes: 3 additions & 8 deletions helmcharts/edbb/charts/kong/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ kong_mem_cache_size: 128m
kong_nginx_http_log_format: "nginx_public_ingress_log_format '$remote_addr - $remote_user [$time_local] \"$request\" $status $request_length $body_bytes_sent $request_time $upstream_response_time $pipe \"$http_referer\" \"$http_user_agent\" \"$http_x_request_id\" \"$http_x_device_id\" \"$http_x_channel_id\" \"$http_x_app_id\" \"$http_x_app_ver\" \"$http_x_session_id\"'"
kong_nginx_worker_processes: "4"
kong_pg_database: kong
kong_pg_host: postgresql
kong_pg_password: postgres
# kong_pg_host: postgresql
# kong_pg_password: postgres
kong_pg_ssl: "True"
kong_pg_user: postgres
kong_proxy_access_log: "logs/access.log nginx_public_ingress_log_format"
Expand All @@ -139,16 +139,11 @@ kong_upstream_keepalive: "200"
commonAnnotations:
reloader.stakater.com/auto: "true"

postgresql: &postgresql
enabled: true
host: postgresql
postgresqlUsername: postgres
postgresqlPassword: postgres


global:
cloud_storage_access_key: "" # not using anywhere
cloud_storage_secret_key: "" # not using anywhere
postgresql: *postgresql

provisioningAnnotations:
"helm.sh/hook-weight": "-4"
Expand Down
3 changes: 1 addition & 2 deletions helmcharts/edbb/charts/player/configs/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ sunbird_base_proto: "{{.Values.sunbird_base_proto | default "https"}}"
sunbird_bot_configured: "{{.Values.sunbird_bot_configured | default "false"}}"
sunbird_bot_service_URL: "{{.Values.sunbird_bot_service_URL | default "/chatapi/bot"}}"
sunbird_build_number: "{{.Values.sunbird_build_number | default ""}}"
sunbird_cassandra_consistency_level: "{{ .Values.global.cassandra.consistency_level }}"
sunbird_cassandra_replication_strategy: '{"class":"SimpleStrategy","replication_factor":1}'
sunbird_cassandra_urls: "{{.Values.global.cassandra.host}}:{{.Values.global.cassandra.port}}"
sunbird_cassandra_urls: "{{ .Values.global.yugabyte.host }}:{{ .Values.global.yugabyte.port }}"
sunbird_collection_children_limit: "{{.Values.sunbird_collection_children_limit | default "1200"}}"
sunbird_collectionEditorURL: "{{.Values.sunbird_collectionEditorURL | default "collection-editor/index.html"}}"
sunbird_config_service_url: "{{.Values.sunbird_config_service_url | default ""}}"
Expand Down
4 changes: 2 additions & 2 deletions helmcharts/edbb/charts/player/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ global:
kafka:
host: kafka
port: 9092
cassandra:
host: cassandra
yugabyte:
host: yb-tserver-service
port: 9042
redis:
host: redis-master
Binary file added helmcharts/edbb/charts/yugabyte-2025.2.0.tgz
Binary file not shown.
51 changes: 0 additions & 51 deletions helmcharts/edbb/templates/provision/postgres.yaml

This file was deleted.

57 changes: 57 additions & 0 deletions helmcharts/edbb/templates/provision/ysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}-yugabyte-postgres-migration-job
namespace: {{ .Release.Namespace }}
labels:
app: {{ .Chart.Name }}-yugabyte-postgres-migration
scope: provisioning
annotations:
{{.Values.global.yugabyte.provisioning.annotations | toYaml }}
spec:
template:
metadata:
labels:
app: {{ .Chart.Name }}-yugabyte-postgres-migration
spec:
restartPolicy: Never
initContainers:
- name: wait-for-yugabyte-postgres
image: busybox
imagePullPolicy: IfNotPresent
command: ['sh', '-c']
args:
- "timeout {{ .Values.migration.yugabyte.waitTime }} sh -c 'until nc -z {{ .Values.global.yugabyte.host }} {{ .Values.global.yugabyte.postgresql_port}}; do echo waiting for yugabytepostgres; sleep 10; done'"
containers:
- name: migration
image: yugabytedb/yugabyte:latest
imagePullPolicy: IfNotPresent
command: ['bash', '-c']
securityContext:
runAsUser: 0
args:
- |
set -e
export devops_branch={{ .Values.devops_release_branch }}
export PGHOST={{.Values.global.yugabyte.host}}
export PGPORT={{.Values.global.yugabyte.postgresql_port}}
export PGUSER=yugabyte
export PGPASSWORD=yugabyte
{{- range .Values.global.yugabyte.databases }}
# Check if the database exists
# Ensure ysqlsh is available in the image
if ! command -v ysqlsh >/dev/null 2>&1; then
echo "ysqlsh not found; please use an image with Yugabyte YSQL client (e.g., yugabytedb/yugabyte)."
exit 1
fi

if ! ysqlsh -lqt | cut -d \| -f 1 | grep -qw {{.name}}; then
# Database doesn't exist, create it
echo "SELECT 'CREATE DATABASE \"{{ .name }}\"' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = '\"{{ .name }}\"')\gexec" | ysqlsh
else
echo "Database {{.name}} already exists."
fi
{{- end }}

echo "YugabyteSQL setup completed."
backoffLimit: 30
Loading