Skip to content

Commit

Permalink
Docs and test docs changes, fixes, v1 changes in examples (hyperledge…
Browse files Browse the repository at this point in the history
…r-archives#1664)

* Change to use digitalproperty and change sequence of things

* Updated to emphasise non-privileged user for install

Added before prereqs-ubuntu,sh description - as this should also be run as 'non-privileged'

* Updated to show v1 defaults and example

* Added issuer authority prerequisite info ; add biz connect sample code (replacing TODO)
  • Loading branch information
Paul O'M authored and dselman committed Jul 26, 2017
1 parent 63cacf1 commit dbb4090
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 21 deletions.
30 changes: 19 additions & 11 deletions contrib-notes/release-process/runtime-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,34 @@ A fresh virtualised image should be used where possible, to ensure that the proc
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. It replaces the procedure outlined in https://hyperledger.github.io/composer/installing/quickstart.html
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.5.2-20170313111819
composer-admin v0.5.2-20170313111819
composer-client v0.5.2-20170313111819
composer-common v0.5.2-20170313111819
composer-runtime-hlf v0.5.2-20170313111819
composer-connector-hlf v0.5.2-20170313111819

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
$ 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
$ cd # ie $HOME
#
$ git clone https://github.com/hyperledger/composer-sample-applications.git
<output redacted>
$ cd composer-sample-applications/packages/getting-started
$ cd composer-sample-applications/packages/digitalproperty-app
$ sed -i.ORIG 's/\("composer-.*".*\):.*"/\1:"unstable"/g' package.json
$ npm install --tag=unstable
$ npm test

$ npm run deployNetwork # will/should install a docker container suffixed with this 'unstable' composer release
$ docker ps -a # check the container version after the business network name eg digitalproperty-network
$ npm test # check the assets are bootstrapped / updated.
```

## New Feature Testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Python: 2.7.x
A code editor of your choice, we recommend VSCode.
```

**Please do not install Composer as a superuser, use 'sudo' or the 'root' user if on Linux (doing will can cause issues with the install). Composer should be installed as non-priviledged user**

If you're running on Ubuntu, you can download the prerequisites using the following commands:

```bash
Expand All @@ -37,7 +39,7 @@ curl -O https://hyperledger.github.io/composer/prereqs-ubuntu.sh
chmod u+x prereqs-ubuntu.sh
```

Next run the script - as this uses sudo you will be prompted for your password.
Next run the script - as this briefly uses sudo during its execution, you will be prompted for your password.

```
./prereqs-ubuntu.sh
Expand All @@ -46,7 +48,7 @@ Next run the script - as this uses sudo you will be prompted for your password.

## Step 1: Installing {{site.data.conrefs.composer_full}} development tools

The development tools you'll need can all be installed with `npm install -g`.
The development tools you'll need can all be installed (as a non-privileged user eg non-root) with `npm install -g`.

1. To install `composer-cli` run the following command:

Expand Down Expand Up @@ -104,11 +106,11 @@ docker rmi $(docker images dev-* -q)

tar xvzf fabric-dev-servers.tar.gz

2. Choose which version of Fabric to use. For v0.6 this needs to be set explicitly as follows.
2. Choose which version of Fabric to use. {{site.data.conrefs.hlf_full}} v1.0 is highly recommended and the default. If for some reason v0.6 needs to be installed, you can set it explicitly as follows:

export FABRIC_VERSION=hlfv0.6

{{site.data.conrefs.hlf_full}} v1.0 is the default, but to 'unset' the v0.6, or to be explicit in using v1 use this command
{{site.data.conrefs.hlf_full}} To 'unset' a v0.6 export, or to be explicit in using v1 Fabric, use this command

export FABRIC_VERSION=hlfv1

Expand Down
14 changes: 11 additions & 3 deletions packages/composer-website/jekylldocs/managing/identity-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ certificate.
## Before you start

Before you follow these steps, you must have added a participant to a participant
registry.
registry. The **issuer** of a new identity (whether using command line or using the Javascript APIs below) must itself have 'issuer' authority and as appropriate, ACLs that permit him/her issue the identity (to be associated with the participant) in Composer.

The procedure below shows an example using the following model of a participant
from the Getting Started walkthrough.
Expand All @@ -40,11 +40,19 @@ of that participant has been created and placed into a participant registry.

## Procedure

1. Issue an identity to the participant
1. Connect and Issue an identity to the participant
* JavaScript API



```javascript
let businessNetworkConnection = /* TODO: get a business network connection */
/* replace with your connection info */
this.businessNetworkConnection = new BusinessNetworkConnection();
this.businessNetworkConnection.connect('hlfv1', 'net.biz.digitalPropertyNetwork', participantId, participantPwd)
.then((result) => {
this.businessNetworkDefinition = result;
});

businessNetworkConnection.issueIdentity('net.biz.digitalPropertyNetwork.Person#[email protected]', 'maeid1')
.then((result) => {
console.log(`userID = ${result.userID}`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Note that ping also returns the participant information for the identity that wa
an identity has been issued for the participant.

```
composer network ping -n <business-network-id> -i <enrollment-id> -s <enrollment-secret>
composer network ping -n <business-network-name> -p <connection-profile-name> -i <enrollment-id> -s <enrollment-secret>
```

### Options
Expand All @@ -31,9 +31,9 @@ composer network ping -n <business-network-id> -i <enrollment-id> -s <enrollment
## Example Output

```
composer network ping -n digitalproperty-network -i WebAppAdmin -s DJY27pEnl16d
composer network ping -n digitalproperty-network -p hlfv1 -i admin -s adminpw
The connection to the network was successfully tested:
version = 0.4.1
version = 0.10.0
participant = <no participant found>
Command completed successfully.
```

0 comments on commit dbb4090

Please sign in to comment.