You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Redis - Configured to support failover. There is 1 master and 2 slaves (no read access on slaves) for a statefulset, 3 sentinels for another statefulset, and then 2 proxies deployment. The proxies ensure that redis traffic is always directed towards master. The proxy replications can be increased/decreased. However the primary/slaves and sentinels would require script changes if wish to increase/decrease replicates for these since these are hard-coded several place in the scripts. There are 3 users/passwords (`default` (nopass), `replication` (replicationpassword), `admin` (adminpassword)) used in this redis scheme, and the passwords should be set to something else if use this scheme in production. The main place the passwords are set is in kubernetes/redis/configmap-acl.yaml script. Other places where passwords are used include the following: `replication` in kubernetes/redis/configmap-main.yaml, `admin` in kubernetes/redis/configmap-pipy.yaml, `admin` in kubernetes/redis/statefulset-sentinel.yaml. The `default` is the typical worker/app/client user, which will plan to assign a password when OpenEMR docker is updated to support redis username/password.
6
6
- phpMyAdmin - There is 1 deployment instance of phpMyAdmin.
7
7
8
-
Would not consider this production quality, but will be a good working, starting point, and hopefully open the door to a myriad of other kubernetes based solutions. Note this is supported by 6.0.0 and higher dockers. If wish to use the most recent development codebase, then can change from openemr/openemr:7.0.0 to openemr/openemr:flex in the openemr/deployment.yaml script (note this will take much longer to start up (probably at least 10 minutes and up to 90 minutes) and is more cpu intensive since each instance of OpenEMR will download codebase and build separately).
8
+
Would not consider this production quality, but will be a good working, starting point, and hopefully open the door to a myriad of other kubernetes based solutions. Note this is supported by 7.0.0 and higher dockers. If wish to use the most recent development codebase, then can change from openemr/openemr:7.0.0 to openemr/openemr:dev (in the openemr/deployment.yaml script), which is built nightly from the development codebase. If you wish to build dynamically from a branch/tag from a github repo or other git repo, then can change from openemr/openemr:7.0.0 to openemr/openemr:flex(in the openemr/deployment.yaml script) (note this will take much longer to start up (probably at least 10 minutes and up to 90 minutes) and is more cpu intensive since each instance of OpenEMR will download codebase and build separately).
9
9
10
10
(Quick note: Development in progress, minikube or kind not required for deployment. :8080 for http, :8090 for https, grab the NodePort for phpmyadmin)
11
11
12
-
You should drop down to one OpenEMR instance-node before trying to pull in an updated image.
13
-
14
-
TODO (optimizing some things). Add support for redis password in the OpenEMR dockers; then add password to the default user in the redis acl (it is now set to work without a password); then turn on protected mode in redis config.
15
-
16
12
# Use
17
13
1. Install (and then start) Kubernetes with Minikube or Kind or other.
18
14
- For Minikube or other, can find online documentation.
@@ -39,36 +35,53 @@ TODO (optimizing some things). Add support for redis password in the OpenEMR doc
39
35
```bash
40
36
bash kub-up
41
37
```
42
-
3. Can see pod progress with following command:
43
-
```bash
44
-
kubectl get pod
45
-
```
46
-
- It will look something like this:
47
-
```console
48
-
NAME READY STATUS RESTARTS AGE
49
-
mysql-565f988976-np9zs 1/1 Running 0 133m
50
-
openemr-5f6db6c87c-8xgzq 1/1 Running 0 133m
51
-
openemr-5f6db6c87c-bfktf 1/1 Running 0 133m
52
-
openemr-5f6db6c87c-bwzdr 1/1 Running 0 133m
53
-
openemr-5f6db6c87c-qn5ll 1/1 Running 0 133m
54
-
openemr-5f6db6c87c-znq8h 1/1 Running 0 133m
55
-
phpmyadmin-78968d6cfb-cdfmq 1/1 Running 0 133m
56
-
redis-74cc9d667-5ltbq 1/1 Running 0 133m
57
-
```
58
-
4. Can see the service listing with following command:
38
+
3. Can see overall progress with following command:
59
39
```bash
60
-
kubectl get svc
40
+
kubectl get all
61
41
```
62
-
- It will look something like this:
42
+
- It will look something like this when completed:
7. Some cool replicas stuff with OpenEMR. The OpenEMR docker pods are run as a replica set (since it is set to 3 replicas in this OpenEMR deployment script). Gonna cover how to view the replica set and how to change the number of replicas on the fly in this step.
111
+
6. Some cool replicas stuff with OpenEMR. The OpenEMR docker pods are run as a replica set (since it is set to 3 replicas in this OpenEMR deployment script). Gonna cover how to view the replica set and how to change the number of replicas on the fly in this step.
99
112
- First. lets list the replica set like this:
100
113
```bash
101
114
kubectl get rs
102
115
```
103
116
- It will look something like this (note OpenEMR has 3 desired and 3 current replicas going):
104
117
```console
105
118
NAME DESIRED CURRENT READY AGE
106
-
mysql-64449b8cf7 1 1 1 4m5s
107
-
openemr-5f6db6c87c 3 3 3 4m5s
108
-
phpmyadmin-78968d6cfb 1 1 1 4m5s
109
-
redis-74cc9d667 1 1 1 4m5s
119
+
openemr-7889cf48d8 3 3 3 9m22s
120
+
phpmyadmin-f4d9bfc69 1 1 1 9m22s
121
+
redisproxy-744b7749dc 2 2 2 9m22s
110
122
```
111
123
- Second, lets increase OpenEMR's replicas from 3 to 10 (ie. pretend in an environment where a huge number of OpenEMR users are using the system at the same time)
112
124
```bash
@@ -127,7 +139,7 @@ TODO (optimizing some things). Add support for redis password in the OpenEMR doc
127
139
```
128
140
- Now, there are 5 replicas of OpenEMR instead of 10. Enter the `kubectl get rs` and `kubectl get pod` to see what happened.
129
141
- This is just a quick overview of scaling. Note we just did manual scaling in the example above, but there are also options of automatic scaling for example depending on cpu use etc.
130
-
8. Some cool replicas stuff with MariaDB. 2 statefulset replications of MariaDB (1 primary/master with 1 replica/slave) are created by default. The number of replicas can be increased or decreased.
142
+
7. Some cool replicas stuff with MariaDB. 2 statefulset replications of MariaDB (1 primary/master with 1 replica/slave) are created by default. The number of replicas can be increased or decreased.
131
143
- Increase replicas (after this command will have the 1 primary/master with 3 replicas/slaves).
132
144
```bash
133
145
kubectl scale sts mysql-sts --replicas=4
@@ -136,7 +148,7 @@ TODO (optimizing some things). Add support for redis password in the OpenEMR doc
136
148
```bash
137
149
kubectl scale sts mysql-sts --replicas=3
138
150
```
139
-
9. To stop and remove OpenEMR orchestration (this will delete everything):
151
+
8. To stop and remove OpenEMR orchestration (this will delete everything):
0 commit comments