Skip to content

Commit 069dc7d

Browse files
Merge pull request #18 from frbrkoala/master
Did some changes to the styling in the main README file
2 parents c681f24 + 3e67a48 commit 069dc7d

File tree

1 file changed

+105
-99
lines changed

1 file changed

+105
-99
lines changed

README.md

Lines changed: 105 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,41 @@ This readme contains the instructions to go from the installation of the softwar
1010

1111
The sample is made of several projects. Each project contains its own README with more detail information about what it contains.
1212

13-
odm-runtime
14-
-----------
13+
#### odm-runtime
1514

16-
is a project that allows to build and run an ODM docker image that contains the ODM Rule Execution Server (RES) and a Database. The RES hosts the ODM rule engine and provide the interface to execute Decision Services.
15+
Is a project that allows to build and run an ODM docker image that contains the ODM Rule Execution Server (RES) and a Database. The RES hosts the ODM rule engine and provide the interface to execute Decision Services.
1716

18-
odm-deployer
19-
------------
17+
#### odm-deployer
2018

21-
is a NodeJS service that acts as a facade to the RES to receive Ruleapp deployment commands from the Blockchain application.
19+
Is a NodeJS service that acts as a facade to the RES to receive Ruleapp deployment commands from the Blockchain application.
2220

23-
odm-deployer-webapp
24-
-------------------
21+
#### odm-deployer-webapp
2522

26-
is a Java WebApp that can be packaged in the same Liberty Server as a the RES to provide a facade to the RES to receive Ruleapp deployment commands from the Blockchain application.
23+
Is a Java WebApp that can be packaged in the same Liberty Server as a the RES to provide a facade to the RES to receive Ruleapp deployment commands from the Blockchain application.
2724

2825
You will be using either odm-deployer or odm-deployer-webapp to provide this facade, not both.
2926

30-
vehicle-lifecycle
31-
-----------------
27+
#### vehicle-lifecycle
3228

33-
is a HyperLedger Composer sample, derived from the one developed by the Composer Team.
29+
Is a HyperLedger Composer sample, derived from the one developed by the Composer Team.
3430
The JavaScript transaction processors in this sample are invoking decisions that are executed
3531
as Decision Services in ODM.
3632

37-
vehicle-lifecycle-cli
38-
---------------------
33+
#### vehicle-lifecycle-cli
3934

40-
is a command line application invoking Composer CLI to perform various operations like deploying RuleApps and submitting transactions.
35+
Is a command line application invoking Composer CLI to perform various operations like deploying RuleApps and submitting transactions.
4136

42-
vehicle-lifecycle-xom
43-
----------------------
37+
#### vehicle-lifecycle-xom
4438

45-
is a Java implementation of the model used in the ODM Decision Service. Its implementation is derived from the model used in the vehicle-lifecycle Composer Sample.
39+
Is a Java implementation of the model used in the ODM Decision Service. Its implementation is derived from the model used in the vehicle-lifecycle Composer Sample.
4640

47-
vehicle-lifecycle-decision-service
48-
-----------------------------------
41+
#### vehicle-lifecycle-decision-service
4942

50-
is the ODM Decision Service that implements the decision logic invoked from the Smart Contracts of the vehicle-lifecycle Blockchain application.
43+
Is the ODM Decision Service that implements the decision logic invoked from the Smart Contracts of the vehicle-lifecycle Blockchain application.
5144

52-
# 1/ Pre-requisites
45+
# Installation
46+
47+
### 1/ Pre-requisites
5348

5449
This sample can only work on Linux and MacOS. If you are using a Windows box, you need to install a Ubuntu Virtual Machine.
5550

@@ -58,38 +53,39 @@ You need to have IBM ODM 8.9.0 installed on your machine. Please refer to your c
5853
The following prerequisites are required:
5954

