-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a better experience for contributors by including a DevContainer definition that includes all the required pre-requisites. See: - https://containers.dev/ - https://code.visualstudio.com/docs/devcontainers/containers Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
- Loading branch information
1 parent
29e9edb
commit b0d7acf
Showing
5 changed files
with
68 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "Ubuntu", | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"features": { | ||
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, | ||
"ghcr.io/devcontainers/features/go:1": {}, | ||
"ghcr.io/devcontainers/features/node:1": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": ["esbenp.prettier-vscode", "github.vscode-github-actions", "ms-vscode.makefile-tools"] | ||
} | ||
}, | ||
"postStartCommand": ["make", "generate"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,66 @@ | ||
# fabric-admin-sdk | ||
Fabric SDK for Admin Capability services | ||
# Fabric Admin SDK | ||
|
||
## [motivation](https://github.com/hyperledger/fabric-rfcs/pull/55) | ||
As gateway sdk will drop off admin capacity, we plan to recover admin capacity related things with this project proposal. | ||
The fabric-admin-sdk provides administrative APIs for creating and configuring [Hyperledger Fabric](https://hyperledger-fabric.readthedocs.io/) networks, and for deploying smart contracts (chaincode) to those networks. | ||
|
||
## identified [features](https://github.com/Hyperledger-TWGC/fabric-admin-sdk/issues/15) | ||
For information on using the fabric-admin-sdk, please visit the [Go API documentation](https://pkg.go.dev/github.com/hyperledger/fabric-admin-sdk/pkg). The API documentation includes some usage examples. Additionally, the [scenario tests](./test/e2e_test.go) can be used as an example of an end-to-end flow, covering channel creation and smart contract deployment. | ||
|
||
### channel | ||
- new channel | ||
- channel update(new org join into specific channel) | ||
- peer join channel | ||
- peer exit channel | ||
- list channel | ||
- inspect channel config | ||
## Overview | ||
|
||
### chaincode | ||
- chain code lifecycle | ||
- system chain code(as list all chain code) | ||
The current API for client application to transact with Fabric networks (the [Fabric Gateway client API](https://hyperledger.github.io/fabric-gateway/)) does not provide the administrative capabilities of the legcacy client application SDKs. The fabric-admin-sdk aims to provide this programmatic administrative capability for use-cases where the [Fabric CLI commands](https://hyperledger-fabric.readthedocs.io/en/latest/command_ref.html) are not the best fit. A specific objective is to support the development of Kubernetes operators. | ||
|
||
### tools | ||
- gate policy?(common/policydsl/policyparser.go, tool for operator) | ||
- peer discovery(optional, as ping test among peer networks when gateway disabled or fabric version below 2.5) | ||
- base on peer discovery result, generate connection profile for sdk if possible?(optional) | ||
More detailed information on the motivation and objectives of the fabric-admin-sdk can be found in the associated [Fabric Admin SDK RFC](https://hyperledger.github.io/fabric-rfcs/text/0000-admin_sdk.html). | ||
|
||
## languages: go, java, nodejs, typescript | ||
### [golang Documentation](https://pkg.go.dev/github.com/hyperledger/fabric-admin-sdk) | ||
## Building and testing | ||
|
||
### Install pre-reqs | ||
|
||
This repository contains APIs written in Go and JavaScript. In order to build these components, the following need to be installed and available in the PATH: | ||
|
||
- [Go 1.21+](https://go.dev/) | ||
- [Node 18+](https://nodejs.org/) | ||
- [Make](https://www.gnu.org/software/make/) | ||
|
||
In order to run scenario test, [Docker](https://www.docker.com/) is also required. | ||
|
||
#### Dev Container | ||
|
||
This project includes a [Dev Container](https://containers.dev/) configuration that includes all of the pre-requisite software described above in a Docker container, avoiding the need to install them locally. The only requirement is that [Docker](https://www.docker.com/) is installed and available. | ||
|
||
Opening the project folder in an IDE such as [VS Code](https://code.visualstudio.com/docs/devcontainers/containers) (with the [Dev Containers extention](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)) should offer the option of opening in the Dev Container. Alternatively, VS Code allows the remote repository to [opened directly in an isolated Dev Container](https://code.visualstudio.com/docs/devcontainers/containers#_quick-start-open-a-git-repository-or-github-pr-in-an-isolated-container-volume). | ||
|
||
### Build using make | ||
|
||
> **Note:** When the repository is first cloned, some mock implementations used for testing will not be present and the Go code will show compile errors. These can be generated explicitly by running `make generate`. | ||
The following Makefile targets are available: | ||
|
||
- `make generate` - generate mock implementations used by unit tests | ||
- `make lint` - run linting checks for the Go code | ||
- `make unit-test-go` - run unit tests for the Go API | ||
- `make unit-test-node` - run unit tests for the Node API | ||
- `make unit-test` - run unit tests for all language implementations | ||
|
||
## History | ||
|
||
The initial submission and implementation of fabric-admin-sdk was driven by members of the [Technical Working Group China](https://github.com/Hyperledger-TWGC) / 超级账本中国技术工作组 (TWGC): | ||
|
||
## init by | ||
- [davidkhala](https://github.com/davidkhala) | ||
- [SamYuan1990](https://github.com/SamYuan1990) | ||
- [xiaohui249](https://github.com/xiaohui249) | ||
- [Peng-Du](https://github.com/Peng-Du) | ||
|
||
## Contributors | ||
<a href="https://github.com/Hyperledger/fabric-admin-sdk/graphs/contributors"> | ||
<img src="https://contributors-img.web.app/image?repo=Hyperledger/fabric-admin-sdk" /> | ||
</a> | ||
## Contribute | ||
|
||
### [Scenario tests and example](./test/e2e_test.go) | ||
Here is steps in short for any contribution. | ||
|
||
## Contribute | ||
Here is steps in short for any contribution. | ||
1. check license and code of conduct | ||
1. fork this project | ||
1. make your own feature branch | ||
1. change and commit your changes, please use `git commit -s` to commit as we enabled [DCO](https://probot.github.io/apps/dco/) | ||
1. raise PR | ||
|
||
## Code of Conduct guidelines | ||
|
||
Please review the Hyperledger [Code of | ||
Conduct](https://wiki.hyperledger.org/community/hyperledger-project-code-of-conduct) | ||
before participating. It is important that we keep things civil. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.