Skip to content

Commit

Permalink
extend validation guide (hyperledger-archives#1931)
Browse files Browse the repository at this point in the history
  • Loading branch information
nklincoln authored and Simon Stone committed Aug 22, 2017
1 parent 143f7b7 commit aec7c2c
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 19 deletions.
71 changes: 71 additions & 0 deletions contrib-notes/release-process/cli-validation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# CLI Verification
The CLI should be verified against the following platforms:
- Ubuntu 14:04 & Ubuntu 16:04
- MacOS 10

A fresh virtualised image should be used where possible, to ensure that the process will be as that of a new user with a fresh machine. This does however preclude this process from detecting issues where a user already has some components (dependancies etc) pre-installed and may cause a conflict with script files provided.

## CLI Testing

On a fresh VM it is necessary to install the current unstable cli package, stand up a fabric (local), then deploy and interact with a BNA on that fabric.

Obtain the unstable cli package:
```bash
$ npm install -g composer-cli@unstable
```

Stand up a local fabric:
```
# Execute the following 4 steps, to stand up a runtime Fabric
$ mkdir fabric-tools && cd fabric-tools
$ curl -O https://raw.githubusercontent.com/hyperledger/composer-tools/master/packages/fabric-dev-servers/fabric-dev-servers.zip
$./startFabric.sh # will remove containers that exist previously including dev-* containers
$./createComposerProfile.sh
```

Obtain two BNA files from the [Composer Playground on Bluemix](http://composer-playground-unstable.mybluemix.net/). Import a sample and the export the original sample, and an edited sample that has included a new Asset and Participant. This guide will assume that the basic-sample-network has been exported.

### CLI Commands

1) Build and deploy the original BNA file
- unzip the exported BNA file
- delete the original BNA file
- build a BNA by targetting the folder that was created on unzip ``` composer archive create -t dir -a v1_bna -n basic-sample-network_V1 ```
- deploy the new BNA ``` composer network deploy -a v1_bna -i PeerAdmin -s mySecret -p hlfv1 ```

2) Check the network
- ping: ``` composer network ping -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list assets ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s silent -r org.acme.sample.SampleAsset ```

3) Update with the edited BNA
- update ``` composer network update -i PeerAdmin -s silent -p hlfv1 -a v2_bna ```
- ping ``` composer network ping -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- check that the new items are listed

4) Create and check participants
- create first ``` composer participant add -n basic-sample-network -p hlfv1 -i PeerAdmin -s secret -d '{"$class":"org.acme.sample.SampleParticipant","participantId":"bob","firstName":"bob","lastName":"bobbington"}' ```
- create second ``` composer participant add -n basic-sample-network -p hlfv1 -i PeerAdmin -s secret -d '{"$class": "org.acme.sample.SampleParticipant","participantId": "participantId:111","firstName": "sally","lastName": "sallyington"}' ```
- check ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s silent ```

5) Submit a transaction
- formulate a valid transaction, eg ``` {"$class": "org.acme.sample.SampleAsset","assetId": "newAsset","owner": "resource:org.acme.sample.SampleParticipant#bob","value": "101"} ``` for basic-sample-network asset creation
- run it ``` composer transaction submit -p hlfv1 -n basic-sample-network -i admin -s admin pw -d '{the transaction}' ```
- formulate an interaction transaction eg ``` {"$class": "org.acme.sample.SampleTransaction","asset": "resource:org.acme.sample.SampleAsset#newAsset","newValue": "1300"} ```
- run it ``` composer transaction submit -p hlfv1 -n basic-sample-network -i admin -s admin pw -d '{the transaction}' ```
- list all ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s mySecret ```
- list assets ``` composer network list -n basic-sample-network -p hlfv1 -i PeerAdmin -s silent -r org.acme.sample.SampleAsset ```

6) Work with IDs
- list current IDs ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ```
- issue to bob ``` composer identity issue -p hlfv1 -n basic-sample-network -i admin -u newUser1 -x false -s adminpw -a org.acme.sample.SampleParticipant#bob ```
- record the output userid and secret for later.
- list current IDs again ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status)
- connect to the business network using the above userId and secret ``` composer network list -n basic-sample-network -p hlfv1 -i newUser1 -s myProvidedSecret ```
- list current IDs again ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status changes)
- Obtain the long uuid for newUser1
- revoke the id ``` composer identity revoke -p hlfv1 -n basic-sample-network -i admin -s adsf -u theLongUUID ```
- list current IDs again ``` composer identity list -i PeerAdmin -n basic-sample-network -p hlfv1 -s secret ``` (looking for ID status changes)


6 changes: 0 additions & 6 deletions contrib-notes/release-process/guide-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,15 @@ We provide script assistance and tutorials for users to follow. It is essential
## Tutorials

