.. | ||
README.md | ||
stack.yml |
laconic-faucet
Instructions for running the laconic faucet server
Prerequisites
-
Minimum hardware requirements:
RAM: 8-16GB Disk space: 200GB CPU: 2 cores
Setup
-
Clone the stack repo:
laconic-so fetch-stack git.vdb.to/cerc-io/testnet-laconicd-stack
-
Clone the laconic-faucet respository:
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet setup-repositories
-
Build the container image:
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet build-containers
This should create the
cerc/laconic-faucet
image locally
Create a deployment
-
Create a spec file for the deployment:
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet deploy init --output laconic-faucet-spec.yml
-
Edit
network
in the spec file to map container ports to host ports as required:network: ports: laconic-faucet: - '3000:3000'
-
Create a deployment from the spec file:
laconic-so --stack ~/cerc/testnet-laconicd-stack/stack-orchestrator/stacks/laconic-faucet deploy create --spec-file laconic-faucet-spec.yml --deployment-dir laconic-faucet-deployment
Configuration
-
Inside the
laconic-faucet-deployment
deployment directory, openconfig.env
file and set following env variables:CERC_FAUCET_KEY= CERC_RPC_ENDPOINT=
Start the deployment
-
To start the deployment:
laconic-so deployment --dir laconic-faucet-deployment start
Check status
-
To list down and monitor the running container:
# With status docker ps # Check logs for a container docker logs -f <CONTAINER_ID>
-
Request tokens from the testnet faucet for your account if required
curl -X POST http://localhost:3000/faucet \ -H "Content-Type: application/json" \ -d '{"address": "<laconicd_address>"}'
Clean up
-
Stop the
laconic-faucet
service running in the background:# Stop the docker containe laconic-so deployment --dir laconic-faucet-deployment stop
-
To stop the service and also delete data:
# Stop the docker containers laconic-so deployment --dir laconic-faucet-deployment stop --delete-volumes # Remove deployment directory (deployment will have to be recreated for a re-run) rm -r laconic-faucet-deployment