diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dd4def7d1..6b61eb16d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,7 +10,6 @@ /build-logic/** @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/devops-ci /charts/** @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/devops-ci -/docker/** @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/devops-ci /fullstack-core/** @hashgraph/release-engineering /fullstack-examples/** @hashgraph/release-engineering /fullstack-gradle-plugin/** @hashgraph/release-engineering @hashgraph/devops-ci diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d19f135e6..d46f21ee7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,8 +10,3 @@ updates: schedule: interval: "daily" open-pull-requests-limit: 15 - - package-ecosystem: "docker" - directory: "/docker" - schedule: - interval: "daily" - open-pull-requests-limit: 5 diff --git a/.github/workflows/flow-deploy-release-artifact.yaml b/.github/workflows/flow-deploy-release-artifact.yaml index de1fa8076..c99e420e6 100644 --- a/.github/workflows/flow-deploy-release-artifact.yaml +++ b/.github/workflows/flow-deploy-release-artifact.yaml @@ -115,60 +115,6 @@ jobs: ossrh-user-name: ${{ secrets.OSSRH_USER_NAME }} ossrh-user-password: ${{ secrets.OSSRH_USER_PASSWORD }} - publish-docker-image: - name: Publish / Docker Image - runs-on: solo-linux-medium - needs: - - prepare-release - steps: - - name: Checkout repository - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - - - name: Login to GitHub Container Registry - uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up Docker Qemu - uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8026d2bc3645ea78b0d2544766a1225eb5691f89 # v3.7.0 - - - name: Build Docker Image (ubi8-init-dind) - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 - with: - context: docker/ubi8-init-dind - platforms: linux/amd64, linux/arm64 - push: ${{ github.event.inputs.dry-run-enabled != 'true' }} - tags: ghcr.io/${{ github.repository }}/ubi8-init-dind:${{ needs.prepare-release.outputs.version }} - - - name: Build Docker Image (ubi8-init-java17) - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 - with: - context: docker/ubi8-init-java17 - platforms: linux/amd64, linux/arm64 - push: ${{ github.event.inputs.dry-run-enabled != 'true' }} - tags: ghcr.io/${{ github.repository }}/ubi8-init-java17:${{ needs.prepare-release.outputs.version }} - - - name: Build Docker Image (ubi8-init-java21) - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 - with: - context: docker/ubi8-init-java21 - platforms: linux/amd64, linux/arm64 - push: ${{ github.event.inputs.dry-run-enabled != 'true' }} - tags: ghcr.io/${{ github.repository }}/ubi8-init-java21:${{ needs.prepare-release.outputs.version }} - - - name: Build Docker Image (kubectl-bats) - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 - with: - context: docker/kubectl-bats - platforms: linux/amd64, linux/arm64 - push: ${{ github.event.inputs.dry-run-enabled != 'true' }} - tags: ghcr.io/${{ github.repository }}/kubectl-bats:${{ needs.prepare-release.outputs.version }} - publish-helm-charts: name: Publish / Helm Charts runs-on: solo-linux-medium @@ -212,7 +158,6 @@ jobs: runs-on: solo-linux-medium needs: - publish-maven-central - - publish-docker-image - publish-helm-charts steps: - name: Checkout Code diff --git a/.github/workflows/support/ci/ci-values.yaml b/.github/workflows/support/ci/ci-values.yaml index 2448729a5..c53b2ff05 100644 --- a/.github/workflows/support/ci/ci-values.yaml +++ b/.github/workflows/support/ci/ci-values.yaml @@ -1,8 +1,8 @@ # helm test container tester: image: - registry: "docker.fst.local" - repository: "kubectl-bats" - tag: "local" - pullPolicy: "Never" + registry: "ghcr.io" + repository: "hashgraph/solo-containers/kubectl-bats" + tag: "0.33.0" + pullPolicy: "IfNotPresent" resources: {} \ No newline at end of file diff --git a/.github/workflows/support/ci_test.sh b/.github/workflows/support/ci_test.sh index 6acda66ae..37acbb56b 100755 --- a/.github/workflows/support/ci_test.sh +++ b/.github/workflows/support/ci_test.sh @@ -22,14 +22,6 @@ kubectl config use-context "kind-${CLUSTER_NAME}" kubectl config set-context --current --namespace="${NAMESPACE}" kubectl config get-contexts -echo "-----------------------------------------------------------------------------------------------------" -echo "Building kubectl-bats image" -KUBECTL_BATS_IMAGE="${LOCAL_DOCKER_REGISTRY}/kubectl-bats:${LOCAL_DOCKER_IMAGE_TAG}" -cd "${DOCKERFILE_DIR}/kubectl-bats" && docker build -t "${KUBECTL_BATS_IMAGE}" . -kind load docker-image "${KUBECTL_BATS_IMAGE}" -n "${CLUSTER_NAME}" -cd - - - echo "-----------------------------------------------------------------------------------------------------" echo "Helm dependency update" @@ -57,9 +49,9 @@ echo "Additional values: ${CHART_VALUES_FILES}" echo "-----------------------------------------------------------------------------------------------------" if [ "${SCRIPT_NAME}" = "nmt-install.sh" ]; then if [[ -z "${CHART_VALUES_FILES}" ]]; then - helm install "${RELEASE_NAME}" -n "${NAMESPACE}" "${CHART_DIR}" --set defaults.root.image.repository=hashgraph/full-stack-testing/ubi8-init-dind + helm install "${RELEASE_NAME}" -n "${NAMESPACE}" "${CHART_DIR}" --set defaults.root.image.repository=hashgraph/solo-containers/ubi8-init-dind else - helm install "${RELEASE_NAME}" -n "${NAMESPACE}" "${CHART_DIR}" -f "${CHART_DIR}/values.yaml" --values "${CHART_VALUES_FILES}" --set defaults.root.image.repository=hashgraph/full-stack-testing/ubi8-init-dind + helm install "${RELEASE_NAME}" -n "${NAMESPACE}" "${CHART_DIR}" -f "${CHART_DIR}/values.yaml" --values "${CHART_VALUES_FILES}" --set defaults.root.image.repository=hashgraph/solo-containers/ubi8-init-dind fi else if [[ -z "${CHART_VALUES_FILES}" ]]; then diff --git a/.github/workflows/support/scripts/env.sh b/.github/workflows/support/scripts/env.sh index 12c202c4c..85acd706b 100644 --- a/.github/workflows/support/scripts/env.sh +++ b/.github/workflows/support/scripts/env.sh @@ -103,9 +103,4 @@ readonly CHART_DIR="../../../charts/fullstack-deployment" # telemetry related env variables readonly TELEMETRY_DIR="${SCRIPT_DIR}/../telemetry" -# docker build related env variables -readonly DOCKERFILE_DIR="../../../docker" -readonly LOCAL_DOCKER_REGISTRY="docker.fst.local" # same as in dev/ci/ci-values.yaml -readonly LOCAL_DOCKER_IMAGE_TAG="local" - show_env_vars \ No newline at end of file diff --git a/charts/fullstack-deployment/Chart.lock b/charts/fullstack-deployment/Chart.lock index 8aa8ab8eb..2378cce9b 100644 --- a/charts/fullstack-deployment/Chart.lock +++ b/charts/fullstack-deployment/Chart.lock @@ -4,7 +4,7 @@ dependencies: version: 0.2.0 - name: hedera-mirror repository: https://hashgraph.github.io/hedera-mirror-node/charts - version: 0.111.1 + version: 0.113.0 - name: tenant repository: https://operator.min.io/ version: 5.0.12 @@ -14,5 +14,5 @@ dependencies: - name: haproxy-ingress repository: https://haproxy-ingress.github.io/charts version: 0.14.5 -digest: sha256:ca8cade42bbfa3211fde7112cb0998e8c7c86587c9113b10f2cbd209683113b0 -generated: "2024-09-06T10:44:29.620625+01:00" +digest: sha256:cb2c36ef5124512badb4dbf8640905d06b6fdcca1d42a0e30f0136b36baaaec2 +generated: "2024-10-09T12:17:54.672614-05:00" diff --git a/charts/fullstack-deployment/values.yaml b/charts/fullstack-deployment/values.yaml index 9894772c1..5a747b98e 100644 --- a/charts/fullstack-deployment/values.yaml +++ b/charts/fullstack-deployment/values.yaml @@ -31,8 +31,8 @@ tester: clusterRoleName: "pod-monitor-role" # this is a shared cluster role for all namespaces image: registry: "ghcr.io" - repository: "hashgraph/full-stack-testing/kubectl-bats" - tag: "" # this should be empty since we want the default behavior of $.Chart.appVersion to apply + repository: "hashgraph/solo-containers/kubectl-bats" + tag: "0.33.0" pullPolicy: "IfNotPresent" resources: {} @@ -67,8 +67,8 @@ defaults: root: # root container image: registry: "ghcr.io" - repository: "hashgraph/full-stack-testing/ubi8-init-java21" - tag: "" # this should be empty since we want the default behavior of $.Chart.appVersion to apply + repository: "hashgraph/solo-containers/ubi8-init-java21" + tag: "0.33.0" pullPolicy: "IfNotPresent" resources: {} extraEnv: [] diff --git a/docker/kubectl-bats/Dockerfile b/docker/kubectl-bats/Dockerfile deleted file mode 100644 index eec460a65..000000000 --- a/docker/kubectl-bats/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (C) 2023 Hedera Hashgraph, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM bitnami/kubectl:latest - -ENV BATS_HOME=/bats - -# switch to user root for setup -USER root - -# setup bats -RUN apt-get update && \ - apt-get install -y curl git vim python3 python3-pip jq && \ - git clone https://github.com/bats-core/bats-core.git "${BATS_HOME}"/bats-core && \ - git clone https://github.com/bats-core/bats-support.git "${BATS_HOME}"/test_helper/bats-support && \ - git clone https://github.com/bats-core/bats-assert.git "${BATS_HOME}"/test_helper/bats-assert && \ - curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash && \ - curl -L https://github.com/mikefarah/yq/releases/download/v4.34.2/yq_linux_amd64 -o /usr/bin/yq && \ - chmod +x /usr/bin/yq - -#switch back to user 1001 -USER 1001 diff --git a/docker/kubectl-bats/build.gradle.kts b/docker/kubectl-bats/build.gradle.kts deleted file mode 100644 index 40cc1cf95..000000000 --- a/docker/kubectl-bats/build.gradle.kts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id("com.palantir.docker") version "0.35.0" -} - -var repo = "ghcr.io" -var registry = "hashgraph/full-stack-testing" -var containerName = "kubectl-bats" -var appVersion = project.version.toString() - -docker { - name = "${repo}/${registry}/${containerName}:${appVersion}" - version = appVersion - buildx(true) - if (!System.getenv("CI").isNullOrEmpty()) { - platform("linux/arm64", "linux/amd64") - push(true) - } else { - load(true) // loads the image into the local docker daemon, doesn't support multi-platform - } -} diff --git a/docker/ubi8-init-dind/Dockerfile b/docker/ubi8-init-dind/Dockerfile deleted file mode 100644 index b4f62b560..000000000 --- a/docker/ubi8-init-dind/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -# -# Copyright (C) 2023 Hedera Hashgraph, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM registry.access.redhat.com/ubi8/ubi-init:latest -ENV COMPOSE_VERSION 2.19.0 - -RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ - /usr/bin/crb enable && \ - dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo && \ - dnf -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-buildx-plugin && \ - dnf -y install md5deep jq zip unzip rsync gettext - -RUN dnf -y install sudo && \ - echo >> /etc/sudoers && \ - echo "%hedera ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers - -RUN systemctl enable docker && \ - systemctl enable containerd - -# Install Docker Compose -RUN curl -SLo /usr/bin/docker-compose "https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m)" && \ - chmod +x /usr/bin/docker-compose - -# Configure the standard user account -RUN groupadd --gid 2000 hedera && \ - useradd --no-user-group --create-home --uid 2000 --gid 2000 --shell /bin/bash hedera && \ - usermod -aG docker hedera && \ - mkdir -p /opt/hgcapp && \ - chown -R hedera:hedera /opt/hgcapp - -RUN touch /var/run/docker.sock && \ - chown root:docker /var/run/docker.sock - -# Set Final Working Directory and User -WORKDIR "/opt/hgcapp" diff --git a/docker/ubi8-init-dind/build.gradle.kts b/docker/ubi8-init-dind/build.gradle.kts deleted file mode 100644 index 53d1192b5..000000000 --- a/docker/ubi8-init-dind/build.gradle.kts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id("com.palantir.docker") version "0.35.0" -} - -var repo = "ghcr.io" -var registry = "hashgraph/full-stack-testing" -var containerName = "ubi8-init-dind" -var appVersion = project.version.toString() - -docker { - name = "${repo}/${registry}/${containerName}:${appVersion}" - version = appVersion - buildx(true) - if (!System.getenv("CI").isNullOrEmpty()) { - platform("linux/arm64", "linux/amd64") - push(true) - } else { - load(true) // loads the image into the local docker daemon, doesn't support multi-platform - } -} diff --git a/docker/ubi8-init-java17/Dockerfile b/docker/ubi8-init-java17/Dockerfile deleted file mode 100644 index d13150f87..000000000 --- a/docker/ubi8-init-java17/Dockerfile +++ /dev/null @@ -1,116 +0,0 @@ -# -# Copyright (C) 2023 Hedera Hashgraph, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM registry.access.redhat.com/ubi8/ubi-init:latest -# Define Standard Environment Variables -ENV LC_ALL=C.UTF-8 -ENV COMPOSE_VERSION 2.19.0 - -# Define JDK Environment Variables -ENV JAVA_VERSION jdk-17.0.7+7 -ENV JAVA_HOME /opt/java/openjdk -ENV PATH $JAVA_HOME/bin:$PATH - -# Define Application Environment Variables -ENV APP_HOME="/opt/hgcapp/services-hedera/HapiApp2.0" -ENV JAVA_HEAP_MIN="" -ENV JAVA_HEAP_MAX="" -ENV JAVA_OPTS="" - -RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ - /usr/bin/crb enable && \ - dnf -y install binutils libsodium openssl zlib readline tzdata gzip tar ca-certificates curl && \ - dnf clean all - -# Install Java 17 Adoptium JDK -RUN set -eux; \ - ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ - case "${ARCH}" in \ - aarch64|arm64) \ - ESUM='0084272404b89442871e0a1f112779844090532978ad4d4191b8d03fc6adfade'; \ - BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_aarch64_linux_hotspot_17.0.7_7.tar.gz'; \ - ;; \ - ppc64el|powerpc:common64) \ - ESUM='8f4366ff1eddb548b1744cd82a1a56ceee60abebbcbad446bfb3ead7ac0f0f85'; \ - BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.7_7.tar.gz'; \ - ;; \ - s390x|s390:64-bit) \ - ESUM='2d75540ae922d0c4162729267a8c741e2414881a468fd2ce4140b4069ba47ca9'; \ - BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.7_7.tar.gz'; \ - ;; \ - amd64|i386:x86-64) \ - ESUM='e9458b38e97358850902c2936a1bb5f35f6cffc59da9fcd28c63eab8dbbfbc3b'; \ - BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.7_7.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ - esac; \ - curl -sSLo /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p "$JAVA_HOME"; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory "$JAVA_HOME" \ - --strip-components 1 \ - --no-same-owner \ - ; \ - rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; - -RUN dnf -y install sudo && \ - echo >> /etc/sudoers && \ - echo "%hedera ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers - -# Configure the standard user account -RUN groupadd --gid 2000 hedera && \ - useradd --no-user-group --create-home --uid 2000 --gid 2000 --shell /bin/bash hedera && \ - mkdir -p /opt/hgcapp && \ - chown -R hedera:hedera /opt/hgcapp - -# Create Application Folders -RUN mkdir -p "/opt/hgcapp" && \ - mkdir -p "/opt/hgcapp/accountBalances" && \ - mkdir -p "/opt/hgcapp/eventsStreams" && \ - mkdir -p "/opt/hgcapp/recordStreams" && \ - mkdir -p "/opt/hgcapp/services-hedera" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/apps" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/config" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/keys" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/lib" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/stats" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/saved" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/upgrade" - -# Add the entrypoint script and systemd service file -ADD entrypoint.sh /opt/hgcapp/services-hedera/HapiApp2.0/ -ADD network-node.service /usr/lib/systemd/system/ - -# Ensure proper file permissions -RUN chmod -R +x /opt/hgcapp/services-hedera/HapiApp2.0/entrypoint.sh && \ - chown -R 2000:2000 /opt/hgcapp/ - -RUN mkdir -p /etc/network-node && \ - touch /etc/network-node/application.env && \ - chown -R 2000:2000 /etc/network-node - -# Expose TCP/UDP Port Definitions -EXPOSE 50111/tcp 50211/tcp 50212/tcp - -# Set Final Working Directory and User -WORKDIR "/opt/hgcapp" diff --git a/docker/ubi8-init-java17/build.gradle.kts b/docker/ubi8-init-java17/build.gradle.kts deleted file mode 100644 index 5737a756f..000000000 --- a/docker/ubi8-init-java17/build.gradle.kts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id("com.palantir.docker") version "0.35.0" -} - -var repo = "ghcr.io" -var registry = "hashgraph/full-stack-testing" -var containerName = "ubi8-init-java17" -var appVersion = project.version.toString() - -docker { - name = "${repo}/${registry}/${containerName}:${appVersion}" - version = appVersion - files("entrypoint.sh", "network-node.service") - buildx(true) - if (!System.getenv("CI").isNullOrEmpty()) { - platform("linux/arm64", "linux/amd64") - push(true) - } else { - load(true) // loads the image into the local docker daemon, doesn't support multi-platform - } -} diff --git a/docker/ubi8-init-java17/entrypoint.sh b/docker/ubi8-init-java17/entrypoint.sh deleted file mode 100755 index b5261596d..000000000 --- a/docker/ubi8-init-java17/entrypoint.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash - -######################################################################################################################## -# Copyright 2016-2022 Hedera Hashgraph, LLC # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -######################################################################################################################## - -set -eo pipefail - -if [[ -z "${APP_HOME}" ]]; then - echo "ERROR: APP_HOME is not defined, but is required!" - exit 63 -fi - -cd "${APP_HOME}" || exit 64 - -if [[ -z "${JAVA_OPTS}" ]]; then - JAVA_OPTS="" -fi - -JAVA_HEAP_OPTS="" - -if [[ -n "${JAVA_HEAP_MIN}" ]]; then - JAVA_HEAP_OPTS="${JAVA_HEAP_OPTS} -Xms${JAVA_HEAP_MIN}" -fi - -if [[ -n "${JAVA_HEAP_MAX}" ]]; then - JAVA_HEAP_OPTS="${JAVA_HEAP_OPTS} -Xmx${JAVA_HEAP_MAX}" -fi - -if [[ ! -d "${APP_HOME}/logs" ]]; then - mkdir -p "${APP_HOME}/logs" -fi - -echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> BEGIN USER IDENT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -id -echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< END USER IDENT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" -echo -set -x -/usr/bin/env java ${JAVA_HEAP_OPTS} ${JAVA_OPTS} -cp "data/lib/*" com.swirlds.platform.Browser -printf "java exit code %s" "${?}\n" diff --git a/docker/ubi8-init-java17/network-node.service b/docker/ubi8-init-java17/network-node.service deleted file mode 100644 index 61e3269ef..000000000 --- a/docker/ubi8-init-java17/network-node.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Hedera Network Node -After=network.target - -[Service] -Type=simple -Restart=no -User=hedera -Group=hedera - -PassEnvironment=JAVA_HOME JAVA_OPTS JAVA_HEAP_MIN JAVA_HEAP_MAX PATH APP_HOME -EnvironmentFile=/etc/network-node/application.env - -WorkingDirectory=/opt/hgcapp/services-hedera/HapiApp2.0 -ExecStart=/usr/bin/bash /opt/hgcapp/services-hedera/HapiApp2.0/entrypoint.sh - -[Install] -WantedBy=multi-user.target diff --git a/docker/ubi8-init-java21/Dockerfile b/docker/ubi8-init-java21/Dockerfile deleted file mode 100644 index 1ea93982f..000000000 --- a/docker/ubi8-init-java21/Dockerfile +++ /dev/null @@ -1,119 +0,0 @@ -# -# Copyright (C) 2023 Hedera Hashgraph, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM registry.access.redhat.com/ubi8/ubi-init:latest -# Define Standard Environment Variables -ENV LC_ALL=C.UTF-8 - -# Define JDK Environment Variables -ENV JAVA_VERSION "jdk-21.0.1+12" -ENV JAVA_HOME /usr/local/java -ENV PATH ${JAVA_HOME}/bin:${PATH} - -# Define Application Environment Variables -ENV APP_HOME="/opt/hgcapp/services-hedera/HapiApp2.0" -ENV JAVA_HEAP_MIN="" -ENV JAVA_HEAP_MAX="" -ENV JAVA_OPTS="" -ENV JAVA_MAIN_CLASS "" -ENV JAVA_CLASS_PATH "" - -# Performance Tuning for Malloc -ENV MALLOC_ARENA_MAX 4 - -# Log Folder Name Override -ENV LOG_DIR_NAME "" - -RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && \ - /usr/bin/crb enable && \ - dnf -y install binutils libsodium openssl zlib readline tzdata gzip tar ca-certificates curl && \ - dnf clean all - -# Install Java 21 Adoptium JDK -RUN set -eux; \ - ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ - case "${ARCH}" in \ - aarch64|arm64) \ - ESUM='e184dc29a6712c1f78754ab36fb48866583665fa345324f1a79e569c064f95e9'; \ - BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.1_12.tar.gz'; \ - ;; \ - amd64|i386:x86-64) \ - ESUM='1a6fa8abda4c5caed915cfbeeb176e7fbd12eb6b222f26e290ee45808b529aa1'; \ - BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_x64_linux_hotspot_21.0.1_12.tar.gz'; \ - ;; \ - ppc64el|powerpc:common64) \ - ESUM='9574828ef3d735a25404ced82e09bf20e1614f7d6403956002de9cfbfcb8638f'; \ - BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.1%2B12/OpenJDK21U-jdk_ppc64le_linux_hotspot_21.0.1_12.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ - esac; \ - curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p /usr/local/java; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory "/usr/local/java" \ - --strip-components 1 \ - --no-same-owner \ - ; \ - rm -f /tmp/openjdk.tar.gz /usr/local/java/lib/src.zip; - -RUN dnf -y install sudo && \ - echo >> /etc/sudoers && \ - echo "%hedera ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers - -# Configure the standard user account -RUN groupadd --gid 2000 hedera && \ - useradd --no-user-group --create-home --uid 2000 --gid 2000 --shell /bin/bash hedera && \ - mkdir -p /opt/hgcapp && \ - chown -R hedera:hedera /opt/hgcapp - -# Create Application Folders -RUN mkdir -p "/opt/hgcapp" && \ - mkdir -p "/opt/hgcapp/accountBalances" && \ - mkdir -p "/opt/hgcapp/eventsStreams" && \ - mkdir -p "/opt/hgcapp/recordStreams" && \ - mkdir -p "/opt/hgcapp/services-hedera" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/apps" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/config" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/keys" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/lib" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/stats" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/saved" && \ - mkdir -p "/opt/hgcapp/services-hedera/HapiApp2.0/data/upgrade" - -# Add the entrypoint script and systemd service file -ADD entrypoint.sh /opt/hgcapp/services-hedera/HapiApp2.0/ -ADD network-node.service /usr/lib/systemd/system/ - -# Ensure proper file permissions -RUN chmod -R +x /opt/hgcapp/services-hedera/HapiApp2.0/entrypoint.sh && \ - chown -R 2000:2000 /opt/hgcapp/ - -RUN mkdir -p /etc/network-node && \ - touch /etc/network-node/application.env && \ - chown -R 2000:2000 /etc/network-node - -# Expose TCP/UDP Port Definitions -EXPOSE 50111/tcp 50211/tcp 50212/tcp - -# Set Final Working Directory and User -WORKDIR "/opt/hgcapp" diff --git a/docker/ubi8-init-java21/build.gradle.kts b/docker/ubi8-init-java21/build.gradle.kts deleted file mode 100644 index 274cc63b5..000000000 --- a/docker/ubi8-init-java21/build.gradle.kts +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2023 Hedera Hashgraph, LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id("com.palantir.docker") version "0.35.0" -} - -val repo = "ghcr.io" -val registry = "hashgraph/full-stack-testing" -val containerName = "ubi8-init-java21" -val appVersion = project.version.toString() - -docker { - name = "${repo}/${registry}/${containerName}:${appVersion}" - version = appVersion - files("entrypoint.sh", "network-node.service") - buildx(true) - if (!System.getenv("CI").isNullOrEmpty()) { - platform("linux/arm64", "linux/amd64") - push(true) - } else { - load(true) // loads the image into the local docker daemon, doesn't support multi-platform - } -} diff --git a/docker/ubi8-init-java21/entrypoint.sh b/docker/ubi8-init-java21/entrypoint.sh deleted file mode 100644 index dd7100a88..000000000 --- a/docker/ubi8-init-java21/entrypoint.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/usr/bin/env bash - -######################################################################################################################## -# Copyright 2016-2022 Hedera Hashgraph, LLC # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" BASIS, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -######################################################################################################################## - -set -eo pipefail - -if [[ -z "${APP_HOME}" ]]; then - echo "ERROR: APP_HOME is not defined, but is required!" - exit 63 -fi - -cd "${APP_HOME}" || exit 64 - -if [[ -z "${JAVA_OPTS}" ]]; then - JAVA_OPTS="" -fi - -# Setup Heap Options -JAVA_HEAP_OPTS="" - -if [[ -n "${JAVA_HEAP_MIN}" ]]; then - JAVA_HEAP_OPTS="${JAVA_HEAP_OPTS} -Xms${JAVA_HEAP_MIN}" -fi - -if [[ -n "${JAVA_HEAP_MAX}" ]]; then - JAVA_HEAP_OPTS="${JAVA_HEAP_OPTS} -Xmx${JAVA_HEAP_MAX}" -fi - -# Setup Main Class -[[ -z "${JAVA_MAIN_CLASS}" ]] && JAVA_MAIN_CLASS="com.hedera.node.app.ServicesMain" - -# Setup Classpath -JCP_OVERRIDDEN="false" -if [[ -z "${JAVA_CLASS_PATH}" ]]; then - JAVA_CLASS_PATH="data/lib/*" -else - JCP_OVERRIDDEN="true" -fi - -if [[ "${JCP_OVERRIDDEN}" != true && "${JAVA_MAIN_CLASS}" != "com.swirlds.platform.Browser" ]]; then - JAVA_CLASS_PATH="${JAVA_CLASS_PATH}:data/apps/*" -fi - -# Override Log Directory Name (if provided) -LOG_DIR_NAME="${LOG_DIR_NAME:-output}" - -# Ensure the log directory exists -if [[ ! -d "${APP_HOME}/${LOG_DIR_NAME}" ]]; then - mkdir -p "${APP_HOME}/${LOG_DIR_NAME}" -fi - -cat <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> BEGIN USER IDENT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -id -echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< END USER IDENT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" -echo - -echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> BEGIN JAVA VERSION >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -/usr/bin/env java -version -echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< END JAVA VERSION <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" -echo - -set +e -echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> BEGIN NODE OUTPUT >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -echo "command: /usr/bin/env java ${JAVA_HEAP_OPTS} ${JAVA_OPTS} -cp """${JAVA_CLASS_PATH}""" """${JAVA_MAIN_CLASS}"""" -/usr/bin/env java ${JAVA_HEAP_OPTS} ${JAVA_OPTS} -cp "${JAVA_CLASS_PATH}" "${JAVA_MAIN_CLASS}" -EC="${?}" -echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< END NODE OUTPUT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" - -echo -echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> BEGIN EXIT CODE >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" -printf "Process Exit Code: %s\n" "${EC}" -echo "<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< END EXIT CODE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" - -printf "\n\n#### Hedera Services Node Software Stopped ####\n\n" diff --git a/docker/ubi8-init-java21/network-node.service b/docker/ubi8-init-java21/network-node.service deleted file mode 100644 index 1e9c71e64..000000000 --- a/docker/ubi8-init-java21/network-node.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Hedera Network Node -After=network.target - -[Service] -Type=simple -Restart=no -User=hedera -Group=hedera - -PassEnvironment=JAVA_HOME JAVA_OPTS JAVA_HEAP_MIN JAVA_HEAP_MAX JAVA_MAIN_CLASS JAVA_CLASS_PATH PATH APP_HOME -EnvironmentFile=/etc/network-node/application.env - -WorkingDirectory=/opt/hgcapp/services-hedera/HapiApp2.0 -ExecStart=/usr/bin/bash /opt/hgcapp/services-hedera/HapiApp2.0/entrypoint.sh - -[Install] -WantedBy=multi-user.target diff --git a/fullstack-gradle-plugin/src/test/kotlin/com/hedera/fullstack/gradle/plugin/HelmInstallChartTaskTest.kt b/fullstack-gradle-plugin/src/test/kotlin/com/hedera/fullstack/gradle/plugin/HelmInstallChartTaskTest.kt index 6408f3a2e..60f1e9f57 100644 --- a/fullstack-gradle-plugin/src/test/kotlin/com/hedera/fullstack/gradle/plugin/HelmInstallChartTaskTest.kt +++ b/fullstack-gradle-plugin/src/test/kotlin/com/hedera/fullstack/gradle/plugin/HelmInstallChartTaskTest.kt @@ -69,7 +69,7 @@ class HelmInstallChartTaskTest { chart.set(fullstackDeploymentChartPath) release.set("fst") // set image for nmt-install - set.add("defaults.root.image.repository=hashgraph/full-stack-testing/ubi8-init-dind") + set.add("defaults.root.image.repository=hashgraph/solo-containers/ubi8-init-dind") values.add(valuesFilePath) } diff --git a/settings.gradle.kts b/settings.gradle.kts index cb243c70c..c892c0164 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,14 +23,6 @@ rootProject.name = "full-stack-testing" includeBuild(".") // https://github.com/gradlex-org/java-module-dependencies/issues/26 // Include the subprojects -include(":docker-kubectl-bats", "docker/kubectl-bats") - -include(":docker-ubi8-init-dind", "docker/ubi8-init-dind") - -include(":docker-ubi8-init-java17", "docker/ubi8-init-java17") - -include(":docker-ubi8-init-java21", "docker/ubi8-init-java21") - include(":fullstack-bom", "fullstack-core/fullstack-bom") include(":fullstack-alerting-api", "fullstack-core/fullstack-alerting-api")