diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 75a3a42b1e..3209e5e2cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: file_ext: .tar.gz - arch: aarch64-unknown-linux-gnu os: ubuntu-2004-8-cores - features: "" + features: "--features mimalloc" file_name: openobserve-${{ github.ref_name }}-linux-arm64 file_ext: .tar.gz - arch: x86_64-apple-darwin @@ -33,7 +33,7 @@ jobs: file_ext: .tar.gz - arch: aarch64-apple-darwin os: macos-latest - features: "--no-default-features" + features: "" file_name: openobserve-${{ github.ref_name }}-darwin-arm64 file_ext: .tar.gz - arch: x86_64-pc-windows-msvc diff --git a/deploy/build/Dockerfile.aarch64 b/deploy/build/Dockerfile.aarch64 index 34b0071eb4..19e3990ce2 100644 --- a/deploy/build/Dockerfile.aarch64 +++ b/deploy/build/Dockerfile.aarch64 @@ -24,12 +24,11 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ \ RUSTFLAGS='-C target-feature=+aes,+crc,+lse,+neon' RUN --mount=type=cache,target=/root/.cache/sccache du -sh /root/.cache/sccache -RUN --mount=type=cache,target=/root/.cache/sccache cargo build --release --target aarch64-unknown-linux-gnu \ +RUN --mount=type=cache,target=/root/.cache/sccache cargo build --release --features mimalloc --target aarch64-unknown-linux-gnu \ && sccache --show-stats \ && du -sh /root/.cache/sccache RUN mv /app/target/aarch64-unknown-linux-gnu/release/openobserve /app/target/release/openobserve -# FROM gcr.io/distroless/cc:latest-arm64 as runtime # FROM gcr.io/distroless/cc:latest-arm64 as runtime FROM public.ecr.aws/debian/debian:bullseye-slim as runtime RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates diff --git a/deploy/build/Dockerfile.amd64 b/deploy/build/Dockerfile.amd64 index 73ff074a3c..bc7ac03e15 100644 --- a/deploy/build/Dockerfile.amd64 +++ b/deploy/build/Dockerfile.amd64 @@ -20,7 +20,7 @@ COPY . /app COPY --from=webBuilder /web/dist web/dist RUN --mount=type=cache,target=/root/.cache/sccache du -sh /root/.cache/sccache -RUN --mount=type=cache,target=/root/.cache/sccache RUSTFLAGS='-C target-feature=+sse2,+sse3,+ssse3,+sse4.1,+sse4.2' cargo build --release --target x86_64-unknown-linux-gnu \ +RUN --mount=type=cache,target=/root/.cache/sccache RUSTFLAGS='-C target-feature=+sse2,+sse3,+ssse3,+sse4.1,+sse4.2' cargo build --release --features mimalloc --target x86_64-unknown-linux-gnu \ && sccache --show-stats \ && du -sh /root/.cache/sccache RUN mv /app/target/x86_64-unknown-linux-gnu/release/openobserve /app/target/release/openobserve diff --git a/deploy/build/Dockerfile.mimalloc.aarch64 b/deploy/build/Dockerfile.mimalloc.aarch64 deleted file mode 100644 index 19e3990ce2..0000000000 --- a/deploy/build/Dockerfile.mimalloc.aarch64 +++ /dev/null @@ -1,38 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM public.ecr.aws/docker/library/node:18.12.1-bullseye as webBuilder -WORKDIR /web -COPY ./web /web/ - -RUN npm install -RUN NODE_OPTIONS="--max-old-space-size=8192" npm run build - -# FROM public.ecr.aws/docker/library/rust:bullseye as builder -FROM public.ecr.aws/zinclabs/rust:bullseye-sccache as builder - -# RUN rustup toolchain install nightly-2023-05-21 -# RUN rustup default nightly-2023-05-21 -# RUN rustup target add aarch64-unknown-linux-gnu -# RUN diff -u <(rustc --print cfg) <(rustc -C target-cpu=native --print cfg) -RUN rustc --version && sccache --version - -WORKDIR /app -COPY . /app -COPY --from=webBuilder /web/dist web/dist - -ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ - CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \ - CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ \ - RUSTFLAGS='-C target-feature=+aes,+crc,+lse,+neon' -RUN --mount=type=cache,target=/root/.cache/sccache du -sh /root/.cache/sccache -RUN --mount=type=cache,target=/root/.cache/sccache cargo build --release --features mimalloc --target aarch64-unknown-linux-gnu \ - && sccache --show-stats \ - && du -sh /root/.cache/sccache -RUN mv /app/target/aarch64-unknown-linux-gnu/release/openobserve /app/target/release/openobserve - -# FROM gcr.io/distroless/cc:latest-arm64 as runtime -FROM public.ecr.aws/debian/debian:bullseye-slim as runtime -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates -RUN apt-get install -y curl htop iftop sysstat procps lsof net-tools -RUN update-ca-certificates -COPY --from=builder /app/target/release/openobserve / -CMD ["/openobserve"] diff --git a/deploy/build/Dockerfile.mimalloc.amd64 b/deploy/build/Dockerfile.mimalloc.amd64 deleted file mode 100644 index bc7ac03e15..0000000000 --- a/deploy/build/Dockerfile.mimalloc.amd64 +++ /dev/null @@ -1,34 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM public.ecr.aws/docker/library/node:18.12.1-bullseye as webBuilder -WORKDIR /web -COPY ./web /web/ - -RUN npm install -RUN NODE_OPTIONS="--max-old-space-size=8192" npm run build - -# FROM public.ecr.aws/docker/library/rust:bullseye as builder -FROM public.ecr.aws/zinclabs/rust:bullseye-sccache as builder - -# RUN rustup toolchain install nightly-2023-05-21 -# RUN rustup default nightly-2023-05-21 -# RUN rustup target add x86_64-unknown-linux-gnu -# RUN diff -u <(rustc --print cfg) <(rustc -C target-cpu=native --print cfg) -RUN rustc --version && sccache --version - -WORKDIR /app -COPY . /app -COPY --from=webBuilder /web/dist web/dist - -RUN --mount=type=cache,target=/root/.cache/sccache du -sh /root/.cache/sccache -RUN --mount=type=cache,target=/root/.cache/sccache RUSTFLAGS='-C target-feature=+sse2,+sse3,+ssse3,+sse4.1,+sse4.2' cargo build --release --features mimalloc --target x86_64-unknown-linux-gnu \ - && sccache --show-stats \ - && du -sh /root/.cache/sccache -RUN mv /app/target/x86_64-unknown-linux-gnu/release/openobserve /app/target/release/openobserve - -# FROM gcr.io/distroless/cc as runtime -FROM public.ecr.aws/debian/debian:bullseye-slim as runtime -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates -RUN apt-get install -y curl htop iftop sysstat procps lsof net-tools -RUN update-ca-certificates -COPY --from=builder /app/target/release/openobserve / -CMD ["/openobserve"] diff --git a/deploy/build/Dockerfile.tag.aarch64 b/deploy/build/Dockerfile.tag.aarch64 index 73b8671900..83d6234160 100644 --- a/deploy/build/Dockerfile.tag.aarch64 +++ b/deploy/build/Dockerfile.tag.aarch64 @@ -24,7 +24,7 @@ ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc \ CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc \ CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++ \ RUSTFLAGS='-C target-feature=+aes,+crc,+lse,+neon' -RUN cargo build --release --target aarch64-unknown-linux-gnu +RUN cargo build --release --features mimalloc --target aarch64-unknown-linux-gnu RUN mv /app/target/aarch64-unknown-linux-gnu/release/openobserve /app/target/release/openobserve FROM gcr.io/distroless/cc:latest-arm64 as runtime diff --git a/deploy/build/buildspec-arm.yml b/deploy/build/buildspec-arm.yml index 6499e715da..b3360d48a7 100644 --- a/deploy/build/buildspec-arm.yml +++ b/deploy/build/buildspec-arm.yml @@ -55,12 +55,6 @@ phases: - docker manifest push public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH - docker manifest push public.ecr.aws/zinclabs/openobserve-dev:latest - # build openobserve-mimalloc - - docker pull public.ecr.aws/zinclabs/rust:bullseye-sccache - - docker build -t openobserve:latest-arm64-mimalloc -f deploy/build/Dockerfile.mimalloc.aarch64 . - - docker tag openobserve:latest-arm64-mimalloc public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-arm64-mimalloc - - docker push public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-arm64-mimalloc - cache: paths: - /root/.cache/ diff --git a/deploy/build/buildspec.yml b/deploy/build/buildspec.yml index e42efa56fd..c5c8de8a6b 100644 --- a/deploy/build/buildspec.yml +++ b/deploy/build/buildspec.yml @@ -31,7 +31,7 @@ phases: # build openobserve - docker pull public.ecr.aws/zinclabs/rust:bullseye-sccache - - docker build -t openobserve:latest-amd64 -f deploy/build/Dockerfile.mimalloc.amd64 . + - docker build -t openobserve:latest-amd64 -f deploy/build/Dockerfile.amd64 . - docker tag openobserve:latest-amd64 public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-amd64 - docker tag openobserve:latest-amd64 public.ecr.aws/zinclabs/openobserve-dev:latest-amd64 - docker push public.ecr.aws/zinclabs/openobserve-dev:$GIT_TAG-$GIT_HASH-amd64