> For the complete documentation index, see [llms.txt](https://abc.bharatblockchain.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://abc.bharatblockchain.io/hyperledger-fabric/fabric-installation/launch-network.md).

# Launch Network

Test Network will be having below steps to be performed in sequence.

1. Certificate Generation - CryptoGen Tool/Fabric CA
2. Start the docker network - HLF Test Network
3. Create a channel - Orderer will create it. (My channel)
4. Peers will join the channel.
5. Anchor peer update
6. Chaincode Deployment: It has a lifecycle (Chaincode Lifecycle)
   1. Packaging&#x20;
   2. Install
   3. Approve&#x20;
   4. Commit
7. Init the ledger&#x20;
8. Invoke or Query Transactions&#x20;

### Note: Please Run these cmds[^1] before step 1

```bash
cd Desktop/hyperledger/fabric-samples/test-network/
./network.sh down

docker ps -aq 
docker volume ls
```

### If there are containers then run :&#x20;

```bash
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker volume prune
```

## Test Network Execution:

### Certificate Generation Using CryptoGen Tool:

In the test network folder do the following:

1. Set the Config Path

```bash
export PATH=${PWD}/../bin:${PWD}:$PATH
```

2. Create the Certificates for Org1

```bash
cryptogen generate --config=./organizations/cryptogen/crypto-config-org1.yaml --output="organizations"
```

3. Create the certificates for Org2

```bash
cryptogen generate --config=./organizations/cryptogen/crypto-config-org2.yaml --output="organizations"
```

4. Create Certificates for OrdererOrg

```bash
cryptogen generate --config=./organizations/cryptogen/crypto-config-orderer.yaml --output="organizations"
```

### Start Docker Network

5. Start the docker containers

```bash
export COMPOSE_PROJECT_NAME=net
export DOCKER_SOCK=/var/run/docker.sock
IMAGE_TAG=latest docker-compose -f compose/compose-test-net.yaml -f compose/docker/docker-compose-test-net.yaml up
```

6. Open a new Terminal
7. Check the docker containers running status

[^1]:


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://abc.bharatblockchain.io/hyperledger-fabric/fabric-installation/launch-network.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
