Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor v15 #192

Merged
merged 2 commits into from
Oct 20, 2023
Merged
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
9 changes: 3 additions & 6 deletions erpnext/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ dependencies:
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.15.2
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 17.15.2
- name: mariadb
repository: https://charts.bitnami.com/bitnami
version: 11.4.2
version: 11.5.7
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 12.1.6
digest: sha256:e3611e4b37a023ee8a9e0e1cb470df53f84e44ef7da0b2ff6c25d1fe08d70eb8
generated: "2023-08-10T18:37:44.822517028+02:00"
digest: sha256:dd2dee114ecbe398e50b9a83b85e865acc72a012205a41eeb990607c6bff89c0
generated: "2023-08-12T18:17:09.911725002+05:30"
7 changes: 1 addition & 6 deletions erpnext/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,9 @@ dependencies:
alias: redis-queue
version: "17.15.2"
repository: https://charts.bitnami.com/bitnami
- name: redis
condition: redis-socketio.enabled
alias: redis-socketio
version: "17.15.2"
repository: https://charts.bitnami.com/bitnami
- name: mariadb
condition: mariadb.enabled
version: "11.4.2"
version: "11.5.7"
repository: https://charts.bitnami.com/bitnami
- name: postgresql
condition: postgresql.enabled
Expand Down
13 changes: 0 additions & 13 deletions erpnext/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,6 @@ The following table lists the configurable parameters of the ERPNext chart and t
| `redis-queue.auth.sentinal` | Sentinal auth is disabled for use with frappe. Do not change. | `false` |
| `redis-queue.master.containerPorts.redis` | Container port for redis-queue service | `6379` |
| `redis-queue.master.persistence.enabled` | Persistence is disabled for in-memory storage use case | `false` |
| `redis-socketio.enabled` | Install redis-socketio sub chart | `true` |
| `redis-socketio.architecture` | Architecture for sub-chart. Do not change. | `standalone` |
| `redis-socketio.auth.enabled` | Authentication is disabled for use with frappe. Do not change. | `false` |
| `redis-socketio.auth.sentinal` | Sentinal auth is disabled for use with frappe. Do not change. | `false` |
| `redis-socketio.master.containerPorts.redis` | Container port for redis-socketio service | `6379` |
| `redis-socketio.master.persistence.enabled` | Persistence is disabled for in-memory storage use case | `false` |
| `mariadb.enabled` | Install mariadb sub chart. | `true` |
| `mariadb.auth.rootPassword` | Root password for in-cluster mariadb setup | `changeit` |
| `mariadb.auth.username` | Initial database username for in-cluster mariadb setup | `erpnext` |
Expand Down Expand Up @@ -382,9 +376,6 @@ redis-cache:
redis-queue:
enabled: false
host: "redis://2.2.2.2:6379"
redis-socketio:
enabled: false
host: "redis://3.3.3.3:6379"
```

Make sure the redis hosts are correct.
Expand Down Expand Up @@ -593,10 +584,6 @@ redis-queue:
enabled: false
host: redis://redis-queue.7abc2d.0001.usw2.cache.amazonaws.com:6379

redis-socketio:
enabled: false
host: redis://redis-socketio.7abc2d.0001.usw2.cache.amazonaws.com:6379

jobs:
configure:
enabled: true
Expand Down
Binary file removed erpnext/charts/mariadb-11.4.2.tgz
Binary file not shown.
Binary file added erpnext/charts/mariadb-11.5.7.tgz
Binary file not shown.
7 changes: 0 additions & 7 deletions erpnext/templates/job-configure-bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ spec:
{{- end}}
bench set-config -g redis_cache $REDIS_CACHE;
bench set-config -g redis_queue $REDIS_QUEUE;
bench set-config -g redis_socketio $REDIS_SOCKETIO;
bench set-config -gp socketio_port $SOCKETIO_PORT;
{{- end }}
env:
Expand Down Expand Up @@ -88,12 +87,6 @@ spec:
{{- else }}
value: {{ index .Values "redis-queue" "host" }}
{{- end }}
- name: REDIS_SOCKETIO
{{- if index .Values "redis-socketio" "enabled" }}
value: redis://{{ .Release.Name }}-redis-socketio-master:{{ index .Values "redis-socketio" "master" "containerPorts" "redis" }}
{{- else }}
value: {{ index .Values "redis-socketio" "host" }}
{{- end }}
{{- if .Values.jobs.configure.envVars }}
{{- toYaml .Values.jobs.configure.envVars | nindent 12 }}
{{- end }}
Expand Down
58 changes: 5 additions & 53 deletions erpnext/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,6 @@ worker:
{{- else if index .Values "redis-queue" "host" }}
- wait-for-it {{ index .Values "redis-queue" "host" }} -t 1;
{{- end }}
{{- if index .Values "redis-socketio" "host" }}
- wait-for-it {{ .Release.Name }}-redis-socketio-master:{{ index .Values "redis-socketio" "master" "containerPorts" "redis" }} -t 1;
{{- else if index .Values "redis-socketio" "host" }}
- wait-for-it {{ index .Values "redis-socketio" "host" }} -t 1;
{{- end }}
{{- if .Values.postgresql.host }}
- wait-for-it {{ .Values.postgresql.host }}:{{ .Values.postgresql.primary.service.ports.postgresql }} -t 1;
{{- else if .Values.postgresql.enabled }}
Expand Down Expand Up @@ -387,20 +382,6 @@ redis-queue:
persistence:
enabled: false

redis-socketio:
# https://github.com/bitnami/charts/tree/master/bitnami/redis
enabled: true
# host: ""
architecture: standalone
auth:
enabled: false
sentinal: false
master:
containerPorts:
redis: 6379
persistence:
enabled: false

mariadb:
# https://github.com/bitnami/charts/tree/master/bitnami/mariadb
enabled: true
Expand All @@ -413,40 +394,11 @@ mariadb:
service:
ports:
mysql: 3306
configuration: |-
[mysqld]
skip-name-resolve
explicit_defaults_for_timestamp
basedir=/opt/bitnami/mariadb
plugin_dir=/opt/bitnami/mariadb/plugin
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
tmpdir=/opt/bitnami/mariadb/tmp
max_allowed_packet=16M
bind-address=*
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
log-error=/opt/bitnami/mariadb/logs/mysqld.log
slow_query_log=0
slow_query_log_file=/opt/bitnami/mariadb/logs/mysqld.log
long_query_time=10.0

# Frappe Specific Changes
character-set-client-handshake=FALSE
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci

[client]
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
plugin_dir=/opt/bitnami/mariadb/plugin

# Frappe Specific Changes
default-character-set=utf8mb4

[manager]
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
extraFlags: >-
--skip-character-set-client-handshake
--skip-innodb-read-only-compressed
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci

postgresql:
# https://github.com/bitnami/charts/tree/master/bitnami/postgresql
Expand Down
4 changes: 2 additions & 2 deletions tests/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ version: '3.8'

services:
k3s:
image: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.23.4-k3s1:latest
image: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.27.1-k3s1:latest
command:
- server
- --tls-san=k3s
- --private-registry=/opt/custom/registries.yaml
- --no-deploy=traefik
- --disable=traefik
volumes:
- ./registries.yaml:/opt/custom/registries.yaml
- k3s-server:/var/lib/rancher/k3s
Expand Down
49 changes: 5 additions & 44 deletions tests/mariadb/values.yaml
Original file line number Diff line number Diff line change
@@ -1,54 +1,15 @@
## MariaDB architecture. Allowed values: standalone or replication
##
architecture: standalone

## MariaDB Authentication parameters
##
auth:
## MariaDB root password
## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run
##
rootPassword: "admin"
## MariaDB custom user and database
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-on-first-run
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
##
database: my_database
username: "my_database"
password: "admin"
## MariaDB replication user and password
## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-up-a-replication-cluster
##
replicationUser: replicator
replicationPassword: "admin"

## Mariadb Primary parameters
##
primary:
configuration: |-
[mysqld]
character-set-client-handshake=FALSE
skip-name-resolve
explicit_defaults_for_timestamp
basedir=/opt/bitnami/mariadb
plugin_dir=/opt/bitnami/mariadb/plugin
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
tmpdir=/opt/bitnami/mariadb/tmp
max_allowed_packet=16M
bind-address=0.0.0.0
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
log-error=/opt/bitnami/mariadb/logs/mysqld.log
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci

[client]
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
default-character-set=utf8mb4
plugin_dir=/opt/bitnami/mariadb/plugin

[manager]
port=3306
socket=/opt/bitnami/mariadb/tmp/mysql.sock
pid-file=/opt/bitnami/mariadb/tmp/mysqld.pid
extraFlags: >-
--skip-character-set-client-handshake
--skip-innodb-read-only-compressed
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
6 changes: 3 additions & 3 deletions tests/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export KUBECONFIG=/root/.kube/config
kubectl cluster-info

echo -e "\e[1m\e[4mInstall kubernetes/ingress-nginx\e[0m"
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.5.1/deploy/static/provider/cloud/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/cloud/deploy.yaml
echo -e "\n"

echo -e "\e[1m\e[4mAdd Helm Repositories\e[0m"
Expand All @@ -27,12 +27,12 @@ echo -e "\n"

echo -e "\e[1m\e[4mCreate mariadb release from bitnami/mariadb helm chart\e[0m"
kubectl create namespace mariadb
helm install mariadb -n mariadb bitnami/mariadb -f tests/mariadb/values.yaml --version 11.4.2 --wait
helm install mariadb -n mariadb bitnami/mariadb -f tests/mariadb/values.yaml --version 11.5.7 --wait
echo -e "\n"

echo -e "\e[1m\e[4mCreate in-cluster release from nfs-ganesha-server-and-external-provisioner/nfs-server-provisioner helm chart\e[0m"
kubectl create namespace nfs
helm install in-cluster -n nfs nfs-ganesha-server-and-external-provisioner/nfs-server-provisioner -f tests/nfs/values.yaml --version 1.4.0 --wait
helm install in-cluster -n nfs nfs-ganesha-server-and-external-provisioner/nfs-server-provisioner -f tests/nfs/values.yaml --wait
echo -e "\n"

echo -e "\e[1m\e[4mCreate frappe-bench release from frappe/erpnext helm chart\e[0m"
Expand Down
Loading