diff --git a/app/data/config/fixturenet-laconicd/registry-cli-config-template.yml b/app/data/config/fixturenet-laconicd/registry-cli-config-template.yml index 16432c18..d558956a 100644 --- a/app/data/config/fixturenet-laconicd/registry-cli-config-template.yml +++ b/app/data/config/fixturenet-laconicd/registry-cli-config-template.yml @@ -5,5 +5,5 @@ services: userKey: REPLACE_WITH_MYKEY bondId: chainId: laconic_9000-1 - gas: 250000 + gas: 350000 fees: 200000aphoton diff --git a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile index 7859adb4..8ff8ab7e 100644 --- a/app/data/container-build/cerc-laconic-registry-cli/Dockerfile +++ b/app/data/container-build/cerc-laconic-registry-cli/Dockerfile @@ -54,8 +54,10 @@ RUN yarn global add @cerc-io/laconic-registry-cli # Add scripts RUN mkdir /scripts +RUN mkdir /scripts/demo-records ENV PATH="${PATH}:/scripts" COPY ./create-demo-records.sh /scripts +COPY ./demo-records /scripts/demo-records COPY ./import-key.sh /scripts COPY ./import-address.sh /scripts diff --git a/app/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh b/app/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh index 0d90da8d..5a5dc34c 100755 --- a/app/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh +++ b/app/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh @@ -4,26 +4,26 @@ set -e if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi + registry_command="laconic cns" -record_1_filename=demo-record-1.yml -cat < ${record_1_filename} -record: - type: WebsiteRegistrationRecord - url: 'https://cerc.io' - repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D - build_artifact_cid: QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 - tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR - version: 1.0.23 -EOF +demo_records_dir="scripts/demo-records" + # Check we have funds funds_response=$(${registry_command} account get --address $(cat my-address.txt)) funds_balance=$(echo ${funds_response} | jq -r .[0].balance[0].quantity) echo "Balance is: ${funds_balance}" + # Create a bond bond_create_result=$(${registry_command} bond create --type aphoton --quantity 1000000000) bond_id=$(echo ${bond_create_result} | jq -r .bondId) echo "Created bond with id: ${bond_id}" -# Publish a demo record -publish_response=$(${registry_command} record publish --filename ${record_1_filename} --bond-id ${bond_id}) -published_record_id=$(echo ${publish_response} | jq -r .id) -echo "Published ${record_1_filename} with id: ${published_record_id}" + +## Publish the demo records +if [ -d $demo_records_dir ]; then + for demo_record in "${demo_records_dir}"/*; do + publish_response=$(${registry_command} record publish --filename ${demo_record} --bond-id ${bond_id}) + published_record_id=$(echo ${publish_response} | jq -r .id) + echo "Published ${demo_record} with id: ${published_record_id}" + cat ${demo_record} + done +fi diff --git a/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-1.yml b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-1.yml new file mode 100644 index 00000000..47b328cf --- /dev/null +++ b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-1.yml @@ -0,0 +1,7 @@ +record: + type: WebsiteRegistrationRecord + url: 'https://hello-urbit.laconic.com' + repo_registration_record_cid: QmTZQ8ZJS6mALjEM2wY71msFno6zzxFftVCiZELj9xREPx + build_artifact_cid: '~lostex-rabdur-labtul-moltev/hello-urbit' + tls_cert_cid: QmR1acEmQt7Tjmhp9cFtymie2eFcrHURQKt9kGto1TQTW1 + version: 0.2.4 diff --git a/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-2.yml b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-2.yml new file mode 100644 index 00000000..eae0cf8b --- /dev/null +++ b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-2.yml @@ -0,0 +1,7 @@ +record: + type: WebsiteRegistrationRecord + url: 'https://dev-hello-urbit.laconic.com' + repo_registration_record_cid: QmPbKkK7gKojnGAgKAE6bK5qBY8BcYp2YDB1e4b28NxvVv + build_artifact_cid: '~lostex-rabdur-labtul-moltev/hello-urbit-dev' + tls_cert_cid: QmWbCv4k9Q9P6XptHNJN6EupDyKVLSLRV6W6T2sAYkfBxr + version: 0.2.5 diff --git a/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-3.yml b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-3.yml new file mode 100644 index 00000000..3197b244 --- /dev/null +++ b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-3.yml @@ -0,0 +1,7 @@ +record: + type: WebsiteRegistrationRecord + url: 'https://app.osmosis.zone' + repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + build_artifact_cid: '~larryx-woldyr/osmosis:latest' + tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + version: 1.3.5 diff --git a/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-4.yml b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-4.yml new file mode 100644 index 00000000..f892ac81 --- /dev/null +++ b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-4.yml @@ -0,0 +1,7 @@ +record: + type: WebsiteRegistrationRecord + url: 'https://dev.osmosis.zone' + repo_registration_record_cid: QmPbKkK7gKojnGAgKAE6bK5qBY8BcYp2YDB1e4b28NxvVv + build_artifact_cid: '~larryx-woldyr/osmosis:dev' + tls_cert_cid: QmWbCv4k9Q9P6XptHNJN6EupDyKVLSLRV6W6T2sAYkfBxr + version: 1.3.6 diff --git a/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-5.yml b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-5.yml new file mode 100644 index 00000000..d4e21bb7 --- /dev/null +++ b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-5.yml @@ -0,0 +1,7 @@ +record: + type: WebsiteRegistrationRecord + url: 'https://pwa-1-1-3.iglootools.xyz' + repo_registration_record_cid: QmSnuWmxptJZdLJpKRarxBMS2Ju2oANVrgbr2xWbie9b2D + build_artifact_cid: https://ipfs.io/ipfs/QmP8jTG1m9GSDJLCbeWhVSVgEzCPPwXRdCRuJtQ5Tz9Kc9 + tls_cert_cid: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR + version: 1.1.3 diff --git a/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-6.yml b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-6.yml new file mode 100644 index 00000000..9e1ffae0 --- /dev/null +++ b/app/data/container-build/cerc-laconic-registry-cli/demo-records/demo-record-6.yml @@ -0,0 +1,7 @@ +record: + type: WebsiteRegistrationRecord + url: 'https://pwa-1-2-3.iglootools.xyz' + repo_registration_record_cid: QmVjYQ59z3fuKfYUV1aXhDR82JAKxdqB5JMPfUsHkJUkJq + build_artifact_cid: https://ipfs.io/ipfs/QmN2yevgjC92gzGi2BY6Q2yBWmR6JNWQ9yscoPPyy1V2Hv + tls_cert_cid: QmTAnmDMSnzqAN3yyXtFD4KpyATkeze62ZkbmXHjJ8xQW8 + version: 1.2.3 diff --git a/docs/laconicd-with-console.md b/docs/laconicd-with-console.md index 79a6336a..e669e1b9 100644 --- a/docs/laconicd-with-console.md +++ b/docs/laconicd-with-console.md @@ -2,10 +2,10 @@ The following tutorial explains the steps to run a laconicd fixturenet with CLI and web console that displays records in the registry. It is designed as an introduction to Stack Orchestrator and to showcase one component of the Laconic Stack. Prior to Stack Orchestrator, the following 4 repositories had to be cloned and setup manually: -- https://github.com/cerc-io/laconicd -- https://github.com/cerc-io/laconic-sdk -- https://github.com/cerc-io/laconic-registry-cli -- https://github.com/cerc-io/laconic-console +- https://git.vdb.to/cerc-io/laconicd +- https://git.vdb.to/cerc-io/laconic-sdk +- https://git.vdb.to/cerc-io/laconic-registry-cli +- https://git.vdb.to/cerc-io/laconic-console Now, with Stack Orchestrator, it is a few quick commands. Additionally, the `docker` and `docker compose` integration on the back-end allows the stack to easily persist, facilitating workflows. @@ -52,7 +52,7 @@ laconic-so version 1. Get the repositories ``` -laconic-so --stack fixturenet-laconic-loaded setup-repositories --include github.com/cerc-io/laconicd,github.com/cerc-io/laconic-sdk,github.com/cerc-io/laconic-registry-cli,github.com/cerc-io/laconic-console +laconic-so --stack fixturenet-laconic-loaded setup-repositories --include git.vdb.to/cerc-io/laconicd,git.vdb.to/cerc-io/laconic-sdk,git.vdb.to/cerc-io/laconic-registry-cli,git.vdb.to/cerc-io/laconic-console ``` 2. Set this environment variable to the Laconic self-hosted Gitea instance: @@ -212,7 +212,7 @@ record: 3. Try out additional CLI commands -- these are documented [here](https://github.com/cerc-io/laconic-registry-cli#readme) and updates are forthcoming +- these are documented [here](https://git.vdb.to/cerc-io/laconic-registry-cli#readme) and updates are forthcoming - e.g,: ```