6055
- Operating Systems: Ubuntu Linux 14.04 / 16.04 LTS (both 64-bit), or Mac OS 10.12
61-
- sw_vers
56+
- `sw_vers`
6257
- Docker Engine: Version 17.03 or higher
63-
- docker -v
58+
- `docker -v`
6459
- Docker-Compose: Version 1.8 or higher
65-
- docker-compose -v
60+
- `docker-compose -v`
6661
- Node: 6.x (note version 7 is not supported)
67-
- node -v
62+
- `node -v`
6863
- npm: v3.x or v5.v
69-
- npm -v
64+
- `npm -v`
7065
- git: 2.9.x
71-
- git --version
66+
- `git --version`
7267
- A code editor of your choice, we recommend VSCode (https://code.visualstudio.com).
7368

7469

7570
Refer to the "Before you begin" section in https://hyperledger.github.io/composer/installing/development-tools.html to make sure you have all the pre-requisites to run HyperLedger Fabric and Composer on your machine.
7671

77-
# 2/ Setting up HyperLedger Fabric V1.0 & Composer 0.11.0
72+
### 2/ Setting up HyperLedger Fabric V1.0 & Composer 0.11.0
7873

79-
- Please refer to https://hyperledger.github.io/composer/installing/development-tools.html to install and run HyperLedger Fabric and Composer.
74+
Please refer to https://hyperledger.github.io/composer/installing/development-tools.html to install and run HyperLedger Fabric and Composer.
8075

8176
Following the steps described in this page should allow you to install Composer (0.11.0 or later) on your machine, install Fabric images and run Fabric on your machine as Docker containers.
8277

83-
Use 'composer -v' to check the version of Composer that has been installed.
78+
Use `composer -v` to check the version of Composer that has been installed.
8479

85-
Note that 'downloadFabric.sh' and 'createComposerProfile.sh' should be done only once, the first time.
80+
Note that `downloadFabric.sh` and `createComposerProfile.sh` should be done only once, the first time.
8681

87-
- use 'startFabric.sh' to start HyperLedger Fabric processes. (You can use 'stopFabric.sh' to stop Fabric on your machine).
82+
Use `startFabric.sh` to start HyperLedger Fabric processes. (You can use `stopFabric.sh` to stop Fabric on your machine).
8883

8984
At this point you should have HyperLedger Fabric 1.0 running and Composer ready to deploy Composer applications.
9085

91-
Use 'docker ps -a' to check that you have the proper containers up and running:
86+
Use `docker ps -a` to check that you have the proper containers up and running:
9287

88+
```
9389
$ docker ps -a
9490
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9591
1a4b387f872c hyperledger/fabric-peer:x86_64-1.0.0 "peer node start -..." About a minute ago Up About a minute 0.0.0.0:7051->7051/tcp, 0.0.0.0:7053->7053/tcp peer0.org1.example.com
@@ -99,151 +95,161 @@ fa5689d9bbaa hyperledger/fabric-orderer:x86_64-1.0.0 "orderer"
9995
5d6a927ab0dd hyperledger/fabric-couchdb:x86_64-1.0.0 "tini -- /docker-e..." About a minute ago Up About a minute 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb
10096
10197
90a45895fcb8 hyperledger/fabric-ca:x86_64-1.0.0 "sh -c 'fabric-ca-..." About a minute ago Up About a minute 0.0.0.0:7054->7054/tcp ca.org1.example.com
98+
```
10299

103100
Next step is to augment this installation with ODM capabilities.
104101

105-
# 3/ Setting-up IBM ODM with HyperLedger Fabric and Composer
102+
### 3/ Setting-up IBM ODM with HyperLedger Fabric and Composer
103+
104+
- Launch a terminal window and go the `odm-runtime` project directory
105+
106+
**<FIRST TIME ONLY>**
107+
108+
- You need to copy RES binary files from your ODM installation:
109+
110+
- Open the `init.sh` script file and set the `ODM_HOME` variable to point to your actual ODM installation
111+
- **Save** the file and **Run** the `init.sh` script
112+
113+
**</FIRST TIME ONLY>**
106114

107-
- Launch a terminal window and go the 'odm-runtime' project directory
108-
- <FIRST TIME ONLY>
109-
You need to copy RES binary files from your ODM installation:
110-
- open the 'init.sh' script file and set the ODM_HOME variable to point to your actual ODM installation
111-
- save the file and run the 'init.sh' script
112-
</FIRST TIME ONLY>
113-
- enter: 'docker-compose up -d' to build the RES Docker image and start it as a Docker Container.
115+
- Enter: `docker-compose up -d` to build the RES Docker image and start it as a Docker Container.
114116

115-
Refer to the README in 'odm-runtime' project for more information
117+
Refer to the README in `odm-runtime` project for more information
116118

117119
The next step is to a run a deployment facade as a companion process to the RES. Called ODM Deployer,
118120
this application comes from the 'odm-deployer' project.
119121

120-
- go to 'odm-deployer'
121-
- enter: 'docker-compose up -d' to build the image and start the deployment service.
122+
- Go to `odm-deployer`
123+
- Enter: `docker-compose up -d` to build the image and start the deployment service.
122124

123-
Refer to the README in the 'odm-deployer' project for more information.
125+
Refer to the README in the `odm-deployer` project for more information.
124126

125127
At this point, the whole Blockchain infrastructure is up-and-running and ready to receive Blockchain applications.
126128

127129
The RES deployed in the Blockchain network is still empty at this point. It must but populated with the XOM of the vehicle lifecycle application and the Decision Service used by the Smart Contracts of this application.
128130

129131
The next step will be to deploy the vehicle lifecycle Hyperledger Composer application.
130132

131-
# 4/ Deploying the vehicle-lifecycle Composer application
133+
### 4/ Deploying the vehicle-lifecycle Composer application
132134

133-
- go to 'vehicle-lifecycle' directory
134-
- enter: 'npm run deploy' to build and deploy the application.
135+
- Go to `vehicle-lifecycle` directory
136+
- Enter: `npm run deploy` to build and deploy the application.
135137

136-
Refer to the README in 'vehicle-lifecycle' directory for more information about this Composer application.
138+
Refer to the README in `vehicle-lifecycle` directory for more information about this Composer application.
137139

138-
# 5/ Setting-up an Eclipse environment for ODM projects
140+
### 5/ Setting-up an Eclipse environment for ODM projects
139141

140142
The ODM application is packaged as 2 eclipse projects that can be edited with ODM Rule Designer:
141-
'vehicle-lifecycle-xom' and 'vehicle-lifecycle-decision-service'
143+
`vehicle-lifecycle-xom` and `vehicle-lifecycle-decision-service`
142144

143145
You need to import them in an Eclipse workspace. You need to perform these instructions only once.
144146

145147
- Launch ODM 8.9.0 Rule Designer
146148
- Create a fresh workspace in whatever location on your disk
147-
- import 'vehicle-lifecycle-xom' and 'vehicle-lifecycle-decision-service' projects into it. You don't need
148-
to copy them, just import them.
149+
- Import `vehicle-lifecycle-xom` and `vehicle-lifecycle-decision-service` projects using "Import > General > Existing Projects Into The Workspace". You don't need to copy them, just import them.
149150

150151
The 2 projects should build without errors. Warnings can be ignored.
151152

152153
Note: if you are copying these project in a different location, the 'npm run deployXom' and 'npm run deployRuleapp' can't be use. Please refer to the 'package.json' file in 'vehicle-lifecycle-cli' directory
153154
to see how to point these commands to a different location.
154155

155-
# 6/ Deploying the XOM
156+
### 6/ Deploying the XOM
156157

157158
A deployment feature has been integrated in the vehicle lifecycle demo to deploy the XOM and the Decision Services through the Blockchain.
158159

159160
To deploy the XOM throught the Blockchain, you should perform the following actions:
160-
- in Rule Designer, you need to generate the XOM (and the Ruleapp):
161-
- right click on the 'deployment/deployer' file in the 'vehicle-lifecycle-decision-service' project explorer and select 'Rule Execution Server / Deploy ...'
162-
- this operation generate a 'vehicle_lifecycle_ds.jar' in the 'output' directory
163-
- right click on the 'deployment/deployer' file in the 'vehicle-lifecycle-decision-service' project explorer and select 'Rule Execution Server / Deploy XOM ...'
164-
- this operation generate a 'vehicle-lifecycle-xom.zip' in the 'output' directory
165-
- go to 'vehicle-lifecyle-cli' directory
166-
- Note: the first time you need to perform: 'npm install'
167-
- enter: 'npm run deployXom'
161+
- In Rule Designer, you need to generate the XOM (and the Ruleapp):
162+
- Right click on the `deployment/deployer` file in the `vehicle-lifecycle-decision-service` project explorer and select "Rule Execution Server / Deploy ...". This operation generate a `vehicle_lifecycle_ds.jar` in the `output` directory.
163+
- Right click on the `deployment/deployer` file in the `vehicle-lifecycle-decision-service` project explorer and select "Rule Execution Server / Deploy XOM ...". This operation generate a `vehicle-lifecycle-xom.zip` in the `output` directory
164+
- Go to `vehicle-lifecyle-cli` directory
165+
166+
**&lt;FIRST TIME ONLY&gt;**
167+
168+
- The first time you need to perform: `npm install`
169+
170+
**&lt;FIRST TIME ONLY&gt;**
171+
172+
- Enter: `npm run deployXom`
168173

169174
This operation needs to be done each time you modify the XOM of the decision service.
170175

171-
Refer to the README in 'vehicle-lifecycle-cli' directory for more information about this command.
176+
Refer to the README in `vehicle-lifecycle-cli` directory for more information about this command.
172177

173-
# 7/ Deploying the Decision Service
178+
### 7/ Deploying the Decision Service
174179

175180
The Decision Service is the packaging of the vehicle lifecyle business rules exposed as a REST service invoked from the Smart Contracts. It must be deployed in the RES associated to all nodes of the Blockchain network.
176181

177182
Like the XOM, the Decision Service is deployed through the Blockchain, leveraging a deployment feature integrated in the demo.
178183

179-
In the previous step, you should have generated the ruleapp supporting the vehicle lifecycle decision service using Rule Designer. The ruleapp is the 'vehicle_lifecycle_ds.jar' generated in the 'output' directory of the 'vehicle-lifecycle-decision-service' project.
184+
In the previous step, you should have generated the ruleapp supporting the vehicle lifecycle decision service using Rule Designer. The ruleapp is the `vehicle_lifecycle_ds.jar` generated in the `output` directory of the `vehicle-lifecycle-decision-service` project.
180185

181-
- go to 'vehicle-lifecyle-cli' directory
182-
- enter: 'npm run deployRuleapp'
186+
- Go to `vehicle-lifecyle-cli` directory
187+
- Enter: `npm run deployRuleapp`
183188

184189
This operation needs to be done each time you modify the business rules of the application.
185190

186191
When you change the rules, you need to increment the version number of the ruleset. You can do it in Rule Designer:
187-
- Open the 'deployer' file in 'deployment'
188-
- make sure the Ruleset base version (in Decision Operation tab) is set to the right version (1.0 to start, to be incremented when you want to deploy newer version)
192+
- Open the `deployer` file in `deployment`
193+
- Make sure the Ruleset base version (in Decision Operation tab) is set to the right version (1.0 to start, to be incremented when you want to deploy newer version)
189194

190-
Refer to the README in 'vehicle-lifecycle-cli' directory for more information about this command.
195+
Refer to the README in `vehicle-lifecycle-cli` directory for more information about this command.
191196

192-
# 8/ Running the Vehicle Lifecycle demo
197+
### 8/ Running the Vehicle Lifecycle demo
193198

194-
Refer to the README in 'vehicle-lifecycle-cli' directory to initialize the application and run a demo scenario that illustrates the application of the business rules when suspicious transactions are generated.
199+
Refer to the README in `vehicle-lifecycle-cli` directory to initialize the application and run a demo scenario that illustrates the application of the business rules when suspicious transactions are generated.
195200

196201
Assuming the XOM and the Ruleapp have been deployed, you can run the full demo from a fresh model
197-
using the following command from the 'vehicle-lifecycle-cli' directory:
198-
- 'npm run demo'
202+
using the following command from the `vehicle-lifecycle-cli` directory:
203+
- `npm run demo`
204+
205+
The message
206+
207+
│ Cross Border Suspicious Transfer: please double check buyer regulation │
199208

200-
The message "│ Cross Border Suspicious Transfer: please double check buyer regulation │" generated in your
201-
display is generated from the business rules of the decision service invoked from a Smart Contract.
209+
generated in your display is generated from the business rules of the decision service invoked from a Smart Contract.
202210

203-
# 9/ End
211+
### 9/ End
204212

205-
You're all set. Refer to the README in 'vehicle-lifecycle-cli' for more information about the demo scenario.
213+
You're all set. Refer to the README in `vehicle-lifecycle-cli` for more information about the demo scenario.
206214

207-
=======================
208-
# Demo Scenario summary
209-
=======================
215+
# All Steps and Demo Scenario summary
210216

211217
Here is a summary of all steps to run the demo.
212218

213219
1/ Run Fabric 1.0
214-
- go to the fabric-tools directory (created from instructions in https://hyperledger.github.io/composer/installing/development-tools.html)
215-
- ./downloadFabric.sh (1st time only)
216-
- ./startFabric.sh
217-
- ./createComposerProfile.sh (1st time only)
220+
- go to the `fabric-tools` directory (created from instructions in https://hyperledger.github.io/composer/installing/development-tools.html)
221+
- `./downloadFabric.sh` (1st time only)
222+
- `./startFabric.sh`
223+
- `./createComposerProfile.sh` (1st time only)
218224

219225
2/ Run ODM RES
220-
- go to 'odm-runtime'
221-
- 'docker-compose up -d'
226+
- go to `odm-runtime`
227+
- `docker-compose up -d`
222228

223229
3/ Run ODM Deployer
224-
- go to 'odm-deployer'
225-
- 'docker-compose up -d'
230+
- go to `odm-deployer`
231+
- `docker-compose up -d`
226232

227233
4/ Deploy vehicle-lifecycle Business Network
228-
- go to 'vehicle-lifecycle'
229-
- 'npm run deploy'
234+
- go to `vehicle-lifecycle`
235+
- `npm run deploy`
230236

231237
5/ Deploy the XOM via Blockchain (provided the XOM has been generated by Rule Designer before)
232-
- go to 'vehicle-lifecycle-cli'
233-
- the first time you need to run 'npm install' to set-up the client application
234-
- 'npm run deployXom'
238+
- go to `vehicle-lifecycle-cli`
239+
- the first time you need to run `npm install` to set-up the client application
240+
- `npm run deployXom`
235241

236242
6/ Deploy the Ruleapp via Blockchain (provided the Ruleapp has been generated by Rule Designer before)
237-
- 'npm run deployRuleapp'
243+
- `npm run deployRuleapp`
238244

239245
7/ Setup the data of the Business Network
240-
- 'npm run setup ; npm run listVehicles'
246+
- `npm run setup ; npm run listVehicles`
241247

242248
8/ Run the suspicious transactions
243-
- 'npm run transfers'
249+
- `npm run transfers`
244250

245251
Assuming the XOM and the Ruleapp have been deployed, you can run the full demo from a fresh model
246-
using the following command from the 'vehicle-lifecycle-cli' directory: 'npm run demo'
252+
using the following command from the `vehicle-lifecycle-cli` directory: `npm run demo`
247253

248254
# License
249255
[Apache 2.0](LICENSE)

0 commit comments

Comments
 (0)