Skip to content

Commit

Permalink
rename blockchain creds as connection profile
Browse files Browse the repository at this point in the history
  • Loading branch information
dshuffma-ibm committed Mar 27, 2018
1 parent a716e1f commit 9dd0549
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ certificate.pem
chaincode.exe
app_state*
/utils/fc_wrangler/kvs
/config/blockchain_creds_dev.json
/config/connection_profile_dev.json
/config/marbles_dev.json
/config/crypto/hsbn
/config/blockchain_creds_dev2.json
/config/connection_profile_dev2.json
/config/marbles_dev2.json
/config/temp.json
2 changes: 1 addition & 1 deletion README-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ gRPC 协议的细节由一个名为 [Hyperledger Fabric Client](https://www.npmj

# SDK 深入剖析
现在让我们看看如何连接到 Fabric Client SDK。
大部分配置选项都可以在 `/config/blockchain_creds_tls.json` 中找到。
大部分配置选项都可以在 `/config/connection_profile_tls.json` 中找到。
此文件列出了我们的区块链网络中的各种组件的主机名(或 IP)和端口。
`helper` 函数将从该配置文件中检索 IP 和端口。

Expand Down
4 changes: 2 additions & 2 deletions README-pt.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Existem diversas versões do Marbles. Uma ramificação do Marbles para cada gra
- Funciona com Hyperledger Fabric `v0.6.1-preview`
- Funciona com IBM Blockchain Bluemix Service
- Plano **Iniciante** ou **HSBN**
- [Marbles - Ramificação v1.0](https://github.com/ibm-blockchain/marbles/tree/v1.0) **(Descontinuada)**
- [Marbles - Ramificação v1.0](https://github.com/ibm-blockchain/marbles/tree/v1.0) **(Descontinuada)**
- Funciona com Hyperledger Fabric `v0.5-developer-preview`
- Não recebe mais suporte do IBM Blockchain Bluemix Service ***

Expand Down Expand Up @@ -157,7 +157,7 @@ Vamos dar uma olhada nas operações envolvidas na criação de uma nova bola de
1. Neste momento, a nova bola de gude existe em nosso ledger e, em breve, deverá existir nos ledgers de todos os pares.

# Detalhes do SDK
Agora, vamos ver como é a interface com o Fabric Client SDK. A maioria das opções de configuração está disponível em `/config/blockchain_creds_tls.json`. Esse arquivo mostra o nome do host (ou IP) e a porta de vários componentes da rede de blockchain. As funções `helper` recuperarão IPs e portas do arquivo de configuração.
Agora, vamos ver como é a interface com o Fabric Client SDK. A maioria das opções de configuração está disponível em `/config/connection_profile_tls.json`. Esse arquivo mostra o nome do host (ou IP) e a porta de vários componentes da rede de blockchain. As funções `helper` recuperarão IPs e portas do arquivo de configuração.
### Configure o SDK:

A primeira ação é inscrever o administrador. Observe o fragmento de código a seguir na inscrição. Há comentários/instruções abaixo do código.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Let’s look at the operations involved when creating a new marble.
# SDK Deeper Dive
Now lets see how we interface with the Fabric Client SDK.
Almost all of the configuration options can be found in our "connection profile" (aka cp).
Your connection profile might be coming from a file such as`/config/blockchain_creds_tls.json`, or it might be from an environmental variable.
Your connection profile might be coming from a file such as`/config/connection_profile_tls.json`, or it might be from an environmental variable.
If you are unsure which, check the logs when marbles starts.
You will either see `Loaded connection profile from an environmental variable` or `Loaded connection profile file <some name here>`.
The cp is JSON and it has the hostname (or ip) and port of various components of our blockchain network.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 3 additions & 4 deletions config/crypto/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Drop your keys/certs in this folder.
# Drop your admin keys/certs in this folder.
This is used for install and instantiate.

## Private Key:
- name the file `privateKey.pem`
- Contents should include `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----`

## Certificate:
- name the file `signedCert.pem`
## Certificate:
- Contents should include `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----`
4 changes: 2 additions & 2 deletions config/marbles_cs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cred_filename": "blockchain_cs.json",
"cred_filename": "connection_profile_cs.json",
"use_events": true,
"keep_alive_secs": 120,
"company": "United Marbles",
Expand All @@ -9,4 +9,4 @@
"ava"
],
"port": 32001
}
}
4 changes: 2 additions & 2 deletions config/marbles_local.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cred_filename": "blockchain_creds_local.json",
"cred_filename": "connection_profile_local.json",
"use_events": true,
"keep_alive_secs": 120,
"company": "United Marbles",
Expand All @@ -9,4 +9,4 @@
"ava"
],
"port": 3001
}
}
2 changes: 1 addition & 1 deletion config/marbles_tls.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cred_filename": "blockchain_creds_tls.json",
"cred_filename": "connection_profile_tls.json",
"use_events": true,
"keep_alive_secs": 120,
"company": "United Marbles",
Expand Down
12 changes: 6 additions & 6 deletions docs/config_file.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ If you are using the files you will likely need to edit them from their default

