Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# blockhead
# Blockhead Service Broker
[![Build Status](https://travis-ci.org/cloudfoundry-incubator/blockhead.svg?branch=master)](https://travis-ci.org/cloudfoundry-incubator/blockhead)

An OSBAPI-compatible broker written in golang.
BlockHead is a dedicated service broker developed based on the Open Service Broker (OSB) API that allows for the creation and deployment of smart contracts through creation and binding of services.

## Configure and Run
Configure the broker, by setting `username` and `password` in `config.json`.

Run the broker by doing:

go run ./cmd/broker/main.go config.json services
Expand All @@ -29,3 +29,15 @@ To do all the make steps:

make

# Blockchain Support
Blockhead currently supports two types of Blockchain networks:

- The Ethereum public blockchain network.
- The permissioned Fabric blockchain network.

The type of the blockchain network that is offered by Blockhead is determined by setting the `Tag` in the service definition provided to Blockhead.

For an Ethereum blockchain network, the service definition tags should include `ethereum`. For the Fabric network, the tags in the service definition should include `fabric`. A service definition lacking either of the two tags is considered incompatible with the broker.

Examples can be found under the `services/` directory in the repository.

6 changes: 4 additions & 2 deletions cmd/broker/main_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ var _ = SynchronizedBeforeSuite(func() []byte {
// images are unaffected
jsonString := `{
"reference":{
"nimak/geth:latest": true
"nimak/geth:latest": true,
"swayr/fab3-org1": true,
"swayr/fab3-org2": true
}
}
`
Expand All @@ -71,7 +73,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {
Expect(err).ToNot(HaveOccurred())

if len(images) > 0 {
Expect(images).To(HaveLen(1))
Expect(len(images)).To(BeNumerically("<", 3))
imageId := images[0].ID

removedImages, err := cli.ImageRemove(context.Background(), imageId, types.ImageRemoveOptions{Force: true})
Expand Down
Loading