How to bootstrap an admin user?
- Daniel_PorterOP
I want to use the new 2.0 metering API to get reports on ledger usage. To do this, I need my participants to have an admin user, and the no-fuss way to do it would be to just add it in the bootstrap script. I’ve pulled down the canton docker demo:
docker run --rm -it digitalasset/canton-community:latest --config examples/01-simple-topology/simple-topology.conf --bootstrap examples/01-simple-topology/simple-ping.cantonand hitting tab on
participant1from within the ammonite repl doesn’t yield anything obviously helpful:adHocPrettyInstance commitments discard is_initialized paramIfDefined prettyNode productElementName resources testing underlying adminParty config domains is_running paramIfNonEmpty prettyOfClass productElementNames runningNode toLengthLimitedString unnamedParam adminToken consoleEnvironment filterString keys paramIfTrue prettyOfObject productIterator self toLf unnamedParamIfDefined canEqual copy health ledger_api paramWithoutValue prettyOfParam productPrefix show toProtoPrimitive unnamedParamIfNonEmpty certs customParam help name parties prettyOfString pruning showType transfer clear_cache dars id packages pretty productArity repair start typeClassInstance code db identity param prettyInfix productElement replication stop uid - Ratko_Veprek
First, please beware the
canton-communityhas now been renamed tocanton-open-source. So withcanton-community:latest, you will fetch and old version.Second, the new version has console commands for user allocation: Canton Console — Daml SDK 2.0.0 documentation
Please note that you need to turn them on using
canton.features.enable-testing-commands = yes. - Daniel_Porter
Okay, great. I’m having trouble pulling from
canton-open-source, kinda looks like it might be in a different artifactory than the one I’m using for hub - it is it not publicly available?Also, I’m noting this is under a feature called “testing.” My intent here isn’t testing - I want to bootstrap an admin user. Is there another recommended way to achieve this?
- cocreature
Note that there is also a user
participant_adminwhich is created by default which you can use for bootstrapping. - Daniel_Porter
Ah, that is very helpful, haven’t seen that documented anywhere.
- Ratko_Veprek
Indeed. The docker image isn’t public yet! We are fixing this.