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

Ubuntu 22.04 #1656

Merged
merged 4 commits into from
Apr 24, 2024
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
21 changes: 16 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version (use hirsuite or bionic on local arm64/Apple Silicon): hirsute, focal, bionic
ARG VARIANT="focal"
ARG VARIANT="jammy"
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
Expand All @@ -19,17 +19,17 @@ RUN apt-get update -y && apt-get install -y \
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
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
Expand All @@ -38,6 +38,12 @@ RUN echo "deb https://hyperledger.jfrog.io/artifactory/indy focal dev" >> /etc
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

# Kim's temp repo
# TODO:
# - Remove dependency on Kim's temp repo.
# - Change this to official repo
RUN echo "deb [trusted=yes] http://209.141.41.82:8000/ packagedir/" >> /etc/apt/sources.list

RUN apt-get update -y && apt-get install -y \
# Python
python3-pip \
Expand All @@ -63,6 +69,11 @@ RUN apt-get update -y && apt-get install -y \
ursa=0.3.2-1 \
# Indy SDK
libindy=1.15.0~1625-bionic \
# Kim's updated packages
# - TODO: Remove dependency on Kim's temp repo.
python3-sortedcontainers \
python3-rlp \
python3-ioflo \
# Need to move libursa.so to parent dir
&& mv /usr/lib/ursa/* /usr/lib && rm -rf /usr/lib/ursa

Expand All @@ -78,4 +89,4 @@ RUN pip3 install -U \


# install fpm
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.14.2
RUN gem install --no-document rake dotenv:2.8.1 fpm:1.15.0
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: hirsute, focal, bionic
// Use hirsute or bionic on local arm64/Apple Silicon.
"args": { "VARIANT": "focal" }
"args": { "VARIANT": "jammy" }
},

// Set *default* container specific settings.json values on container create.
Expand All @@ -29,4 +29,4 @@

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
}
11 changes: 6 additions & 5 deletions .github/workflows/PR.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

branches:
- main
- ubuntu-22.04

jobs:
workflow-setup:
Expand All @@ -28,7 +29,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 @@ -44,12 +45,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-docker-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 }}/plenum-build
Expand All @@ -58,7 +59,7 @@ jobs:
build_packages:
name: Build Packages
needs: [workflow-setup, build-docker-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 }}/plenum-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
Expand All @@ -80,4 +81,4 @@ jobs:
needs: [workflow-setup, plenum_tests]
if: ${{ needs.workflow-setup.outputs.testsNeeded == 'false' || success() }}
steps:
- run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '
- run: 'echo "Just a status Check (Always true, when executed) for branch protection rules(blocks merging while test are running and if tests fail)." '
11 changes: 6 additions & 5 deletions .github/workflows/Push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- ubuntu-22.04
paths:
- '**.py'
- '.github/**'
Expand All @@ -28,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-docker-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 }}/plenum-build
Expand All @@ -46,7 +47,7 @@ jobs:
build_packages:
name: Build Packages
needs: [workflow-setup, build-docker-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 }}/plenum-build:${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
UBUNTU_VERSION: ${{ needs.workflow-setup.outputs.UBUNTU_VERSION }}
Expand All @@ -66,7 +67,7 @@ jobs:
name: Publish Artifacts
needs: [workflow-setup, plenum_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 \
apt-transport-https \
apt-utils\
wget\
curl\
jq\
gnupg

# ========================================================================================================
# 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
# ========================================================================================================

# 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 focal dev" >> /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

# TODO change this to official repo
RUN echo "deb [trusted=yes] http://209.141.41.82:8000/ packagedir/" >> /etc/apt/sources.list
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reflectivedevelopment, Which repo is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary repo, until we get the jfrog packages installed.



RUN apt-get update -y && apt-get install -y \
# Python
python3-pip \
rubygems && \
gem install --no-document dotenv:2.8.1 fpm:1.15.0 && \
pip3 install Cython==0.29.36

8 changes: 4 additions & 4 deletions .github/workflows/publishRelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,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 @@ -111,7 +111,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 @@ -124,7 +124,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 }}/plenum-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 }}/plenum-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
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-plenum using docker

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

### Build indy-plenum

```
./build-indy-plenum.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-plenum-deb-u1604`.

### Build 3rd-party dependencies

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

Built packages are placed in the `output-path` folder.
28 changes: 28 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,28 @@
#!/usr/bin/env bash

set -x
set -e


PKG_SOURCE_PATH=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )/../../

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

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

docker build -t "${PKG_NAME}-build-u2204" -f $PKG_SOURCE_PATH/.github/workflows/build/Dockerfile.ubuntu-2204 .
docker volume create --name "${OUTPUT_VOLUME_NAME}"

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