Skip to content

Commit 4e34e78

Browse files
misba7moabu
andauthored
docs: demonstrate migration from to gluu4 to gluu-flex (#1982)
* docs: demonstrate migration from to gluu4 to gluu-flex Signed-off-by: Amro Misbah <[email protected]> * docs: rollback to the vreplace-flex-version keyword Signed-off-by: Amro Misbah <[email protected]> --------- Signed-off-by: Amro Misbah <[email protected]> Co-authored-by: Mohammad Abudayyeh <[email protected]>
1 parent 9946817 commit 4e34e78

File tree

3 files changed

+93
-1
lines changed

3 files changed

+93
-1
lines changed

Diff for: docs/admin/gluu-migration.md

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
tags:
3+
- administration
4+
- kubernetes
5+
- operations
6+
- gluu4
7+
- migration
8+
---
9+
10+
This guide shows how to migrate from `Gluu 4.x` to `Gluu Flex`.
11+
12+
13+
# Migration steps
14+
15+
1. Create a fresh flex K8s [setup](https://docs.gluu.org/head/install/helm-install/) based on your preferred environment.
16+
17+
1. Write all your existing configurations as code using the Janssen terraform [provider](https://registry.terraform.io/providers/JanssenProject/jans/latest/docs).
18+
You can check this [doc](https://docs.jans.io/head/janssen-server/terraform/) to know the benefits of this approach and how to implement it.
19+
20+
21+
1. Test applying the configuration through Terraform. Ensure no delta between the old Gluu 4.x and Gluu flex, and verify the changes using the admin-ui/TUI.
22+
23+
1. Move the sensitive data from the old setup to the new one, honoring any changes such as custom attributes and users.
24+
25+
# Terraform configuration example
26+
27+
Firstly, you have to initialize and configure the Janssen terraform provider. You can follow this [doc](https://docs.jans.io/head/janssen-server/terraform/) to complete this.
28+
29+
Once completed, let's showcase how to move existing gluu4 [clients](#clients-migration) and [interception scripts](#interception-scripts-migration) using Terraform.
30+
31+
!!! Note
32+
The examples are meant for demonstration purposes. You should adjust them as needed.
33+
34+
## Clients Migration
35+
36+
We will use the [jans_oidc_client](https://registry.terraform.io/providers/JanssenProject/jans/latest/docs/resources/oidc_client) resource.
37+
38+
Add the following to `clients.tf`:
39+
40+
```
41+
resource "jans_oidc_client" "gluu4_migrated_client" {
42+
display_name = "Gluu4 migrated client"
43+
description = "Client migrated from Gluu4 to Flex"
44+
redirect_uris = ["https://demoexample.gluu.org/admin"]
45+
token_endpoint_auth_method = "none"
46+
subject_type = "pairwise"
47+
grant_types = ["authorization_code"]
48+
response_types = ["code"]
49+
disabled = false
50+
trusted_client = true
51+
application_type = "web"
52+
scopes = ["inum=F0C4,ou=scopes,o=jans"]
53+
persist_client_authorizations = true
54+
access_token_as_jwt = false
55+
}
56+
```
57+
## Interception scripts Migration
58+
59+
We will use the [jans_script](https://registry.terraform.io/providers/JanssenProject/jans/latest/docs/resources/oidc_client) resource.
60+
61+
Add the following to `scripts.tf`:
62+
63+
64+
```
65+
resource "jans_script" "gluu_migrated_script" {
66+
dn = "inum=CACD-5901,ou=scripts,o=jans"
67+
inum = "CACD-5901"
68+
name = "scan_client_registration"
69+
description = "Scan Client Registration Script"
70+
script = file("script.py")
71+
script_type = "client_registration"
72+
programming_language = "python"
73+
level = 100
74+
revision = 1
75+
enabled = true
76+
modified = false
77+
internal = false
78+
location_type = "db"
79+
base_dn = "inum=CACD-5901,ou=scripts,o=jans"
80+
81+
module_properties {
82+
value1 = "v1"
83+
value2 = "v2"
84+
description = null
85+
}
86+
}
87+
```
88+
89+
90+
You can run `terraform apply` and review the created resources in the Admin-UI/TUI.

Diff for: docs/install/helm-install/rancher.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Also, there are multiple `Rancher` installation [options](https://ranchermanager
1818
Here's an [example](https://ranchermanager.docs.rancher.com/reference-guides/single-node-rancher-in-docker/advanced-options#running-rancherrancher-and-rancherrancher-agent-on-the-same-node) on how to do that.
1919

2020
1. 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.
21-
2. Provision a Linux 4 CPU, 16 GB RAM, and 50GB SSD VM with ports `443` and `80` open. Save the VM IP address. For development environments, the VM can be set up using VMWare Workstation Player or VirtualBox with Ubuntu 20.04 operating system running on a VM.
21+
2. Provision a Linux 4 CPU, 16 GB RAM, and 50GB SSD VM with ports `443` and `80` open. Save the VM IP address. For development environments, the VM can be set up using VMWare Workstation Player or VirtualBox with Ubuntu 20.04/22.04 operating system running on a VM.
2222
3. Install [Docker](https://docs.docker.com/engine/install/).
2323
4. Execute
2424
```bash

Diff for: mkdocs.yml

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ nav:
153153
- 'Flex Recipes':
154154
- 'admin/recipes/README.md'
155155
- 'Getting Started with Rancher': 'admin/recipes/getting-started-rancher.md'
156+
- 'Migrating from Gluu4': 'admin/gluu-migration.md'
157+
156158
- 'Reference':
157159
- 'reference/kubernetes/README.md'
158160
- 'Flex Helm Chart': 'reference/kubernetes/helm-chart.md'

0 commit comments

Comments
 (0)