- Fork this repo.
- Set your private key as the env
CICD_LACONIC_USER_KEY
in Settings -> Secrets -> Actions - Register and set a name authority; see these instructions.
- Modify the
"name":
and"repository":
fields, then commit. - The commit should trigger an Action and publish an ApplicationRecord and ApplicationDeploymentRequest to the chain.
This is a reference workflow for publishing and deploying a webapp using the Laconic Registry:
- Upload the code to the webapp to a public repo.
- [On-chain] Register an Authority.
- [On-chain] Register an Application Record and corresponding name.
- [On-chain] Register an Application Deployment Request.
- Set up Service Provider infrastructure.
- Deploy the app using the data from the Application Deployment Request.
- [On-chain] Register a DNS Record and corresponding name.
- [On-chain] Register an Application Deployment Record and corresponding name.
The following steps will provide sample commands and records for an example app being published:
- Our organization is Bob Inc.
- The authority will be set to
bob
.
You must have a laconic
address and a bond ID in order to register authorities, names, and records on chain.
- Bond ID:
a742489e5817ef274187611dadb0e4284a49c087608b545ab6bd990905fb61f3
To create a bond,
Our (fictional) webapp repo is github.com/bobby/fries
. It includes a package.json
file that looks [like this].
- The app name is
fries
- The app version is
0.0.1
- The git commit is
be15ad5492699aj4c85810fa5c10a28e1f8b8725
We set up the SP infrastructure to monitor the chain registry and deploy apps as required using this guide.
- The
DEPLOYMENT_RECORD_NAMESPACE
must be set tobob
.
We follow the steps in here to set the bob
authority.
This should take place automatically after pushing a commit to the relevant branch in the webapp repo.
We can register an ApplicationRecord that looks like this using the commands shown here.
- Application record ID:
bafyreibln2qgnj4swmqnpzfqyryylovei64xglma6euufr4rs3gghu6xe4
We can register the relevant names now using the application record ID:
lrn://bob/applications/fries
lrn://bob/applications/[email protected]
lrn://bob/applications/fries@be15ad5492699aj4c85810fa5c10a28e1f8b8725
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry name set lrn://bob/applications/fries bafyreibln2qgnj4swmqnpzfqyryylovei64xglma6euufr4rs3gghu6xe4"
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry name set lrn://bob/applications/[email protected] bafyreibln2qgnj4swmqnpzfqyryylovei64xglma6euufr4rs3gghu6xe4"
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry name set lrn://bob/applications/fries@be15ad5492699aj4c85810fa5c10a28e1f8b8725 bafyreibln2qgnj4swmqnpzfqyryylovei64xglma6euufr4rs3gghu6xe4"
This should take place automatically after pushing a commit to the relevant branch in the webapp repo.
We can register an ApplicationDeploymenRequest that looks like this using the commands shown here.
If your SP setup is operational, it should deploy the app and register the relevant DNS and ApplicationDeployment Records automatically after it detects the deployment request.
In this example, the app is deployed at https://fries-13r8rdasg.pwa.bob.tech
.
This should take place automatically through your SP setup.
We can register a DnsRecord that looks like this using the commands shown here.
- Dns record ID:
bafyreiefnnnwbvd2hpmxkhhgx432t4l45su3ipqgrsmqlgvwgz7ztg3l6y
We can register the relevant name using the Dns record ID:
lrn://bob/dns/fries-13r8rdasg.pwa.bob.tech
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry name set lrn://bob/dns/fries-13r8rdasg.pwa.bob.tech bafyreiefnnnwbvd2hpmxkhhgx432t4l45su3ipqgrsmqlgvwgz7ztg3l6y"
This should take place automatically through your SP setup.
We can register an ApplicationDeploymentRecord that looks like this using the commands shown here.
- Application deployment record ID:
bafyreiape3qbsljhybvgstv6bqlspxqghd7rlxhghcxi5u524mfdyodesq
We can register the relevant name using the Dns record ID:
lrn://bob/deployments/fries-13r8rdasg.pwa.bob.tech
laconic-so deployment --dir laconic-console-deployment exec cli "laconic registry name set lrn://bob/deployments/fries-13r8rdasg.pwa.bob.tech bafyreiape3qbsljhybvgstv6bqlspxqghd7rlxhghcxi5u524mfdyodesq"