-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4822 from open-formulieren/feature/setup-configur…
…ation ✨ [#4788] ConfigurationStep for Objects API registration config
- Loading branch information
Showing
36 changed files
with
811 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# setup initial configuration using environment variables | ||
# Run this script from the root of the repository | ||
|
||
set -e | ||
|
||
if [[ "${RUN_SETUP_CONFIG,,}" =~ ^(true|1|yes)$ ]]; then | ||
# Figure out abspath of this script | ||
SCRIPT=$(readlink -f "$0") | ||
SCRIPTPATH=$(dirname "$SCRIPT") | ||
|
||
# wait for required services | ||
${SCRIPTPATH}/wait_for_db.sh | ||
|
||
src/manage.py migrate | ||
src/manage.py setup_configuration --yaml-file setup_configuration/data.yaml | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh | ||
|
||
set -ex | ||
|
||
# Wait for the database container | ||
# See: https://docs.docker.com/compose/startup-order/ | ||
export PGHOST=${DB_HOST:-db} | ||
export PGPORT=${DB_PORT:-5432} | ||
|
||
until pg_isready; do | ||
>&2 echo "Waiting for database connection..." | ||
sleep 1 | ||
done | ||
|
||
>&2 echo "Database is up." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
zgw_consumers_config_enable: True | ||
zgw_consumers: | ||
services: | ||
- identifier: objecttypen-test | ||
label: Objecttypen API test | ||
api_root: http://objecttypes-web:8000/api/v2/ | ||
api_type: orc | ||
auth_type: api_key | ||
header_key: Authorization | ||
header_value: Token 171be5abaf41e7856b423ad513df1ef8f867ff48 | ||
- identifier: objecten-test | ||
label: Objecten API test | ||
api_root: http://objects-web:8000/api/v2/ | ||
api_type: orc | ||
auth_type: api_key | ||
header_key: Authorization | ||
header_value: Token 7657474c3d75f56ae0abd0d1bf7994b09964dca9 | ||
- identifier: documenten-test | ||
label: Documenten API test | ||
api_root: http://openzaak-web.local:8000/documenten/api/v1/ | ||
api_type: drc | ||
auth_type: zgw | ||
client_id: test_client_id | ||
secret: test_secret_key | ||
- identifier: catalogi-test | ||
label: Catalogi API test | ||
api_root: http://openzaak-web.local:8000/catalogi/api/v1/ | ||
api_type: ztc | ||
auth_type: zgw | ||
client_id: test_client_id | ||
secret: test_secret_key | ||
|
||
objects_api_config_enable: True | ||
objects_api: | ||
groups: | ||
- name: Config 1 | ||
identifier: config-1 | ||
objects_service_identifier: objecten-test | ||
objecttypes_service_identifier: objecttypen-test | ||
documenten_service_identifier: documenten-test | ||
catalogi_service_identifier: catalogi-test | ||
catalogue_domain: TEST | ||
catalogue_rsin: "000000000" | ||
organisatie_rsin: "000000000" | ||
document_type_submission_report: PDF Informatieobjecttype | ||
document_type_submission_csv: CSV Informatieobjecttype | ||
document_type_attachment: Attachment Informatieobjecttype | ||
- name: Config 2 | ||
identifier: config-2 | ||
objects_service_identifier: objecten-test | ||
objecttypes_service_identifier: objecttypen-test | ||
documenten_service_identifier: documenten-test | ||
catalogi_service_identifier: catalogi-test | ||
catalogue_domain: OTHER | ||
catalogue_rsin: "000000000" | ||
organisatie_rsin: "000000000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.. _installation_configuration_cli: | ||
|
||
============================== | ||
Open Forms configuration (CLI) | ||
============================== | ||
|
||
After deploying Open Forms, it needs to be configured to be fully functional. The | ||
command line tool ``setup_configuration`` assist with this configuration by loading a | ||
YAML file in which the configuration information is specified. | ||
|
||
You can get the full command documentation with: | ||
|
||
.. code-block:: bash | ||
src/manage.py setup_configuration --help | ||
.. warning:: This command is declarative - if configuration is manually changed after | ||
running the command and you then run the exact same command again, the manual | ||
changes will be reverted. | ||
|
||
Preparation | ||
=========== | ||
|
||
The command executes the list of pluggable configuration steps, and each step | ||
requires specific configuration information, that should be prepared. | ||
Here is the description of all available configuration steps and the shape of the data, | ||
used by each step. | ||
|
||
|
||
Services configuration | ||
---------------------- | ||
|
||
TODO: add generated documentation for ``zgw_consumers.ServiceConfigurationStep`` | ||
|
||
Objects API registration configuration | ||
-------------------------------------- | ||
|
||
TODO: add generated documentation for ``ObjectsAPIConfigurationStep`` | ||
|
||
Execution | ||
========= | ||
|
||
Open Forms configuration | ||
------------------------ | ||
|
||
With the full command invocation, all defined configuration steps are applied. Each step is idempotent, | ||
so it's safe to run the command multiple times. The steps will overwrite any manual changes made in | ||
the admin if you run the command after making these changes. | ||
|
||
.. code-block:: bash | ||
src/manage.py setup_configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.