macOS
A quick start guide on how to run a ConsenSource node locally on macOS for development purposes.
Requirements
The following tools are required to run ConsenSource locally:
- Docker -
brew install docker
If you wish to perform development work, the following additional tools are required:
- npm -
brew install node
- Rust/Rustup
How To Run ConsenSource
The ConsenSource application is comprised of a number of Docker images. To run the app locally, we use
docker-compose
to orchestrate the container network.
- Clone the ConsenSource repo
- Via HTTPS:
git clone https://github.com/target/consensource-compose.git consensource
- Via SSH:
git clone git@github.com:target/consensource-compose.git consensource
- Via HTTPS:
cd consensource
- Pull down Docker images from DockerHub
docker-compose pull
(the images are quite large and will take some time to download)
- Start the network
docker-compose up
Available Services
The following services should be available on your local machine at this point:
- ConsenSource Client: http://localhost:8080/
- ConsenSource REST API: http://localhost:9009/
- Sawtooth REST API: http://localhost:8008/
- PostgreSQL Adminer: http://localhost:8081/
You can run the following cURL command to see the contents of the genesis block that was created on startup:
curl -X GET http://localhost:8008/blocks
Log In To A Container
To log in to a running container for any of the services, you can run:
docker exec -it <container_name> /bin/bash
For example, to log in to the CLI, you can run:
docker exec -it consensource-cli /bin/bash
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified April 14, 2020: Additonal UI docs (9651d07)