Follow the 'Getting Started' processes:
- [Hosted Playground](https://hyperledger.github.io/composer/installing/getting-started-with-playground.html)
- [Local Playground](https://hyperledger.github.io/composer/installing/using-playground-locally.html)
- [Dev Tools](https://hyperledger.github.io/composer/installing/development-tools.html)

Follow the provided tutorials:
- [Playground](https://hyperledger.github.io/composer/tutorials/playground-guide.html)
- [Developer](https://hyperledger.github.io/composer/tutorials/developer-guide.html)

Follow the extended tutorials:
- [Subscribe to events](https://hyperledger.github.io/composer/applications/subscribing-to-events.html)
- [Deploy REST Server](https://hyperledger.github.io/composer/integrating/deploying-the-rest-server.html)
- [Call out to REST](https://hyperledger.github.io/composer/integrating/call-out.html)

### Documentation
Run a link checker against the unstable documentation to check for any broken links.

Following through the documentation tutorials should have been a smooth process, with NO road blockers or work arounds - which includes the need to know any specialist (in depth) knowledge, knowing that a password has changed, knowing that a small edit to a script file is required etc.

Expand Down
5 changes: 2 additions & 3 deletions contrib-notes/release-process/playground-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ Start with the basic sample network loaded
- Import/replace button should bring up the Import/replace modal
- Should have access to all samples
- All samples should import
- Add file button should bring up add file modal
- Should be able to add query file from disk

- Should be able to add a file via drag-drop

### Define Page (File-Editor)
This page is the main file editor page, where it is possible to edit resources. We need to ensure that the linking between the side navigation menu and the file editor is consistent, that validation errors report correctly for each file type and that file specific edit options are enabled.

Expand Down
29 changes: 20 additions & 9 deletions contrib-notes/release-process/runtime-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,14 @@ The runtime should be verified against the following platforms:

A fresh virtualised image should be used where possible, to ensure that the process will be as that of a new user with a fresh machine. This does however preclude this process from detecting issues where a user already has some components (dependancies etc) pre-installed and may cause a conflict with script files provided.

## CLI
## Sample Applications (digital property app)
Cmd line Installation Verification (Mac OS X and Ubuntu). These test should be run following the instructions in the web pages.
_These should be run using the unstable releases of the code to validate what is going to be released is good_

This short output shows how to install and update the package.json of the getting started application to use the unstable versions and uses the Digital Property sample application as an indicative test of _unstable_. You

```bash
$ npm install -g composer-cli@unstable
<output redacted>
$ composer --version
composer-cli v0.10.0-20170720064757
composer-admin v0.10.0-20170720064757
composer-client v0.10.0-20170720064757
composer-common v0.10.0-20170720064757
composer-runtime-hlf v0.10.0-20170720064757
composer-connector-hlf v0.10.0-20170720064757

# Execute the following 4 steps, to stand up a runtime Fabric
$ mkdir fabric-tools && cd fabric-tools
Expand All @@ -40,6 +32,25 @@ $ docker ps -a # check the container version after the business network name eg
$ npm test # check the assets are bootstrapped / updated.
```

## Sample Applications (vehicle lifecycle)
The composer-sample-applications repository also contains the vehicle-lifecyle demo. This should be run on a clean VM using the one line install.
- packages/vehicle-lifecyle contains the Readme to follow to perform the install.

## Sample Networks
Following from testing of the digital-property-app, a similar operation should be performed targetting the composer-sample-networks repository.

```
$ git clone https://github.com/hyperledger/composer-sample-networks.git
```

Move through each of the sample networks in sequence, updating their composer package dependancies to point to the unstable version and then run the npm test.
```
$ cd composer-sample-networks/packages/myTestPackageItem
$ sed -i.ORIG 's/\("composer-.*".*\):.*"/\1:"unstable"/g' package.json
$ npm install --tag=unstable
$npm test
```

## New Feature Testing

All new features added for the release, which will be named in the release notes outline, should be proven on the unstable build. At this point some exploratory testing needs to be investigated, in an attempt to break the delivered feature and/or knowingly drive it towards a state where features could be working from invalid information.
Expand Down
8 changes: 7 additions & 1 deletion contrib-notes/release-process/weekly-qa-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ We wish to validate three core aspects:
- [User guides](./guide-validation.md)
- [Runtime](./runtime-validation.md)
- [Playground](./playground-validation.md)
- [CLI](./cli-validation.md)

Each link above will provide a guide for validation purposes. It should be possible to follow the guides without reaching an error case. Upon completion of the above valiadtion guides, and in the presence of a clean build, we can progress to the release phase.

## The Release

Once validation has passed, and the consensus is to cut a release, the [release process](./release-process.md) may be followed.
Once validation has passed, and the consensus is to cut a release, the [release process](./release-process.md) may be followed.

If a major version bump is being performed, it will be necessary to update:
- composer-sample-applications
- composer-sample-networks
For the runtime level change, and cut a release of the items listed above.

0 comments on commit aec7c2c

Please sign in to comment.