Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CA capability to test-network-nano-bash #1209

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test-network-nano-bash/.gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
channel-artifacts/
crypto-config/
data/
data_ca/
logs/
*.gz
chaincode-external/
15 changes: 15 additions & 0 deletions test-network-nano-bash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ If you have trouble running bash scripts in your environment, you can just as ea

Note the syntax of running the scripts. The peer admin scripts set the admin environment variables and must be run with the `source` command in order that the exported environment variables can be utilized by any subsequent user commands.

## Running each component separately with CAs

These instructions are for running the CAs from terminal sessions. Open terminal windows for 3 CAs as seen in the following terminal setup. These instructions should be followd before opening the ordering and peer windows described above.

![CA Terminal setup](ca_terminal_setup.png)

- cd to the `test-network-nano-bash` directory in each terminal window
- Before running the `./generate_artifacts.sh -ca` in the first orderer terminal, run `./ordererca.sh`, `./org1ca.sh`, `./org2ca.sh` in the repsective terminals.
- In the first orderer terminal, run `./generate_artifacts.sh -ca` to generate crypto material using the CAs and application channel genesis block and configuration transactions (calls configtxgen). The artifacts will be created in the `crypto-config` and `channel-artifacts` directories. If you are running BFT consensus then run `./generate_artifacts.sh BFT -ca`. All artifacts generated with the CA will conform to the same directory structure as cryptogen.

## Starting the network with one command

Using the individual scripts above gives you more control of the process of starting a Fabric network and demonstrates how all the required components fit together, however the same network can also be started using a single script for convenience.
Expand All @@ -73,6 +83,11 @@ For BFT consensus type:
./network.sh start -o BFT
```

For Raft consensus type using CAs:
```shell
./network.sh start -ca
```

After the network has started, use separate terminals to run peer commands.
You will need to configure the peer environment for each new terminal.
For example to run against peer1, use:
Expand Down
Loading
Loading