From 42ca84b78b9bb9fa29ea8008a7e53a7b01420591 Mon Sep 17 00:00:00 2001 From: rameshthoomu Date: Wed, 28 Sep 2016 10:26:54 -0400 Subject: [PATCH] FAB-506 broken links fixes and added new targets fixed broken links and added new targets (Releases, Fabric Starter kit & SystemChaincode) in mkdocs.yml. Also fixed some formatting errors in fabric-starter-kit.md Change-Id: Ia5736bd258ef3bd2e1bb6575af605da35f62ea0a Signed-off-by: rameshthoomu --- docs/API/CoreAPI.md | 39 ++++++++++++++++------------ docs/index.md | 14 +++++----- docs/starter/fabric-starter-kit.md | 41 +++++++++++++++--------------- mkdocs.yml | 10 +++++--- 4 files changed, 57 insertions(+), 47 deletions(-) diff --git a/docs/API/CoreAPI.md b/docs/API/CoreAPI.md index 200ae9f628e..ab6eb9d8ae7 100644 --- a/docs/API/CoreAPI.md +++ b/docs/API/CoreAPI.md @@ -7,9 +7,9 @@ This document covers the available APIs for interacting with a peer node. Three 1. [CLI](#cli) 2. [REST API](#rest-api) 3. [Node.js Application](#nodejs-application) - * [Using Swagger JS Plugin](#using-swagger-js-plugin) - * [Marbles Demo Application](#marbles-demo-application) - * [Commercial Paper Demo Application](#commercial-paper-demo-application) + * [Using Swagger JS Plugin](#using-swagger-js-plugin) + * [Marbles Demo Application](#marbles-demo-application) + * [Commercial Paper Demo Application](#commercial-paper-demo-application) **Note:** If you are working with APIs with security enabled, please review the [security setup instructions](https://github.com/hyperledger/fabric/blob/master/docs/Setup/Chaincode-setup.md#security-setup-optional) before proceeding. @@ -68,21 +68,28 @@ Command | **stdout** result in the event of success Deploy creates the docker image for the chaincode and subsequently deploys the package to the validating peer. An example is below. -`peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'` - +``` +peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}' +``` Or: -`peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args": ["init", "a","100", "b", "200"]}'` +``` +peer chaincode deploy -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args": ["init", "a","100", "b", "200"]}' +``` The response to the chaincode deploy command will contain the chaincode identifier (hash) which will be required on subsequent `chaincode invoke` and `chaincode query` commands in order to identify the deployed chaincode. With security enabled, modify the command to include the -u parameter passing the username of a logged in user as follows: -`peer chaincode deploy -u jim -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}'` +``` +peer chaincode deploy -u jim -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Function":"init", "Args": ["a","100", "b", "200"]}' +``` Or: -`peer chaincode deploy -u jim -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args": ["init", "a","100", "b", "200"]}'` +``` +peer chaincode deploy -u jim -p github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02 -c '{"Args": ["init", "a","100", "b", "200"]}' +``` **Note:** If your GOPATH environment variable contains more than one element, the chaincode must be found in the first one or deployment will fail. @@ -165,19 +172,19 @@ You can work with the REST API through any tool of your choice. For example, the To learn about the REST API through Swagger, please take a look at the Swagger document [here](https://github.com/hyperledger/fabric/blob/master/core/rest/rest_api.json). You can upload the service description file to the Swagger service directly or, if you prefer, you can set up Swagger locally by following the instructions [here](#to-set-up-swagger-ui). * [Block](#block) - * GET /chain/blocks/{Block} + * GET /chain/blocks/{Block} * [Blockchain](#blockchain) - * GET /chain + * GET /chain * [Chaincode](#chaincode) * POST /chaincode * [Network](#network) - * GET /network/peers + * GET /network/peers * [Registrar](#registrar) - * POST /registrar - * DELETE /registrar/{enrollmentID} - * GET /registrar/{enrollmentID} - * GET /registrar/{enrollmentID}/ecert - * GET /registrar/{enrollmentID}/tcert + * POST /registrar + * DELETE /registrar/{enrollmentID} + * GET /registrar/{enrollmentID} + * GET /registrar/{enrollmentID}/ecert + * GET /registrar/{enrollmentID}/tcert * [Transactions](#transactions) * GET /transactions/{UUID} diff --git a/docs/index.md b/docs/index.md index b67bf2b8f1b..d9f5b96041f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -27,7 +27,7 @@ v0.6-preview. If you'd like to dive right in and get an operational experience on your local server or laptop to begin development, we have just the thing for you. We have -created a standalone Docker-based [starter kit](Starter/fabric-starter-kit.md) +created a standalone Docker-based [starter kit](starter/fabric-starter-kit.md) that leverages the latest published Docker images that you can run on your laptop and be up and running in no time. That should get you going with a sample application and some simple chaincode. From there, you can go deeper @@ -122,14 +122,14 @@ testing Chaincode. relating to Chaincode. ## Application developer guide - +``` - [APIs - CLI, REST, and Node.js](API/CoreAPI.md) - [CLI](API/CoreAPI.md#cli): working with the command-line interface. - [REST](API/CoreAPI.md#rest-api): working with the REST API (*deprecated*). - [Node.js SDK](nodeSDK/node-sdk-guide.md): working with the Node.js SDK. - +``` ## Fabric developer guide - +``` - [Making code contributions](CONTRIBUTING.md): First, you'll want to familiarize yourself with the project's contribution guidelines. - [Setting up the development environment](dev-setup/devenv.md): after that, you @@ -145,16 +145,16 @@ relating to Chaincode. - [License header](dev-setup/headers.txt): every source file must include this license header modified to include a copyright statement for the principle author(s). - +``` # Operations guide - +``` - [Setting Up a Network](Setup/Network-setup.md): instructions for setting up a network of fabric peers. - [Certificate Authority (CA) Setup](Setup/ca-setup.md): setting up a CA to support identity, security (authentication/authorization), privacy and confidentiality. - [Application ACL](tech/application-ACL.md): working with access control lists. - +``` # License The Hyperledger Project uses the [Apache License Version 2.0](LICENSE) software license. diff --git a/docs/starter/fabric-starter-kit.md b/docs/starter/fabric-starter-kit.md index 3ddce81b0d6..94d0d912ff1 100755 --- a/docs/starter/fabric-starter-kit.md +++ b/docs/starter/fabric-starter-kit.md @@ -9,7 +9,7 @@ the fabric's Node.js SDK, and chaincode written in Go. There are three Docker images that, when run, will provide a basic network environment. There is an image to run a single `peer`, one to run the `membersrvc` and one to run both your Node.js application and the your -chaincode. See [Application Developer's Overview](app-overview.md) on how the +chaincode. See [Application Developer's Overview](../nodeSDK/app-overview.md) on how the components running within the containers will communicate. The starter kit comes with a sample Node.js application ready to execute and @@ -28,9 +28,9 @@ Hyperledger fabric.* We recommend first running in chaincode development mode. ## Further exploration If you wish, there are a number of chaincode examples near by. - - `cd ../../chaincode` - +``` + cd ../../chaincode +``` ## Getting started **Note:** This sample was prepared using Docker for Mac 1.12.0 @@ -63,36 +63,35 @@ is located, execute one of following `docker-compose` commands. * to run as detached containers: - ``` - docker-compose up -d - ``` +``` + docker-compose up -d +``` **note:** to see the logs for the `peer` container use the `docker logs peer` command * to run in the foreground and see the log output in the current terminal session: - ``` - docker-compose up - ``` +``` + docker-compose up +``` Both commands will start three docker containers, to view the container status try `docker ps` command. The first time this is run the Docker images will be downloaded. This may take 10 minutes or more depending on the network connections of the system running the command. - ``` - docker ps - ``` - - You should see something like the following: +``` + docker ps +``` + You should see something like the following: - ``` - CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - bb01a2fa96ef hyperledger/fabric-starter-kit "sh -c 'sleep 20; /op" About a minute ago Up 59 seconds starter - ec7572e65f12 hyperledger/fabric-peer "sh -c 'sleep 10; pee" About a minute ago Up About a minute peer - 118ef6da1709 hyperledger/fabric-membersrvc "membersrvc" About a minute ago Up About a minute membersrvc - ``` +``` + CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES + bb01a2fa96ef hyperledger/fabric-starter-kit "sh -c 'sleep 20; /op" About a minute ago Up 59 seconds starter + ec7572e65f12 hyperledger/fabric-peer "sh -c 'sleep 10; pee" About a minute ago Up About a minute peer + 118ef6da1709 hyperledger/fabric-membersrvc "membersrvc" About a minute ago Up About a minute membersrvc +``` * Start a terminal session in the **starter** container. This is where the Node.js application is located. diff --git a/mkdocs.yml b/mkdocs.yml index 0af47abc745..a9586af14fa 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,6 +11,7 @@ pages: - Glossary: glossary.md - Protocol Spec: protocol-spec.md - Usecases: biz/usecases.md +- System Chaincode: SystemChaincode-noop.md - Installation and setup: - Chaincode or Application Developer Setup: Setup/Chaincode-setup.md @@ -24,7 +25,6 @@ pages: - Chaincode APIs: API/ChaincodeAPI.md - Core API: API/CoreAPI.md - CA API: API/MemberServicesAPI.md - - System Chaincode: SystemChaincodes/noop.md - Fabric Developer: - v1.0 Preview: abstract_v1.md @@ -37,7 +37,7 @@ pages: - Maintainers: MAINTAINERS.md - Reviewing: Gerrit/reviewing.md - Changes: Gerrit/changes.md - - Style guides: +- Style guides: - Golang: Style-guides/go-style.md - FAQ: @@ -57,10 +57,14 @@ pages: - App-Overview: nodeSDK/app-overview.md - Node-SDK-guide: nodeSDK/node-sdk-guide.md - Node-SDK-indepth: nodeSDK/node-sdk-indepth.md - - Node-SDK-self-contained: nodeSDK/node-sdk-self-contained.md - Sample-Standalone-app: nodeSDK/sample-standalone-app.md - Sample-web-app: nodeSDK/sample-web-app.md +- Starter Kit: + - Starter Kit: starter/fabric-starter-kit.md + +- Releases: releases.md + markdown_extensions: - extra - tables