Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
GC Infrastructure code
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU Software
OSDU Data Platform
Deployment and Operations
GC Infrastructure code
Merge requests
!413
GONRG-4892: Update/add readme to keycloak bootstrap
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
GONRG-4892: Update/add readme to keycloak bootstrap
GONRG-4892-add-docs-keycloak
into
master
Overview
0
Commits
10
Pipelines
9
Changes
1
Merged
Yauheni Rykhter (EPAM)
requested to merge
GONRG-4892-add-docs-keycloak
into
master
2 years ago
Overview
0
Commits
10
Pipelines
9
Changes
1
Expand
0
0
Merge request reports
Compare
master
version 8
ce12827c
2 years ago
version 7
2c53ae3e
2 years ago
version 6
e939540d
2 years ago
version 5
3a15ed9c
2 years ago
version 4
64c0c0af
2 years ago
version 3
9dc4dcf6
2 years ago
version 2
ee2a6869
2 years ago
version 1
b222a1cc
2 years ago
master (base)
and
latest version
latest version
74c61e02
10 commits,
2 years ago
version 8
ce12827c
9 commits,
2 years ago
version 7
2c53ae3e
8 commits,
2 years ago
version 6
e939540d
6 commits,
2 years ago
version 5
3a15ed9c
5 commits,
2 years ago
version 4
64c0c0af
4 commits,
2 years ago
version 3
9dc4dcf6
3 commits,
2 years ago
version 2
ee2a6869
2 commits,
2 years ago
version 1
b222a1cc
1 commit,
2 years ago
1 file
+
63
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bootstrap_infra_on_prem/keycloak/README.md
0 → 100644
+
63
−
0
Options
# Bootstrap Keycloak for OSDU Anthos on-prem installation
The main purpose of bootstrap Keycloak is to automate uploading neccessary settings for OSDU Anthos on-prem installation.
\
We parsing all evironment variables in container, then find all of them if they starts with 'KEYCLOAK_' and ends with '_SECRET' parts.
Then we use these variables for creation Keycloak clients with custom passwords (can be updated) and realms.
## Prerequisites
1.
Keycloak
1.
Python 3.8.10
1.
You need to create a secret and add it to Kubernetes.
**Variables for bootstrap script must start with 'KEYCLOAK_' and ends with '_SECRET' parts!!! (check the examples!!!)**
\
As an example:
Creation of secret:
```
YAML
apiVersion: v1
kind: Secret
metadata:
name: "example"
type: Opaque
data:
CLIENT_ID: {{ print "example" | b64enc | quote }}
CLIENT_SECRET: {{ randAlphaNum 16 | b64enc | quote }}
```
Adding secret to deployment:
```
YAML
apiVersion: apps/v1
kind: Deployment
metadata:
name: "example-deployment"
spec:
replicas: 1
selector:
matchLabels:
job: example-bootstrap
template:
metadata:
labels:
job: example-bootstrap
spec:
containers:
- name: "example"
env:
- name: KEYCLOAK_EXAMPLE_SECRET
valueFrom:
secretKeyRef:
name: "example"
key: CLIENT_SECRET
```
## Provisioning
To provision this script, use:
```
Python
pip install requirements.txt
python3 keycloak.py
```
Loading