Deploying a Business Network
A business network is deployed using the composer network deploy
command.
Procedure
Before deploying a business network, a Business Network Definition is needed as a
zip
file 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
-p
and allow Fabric Composer to create aDefault Connection Profile
for 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!