Skip to content

Commit 423145a

Browse files
committed
CH-169 try fix keycloak starting issue
1 parent 67fdf62 commit 423145a

File tree

12 files changed

+1063
-19
lines changed

12 files changed

+1063
-19
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ node_modules
88
*.DS_Store
99
deployment/helm
1010
deployment/compose
11-
docker-compose.yaml
11+
/docker-compose.yaml
1212
*.egg-info
1313
*.idea
1414
/build
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/dev
2+
.ch-manifest
3+
README.md
4+
/deploy

applications/accounts/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/keycloak/keycloak:16.1.1
1+
FROM quay.io/keycloak/keycloak:16.1.0
22

33
# add kubectl
44
USER root

applications/accounts/deploy/resources/realm.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
"resetPasswordAllowed": true,
4545
"editUsernameAllowed": true,
4646
"users": [
47-
{{- range $app := .Values.apps }}
47+
{{- range $j, $app := .Values.apps }}
4848
{{- if (hasKey $app.harness "accounts") }}
49-
{{- range $i, $user := $app.harness.accounts.users }}{{if $i}},{{end}}
49+
{{- range $i, $user := $app.harness.accounts.users }}{{if (add $i $j)}},{{end}}
5050
{{ include "deploy_accounts_utils.user" (dict "root" $ "app" $app "user" $user) }}
5151
{{- end }}
5252
{{- end }}
@@ -82,11 +82,11 @@
8282
}
8383
],
8484
"client": {
85-
{{- range $app := .Values.apps }}
85+
{{- range $j,$app := .Values.apps }}
8686
{{- if (hasKey $app.harness "accounts") }}
8787
{{ $app.harness.name | quote }}: [
8888
{{- range $i, $role := $app.harness.accounts.roles }}
89-
{{if $i}},{{end}}
89+
{{if (add $i $j)}},{{end}}
9090
{{ include "deploy_accounts_utils.role" (dict "root" $ "app" $app "role" $role) }}
9191
{{- end }}
9292
]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
accounts:
2+
roles:
3+
- role1
4+
- role2
5+
- role3
6+
users:
7+
- username: [email protected]
8+
clientRoles:
9+
- role1
10+
realmRoles:
11+
- administrator
12+
- offline_access
13+
- username: samples-test-user2
14+
15+
password: test1
16+
clientRoles:
17+
- role1
18+
realmRoles:
19+
- offline_access
20+

applications/accounts/deploy/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ harness:
1111
cpu: "10m"
1212
limits:
1313
memory: "1024Mi"
14-
cpu: "500m"
14+
cpu: "2000m"
1515
service:
1616
auto: true
1717
port: 8080
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
embed-server --std-out=echo --server-config=standalone-ha.xml
2+
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheThemes,value=false)
3+
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheTemplates,value=false)
4+
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=staticMaxAge,value=-1)
5+
stop-embedded-server
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: '3.2'
2+
3+
services:
4+
postgres:
5+
image: postgres
6+
environment:
7+
POSTGRES_DB: keycloak
8+
POSTGRES_USER: keycloak
9+
POSTGRES_PASSWORD: password
10+
PGDATA: /var/lib/postgresql/data/pgdata
11+
volumes:
12+
- pg_data:/var/lib/postgresql/data/pgdata
13+
14+
keycloak:
15+
image: quay.io/keycloak/keycloak:16.1.1
16+
environment:
17+
DB_VENDOR: POSTGRES
18+
DB_ADDR: postgres
19+
DB_DATABASE: keycloak
20+
DB_USER: keycloak
21+
DB_SCHEMA: public
22+
DB_PASSWORD: password
23+
KEYCLOAK_USER: admin
24+
KEYCLOAK_PASSWORD: Pa55w0rd
25+
26+
ports:
27+
- 8080:8080
28+
depends_on:
29+
- postgres
30+
volumes:
31+
- type: bind
32+
source: ../themes/custom
33+
target: /opt/jboss/keycloak/themes/custom
34+
# disable cache
35+
- type: bind
36+
source: ./disable-theme-cache.cli
37+
target: /opt/jboss/startup-scripts/disable-theme-cache.cli
38+
- type: bind
39+
source: ../scripts/create_api_user.sh
40+
target: /opt/jboss/startup-scripts/create_api_user.sh
41+
- type: bind
42+
source: ../plugins/metacell-admin-event-listener-bundle-1.0.0.ear
43+
target: /opt/jboss/keycloak/standalone/deployments/metacell-admin-event-listener-bundle-1.0.0.ear
44+
volumes:
45+
pg_data:

0 commit comments

Comments
 (0)