Skip to content

Commit 604ddd2

Browse files
authored
fix: replace bitnami commercial images with free official images (#2477)
Signed-off-by: Amro Misbah <amromisba7@gmail.com>
1 parent 32270a4 commit 604ddd2

File tree

9 files changed

+197
-96
lines changed

9 files changed

+197
-96
lines changed

automation/mysql.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: mysql-secret
5+
namespace: gluu
6+
type: Opaque
7+
stringData:
8+
root-password: Test1234#
9+
---
10+
apiVersion: v1
11+
kind: Service
12+
metadata:
13+
name: mysql
14+
namespace: gluu
15+
spec:
16+
ports:
17+
- port: 3306
18+
selector:
19+
app: mysql
20+
clusterIP: None
21+
---
22+
apiVersion: apps/v1
23+
kind: Deployment
24+
metadata:
25+
name: mysql
26+
namespace: gluu
27+
spec:
28+
selector:
29+
matchLabels:
30+
app: mysql
31+
strategy:
32+
type: Recreate
33+
template:
34+
metadata:
35+
labels:
36+
app: mysql
37+
spec:
38+
containers:
39+
- image: mysql:8.0
40+
name: mysql
41+
env:
42+
- name: MYSQL_ROOT_PASSWORD
43+
valueFrom:
44+
secretKeyRef:
45+
name: mysql-secret
46+
key: root-password
47+
- name: MYSQL_DATABASE
48+
value: gluu
49+
ports:
50+
- containerPort: 3306
51+
name: mysql
52+
volumeMounts:
53+
- name: mysql-persistent-storage
54+
mountPath: /var/lib/mysql
55+
volumes:
56+
- name: mysql-persistent-storage
57+
persistentVolumeClaim:
58+
claimName: mysql-pv-claim
59+
---
60+
apiVersion: v1
61+
kind: PersistentVolumeClaim
62+
metadata:
63+
name: mysql-pv-claim
64+
namespace: gluu
65+
spec:
66+
accessModes:
67+
- ReadWriteOnce
68+
resources:
69+
requests:
70+
storage: 5Gi

automation/pgsql.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
apiVersion: v1
2+
kind: Secret
3+
metadata:
4+
name: postgresql-secret
5+
namespace: gluu
6+
type: Opaque
7+
stringData:
8+
postgresql-password: Test1234#
9+
---
10+
apiVersion: v1
11+
kind: Service
12+
metadata:
13+
name: postgresql
14+
namespace: gluu
15+
spec:
16+
ports:
17+
- port: 5432
18+
selector:
19+
app: postgresql
20+
clusterIP: None
21+
---
22+
apiVersion: apps/v1
23+
kind: Deployment
24+
metadata:
25+
name: postgresql
26+
namespace: gluu
27+
spec:
28+
selector:
29+
matchLabels:
30+
app: postgresql
31+
strategy:
32+
type: Recreate
33+
template:
34+
metadata:
35+
labels:
36+
app: postgresql
37+
spec:
38+
containers:
39+
- image: postgres:16
40+
name: postgresql
41+
env:
42+
- name: POSTGRES_PASSWORD
43+
valueFrom:
44+
secretKeyRef:
45+
name: postgresql-secret
46+
key: postgresql-password
47+
- name: POSTGRES_DB
48+
value: gluu
49+
- name: PGDATA
50+
value: /var/lib/postgresql/data/pgdata
51+
ports:
52+
- containerPort: 5432
53+
name: postgresql
54+
volumeMounts:
55+
- name: postgresql-persistent-storage
56+
mountPath: /var/lib/postgresql/data
57+
volumes:
58+
- name: postgresql-persistent-storage
59+
persistentVolumeClaim:
60+
claimName: postgresql-pv-claim
61+
---
62+
apiVersion: v1
63+
kind: PersistentVolumeClaim
64+
metadata:
65+
name: postgresql-pv-claim
66+
namespace: gluu
67+
spec:
68+
accessModes:
69+
- ReadWriteOnce
70+
resources:
71+
requests:
72+
storage: 5Gi

automation/startflexdemo.sh

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ if [[ $INSTALL_ISTIO == "true" ]]; then
6262
cd ..
6363
fi
6464

65-
PERSISTENCE_TYPE="sql"
6665
if [[ $GLUU_PERSISTENCE == "MYSQL" ]]; then
67-
sudo microk8s.kubectl get po --kubeconfig="$KUBECONFIG"
68-
sudo helm install my-release --set auth.rootPassword=Test1234#,auth.database=gluu -n gluu oci://registry-1.docker.io/bitnamicharts/mysql --kubeconfig="$KUBECONFIG"
66+
sudo wget https://raw.githubusercontent.com/GluuFederation/flex/nightly/automation/mysql.yaml
67+
sudo microk8s.kubectl apply -f mysql.yaml --kubeconfig="$KUBECONFIG"
6968
cat << EOF > override.yaml
7069
config:
7170
countryCode: US
@@ -76,15 +75,14 @@ config:
7675
cnSqlDbName: gluu
7776
cnSqlDbPort: 3306
7877
cnSqlDbDialect: mysql
79-
cnSqlDbHost: my-release-mysql.gluu.svc
78+
cnSqlDbHost: mysql.gluu.svc
8079
cnSqlDbUser: root
8180
cnSqlDbTimezone: UTC
8281
cnSqldbUserPassword: Test1234#
8382
EOF
84-
fi
85-
if [[ $GLUU_PERSISTENCE == "PGSQL" ]]; then
86-
sudo microk8s.kubectl get po --kubeconfig="$KUBECONFIG"
87-
sudo helm install my-release --set auth.postgresPassword=Test1234#,auth.database=gluu -n gluu oci://registry-1.docker.io/bitnamicharts/postgresql --kubeconfig="$KUBECONFIG"
83+
else
84+
sudo wget https://raw.githubusercontent.com/GluuFederation/flex/nightly/automation/pgsql.yaml
85+
sudo microk8s.kubectl apply -f pgsql.yaml --kubeconfig="$KUBECONFIG"
8886
cat << EOF > override.yaml
8987
config:
9088
countryCode: US
@@ -95,7 +93,7 @@ config:
9593
cnSqlDbName: gluu
9694
cnSqlDbPort: 5432
9795
cnSqlDbDialect: pgsql
98-
cnSqlDbHost: my-release-postgresql.gluu.svc
96+
cnSqlDbHost: postgresql.gluu.svc
9997
cnSqlDbUser: postgres
10098
cnSqlDbTimezone: UTC
10199
cnSqldbUserPassword: Test1234#
@@ -108,7 +106,6 @@ global:
108106
testEnviroment: true
109107
istio:
110108
enable: $INSTALL_ISTIO
111-
cnPersistenceType: $PERSISTENCE_TYPE
112109
admin-ui:
113110
ingress:
114111
adminUiEnabled: true

docs/admin/recipes/getting-started-rancher.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -167,18 +167,12 @@ kubectl get secret cn -o json -n <namespace>
167167
To install a quick setup with `PostgreSQL` as the backend, you need to provide the connection parameters of a fresh setup.
168168
For a test setup, you can follow the below instructions:
169169

170-
- `Apps` --> `Charts` and search for `Postgres`.
171-
- Click on `Install` on the right side of the window.
172-
- Create a new namespace called `postgres` and hit `Next`.
173-
- You should be on the `Edit YAML` page. Modify the below keys as desired. These values will be inputted in the installation of `Gluu Flex`
174-
175-
| Key |
176-
|-----------------|
177-
| `auth.database` |
178-
| `auth.username` |
179-
| `auth.password` |
180-
181-
- Click `Install` at the bottom right of the page.
170+
- Open a kubectl shell from the top right navigation menu `>_`.
171+
- Run:
172+
```bash
173+
wget https://raw.githubusercontent.com/GluuFederation/flex/nightly/automation/pgsql.yaml
174+
kubectl apply -f pgsql.yaml #adjust values as preferred
175+
```
182176

183177
### Install MySQL database
184178
!!! Note
@@ -189,21 +183,11 @@ kubectl get secret cn -o json -n <namespace>
189183

190184
- Open a kubectl shell from the top right navigation menu `>_`.
191185
- Run:
186+
```bash
187+
wget https://raw.githubusercontent.com/GluuFederation/flex/nightly/automation/mysql.yaml
188+
kubectl apply -f mysql.yaml #adjust values as preferred
192189
```
193-
helm repo add bitnami https://charts.bitnami.com/bitnami
194-
helm repo update
195-
kubectl create ns gluu #Create gluu namespace
196-
```
197-
- Pass in a custom password for the database. Here we used `Test1234#`. The admin user will be left as `root`. Notice we are installing in the `gluu` namespace. Run
198-
199-
```
200-
helm install my-release --set auth.rootPassword=Test1234#,auth.database=jans bitnami/mysql -n gluu
201-
```
202-
203-
### Successful Installation
204-
After the installation is successful, you should have a `Statefulset` active in the rancher UI as shown in the screenshot below.
205190

206-
<img width="1504" alt="Screenshot 2022-07-05 at 14 54 26" src="https://user-images.githubusercontent.com/17182751/177326700-9215436c-f1c2-467f-94ff-601ff7fbdbfb.png">
207191

208192

209193
2. Install [Nginx-Ingress](https://github.com/kubernetes/ingress-nginx), if you are not using Istio ingress
@@ -227,7 +211,7 @@ kubectl get secret cn -o json -n <namespace>
227211
- Change the namespace from `default` to `gluu`, then click on `Next`.
228212
- Scroll through the sections to get familiar with the options. For minimal setup follow with the next instructions.
229213
- Add `License SSA`. Before initiating the setup, please obtain an [SSA](https://docs.gluu.org/vreplace-flex-version/install/agama/prerequisites/#obtaining-an-ssa) for Flex trial, after which you will issued a JWT.
230-
- Click on the `Persistence` section. Change `SQL database host uri` to `postgresql.postgres.svc.cluster.local` in the case of `PostgreSQL` or `my-release-mysql.gluu.svc.cluster.local` in the case of `MySQL`. Also set `SQL database username`,`SQL password`, and `SQL database name` to the values you used during the database installation.
214+
- Click on the `Persistence` section. Change `SQL database host uri` to `postgresql.gluu.svc` in the case of `PostgreSQL` or `mysql.gluu.svc` in the case of `MySQL`. Also set `SQL database username`,`SQL password`, and `SQL database name` to the values you used during the database installation.
231215
- To enable Casa and the Admin UI, navigate to the `Optional Services` section and check the `Enable casa` and `boolean flag to enable admin UI` boxes. You can also enable different services like `Client API` and `Jackrabbit`.
232216
- Click on the section named `Ingress` and enable all the endpoints. You might add LB IP or address if you don't have `FQDN` for `Gluu`.
233217
- To pass your `FQDN` or `Domain` that is intended to serve the Gluu Flex IDP, head to the `Configuration` section:

docs/includes/cn-system-requirements.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ Use the listing below for a detailed estimation of the minimum required resource
2121
| link | 0.5 | 1GB | N/A | 64 Bit | No |
2222
| saml | 0.5 | 1GB | N/A | 64 Bit | No |
2323
| kc-scheduler - job| 0.3 | 0.3GB | N/A | 64 Bit | No |
24+
| cleanup - job | 0.3 | 0.3GB | N/A | 64 Bit | Yes |
2425

25-
Releases of images are in style 1.0.0-beta.0, 1.0.0-0
26+
Releases of images are in style 0.0.0-nightly or x.y-z-1

docs/install/helm-install/amazon-eks.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ tags:
6868
Add the following yaml snippet to your `override.yaml` file:
6969
7070
```yaml
71-
global:
72-
isFqdnRegistered: false
7371
config:
7472
configmap:
7573
lbAddr: http:// #Add LB address from previous command
@@ -81,7 +79,6 @@ tags:
8179
8280
```yaml
8381
global:
84-
isFqdnRegistered: true
8582
fqdn: demoexample.gluu.org #CHANGE-THIS to the FQDN used for Gluu
8683
config:
8784
configmap:
@@ -102,24 +99,22 @@ tags:
10299
103100
In a production environment, a production grade PostgreSQL server should be used such as `Amazon RDS`
104101
105-
For testing purposes, you can deploy it on the EKS cluster using the following command:
102+
For testing purposes, you can deploy it on the EKS cluster using the following commands:
106103
107-
```
108-
helm install my-release --set auth.postgresPassword=Test1234#,auth.database=gluu -n gluu oci://registry-1.docker.io/bitnamicharts/postgresql
104+
```bash
105+
wget https://raw.githubusercontent.com/GluuFederation/flex/vreplace-flex-version/automation/pgsql.yaml
106+
kubectl apply -f pgsql.yaml
109107
```
110108
111109
Add the following yaml snippet to your `override.yaml` file:
112110
113111
```yaml
114-
115-
global:
116-
cnPersistenceType: sql
117112
config:
118113
configmap:
119114
cnSqlDbName: gluu
120115
cnSqlDbPort: 5432
121116
cnSqlDbDialect: pgsql
122-
cnSqlDbHost: my-release-postgresql.gluu.svc
117+
cnSqlDbHost: postgresql.gluu.svc
123118
cnSqlDbUser: postgres
124119
cnSqlDbTimezone: UTC
125120
cnSqldbUserPassword: Test1234#
@@ -129,24 +124,22 @@ tags:
129124
130125
In a production environment, a production grade MySQL server should be used such as `Amazon RDS`
131126
132-
For testing purposes, you can deploy it on the EKS cluster using the following command:
127+
For testing purposes, you can deploy it on the EKS cluster using the following commands:
133128
134-
```
135-
helm install my-release --set auth.rootPassword=Test1234#,auth.database=gluu -n gluu oci://registry-1.docker.io/bitnamicharts/mysql
129+
```bash
130+
wget https://raw.githubusercontent.com/GluuFederation/flex/vreplace-flex-version/automation/mysql.yaml
131+
kubectl apply -f mysql.yaml
136132
```
137133
138134
Add the following yaml snippet to your `override.yaml` file:
139135
140136
```yaml
141-
142-
global:
143-
cnPersistenceType: sql
144137
config:
145138
configmap:
146139
cnSqlDbName: gluu
147140
cnSqlDbPort: 3306
148141
cnSqlDbDialect: mysql
149-
cnSqlDbHost: my-release-mysql.gluu.svc
142+
cnSqlDbHost: mysql.gluu.svc
150143
cnSqlDbUser: root
151144
cnSqlDbTimezone: UTC
152145
cnSqldbUserPassword: Test1234#
@@ -156,8 +149,6 @@ tags:
156149
157150
```yaml
158151
global:
159-
cnPersistenceType: sql
160-
isFqdnRegistered: true
161152
fqdn: demoexample.gluu.org #CHANGE-THIS to the FQDN used for Gluu
162153
nginx-ingress:
163154
ingress:
@@ -174,7 +165,7 @@ tags:
174165
cnSqlDbName: gluu
175166
cnSqlDbPort: 3306
176167
cnSqlDbDialect: mysql
177-
cnSqlDbHost: my-release-mysql.gluu.svc
168+
cnSqlDbHost: mysql.gluu.svc
178169
cnSqlDbUser: root
179170
cnSqlDbTimezone: UTC
180171
cnSqldbUserPassword: Test1234#

0 commit comments

Comments
 (0)