Skip to content

Commit be4da9b

Browse files
authored
doc: update migration to 0.53.0 (#6613)
1 parent c846597 commit be4da9b

File tree

2 files changed

+49
-35
lines changed

2 files changed

+49
-35
lines changed

docker-compose.yml

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ services:
6060
echo '/!\\ Config file already exists';
6161
fi;
6262
chown -R cds:cds /app/conf /app/artifacts /app/repositories /app/cdn-buffer /app/cdn-storage;
63-
/app/cds-engine-linux-amd64 config new > /app/conf/conf.toml;
6463
mkdir -p /app/artifacts /app/repositories /app/hatchery-local;
6564
chown -R cds:cds /app/conf /app/artifacts /app/repositories /app/hatchery-local /app/cdn-buffer /app/cdn-storage;
6665
/app/cds-engine-linux-amd64 config edit /app/conf/conf.toml --output /app/conf/conf.toml api.artifact.local.baseDirectory=/app/artifacts;

docs/content/hosting/upgrade/migrate_0.53.md

+49-34
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,31 @@ weight: 1
77

88
Before upgrading your CDS Instance:
99
- You have to backup your databases: cds and cdn databases.
10-
- You have to install the version 0.52.0
11-
- You must follow the following step before upgrading to 0.53.0
10+
- You have to install the version 0.52.0.
11+
- You must follow the following step before upgrading to 0.53.0.
1212

1313

1414
## Before upgrading
1515

1616
### Organization
1717

18-
The version 0.52.0 introduces the notion of Organization in CDS for all authentication drivers. In 0.53.0, organizations are mandatories so you need to add them before upgrading to 0.53.0
18+
The version 0.52.0 introduced the notion of Organization in CDS for all authentication drivers. In 0.53.0, organizations are now mandatory so you need to add them before upgrading to 0.53.0.
1919

2020

21-
* Upgrade you CDS API configuration to add organization on your different authentication drivers
22-
* List all allowed organization in the field 'allowedOrganizations'
21+
* Upgrade you CDS API configuration to add the following fields on your different authentication drivers.
22+
* List all allowed organizations in the field 'allowedOrganizations'
2323

2424
```toml
2525
[api.auth]
2626
allowedOrganizations = ["my-organization"]
27-
2827
[api.auth.local]
29-
enabled = true
3028
organization = "my-organization"
31-
signupDisabled = false
32-
33-
3429
[api.auth.github]
3530
organization = "my-organization"
36-
apiUrl = "https://api.github.com"
37-
clientId = "xxx"
38-
clientSecret = "xxx"
39-
enabled = true
40-
signupDisabled = false
41-
url = "https://github.com"
42-
4331
[api.auth.gitlab]
4432
organization = "my-organization"
45-
applicationID = "xxx"
46-
enabled = true
47-
secret = "xxx"
48-
signupDisabled = false
49-
url = "https://gitlab.com"
50-
33+
[api.auth.oidc]
34+
organization = "my-organization"
5135
[api.auth.corporateSSO] # There is no organization in SSO configuration, as it's provided by the SSO itself
5236
[api.auth.ldap] # There is no organization in ldap configuration as it's provided by the company ldap field
5337
```
@@ -73,16 +57,47 @@ cdsctl admin organization user-migrate my-organization
7357

7458
## Upgrading to 0.53.0
7559

76-
As we are updating DB table around authentication consumer, you will need to completely shutdown your CDS instances and all µservices.
60+
This version contains changes on database table used to authenticate users, this will requires CDS to be stopped before the migration.
7761

78-
* Shutdown CDS and all µservices
62+
* Shutdown all CDS's services.
63+
* Apply the following changes to your CDS API configuration:
64+
```
65+
# The field enabled was renamed by signinEnabled in auth api.auth
66+
[api.auth]
67+
[api.auth.local]
68+
signinEnabled = true
69+
[api.auth.github]
70+
signinEnabled = true
71+
[api.auth.gitlab]
72+
signinEnabled = true
73+
[api.auth.oidc]
74+
signinEnabled = true
75+
[api.auth.corporateSSO]
76+
signinEnabled = true
77+
[api.auth.ldap]
78+
signinEnabled = true
79+
80+
# The common configuration for auth drivers were moved to a new config section called drivers
81+
[api.drivers]
82+
[api.drivers.github]
83+
url = ""
84+
apiUrl = ""
85+
clientId = ""
86+
clientSecret = ""
87+
[api.drivers.gitlab]
88+
url = ""
89+
applicationID = ""
90+
secret = ""
91+
[api.drivers.oidc]
92+
...
93+
[api.drivers.corporateSSO]
94+
...
95+
[api.drivers.ldap]
96+
...
97+
```
7998
* Run the database migration, documentation on https://ovh.github.io/cds/hosting/database/
80-
* Start 1 (scale to 1 if you usually use multiple instances) CDS API, check if there is no error on migration, with `cdsctl admin migration list`
81-
* There are two migrations to check: 'OrganizationMigration' and 'ConsumerMigration'
82-
* Migration can take a few minutes (between 1 and 5) depending on the number of users you have.
83-
* Scale up CDS API if you usually use multiple instances
84-
* Start other µservices
85-
86-
87-
88-
99+
* Start CDS API service (scale to 1 instance if you usually use multiple instances).
100+
* Login to CDS using the command line and check if there is no error on migration using `cdsctl admin migration list`.
101+
* There are two migrations to check: 'OrganizationMigration' and 'ConsumerMigration'.
102+
* Migration can take a few minutes depending on the number of users.
103+
* Scale up CDS API if you usually use multiple instances then restart others services.

0 commit comments

Comments
 (0)