Deploying a Business Network
A business network is deployed using the
composer network deploy command.
Before deploying a business network, a Business Network Definition is needed as a
zipfile with the following structure:
BusinessNetworkArchive.zip ├── lib │ └── mozart.cto.js ├── models │ └── mozart.cto └── package.json
- **lib** contains all of the transactions processor functions - **models** contains all of the model files written in the [CTO Language](../reference/cto_language.html). - **package.json** is required, and is used to create the [Business Network Definition](../reference/businessnetworkdefinition.html)'s identifier You can use the `composer archive` command to create an archive with the correct format. **NOTE**: *Do not zip a a folder containing **lib**, **models**, and **package.json** to create an Business Network Archive, zip the contents themselves*
Create a Connection Profile or do not use
-pand allow Fabric Composer to create a
Default Connection Profilefor you.
Enter the command on a single line. For example:
composer network deploy -a <BusinessNetworkDefinition>.zip -i <Your EnrollmentID>
Enter your Enrollment Secret when prompted.
prompt: What is the enrollment secret of the user?:
When you see
Deploying business network definition. This may take a little time. Command completed successfully.
you have successfully deployed a business network!