Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build release binaries and Docker images for arm64 #3836

Merged
merged 1 commit into from
Dec 6, 2022
Merged
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
127 changes: 88 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,15 @@
# SPDX-License-Identifier: Apache-2.0

name: Release

on:
workflow_dispatch:
inputs:
release:
description: 'Fabric Release, e.g. 2.4.7'
required: true
type: string
two_digit_release:
description: 'Fabric Two Digit Release, e.g. 2.4'
required: true
type: string
commit_hash:
description: 'Commit hash, e.g. df9c661a192f8cf11376d9d643a0021f1a76c34b'
required: true
type: string
push:
tags: [ v2.* ]

env:
GO_VER: 1.18.7
ALPINE_VER: 3.16
DOCKER_REGISTRY: ghcr.io

permissions:
contents: read
Expand All @@ -34,9 +25,15 @@ jobs:
- image: ubuntu-20.04
target: linux
arch: amd64
- image: ubuntu-20.04
target: linux
arch: arm64
- image: macos-11
target: darwin
arch: amd64
- image: macos-11
target: darwin
arch: arm64
- image: windows-2022
target: windows
arch: amd64
Expand All @@ -52,35 +49,87 @@ jobs:
run: ./ci/scripts/create_binary_package.sh
env:
TARGET: ${{ matrix.target }}-${{ matrix.arch }}
RELEASE: ${{ inputs.release }}
BASE_VERSION: ${{ github.ref_name }}
RELEASE: ${{ github.ref_name }}
- name: Publish Release Artifact
uses: actions/upload-artifact@v3
with:
name: hyperledger-fabric-${{ matrix.target }}-${{ matrix.arch }}-${{ inputs.release }}.tar.gz
path: release/${{ matrix.target }}-${{ matrix.arch }}/hyperledger-fabric-${{ matrix.target }}-${{ matrix.arch }}-${{ inputs.release }}.tar.gz
name: hyperledger-fabric-${{ matrix.target }}-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz
path: release/${{ matrix.target }}-${{ matrix.arch }}/hyperledger-fabric-${{ matrix.target }}-${{ matrix.arch }}-${{ github.ref_name }}.tar.gz


build-and-push-docker-images:
name: Build and Push Fabric Docker Images
name: Build and Push

runs-on: ubuntu-20.04

permissions:
contents: read
packages: write

strategy:
matrix:
include:
- COMPONENT: baseos
CONTEXT: images/baseos
- COMPONENT: ccenv
CONTEXT: images/ccenv
- COMPONENT: peer
CONTEXT: .
- COMPONENT: orderer
CONTEXT: .
- COMPONENT: tools
CONTEXT: .

steps:
- name: Run APT Clean
run: sudo apt clean
- name: Run Apt Update
run: sudo apt update
- name: Install Dependencies
run: sudo apt install -y gcc haveged libtool make
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VER }}
- name: Checkout Fabric Code
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Checkout
uses: actions/checkout@v3
- name: Publish Docker Images
run: ./ci/scripts/publish_docker.sh
env:
RELEASE: ${{ inputs.release }}
TWO_DIGIT_RELEASE: ${{ inputs.two_digit_release }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}

- name: Login to the GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# - name: Login to Docker Hub Container Registry
# uses: docker/login-action@v2
# with:
# registry: docker.io
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_REGISTRY }}/hyperledger/fabric-${{ matrix.COMPONENT }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}

