Skip to content

Commit 3cbfa31

Browse files
authored
Revert FLB repository changes (#952)
* Revert "Update FLB_VERSION to allow overriding default branch or tag (#949)" This reverts commit 855fcc5. * Revert "Add FLB_REPOSITORY to allow overriding default Fluent Bit Repo (#943)" This reverts commit 66b2457.
1 parent 08cc2c0 commit 3cbfa31

File tree

5 files changed

+13
-66
lines changed

5 files changed

+13
-66
lines changed

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ all: release
1515

1616
# Execute set-cache to turn docker cache back on for faster development.
1717
DOCKER_BUILD_FLAGS := "--no-cache"
18-
# Fluent Bit version (branch or tag) to checkout, will use value if not set
19-
FLB_VERSION ?= "1.9.10"
20-
# Fluent Bit repository to checkout, will use value if not set
21-
FLB_REPOSITORY ?= "https://github.com/amazon-contributing/upstream-to-fluent-bit.git"
2218

2319
.PHONY: dev
2420
dev: DOCKER_BUILD_FLAGS =
@@ -38,7 +34,7 @@ debug: main-debug init-debug
3834
.PHONY: build
3935
build:
4036
docker system prune -f
41-
docker build $(DOCKER_BUILD_FLAGS) --build-arg FLB_VERSION=${FLB_VERSION} --build-arg FLB_REPOSITORY=${FLB_REPOSITORY} -t amazon/aws-for-fluent-bit:build -f ./scripts/dockerfiles/Dockerfile.build .
37+
docker build $(DOCKER_BUILD_FLAGS) -t amazon/aws-for-fluent-bit:build -f ./scripts/dockerfiles/Dockerfile.build .
4238

4339
.PHONY: build-init
4440
build-init:

README.md

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Welcome to AWS for Fluent Bit! Before using this Docker Image, please read this
2828
- [Using the AWS Plugins outside of a container](#using-the-aws-plugins-outside-of-a-container)
2929
- [Running aws-for-fluent-bit Windows containers](#running-aws-for-fluent-bit-windows-containers)
3030
- [Development](#development)
31-
- [Local build](#local-build)
3231
- [Local integ testing](#local-integ-testing)
3332
- [Developing Features in the AWS Plugins](#developing-features-in-the-aws-plugins)
3433
- [Fluent Bit Examples](#fluent-bit-examples)
@@ -355,55 +354,6 @@ For more details about running Fluent Bit Windows containers in Amazon ECS, plea
355354

356355
### Development
357356

358-
#### Local build
359-
360-
AWS for Fluent Bit can be built locally using the following commands:
361-
362-
- `make release`: Builds the image with the `--no-cache` option, ensuring a clean build
363-
- `make dev`: Builds the image with Docker caching enabled for faster development iterations
364-
365-
##### Customizing Fluent Bit Version and Repository
366-
367-
You can customize which version of Fluent Bit is built and which repository it's sourced from. The default values are:
368-
369-
- `FLB_VERSION`: "1.9.10" (can be either a branch name or tag name within the repository)
370-
- `FLB_REPOSITORY`: "https://github.com/amazon-contributing/upstream-to-fluent-bit.git"
371-
372-
There are two ways to customize these values:
373-
374-
**Method 1: Using environment variables**
375-
376-
Set the environment variables when running the make command:
377-
378-
```bash
379-
# Build with a specific Fluent Bit version tag
380-
FLB_VERSION="2.0.8" make release
381-
382-
# Build with a specific branch name
383-
FLB_VERSION="feature-branch" make release
384-
385-
# Build from a different repository
386-
FLB_VERSION="your-branch" FLB_REPOSITORY="https://github.com/your-username/fluent-bit.git" make release
387-
388-
# Combine with dev mode for faster builds with caching
389-
FLB_VERSION="your-branch" FLB_REPOSITORY="https://github.com/your-username/fluent-bit.git" make dev
390-
```
391-
392-
**Method 2: Updating the Makefile directly**
393-
394-
You can also modify the default values in the Makefile:
395-
396-
1. Open the Makefile in your editor
397-
2. Locate these lines (near the top):
398-
```
399-
# Fluent Bit version (branch or tag) to checkout, will use value if not set
400-
FLB_VERSION ?= "1.9.10"
401-
# Fluent Bit repository to checkout, will use value if not set
402-
FLB_REPOSITORY ?= "https://github.com/amazon-contributing/upstream-to-fluent-bit.git"
403-
```
404-
3. Update the values as needed
405-
4. Save the file and run `make release` or `make dev`
406-
407357
#### Local integ testing
408358

409359
Use `make dev` to build the image.

scripts/dockerfiles/Dockerfile.build

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
FROM public.ecr.aws/amazonlinux/amazonlinux:2 as builder
22

3-
# Fluent Bit version (branch or tag) to checkout
4-
ARG FLB_VERSION=1.9.10
5-
# Fluent Bit repository to checkout
6-
ARG FLB_REPOSITORY=https://github.com/amazon-contributing/upstream-to-fluent-bit.git
3+
# Fluent Bit version; update these for each release
4+
ENV FLB_VERSION 1.9.10
75
# branch to pull parsers from in github.com/fluent/fluent-bit-docker-image
86
ENV FLB_DOCKER_BRANCH 1.8
97

10-
RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log
8+
ENV FLB_TARBALL http://github.com/fluent/fluent-bit/archive/v$FLB_VERSION.zip
9+
RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/
1110

1211
RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
1312
RUN chmod +x /bin/gimme
@@ -76,8 +75,10 @@ ADD configs/plugin-metrics-parser.conf /fluent-bit/configs/
7675
FROM builder as compile
7776

7877
# Get Fluent Bit source code
79-
RUN git clone --single-branch --branch ${FLB_VERSION} ${FLB_REPOSITORY} /tmp/fluent-bit/
80-
WORKDIR /tmp/fluent-bit/build/
78+
WORKDIR /tmp/fluent-bit-$FLB_VERSION/
79+
RUN git clone https://github.com/amazon-contributing/upstream-to-fluent-bit.git /tmp/fluent-bit-$FLB_VERSION/
80+
WORKDIR /tmp/fluent-bit-$FLB_VERSION/build/
81+
RUN git checkout $FLB_VERSION
8182

8283
# Apply Fluent Bit patches to base version
8384
COPY AWS_FLB_CHERRY_PICKS \

troubleshooting/debugging.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ CMD valgrind --leak-check=full --error-limit=no /fluent-bit/bin/fluent-bit -c /f
778778
The best option, which is most likely to catch any leak or segfault is to create a fresh build of the image using the `make debug-valgrind` target. This will create a fresh build with debug mode and valgrind support enabled, which gives the highest chance that Valgrind will be able to produce useful diagnostic information about the issue.
779779

780780
1. Check out the git tag for the version that saw the problem
781-
2. Make sure the `FLB_VERSION` at the top of the `Makefile` is set to the same version as the main Dockerfile for that tag.
781+
2. Make sure the `FLB_VERSION` at the top of the `scripts/dockerfiles/Dockerfile.build` is set to the same version as the main Dockerfile for that tag.
782782
3. Build this dockerfile with the `make debug-valgrind` target. The image will be tagged with the `amazon/aws-for-fluent-bit:debug-valgrind` tag.
783783

784784
##### Other Options: Other Debug Builds
@@ -1233,7 +1233,7 @@ When you recieve a SIGSEGV/crash report from a customer, perform the following s
12331233

12341234
#### 1. Build and distribute a core dump S3 uploader image
12351235

1236-
For debug images, we update the `debug-latest` tag and add a tag as `debug-<Version>`. You can find them in [Docker Hub](https://hub.docker.com/r/amazon/aws-for-fluent-bit), [Amazon ECR Public Gallery](https://gallery.ecr.aws/aws-observability/aws-for-fluent-bit) and Amazon ECR. If you need a customized image build for the specific version/case you are testing. Make sure `FLB_VERSION` is set to the right version in `Makefile` and make sure the `AWS_FLB_CHERRY_PICKS` file has the right contents for the release you are testing.
1236+
For debug images, we update the `debug-latest` tag and add a tag as `debug-<Version>`. You can find them in [Docker Hub](https://hub.docker.com/r/amazon/aws-for-fluent-bit), [Amazon ECR Public Gallery](https://gallery.ecr.aws/aws-observability/aws-for-fluent-bit) and Amazon ECR. If you need a customized image build for the specific version/case you are testing. Make sure the `ENV FLB_VERSION` is set to the right version in the `Dockerfile.build` and make sure the `AWS_FLB_CHERRY_PICKS` file has the right contents for the release you are testing.
12371237

12381238
Then simply run:
12391239
```

troubleshooting/tutorials/remote-core-dump/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ Clone the AWS for Fluent Bit source code, and run `make debug` for a plain debug
2727
When Fluent Bit crashes, a zipped core file, stacktrace, and the Fluent Bit executable will be output to the `/cores` directory and the files will also be uploaded to S3.
2828

2929
There are couple of things to note about the debug target for the core file debugging use case:
30-
- The Fluent Bit upstream base version is specified with `FLB_VERSION` in `Makefile`
30+
- The Fluent Bit upstream base version is specified with `ENV FLB_VERSION`
3131
- Fluent Bit is compiled with CMake flag `-DFLB_DEBUG=On`
3232
- `gdb` is installed in the final stage of the Docker build.
3333
- `aws` cli is installed to copy files to the S3 bucket.
3434

35-
When you clone AWS for Fluent Bit, you will automatically get the latest Dockerfile for our latest release on the mainline branch. To create a debug build of a different version, either check out the tag for that version, or modify the `FLB_VERSION` at the top of the `Makefile` to install the desired Fluent Bit base version.
35+
When you clone AWS for Fluent Bit, you will automatically get the latest Dockerfile for our latest release on the mainline branch. To create a debug build of a different version, either check out the tag for that version, or modify the `ENV FLB_VERSION` at the top of the `/scripts/dockerfiles/Dockerfile.build` to install the desired Fluent Bit base version.
3636

3737
Once you are ready, build the debug image:
3838

0 commit comments

Comments
 (0)