Start your environment
Table of contents
- The stack
- The runtimes you will get
- Check your
ff
CLI is healthy - Initialize a new stack
- Start your stack
The stack
A stack
refers to a set of all the runtimes needed to simulate a multi-party network on one machine, automatically connected together for you through configuration generated by the FireFly CLI.
You choose how many members your want to simulate - we recommend you start with 2.
Your stack will have a data directory containing all the configuration, so you can look at it once it’s built and see how things connect together.
The stack will start and stop in Docker, using Docker Compose to manage the cross-container networking, and to start/stop the stack runtimes together.
All the instructions in this doc use the ff
CLI to create, start, and stop the stack, get info, and logs.
If you want to drop down into administering the resources directly in Docker / Docker Compose - go for it! The tooling is designed to be a helper, but not to hide or abstract things away so you can get under the hood.
The runtimes you will get
The CLI includes a number of options (viewable via ff help init
) to control the runtimes that will be created within your stack. By default, it will include the following:
- Blockchain: a shared blockchain ledger
- For development, you get a single shared node
- An Ethereum blockchain using Go Ethereum is the default option
- Adding a block explorer UI option is an enhancement tracked in #108
- Blockchain connector: one per member
- The transaction and events interface for your blockchain node
- An instance of firefly-ethconnect is the default option
- Shared storage: one per member
- An IPFS node is the default option
- Any data you upload will only be available to other nodes within the stack
- These storage nodes are automatically joined together into a private network
- Data exchange: one per member
- An instance of firefly-dataexchange-https is the default option
- Uses Mutual TLS for authentication and transport encryption
- Automatically generates a self-signed certificate for each member
- Database: one per member
- A SQLite relational database is the default option
- Token connector: one per member
- The token service for your node
- A instance of firefly-tokens-erc1155 is the default option
Check your ff
CLI is healthy
First, check that it is installed on your machine: ff -h
this should expose the various exercisable commands and flags.
Initialize a new stack
- Make sure you have Docker running
- In your terminal run the following command -
ff init [stack_name]
. For example,ff init dev1
. - You will be prompted to select the number of members in your system. Choose
2
Start your stack
- Now start the FireFly stack by running -
ff start [stack_name]
. For example,ff start dev1
. - Be patient on this step. The CLI is downloading the various images encapsulated within a FireFly node and starting the corresponding containers. This may take a couple of minutes.
- Once the system is running, you will be able to access an interactive Swagger interface for each membership on ports 5000, 5001 and 5002 respectively. These will be enumerated in your terminal session.