Update fixturenet-laconicd docs
Former-commit-id: 89b33c0e38383221d29955f240eabfc725d9d38a
This commit is contained in:
parent
4092a127ef
commit
edd7d549d9
@ -11,20 +11,25 @@ To use a user-supplied registry set these environment variables:
|
||||
|
||||
Leave `CERC_NPM_REGISTRY_URL` un-set to use the local gitea registry.
|
||||
|
||||
### Build support containers
|
||||
### 1. Build support containers
|
||||
```
|
||||
$ laconic-so --stack build-support build-containers
|
||||
```
|
||||
### Deploy Gitea Package Registry
|
||||
Note that the scheme/gerbil builder container can take a while to build so if you aren't going to build scheme projects it can be skipped with:
|
||||
```
|
||||
$ laconic-so --stack build-support build-containers --exclude cerc/builder-gerbil
|
||||
```
|
||||
### 2. Deploy Gitea Package Registry
|
||||
|
||||
```
|
||||
$ laconic-so --stack package-registry setup-repositories
|
||||
$ laconic-so --stack package-registry deploy-system up
|
||||
$ laconic-so --stack package-registry deploy up
|
||||
This is your gitea access token: 84fe66a73698bf11edbdccd0a338236b7d1d5c45. Keep it safe and secure, it can not be fetched again from gitea.
|
||||
$ export CERC_NPM_AUTH_TOKEN=84fe66a73698bf11edbdccd0a338236b7d1d5c45
|
||||
```
|
||||
Now npm packages can be built:
|
||||
### Build npm Packages
|
||||
Ensure that `CERC_NPM_AUTH_TOKEN` is set with the token printed above when the package-registry stack was deployed (the actual token value will be different than shown in this example):
|
||||
```
|
||||
$ export CERC_NPM_AUTH_TOKEN=84fe66a73698bf11edbdccd0a338236b7d1d5c45
|
||||
$ laconic-so build-npms --include laconic-sdk
|
||||
```
|
||||
|
@ -1,18 +1,50 @@
|
||||
# Laconicd Fixturenet
|
||||
|
||||
Instructions for deploying a local Laconic blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator (the installation of which is covered [here](https://github.com/cerc-io/stack-orchestrator#user-mode)):
|
||||
Instructions for deploying a local Laconic blockchain "fixturenet" for development and testing purposes using laconic-stack-orchestrator.
|
||||
|
||||
## Clone required repositories
|
||||
## 1. Install Laconic Stack Orchestrator
|
||||
Installation is covered in detail [here](https://github.com/cerc-io/stack-orchestrator#user-mode) but if you're on Linux and already have docker installed it should be as simple as:
|
||||
```
|
||||
$ laconic-so setup-repositories --include cerc-io/laconicd,cerc-io/laconic-sdk,cerc-io/laconic-registry-cli
|
||||
$ mkdir my-working-dir
|
||||
$ cd my-working-dir
|
||||
$ curl -L -o ./laconic-so https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so
|
||||
$ chmod +x ./laconic-so
|
||||
$ export PATH=$PATH:$(pwd) # Or move laconic-so to ~/bin or your favorite on-path directory
|
||||
```
|
||||
## Build the laconicd container
|
||||
## 2. Prepare the local build environment
|
||||
Note that this step needs only to be done once on a new machine.
|
||||
Detailed instructions can be found [here](../build-support/README.md). For the impatient run these commands:
|
||||
```
|
||||
$ laconic-so build-containers --include cerc/laconicd
|
||||
$ laconic-so --stack build-support build-containers --exclude cerc/builder-gerbil
|
||||
$ laconic-so --stack package-registry setup-repositories
|
||||
$ laconic-so --stack package-registry deploy-system up
|
||||
```
|
||||
This should create a container with tag `cerc/laconicd` in the local image registry.
|
||||
## Deploy the stack
|
||||
Then add the localhost alias `gitea.local` and set `CERC_NPM_AUTH_TOKEN` to the token printed when the package-registry stack was deployed above:
|
||||
```
|
||||
$ laconic-so deploy-system --include fixturenet-laconicd up
|
||||
$ sudo vi /etc/hosts
|
||||
$ export CERC_NPM_AUTH_TOKEN=<my-token>
|
||||
```
|
||||
|
||||
## 3. Clone required repositories
|
||||
```
|
||||
$ laconic-so --stack fixturenet-laconicd setup-repositories
|
||||
```
|
||||
## 4. Build the stack's packages and containers
|
||||
```
|
||||
$ laconic-so --stack fixturenet-laconicd build-npms
|
||||
$ laconic-so --stack fixturenet-laconicd build-containers
|
||||
```
|
||||
## 5. Deploy the stack
|
||||
```
|
||||
$ laconic-so --stack fixturenet-laconicd deploy up
|
||||
```
|
||||
Correct operation should be verified by checking the laconicd container's logs with:
|
||||
```
|
||||
$ laconic-so --stack fixturenet-laconicd deploy logs
|
||||
```
|
||||
## 6. Test with the Registry CLI
|
||||
```
|
||||
$ laconic-so --stack fixturenet-laconicd deploy exec laconicd "sh /docker-entrypoint-scripts.d/export-mykey.sh"
|
||||
$ laconic-so --stack fixturenet-laconicd deploy exec cli "sh /scripts/import-key.sh xxxxxxxxxxxxxxxxxxxxxxx"
|
||||
$ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status"
|
||||
```
|
||||
Correct operation should be verified by checking the laconicd container's log.
|
||||
|
5
app/data/stacks/package-registry/README.md
Normal file
5
app/data/stacks/package-registry/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Package Registry Stack
|
||||
|
||||
The Package Registry Stack supports a build environment that requires a package registry (initially for NPM packages only).
|
||||
|
||||
Setup instructions can be found [here](../build-support/README.md).
|
Loading…
Reference in New Issue
Block a user