```json
{
"cred_filename": "blockchain_creds_tls.json",
"cred_filename": "connection_profile_tls.json",
"use_events": true,
"keep_alive_secs": 120,
"company": "United Marbles",
Expand Down Expand Up @@ -53,7 +53,7 @@ There is already an example file in the config folder you can use.
### 2. The Connection Profile:

- This data contains the settings for your blockchain network such as IPs, port numbers, and certificates.
- The file version can be found in `<marbles>/config/blockchain_creds_tls.json`.
- The file version can be found in `<marbles>/config/connection_profile_tls.json`.
- If you are using the env version you must set this yourself.
- `> export CONNECTION_PROFILE="{JSON GOES IN HERE}"`
- Tip: Use separate files for separate blockchain networks.
Expand All @@ -73,7 +73,7 @@ You should have already downloaded this file from the service during the [instal
"client": {
"organization": "Org1MSP",
"credentialStore": {
"path": "./crypto/prebaked"
"path": "./crypto/example"
}
},
"channels": {
Expand Down Expand Up @@ -105,10 +105,10 @@ You should have already downloaded this file from the service during the [instal
"fabric-ca"
],
"adminPrivateKey": {
"path": "./crypto/prebaked/cd96d5260ad4757551ed4a5a991e62130f8008a0bf996e4e4b84cd097a747fec-priv"
"path": "./crypto/example/private.pem"
},
"signedCert": {
"path": "./crypto/prebaked/PeerAdminCert.pem"
"path": "./crypto/example/cert.pem",
}
}
},
Expand Down Expand Up @@ -175,6 +175,6 @@ You should have already downloaded this file from the service during the [instal
- `enrollSecret` - A registered user's secret on the CA. Can be found in the CA's yaml file.
- `caName` - The CA to use to authenticate the enroll ID.

Once you have edited `blockchain_creds_tls.json` you are ready to install/instantiate Marbles.
Once you have edited `connection_profile_tls.json` you are ready to install/instantiate Marbles.

1. Continue where you left off in the [tutorial](../README.md#installchaincode).
13 changes: 6 additions & 7 deletions docs/install_chaincode.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Install and Instantiate Chaincode w/Bluemix

1. If you are not currently on the Blockchain "Resources" page... then get there via:
1. Login to [Bluemix](https://console.ng.bluemix.net)
1. Login to [Bluemix](https://console.ng.bluemix.net)
1. Get to your dashboard by clicking the "Menu" icon on the top left and then clicking the "Dashboard" link
1. Under "All Services" locate your the Blockchain row and click it
1. Enter your IBM Blockchain Service's dashboard by clicking the "Enter" button
Expand Down Expand Up @@ -31,8 +31,8 @@

- The arguments input box is for entering the arguments we want to pass to our chaincode's Init() function.
- Typically, this is an array of strings. As you type you can see exactly what will be sent in the lower input named "Chaincode Arguments".
- Marbles chaincode is expecting a single numeric input argument. Therefore, enter your favorite number. Mines 314.
- Marbles chaincode will store this number to the ledger as a self-test of sorts. It can literally be any number you want.
- Marbles chaincode is expecting a single numeric input argument. Therefore, enter your favorite number. Mines 314.
- Marbles chaincode will store this number to the ledger as a self-test of sorts. It can literally be any number you want.
- Next from the "Channel" drop down, select our 1 and only channel
- Then click the "Submit" button
- If it went well the chaincode page will refresh
Expand All @@ -58,13 +58,12 @@

- The last thing we need to do is grab all the service instance's credentials for our network. We will use this data to inform the marbles node.js application of our blockchain's networking addresses and credentials.
- Get the service credentials by clicking the "JSON" button under the "App Integration" column (you may need to expand the chaincode row first)
- **Important:** This will open the JSON in your browser. Copy this data and save/replace the entire contents of the file `<marbles directory>/config/blockchain_creds_tls.json`
- This JSON contains all the details needed to connect to your network.
- **Important:** This will open the JSON in your browser. Copy this data and save/replace the entire contents of the file `<marbles directory>/config/connection_profile_tls.json`
- This JSON contains all the details needed to connect to your network.
- Marbles will read this file to connect and transact on your network on this channel.

### Finish Up

Congrats! The network is all setup and marbles chaincode is running.
Congrats! The network is all setup and marbles chaincode is running.

- Continue where you left off in the [tutorial](../README.md#hostmarbles).

0 comments on commit 9dd0549

Please sign in to comment.