Skip to content

Commit

Permalink
Fixed outdated github action functions and added Foundationdb-monitor… (
Browse files Browse the repository at this point in the history
#135)

* Fixed outdated github action functions and added Foundationdb-monitor container

* fix yaml
  • Loading branch information
MarkSh1 authored Jul 3, 2024
1 parent 03e271f commit c7165cf
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
- name: Create Draft Release
if: ${{ steps.vers.outputs.release_flag == 'ON' }}
id: create_release
uses: actions/create-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "${{ steps.vers.outputs.full_ver }}"
release_name: "v${{ steps.vers.outputs.full_ver }}"
name: "v${{ steps.vers.outputs.full_ver }}"
draft: true
prerelease: false

Expand All @@ -52,13 +52,14 @@ jobs:
parallel: 5
image: foundationdb-build:7.3.0-1.ow.build
owner: owtech

runs-on: ${{ matrix.run_on }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set building repo
run: |
run: |
echo "use_image=ghcr.io/${{matrix.owner}}/${{matrix.image}}" >> "$GITHUB_ENV"
- name: Build
Expand All @@ -85,7 +86,7 @@ jobs:
# run: ctest --output-on-failure -V

- name: Upload result
uses: nanoufo/action-upload-artifacts-and-release-assets@v1.8
uses: nanoufo/action-upload-artifacts-and-release-assets@v2
with:
path: |
${{github.workspace}}/bld/linux/packages/*${{needs.calc_ver.outputs.full_ver}}*
Expand All @@ -105,7 +106,7 @@ jobs:
uses: actions/checkout@v4

- name: Download the foundationdb distro
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ${{github.workspace}}/bld/download

Expand Down Expand Up @@ -144,7 +145,7 @@ jobs:
uses: actions/checkout@v4

- name: Download the foundationdb distro
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: ${{github.workspace}}/bld/download

Expand Down Expand Up @@ -204,7 +205,7 @@ jobs:
pip3 install 'foundationdb==${{ env.JOSHUA_DB_VER }}'
- name: Download the correctness package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download_correctness
with:
name: correctness-${{needs.calc_ver.outputs.full_ver}}.tar.gz
Expand Down
4 changes: 3 additions & 1 deletion packaging/docker/build-images-for-owtech.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ else
DISTR_DIR="$DISTR_SRC"
fi

IMAGE_LIST="foundationdb-base foundationdb foundationdb-kubernetes-sidecar"
cp -r $BASE_DIR/../../fdbkubernetesmonitor $BASE_DIR/

IMAGE_LIST="foundationdb-base foundationdb foundationdb-kubernetes-sidecar fdb-kubernetes-monitor"

# Build and tag images
for IMG in $IMAGE_LIST; do
Expand Down
28 changes: 26 additions & 2 deletions packaging/docker/foundationdb-owtech.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Build foundationdb-base, foundationdb-kubernetes-sidecar and foundationdb
# Build foundationdb-base, foundationdb-monitor, foundationdb-kubernetes-sidecar and foundationdb
# requiements:
# 1. --build-arg FDB_VERSION=... must be a full version name, ex. 7.1.25-5.ow.1
# 2. /mnt/distr must be mounted to a directory with foundationdb built artifacts
# foundationdb-bins-${FDB_VERSION}.x86_64.tgz
# and foundationdb-libs-${FDB_VERSION}.x86_64.tgz must be there.

ARG BASE_IMAGE=oraclelinux:9

## base
FROM ${BASE_IMAGE} as base

RUN OS_SPECIFIC_PACKAGES="" \
Expand Down Expand Up @@ -73,10 +75,11 @@ RUN curl -Ls https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd6

WORKDIR /

## foundationdb-base
FROM base as foundationdb-base

WORKDIR /tmp
ARG FDB_VERSION=6.3.25-5.ow.1
ARG FDB_VERSION=7.3.0-1.ow.build

RUN mkdir -p /var/fdb/{logs,tmp,lib} && \
mkdir -p /usr/lib/fdb/multiversion && \
Expand All @@ -100,6 +103,26 @@ RUN tar -xvf /mnt/distr/foundationdb-bins-${FDB_VERSION}.x86_64.tgz -C /usr/bin

WORKDIR /

## go-build
FROM golang:1.22.2-bullseye AS go-build

COPY fdbkubernetesmonitor/ /fdbkubernetesmonitor
WORKDIR /fdbkubernetesmonitor
RUN go build -o /fdb-kubernetes-monitor *.go

## fdb-kubernetes-monitor
FROM foundationdb-base as fdb-kubernetes-monitor

# Install the kubernetes monitor binary
COPY --from=go-build /fdb-kubernetes-monitor /usr/bin/

# Runtime Configuration Options
USER fdb
WORKDIR /var/fdb
VOLUME /var/fdb/data
ENTRYPOINT ["/usr/bin/fdb-kubernetes-monitor"]

## foundationdb
FROM foundationdb-base as foundationdb

WORKDIR /tmp
Expand All @@ -125,6 +148,7 @@ ENV FDB_CLUSTER_FILE_CONTENTS ""
ENV FDB_PROCESS_CLASS unset
ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/var/fdb/scripts/fdb.bash"]

## foundationdb-kubernetes-sidecar
FROM foundationdb-base as foundationdb-kubernetes-sidecar

RUN dnf -y install python3 python3-pip \
Expand Down

0 comments on commit c7165cf

Please sign in to comment.