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

Feature/ubuntu22 04 #1870

Open
wants to merge 4 commits into
base: ubuntu-22.04
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/checkout@v4
- name: setup
id: setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2
- name: testsNeeded
id: testsNeeded
uses: dorny/paths-filter@v3
Expand All @@ -46,12 +46,12 @@ jobs:
name: Lint
needs: [workflow-setup]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'true' }}
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2

build-image:
name: Create Builder Image
needs: [workflow-setup, lint]
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
with:
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build
Expand All @@ -60,7 +60,7 @@ jobs:
build_packages:
name: Build Packages
needs: [workflow-setup, build-image]
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
with:
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/Push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
uses: actions/checkout@v4
- name: setup
id: setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2

lint:
name: Lint
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2

build-image:
name: Create Builder Image
needs: [workflow-setup, lint]
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
with:
CACHE_KEY_BUILD: ${{ needs.workflow-setup.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build
Expand All @@ -47,7 +47,7 @@ jobs:
build_packages:
name: Build Packages
needs: [workflow-setup, build-image]
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
with:
DOCKER_IMAGE: ghcr.io/${{ needs.workflow-setup.outputs.GITHUB_REPOSITORY_NAME }}/node-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
Expand All @@ -67,7 +67,7 @@ jobs:
name: Publish Artifacts
needs: [workflow-setup, indy_node_tests]
if: needs.workflow-setup.outputs.publish == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v2
with:
COMPONENT: 'dev'
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/build/Dockerfile.ubuntu-2204
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:22.04

ARG uid=1000
ARG user=indy

RUN apt-get update -y && apt-get install -y \
# common stuff
git \
wget \
gnupg \
apt-transport-https \
ca-certificates \
apt-utils \
curl \
jq

# ========================================================================================================
# Update repository signing keys
# --------------------------------------------------------------------------------------------------------
# Hyperledger
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
# Sovrin
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
# Bionic-Security
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
# ========================================================================================================

# ToDo:
# - Eliminate dependency on obsolete bionic repositories.

# Plenum
# - https://github.com/hyperledger/indy-plenum/issues/1546
# - Needed to pick up rocksdb=5.8.8
RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev" >> /etc/apt/sources.list && \
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list && \
echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list

RUN apt-get update -y && apt-get install -y rubygems python3-pip && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*

# install fpm
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.15.0
8 changes: 4 additions & 4 deletions .github/workflows/publishRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
uses: actions/checkout@v4
- name: get-release-info
id: get-release-info
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
with:
versionString: "${{ github.event.head_commit.message }}"
- name: workflow-setup
id: workflow-setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2

createRelease:
name: Create Release
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
name: Publish Artifacts
needs: [release-infos, createRelease]
if: needs.release-infos.outputs.isVersionBump == 'true' && needs.release-infos.outputs.publish == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/publish_artifacts.yaml@v2
with:
COMPONENT: ${{ needs.release-infos.outputs.component }}
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}
Expand All @@ -123,7 +123,7 @@ jobs:
convertPyVersion:
name: "Convert to python version flavour"
needs: [release-infos, publish_artifacts]
uses: hyperledger/indy-shared-gha/.github/workflows/pyVersionConversion.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/pyVersionConversion.yaml@v2
with:
VERSIONTAG: ${{ needs.release-infos.outputs.VERSIONTAG }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/releasepr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ jobs:
uses: actions/checkout@v4
- name: get-release-info
id: get-release-info
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
with:
versionString: "${{ github.event.pull_request.body }}"
- name: workflow-setup
id: workflow-setup
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v1
uses: hyperledger/indy-shared-gha/.github/actions/workflow-setup@v2

lint:
name: Lint
needs: [release-infos]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/lint.yaml@v2

build-docker-image:
name: Create Builder Image
needs: [release-infos, lint]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildimage.yaml@v2
with:
CACHE_KEY_BUILD: ${{ needs.release-infos.outputs.CACHE_KEY_BUILD }}
DOCKER_IMAGE: ghcr.io/${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}/node-build
Expand All @@ -53,7 +53,7 @@ jobs:
name: Build Packages
needs: [release-infos, build-docker-image]
if: needs.release-infos.outputs.isVersionBump == 'true'
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v1
uses: hyperledger/indy-shared-gha/.github/workflows/buildpackages.yaml@v2
with:
DOCKER_IMAGE: ghcr.io/${{ needs.release-infos.outputs.GITHUB_REPOSITORY_NAME }}/node-build:${{ needs.release-infos.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.release-infos.outputs.UBUNTU_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
fetch-depth: 0
- name: extract branch
id: get-branch
uses: hyperledger/indy-shared-gha/.github/actions/branch-from-tag@v1
uses: hyperledger/indy-shared-gha/.github/actions/branch-from-tag@v2
with:
tag: ${{ github.ref }}
- name: get-release-info
id: get-release-info
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v1
uses: hyperledger/indy-shared-gha/.github/actions/get-release-info@v2
with:
versionString: "${{ github.ref }}"

Expand Down
75 changes: 75 additions & 0 deletions build-scripts/ubuntu-2204/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
FROM ubuntu:22.04

ARG uid=1000
ARG user=indy

RUN apt-get update -y && apt-get install -y \
# common stuff
git \
wget \
gnupg \
apt-transport-https \
ca-certificates \
apt-utils

# ========================================================================================================
# Update repository signing keys
# --------------------------------------------------------------------------------------------------------
# Hyperledger
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 9692C00E657DDE61 && \
# Sovrin
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88 && \
# Bionic-Security
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
# ========================================================================================================

# Plenum
# - https://github.com/hyperledger/indy-plenum/issues/1546
# - Needed to pick up rocksdb=5.8.8
RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy jammy dev" >> /etc/apt/sources.list && \
echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list && \
echo "deb https://repo.sovrin.org/deb bionic master" >> /etc/apt/sources.list && \
echo "deb https://repo.sovrin.org/sdk/deb bionic master" >> /etc/apt/sources.list

# Sovrin
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88

RUN apt-get update -y && apt-get install -y \
# Python
python3-pip \
python3-nacl \
# rocksdb python wrapper
rocksdb=5.8.8 \
libgflags-dev \
libsnappy-dev \
zlib1g-dev \
libbz2-dev \
liblz4-dev \
libgflags-dev \
# zstd is needed for caching in github actions pipeline
zstd \
# fpm
ruby \
ruby-dev \
rubygems \
gcc \
make \
# Indy Node and Plenum
libssl1.0.0 \
ursa=0.3.2-1 \
# Indy SDK
libindy=1.15.0~1625-bionic \
# Need to move libursa.so to parent dir
&& mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa

RUN pip3 install -U \
# Required by setup.py
setuptools==50.3.2 \
'pyzmq==22.3.0'

# install fpm
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.14.2

RUN apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*

30 changes: 30 additions & 0 deletions build-scripts/ubuntu-2204/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
### Build indy-node using docker

```
./build-indy-node-docker.sh <path-to-sources> <version>
```
Built package is placed in a docker volume `indy-node-deb-u1604`.

### Build indy-node

```
./build-indy-node.sh <path to sources> <version> <output-path: default='.'>
```

Built package is placed in the `output-path` folder.

### Build 3rd-party dependencies using docker

```
./build-3rd-parties-docker.sh
```

Built packages are placed in a docker volume `indy-node-deb-u1604`.

### Build 3rd-party dependencies

```
./build-3rd-parties-docker.sh <output-path: default='.'>
```

Built packages are placed in the `output-path` folder.
24 changes: 24 additions & 0 deletions build-scripts/ubuntu-2204/build-3rd-parties-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

set -x
set -e

if [ -z "$2" ]; then
CMD="/root/build-3rd-parties.sh /output"
else
CMD="$2"
fi

PKG_NAME=indy-node
IMAGE_NAME="${PKG_NAME}-build-u2204"
OUTPUT_VOLUME_NAME="${1:-"${PKG_NAME}-deb-u2204"}"

docker build -t "${PKG_NAME}-build-u2204" -f Dockerfile .
docker volume create --name "${OUTPUT_VOLUME_NAME}"

docker run \
-i \
--rm \
-v "${OUTPUT_VOLUME_NAME}:/output" \
"${IMAGE_NAME}" \
$CMD
Loading