Skip to content

Commit

Permalink
[18630] Deploy renamed seeder to UAT (#54)
Browse files Browse the repository at this point in the history
* Align staging to dev (#37)

Add staging pipeline file (#36)

* add file

* fix

* Update staging (#39)

* Add staging pipeline file (#36)

* add file

* fix

* feat(cli): update seeder (#35)

* Add deploy stage to logto-admin (#38)

---------

Co-authored-by: Norbert Nagy <nagy.norbert1989@gmail.com>
Co-authored-by: William Monteiro <williamwd@users.noreply.github.com>

* fix(cli): fix seeder to handle empty data (#42)

* fix(cli): fix seeder to handle empty data (#41)

fix(cli): fix seeder to handle empty values

* chore(cli): cleanup

* fix(cli): azure pipeline

* [17584] Deploy to staging (#47)

* Add staging pipeline file (#36)

* add file

* fix

* feat(cli): update seeder (#35)

* Add deploy stage to logto-admin (#38)

* fix(cli): fix logto pipeline (#40)

* fix(cli): fix seeder to handle empty data (#41)

fix(cli): fix seeder to handle empty values

* feat: logto uat changes (#43)

* feat: logto uat changes

* Update pipeline-variables/uat.yml

Co-authored-by: Sara Zanellato <47299026+peschina@users.noreply.github.com>

---------

Co-authored-by: Sara Zanellato <47299026+peschina@users.noreply.github.com>

---------

Co-authored-by: Alfonso Graziano <alfonso.graziano@nearform.com>
Co-authored-by: Norbert Nagy <nagy.norbert1989@gmail.com>
Co-authored-by: William Monteiro <williamwd@users.noreply.github.com>

* Test migration command in Terraform (#48)

fix: remove seed commands from dockerfile

* [18810] Deploy to staging (#50)

* Add staging pipeline file (#36)

* add file

* fix

* feat(cli): update seeder (#35)

* Add deploy stage to logto-admin (#38)

* fix(cli): fix logto pipeline (#40)

* fix(cli): fix seeder to handle empty data (#41)

fix(cli): fix seeder to handle empty values

* feat: logto uat changes (#43)

* feat: logto uat changes

* Update pipeline-variables/uat.yml

Co-authored-by: Sara Zanellato <47299026+peschina@users.noreply.github.com>

---------

Co-authored-by: Sara Zanellato <47299026+peschina@users.noreply.github.com>

* Test migration command in Terraform (#48)

fix: remove seed commands from dockerfile

---------

Co-authored-by: Alfonso Graziano <alfonso.graziano@nearform.com>
Co-authored-by: Norbert Nagy <nagy.norbert1989@gmail.com>
Co-authored-by: William Monteiro <williamwd@users.noreply.github.com>

* 18630 seed real roles (#45)

* feat(cli): seed roles and permissions into db

* fix(cli): cleanup code

* chore(cli): small update

* chore(cli): refactoring roles

* chore(cli): refactoring organization roles

* chore(cli): update

* chore(cli): rename seeder file (#52)

* chore(cli): rename seeder file

* chore(cli): fix eof new line

---------

Co-authored-by: Alfonso Graziano <alfonso.graziano@nearform.com>
Co-authored-by: Norbert Nagy <nagy.norbert1989@gmail.com>
Co-authored-by: William Monteiro <williamwd@users.noreply.github.com>
  • Loading branch information
4 people authored Jun 28, 2024
1 parent 44a5c48 commit 6863c7f
Show file tree
Hide file tree
Showing 13 changed files with 604 additions and 636 deletions.
6 changes: 3 additions & 3 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/src/packages/connectors/connector-saml/README.md:private-key:101
/src/packages/cli/src/commands/database/ogcio/ogcio-seeder.json:generic-api-key:33
/src/packages/cli/src/commands/database/ogcio/ogcio-seeder.json:generic-api-key:42
/src/packages/cli/src/commands/database/ogcio/ogcio-seeder.json:generic-api-key:151
/src/packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json:generic-api-key:37
/src/packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json:generic-api-key:46
/src/packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json:generic-api-key:157
6 changes: 3 additions & 3 deletions README.OGCIO.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ USER_DEFAULT_ORGANIZATION_ROLE_NAMES=OGCIO Employee, OGCIO Manager

3. After the installation, you can start seeding the database. You have to seed in two steps:
- seed Logto's database: `pnpm cli db seed`
- seed custom OGCIO data: `npm run cli db ogcio -- --seeder-filepath="./packages/cli/src/commands/database/ogcio/ogcio-seeder.json"`
- seed custom OGCIO data: `npm run cli db ogcio -- --seeder-filepath="./packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json"`

3.5. Database alteration

Expand Down Expand Up @@ -98,7 +98,7 @@ After installing and seeding the database, you must create a default admin user.

## Custom seeder

We made a custom seeder to ensure the required configuration for OGCIO Building Block integration exists right after the installation. The seeder also makes configuring the deployed Logto instance easy via a CI pipeline. The seeder is located in `packages/cli/src/commands/database/ogcio/`. The configuration for the local dev environment is inside `packages/cli/src/commands/database/ogcio/ogcio-seeder.json`.
We made a custom seeder to ensure the required configuration for OGCIO Building Block integration exists right after the installation. The seeder also makes configuring the deployed Logto instance easy via a CI pipeline. The seeder is located in `packages/cli/src/commands/database/ogcio/`. The configuration for the local dev environment is inside `packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json`.

Each type of configuration has its own dedicated file, which serves as a repository of knowledge about the structure of the configuration and how it should be inserted into the database. This approach ensures a systematic and organized management of the database configuration.

Expand All @@ -112,4 +112,4 @@ This command can take a parameter to specify the input data file, called `seeder

Usage: `npm run cli db ogcio -- --seeder-filepath="DATA_FILE_PATH"`

To seed the default data for local dev environments, run `npm run cli db ogcio -- --seeder-filepath="./packages/cli/src/commands/database/ogcio/ogcio-seeder.json"`.
To seed the default data for local dev environments, run `npm run cli db ogcio -- --seeder-filepath="./packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json"`.
2 changes: 1 addition & 1 deletion docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
[
"sh",
"-c",
"npm run cli db seed -- --swe && npm run cli db alteration deploy latest && npm run cli db ogcio -- --seeder-filepath=\"/etc/logto/packages/cli/src/commands/database/ogcio/ogcio-seeder.json\" && npm start"
"npm run cli db seed -- --swe && npm run cli db alteration deploy latest && npm run cli db ogcio -- --seeder-filepath=\"/etc/logto/packages/cli/src/commands/database/ogcio/ogcio-seeder-local.json\" && npm start"
]
ports:
- 3301:3301
Expand Down
Loading

0 comments on commit 6863c7f

Please sign in to comment.