Skip to content

Commit

Permalink
Change docs to use explicit Composer and Fabric versions in commands (h…
Browse files Browse the repository at this point in the history
…yperledger-archives#4282)

Signed-off-by: Mark S. Lewis <[email protected]>
  • Loading branch information
bestbeforetoday authored Jul 27, 2018
1 parent cb3a259 commit 985691e
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 11 deletions.
6 changes: 6 additions & 0 deletions packages/composer-website/jekylldocs/_data/conrefs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ hlf_full:

hlf_latest:
v1.1

composer_version:
"0.19"

export_fabric_version_command:
export FABRIC_VERSION=hlfv11
1 change: 1 addition & 0 deletions packages/composer-website/jekylldocs/applications/web.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Head to the `fabric-dev-servers` directory and start {{site.data.conrefs.hlf_ful

```bash
cd ~/fabric-dev-servers
{{site.data.conrefs.export_fabric_version_command}}
./startFabric.sh
./createPeerAdminCard.sh
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ Note that you **should not** use `su` or `sudo` for the following npm commands.

1. Essential CLI tools:

npm install -g composer-cli
npm install -g composer-cli@{{site.data.conrefs.composer_version}}

2. Utility for running a REST Server on your machine to expose your business networks as RESTful APIs:

npm install -g composer-rest-server
npm install -g composer-rest-server@{{site.data.conrefs.composer_version}}

3. Useful utility for generating application assets:

npm install -g generator-hyperledger-composer
npm install -g generator-hyperledger-composer@{{site.data.conrefs.composer_version}}

4. Yeoman is a tool for generating applications, which utilises `generator-hyperledger-composer`:

Expand All @@ -50,7 +50,7 @@ If you've already tried {{site.data.conrefs.composer_short}} online, you'll have

5. Browser app for simple editing and testing Business Networks:

npm install -g composer-playground
npm install -g composer-playground@{{site.data.conrefs.composer_version}}

### Step 3: Set up your IDE
Whilst the browser app _can_ be used to work on your Business Network code, most users will prefer to work in an IDE. Our favourite is `VSCode`, because a {{site.data.conrefs.composer_short}} extension is available.
Expand All @@ -72,9 +72,10 @@ This step gives you a local {{site.data.conrefs.hlf_full}} runtime to deploy you
A `zip` is also available if you prefer: just replace the `.tar.gz` file with `fabric-dev-servers.zip` and the `tar -xvf` command with a `unzip` command in the preceding snippet.


9. Use the scripts you just downloaded and extracted to download a local {{site.data.conrefs.hlf_full}} runtime:
9. Use the scripts you just downloaded and extracted to download a local {{site.data.conrefs.hlf_full}} {{site.data.conrefs.hlf_latest}} runtime:

cd ~/fabric-dev-servers
{{site.data.conrefs.export_fabric_version_command}}
./downloadFabric.sh

> Congratulations, you've now installed everything required for the typical Developer Environment.
Expand All @@ -88,6 +89,7 @@ You control your runtime using a set of scripts which you'll find in `~/fabric-d
The first time you start up a new runtime, you'll need to run the start script, then generate a PeerAdmin card:

cd ~/fabric-dev-servers
{{site.data.conrefs.export_fabric_version_command}}
./startFabric.sh
./createPeerAdminCard.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ You control your local {{site.data.conrefs.hlf_full}} runtime using a set of scr

1. Stop the local {{site.data.conrefs.hlf_full}} runtime and remove any runtime Docker containers or images:

{{site.data.conrefs.export_fabric_version_command}}
~/fabric-dev-servers/stopFabric.sh
~/fabric-dev-servers/teardownFabric.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Any running instances of the CLI tools should be stopped before continuing. If y

2. Install the latest version of all of the CLI tools:

npm install -g composer-cli composer-rest-server generator-hyperledger-composer
npm install -g composer-cli@{{site.data.conrefs.composer_version}} composer-rest-server@{{site.data.conrefs.composer_version}} generator-hyperledger-composer@{{site.data.conrefs.composer_version}}

### Step 2: Update Playground

Expand All @@ -40,11 +40,11 @@ If you have installed the browser app "Playground" on your development machine,

2. Install the latest version of the browser app:

npm install -g composer-playground
npm install -g composer-playground@{{site.data.conrefs.composer_version}}

> Congratulations, you have updated your development environment with the latest version of the development tools. You can now continue developing your blockchain applications using the latest features and bug fixes!
## What Next?

- Learn how to use the web app UI with the [Playground Tutorial](../tutorials/playground-tutorial.html)
- Learn how to use the CLI and VSCode tools with the [Developer Tutorial](../tutorials/developer-tutorial.html)
- Learn how to use the CLI and VSCode tools with the [Developer Tutorial](../tutorials/developer-tutorial.html)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The {{site.data.conrefs.composer_full}} REST server can be installed either usin

To install with npm, run the following command:

npm install -g composer-rest-server
npm install -g composer-rest-server@{{site.data.conrefs.composer_version}}

To install the REST server using Docker see [deploying the REST server](./deploying-the-rest-server.html).

Expand Down
2 changes: 1 addition & 1 deletion packages/composer-website/jekylldocs/reference/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ administrative, operational, and development tasks.

The {{site.data.conrefs.composer_full}} command line application can be installed using npm:

`npm install -g composer-cli`
`npm install -g composer-cli@{{site.data.conrefs.composer_version}}`

*Please note: When using Ubuntu this command will fail when running in a root user shell.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ An alternative stand-alone command is available for situations where the `compos
This would normally be installed as a global module

```
npm install -g composer-report
npm install -g composer-report@{{site.data.conrefs.composer_version}}
```

Once installed, running `composer-report` will create a report archive in the current directory in the same way as the full `composer report` command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Let's get started!
If you have previously installed the Composer development environment, you will need to first tear down the {{site.data.conrefs.hlf_full}} containers provided by the development environment:

cd ~/fabric-dev-servers
{{site.data.conrefs.export_fabric_version_command}}
./stopFabric.sh
./teardownFabric.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The tutorial will assume that you use the simple {{site.data.conrefs.hlf_full}}
1. Start a clean {{site.data.conrefs.hlf_full}} by running the following commands:

cd ~/fabric-dev-servers
{{site.data.conrefs.export_fabric_version_command}}
./stopFabric.sh
./teardownFabric.sh
./downloadFabric.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ The tutorial will assume that you use the simple {{site.data.conrefs.hlf_full}}
1. Start a clean {{site.data.conrefs.hlf_full}} by running the following commands:

cd ~/fabric-dev-servers
{{site.data.conrefs.export_fabric_version_command}}
./stopFabric.sh
./teardownFabric.sh
./downloadFabric.sh
Expand Down

0 comments on commit 985691e

Please sign in to comment.