Skip to content

Commit 684233d

Browse files
author
Jason Yellick
committed
[FAB-8182] Remove old configtxgen doc
The new command doc layout makes the old configtxgen document superfluous. However, there was still some content in the old doc that was useful to preserve, and has not been moved to the command doc. This CR also updates the referenced profiles to be the more recent V1_1 capability profiles, as was suggested in a review of the doc, but deferred for a later CR. Change-Id: I77a9e8e56c8fbf19e27b040279a4b74150f17ffb Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent 3d78ddf commit 684233d

File tree

3 files changed

+44
-339
lines changed

3 files changed

+44
-339
lines changed

docs/source/commands/configtxgen.md

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ Usage of configtxgen:
4141
### Output a genesis block
4242

4343
Write a genesis block to `genesis_block.pb` for channel `orderer-system-channel`
44-
for profile `SampleSingleMSPSolo`.
44+
for profile `SampleSingleMSPSoloV1_1`.
4545

4646
```
47-
configtxgen -outputBlock genesis_block.pb -profile SampleSingleMSPSolo -channelID orderer-system-channel
47+
configtxgen -outputBlock genesis_block.pb -profile SampleSingleMSPSoloV1_1 -channelID orderer-system-channel
4848
```
4949

5050
### Output a channel creation tx
5151

5252
Write a channel creation transaction to `create_chan_tx.pb` for profile
53-
`SampleSingleMSPChannel`.
53+
`SampleSingleMSPChannelV1_1`.
5454

5555
```
56-
configtxgen -outputCreateChannelTx create_chan_tx.pb -profile SampleSingleMSPChannel -channelID application-channel-1
56+
configtxgen -outputCreateChannelTx create_chan_tx.pb -profile SampleSingleMSPChannelV1_1 -channelID application-channel-1
5757
```
5858

5959
### Inspect a genesis block
@@ -87,9 +87,40 @@ configtxgen -printOrg Org1
8787
### Output anchor peer tx
8888

8989
Output a configuration update transaction to `anchor_peer_tx.pb` which sets the
90-
anchor peers for organization Org1 as defined in profile SampleSingleMSPChannel
91-
based on `configtx.yaml`.
90+
anchor peers for organization Org1 as defined in profile
91+
SampleSingleMSPChannelV1_1 based on `configtx.yaml`.
9292

9393
```
94-
configtxgen -outputAnchorPeersUpdate anchor_peer_tx.pb -profile SampleSingleMSPChannel -asOrg Org1
94+
configtxgen -outputAnchorPeersUpdate anchor_peer_tx.pb -profile SampleSingleMSPChannelV1_1 -asOrg Org1
9595
```
96+
97+
## Configuration
98+
99+
The `configtxgen` tool's output is largely controlled by the content of
100+
`configtx.yaml`. This file is searched for at `FABRIC_CFG_PATH` and must be
101+
present for `configtxgen` to operate.
102+
103+
This configuration file may be edited, or, individual properties may be
104+
overridden by setting environment variables, such as
105+
`CONFIGTX_ORDERER_ORDERERTYPE=kafka`.
106+
107+
For many `configtxgen` operations, a profile name must be supplied. Profiles
108+
are a way to express multiple similar configurations in a single file. For
109+
instance, one profile might define a channel with 3 orgs, and another might
110+
define one with 4 orgs. To accomplish this without the length of the file
111+
becoming burdensome, `configtx.yaml` depends on the standard YAML feature of
112+
anchors and references. Base parts of the configuration are tagged with an
113+
anchor like `&OrdererDefaults` and then merged into a profile with a reference
114+
like `<<: *OrdererDefaults`. Note, when `configtxgen` is operating under a
115+
profile, environment variable overrides do not need to include the profile
116+
prefix and may be referenced relative to the root element of the profile. For
117+
instance, do not specify
118+
`CONFIGTX_PROFILE_SAMPLEINSECURESOLO_ORDERER_ORDERERTYPE`,
119+
instead simply omit the profile specifics and use the `CONFIGTX` prefix
120+
followed by the elements relative to the profile name such as
121+
`CONFIGTX_ORDERER_ORDERERTYPE`.
122+
123+
Refer to the sample `configtx.yaml` shipped with Fabric for all possible
124+
configuration options. You may find this file in the `config` directory of
125+
the release artifacts tar, or you may find it under the `sampleconfig` folder
126+
if you are building from source.

docs/source/configtxgen.rst

Lines changed: 0 additions & 331 deletions
This file was deleted.

0 commit comments

Comments
 (0)