How do I provision the system with Barclays (GLEIF)?
Table of Contents
Note: How do I provision the system with Acme Corporation (holding group)? is the system's reference fully-populated test/demo entity (parties, business units, portfolios, books, staff accounts with photos, GLEIF counterparties) — use it unless you have a specific reason to want Barclays' lighter-weight, GLEIF-only tenant instead (e.g. a scenario that doesn't need staff/business-unit structure).
Reproduce, from the command line, what an operator used to do through the
three provisioning wizards of the removed desktop client — but sourced
from the GLEIF golden copy
rather than synthetic data. The ores-shell block below is tangled
into the runnable script library as barclays_system_provision.ores.
1. Question
How do I provision a fresh system from the shell with a Barclays Plc tenant and GLEIF parties and counterparties?
2. Answer
The flow bootstraps the system with a super_admin account, installs a
Barclays Plc tenant from the GLEIF starting point with the LEI of the
hierarchy's root, and provisions that root party. The starting point's
own steps import the LEI hierarchy as the tenant's parties and publish
the counterparty set the counterparty_size parameter names, all
server-side; the command follows the run to its end. load's
stop-on-error semantics guarantee an error-free run ends fully
provisioned.
Expectations: the services are up (compass services start), the
database is fresh (compass db recreate -y -k → bootstrap mode), and
the GLEIF golden copy is loaded (the small subset under
external/lei holds BARCLAYS PLC, LEI 213800LBQA1Y9L22JB70).
connect takes the endpoint from $ORES_NATS_URL and inherits the
subject prefix and TLS context the shell was started with, so nothing
is hard-coded to an environment.
connect $ORES_NATS_URL bootstrap setup super_admin Secure-Password-123 super_admin@localhost.com --tenant-admin-password Secure-Password-123 --tenant-code barclays --tenant-name "Barclays Plc" --tenant-hostname barclays_plc --profile gleif_entity --param root_lei=213800LBQA1Y9L22JB70 --param counterparty_size=small logout login tenant_admin@barclays_plc Secure-Password-123 provision party "BARCLAYS PLC" accounts set-default-party "BARCLAYS PLC" logout exit
Run it from a connected shell, or load the generated script:
./ores.shell ${log_args} ${connect_args} << 'EOF'
<<barclays-system-provision>>
EOF
3. Script
projects/ores.shell/scripts/library/provisioning/barclays_system_provision.ores —
generated from this recipe's ores-shell block by
compass build --direct tangle_shell_scripts (do not edit the .ores by hand).
4. Tested by
Manual: compass shell -f barclays_system_provision.ores against a
freshly recreated database.
5. See also
- GLEIF — the LEI source the party data is drawn from.