How do I bootstrap a smoke-test system?
The lightweight smoke that predates the provision porcelain: it
exercises multi-tenant behaviour with raw tenants add / accounts
create commands rather than the wizards. The ores-shell block is
tangled into the runnable library as bootstrap_smoke.ores.
Question
How do I bootstrap a minimal multi-tenant system from the shell for a smoke test?
Answer
Create the initial super_admin, two tenants (acme and example),
one account in each, and print the role-grant commands each account
needs. An error-free run leaves a system two admins can log into.
Expectations: services up, fresh bootstrap-mode database. connect
takes the endpoint from $ORES_NATS_URL.
connect $ORES_NATS_URL bootstrap super_admin Secure-Password-123 super_admin@localhost.com accounts login super_admin Secure-Password-123 tenants add acme "Acme Corp" organisation acme.com "Acme Corporation tenant" accounts create newuser61@acme.com Secure-Password-123 567 newuser61@acme.com tenants add example "Example Corp" organisation example.com "Example Corporation tenant" accounts create newuser60@example.com Secure-Password-123 567 newuser60@example.com permissions suggest newuser60 example.com permissions suggest newuser61 acme.com exit
./ores.shell ${log_args} ${connect_args} << 'EOF'
<<bootstrap-smoke>>
EOF
Script
projects/ores.shell/scripts/library/bootstrap_smoke.ores — generated
from this recipe by compass build --direct tangle_shell_scripts (do not
edit the .ores by hand).
Tested by
Manual: compass shell -f bootstrap_smoke.ores against a freshly
recreated database.
See also
- How do I provision the system with Barclays (GLEIF)? — the full wizard-equivalent flow.