- name: Build and push ${{ matrix.COMPONENT }} Image
id: push
uses: docker/build-push-action@v3
with:
context: ${{ matrix.CONTEXT }}
file: images/${{ matrix.COMPONENT }}/Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
push: ${{ github.event_name != 'pull_request' }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
ALPINE_VER=${{ env.ALPINE_VER }}
GO_VER=${{ env.GO_VER }}
GO_TAGS=

create-release:
name: Create GitHub Release
needs: [ build-binaries, build-and-push-docker-images ]
Expand All @@ -96,8 +145,8 @@ jobs:
- name: Release Fabric Version
uses: ncipollo/release-action@v1
with:
allowUpdates: "true"
artifacts: "*.tar.gz/*.tar.gz"
bodyFile: release_notes/v${{ inputs.release }}.md
commit: ${{ inputs.commit_hash }}
tag: v${{ inputs.release }}
bodyFile: release_notes/${{ github.ref_name }}.md
tag: ${{ github.ref_name }}
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# - verify - runs unit tests for only the changed package tree

ALPINE_VER ?= 3.16
BASE_VERSION = 2.5.0
BASE_VERSION ?= 2.5.0

# 3rd party image version
# These versions are also set in the runners in ./integration/runners/
Expand Down Expand Up @@ -83,7 +83,7 @@ GO_TAGS ?=

RELEASE_EXES = orderer $(TOOLS_EXES)
RELEASE_IMAGES = baseos ccenv orderer peer tools
RELEASE_PLATFORMS = darwin-amd64 linux-amd64 windows-amd64
RELEASE_PLATFORMS = darwin-amd64 darwin-arm64 linux-amd64 linux-arm64 windows-amd64
TOOLS_EXES = configtxgen configtxlator cryptogen discover ledgerutil osnadmin peer

pkgmap.configtxgen := $(PKGNAME)/cmd/configtxgen
Expand Down
17 changes: 0 additions & 17 deletions ci/scripts/publish_docker.sh

This file was deleted.

3 changes: 2 additions & 1 deletion docker-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ ifneq ($(NO_PROXY),)
DOCKER_BUILD_FLAGS+=--build-arg 'NO_PROXY=$(NO_PROXY)'
endif

DBUILD = docker build --force-rm $(DOCKER_BUILD_FLAGS)
DOCKER_BUILD ?= docker build --force-rm
DBUILD = $(DOCKER_BUILD) $(DOCKER_BUILD_FLAGS)

DOCKER_NS ?= hyperledger
DOCKER_TAG=$(ARCH)-$(PROJECT_VERSION)
Expand Down
106 changes: 106 additions & 0 deletions release_notes/v2.5.0-alpha1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
v2.5.0-alpha1 Release Notes - 6 Dec 2022
=================================


Improvements
------------

- Prepares multi-arch Docker images for linux/arm64 and linux/amd64


Fixes
-----




Dependencies
------------
Fabric v2.5.0-alpha has been tested with the following dependencies:
* Go 1.18.7
* CouchDB v3.1.1

Fabric docker images on dockerhub utilize Alpine 3.16.


Deprecations (existing)
-----------------------

**Ordering service system channel is deprecated**

v2.3 introduced the ability to manage an ordering service without a system channel.
Managing an ordering service without a system channel has privacy, scalability,
and operational benefits. The use of a system channel is deprecated and may be removed in a future release.
For information about removal of the system channel, see the [Create a channel without system channel documentation](https://hyperledger-fabric.readthedocs.io/en/release-2.3/create_channel/create_channel_participation.html).

**FAB-15754: The 'Solo' consensus type is deprecated.**

The 'Solo' consensus type has always been marked non-production and should be in
use only in test environments; however, for compatibility it is still available,
but may be removed entirely in a future release.

**FAB-16408: The 'Kafka' consensus type is deprecated.**

The 'Raft' consensus type was introduced in v1.4.1 and has become the preferred
production consensus type. There is a documented and tested migration path from
Kafka to Raft, and existing users should migrate to the newer Raft consensus type.
For compatibility with existing deployments, Kafka is still supported,
but may be removed entirely in a future release.
Additionally, the fabric-kafka and fabric-zookeeper docker images are no longer updated, maintained, or published.

**Fabric CouchDB image is deprecated**

v2.2.0 added support for CouchDB 3.1.0 as the recommended and tested version of CouchDB.
If prior versions are utilized, a Warning will appear in the peer log.
Note that CouchDB 3.1.0 requires that an admin username and password be set,
while this was optional in CouchDB v2.x. See the
[Fabric CouchDB documentation](https://hyperledger-fabric.readthedocs.io/en/v2.2.0/couchdb_as_state_database.html#couchdb-configuration)
for configuration details.
Also note that CouchDB 3.1.0 default max_document_size is reduced to 8MB. Set a higher value if needed in your environment.
Finally, the fabric-couchdb docker image will not be updated to v3.1.0 and will no longer be updated, maintained, or published.
Users can utilize the official CouchDB docker image maintained by the Apache CouchDB project instead.

**FAB-7559: Support for specifying orderer endpoints at the global level in channel configuration is deprecated.**

Utilize the new 'OrdererEndpoints' stanza within the channel configuration of an organization instead.
Configuring orderer endpoints at the organization level accommodates
scenarios where orderers are run by different organizations. Using
this configuration ensures that only the TLS CA certificates of that organization
are used for orderer communications; in contrast to the global channel level endpoints which
would cause an aggregation of all orderer TLS CA certificates across
all orderer organizations to be used for orderer communications.

**FAB-17428: Support for configtxgen flag `--outputAnchorPeersUpdate` is deprecated.**

The `--outputAnchorPeersUpdate` mechanism for updating anchor peers has always had
limitations (for instance, it only works the first time anchor peers are updated).
Instead, anchor peer updates should be performed through channel configuration updates.

**FAB-15406: The fabric-tools docker image is deprecated**

The fabric-tools docker image will not be published in future Fabric releases.
Instead of using the fabric-tools docker image, users should utilize the
published Fabric binaries. The Fabric binaries can be used to make client calls
to Fabric runtime components, regardless of where the Fabric components are running.

**FAB-15317: Block dissemination via gossip is deprecated**

Block dissemination via gossip is deprecated and may be removed in a future release.
Fabric peers can be configured to receive blocks directly from an ordering service
node, and not gossip blocks, by using the following configuration:
```
peer.gossip.orgLeader: true
peer.gossip.useLeaderElection: false
peer.gossip.state.enabled: false
peer.deliveryclient.blockGossipEnabled: false
```

**FAB-15061: Legacy chaincode lifecycle is deprecated**

The legacy chaincode lifecycle from v1.x is deprecated and will be removed
in a future release. To prepare for the eventual removal, utilize the v2.x
chaincode lifecycle instead, by enabling V2_0 application capability on all
channels, and redeploying all chaincodes using the v2.x lifecycle. The new
chaincode lifecycle provides a more flexible and robust governance model
for chaincodes. For more details see the
[documentation for enabling the new lifecycle](https://hyperledger-fabric.readthedocs.io/en/release-2.2/enable_cc_lifecycle.html).