Skip to content

Commit

Permalink
chore: updating golang version in docs, and proto-grpc dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Sandeep Nishad <[email protected]>
  • Loading branch information
sandeepnRES committed Aug 14, 2024
1 parent edde6c6 commit 30cde8b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ Before starting, make sure you have the following software installed on your hos
- Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version)
- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher)
- Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8)
- Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported)
- Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/)
- Protoc (Protobuf compiler): _Golang should already be installed and configured._
* Default method: Run the following with `sudo` if necessary. This will install both the protobuf compiler and the Go code generator plugins.
```
apt-get install protobuf-compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
```
* If the above method installs an older version of `protoc` (check using `protoc --version`), say below 3.12.x, you should download pre-compiled binaries instead. (With an older version, you may see errors while attempting to launch and setup the Fabric networks).
```
Expand All @@ -46,13 +46,14 @@ Before starting, make sure you have the following software installed on your hos
sudo apt-get install unzip
unzip protoc-3.15.6-linux-x86_64.zip -d <some-folder-path>
export PATH="$PATH:<some-folder-path>/bin"
go install google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
```
| Notes |
|:------|
| The latest version at present is `3.15.6`, but you should check the above link to find the most current version before running the above steps. |
| The latest version of `protoc-gen-go-grpc` that works with the Fabric test networks we will run below is `v1.4.0`, which is why that version is hardcoded here. |
### Credentials
Make sure you have an SSH or GPG key registered in https://github.com to allow seamless cloning of repositories (at present, various setup scripts clone repositories using the `https://` prefix but this may change to `git@` in the future).
Expand Down Expand Up @@ -172,7 +173,7 @@ For more information, refer to the associated [README](https://github.com/hyperl
**Troubleshooting Tips**:

- If you see any errors during the launches, re-check the prerequisites (software installations and credentials). Ensure your network connection is working. As a safe bet, you can retry after cleanup: kill and remove all Docker containers and associated volumes.
- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc` and `protoc-gen-go` using suggestions made in the Prerequisites section above.
- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc`, `protoc-gen-go`, and `protoc-gen-go-grpc` using suggestions made in the Prerequisites section above.

### Fabric Relay

Expand Down
13 changes: 7 additions & 6 deletions docs/docs/weaver/getting-started/test-network/setup-local.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Before starting, make sure you have the following software installed on your hos
- Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version)
- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher)
- Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8)
- Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported)
- Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/)
Expand All @@ -38,8 +38,8 @@ Before starting, make sure you have the following software installed on your hos
* Default method: Run the following with `sudo` if necessary. This will install both the protobuf compiler and the Go code generator plugins.
```
apt-get install protobuf-compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
```
* If the above method installs an older version of `protoc` (check using `protoc --version`), say below 3.12.x, you should download pre-compiled binaries instead. (With an older version, you may see errors while attempting to launch and setup the Fabric networks).
```
Expand All @@ -48,8 +48,8 @@ Before starting, make sure you have the following software installed on your hos
sudo apt-get install unzip
unzip protoc-3.15.6-linux-x86_64.zip -d <some-folder-path>
export PATH="$PATH:<some-folder-path>/bin"
go install google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0
```
- SQLite3 Library:
* Sample instruction for Ubuntu:
Expand All @@ -60,6 +60,7 @@ Before starting, make sure you have the following software installed on your hos
| Notes |
|:------|
| The latest version at present is `3.15.6`, but you should check the above link to find the most current version before running the above steps. |
| The latest version of `protoc-gen-go-grpc` that works with the Fabric test networks we will run below is `v1.4.0`, which is why that version is hardcoded here. |
### Credentials
Make sure you have an SSH or GPG key registered in https://github.com to allow seamless cloning of repositories (at present, various setup scripts clone repositories using the `https://` prefix but this may change to `git@` in the future).
Expand Down Expand Up @@ -179,7 +180,7 @@ For more information, refer to the associated [README](https://github.com/hyperl
**Troubleshooting Tips**:

- If you see any errors during the launches, re-check the prerequisites (software installations and credentials). Ensure your network connection is working. As a safe bet, you can retry after cleanup: kill and remove all Docker containers and associated volumes.
- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc` and `protoc-gen-go` using suggestions made in the Prerequisites section above.
- If `protoc` or `protoc-gen-go` throws an error, reinstall `protoc`, `protoc-gen-go`, and `protoc-gen-go-grpc` using suggestions made in the Prerequisites section above.

### Fabric Client (fabric-cli)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Before starting, make sure you have the following software installed on your hos
- Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version)
- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher)
- Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8)
- Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 11 to Version 16 Supported)
- Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Before starting, make sure you have the following software installed on your hos
- Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
- Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version)
- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.16 or higher)
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher)
- Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8)
- Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported)
- Yarn: [sample instructions](https://classic.yarnpkg.com/en/docs/install/)
Expand Down
2 changes: 1 addition & 1 deletion weaver/core/network/fabric-interop-cc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN cd /fabric-interop-cc/contracts/interop && CC=musl-gcc go build -o interop

# Production ready image
# Pass the binary to the prod image
FROM alpine:3.11 as prod
FROM alpine:3.11 AS prod

RUN apk add libc6-compat libstdc++ zlib>1.2.11-r4 zlib-dev>1.2.11-r4
COPY --from=build /fabric-interop-cc/contracts/interop/interop /app/interop
Expand Down
2 changes: 1 addition & 1 deletion weaver/core/network/fabric-interop-cc/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ list-names:
echo ${DOCKER_IMAGE_NAME}:$(DOCKER_TAG)

image:
(cd contracts/interop && make run-vendor)
(cd contracts/interop && make run-vendor && go mod tidy)
docker build --build-arg GIT_URL=$(GIT_URL) -t ${DOCKER_IMAGE_NAME}:$(DOCKER_TAG) .

check-if-tag-exists:
Expand Down

0 comments on commit 30cde8b

Please sign in to comment.