Skip to content
Open
Show file tree
Hide file tree
Changes from 9 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
47 changes: 47 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
timeout-minutes: 30
outputs:
version: ${{ steps.version.outputs.version }}
elasticsearch_image_tag: ${{ steps.elasticsearch_image.outputs.tag }}
should_publish: ${{ (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'dev-preview')) && secrets.DOCKER_USERNAME != '' && secrets.DOCKER_PASSWORD != '' }}
is_prod_deploy: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name != 'pull_request' }}
is_dev_deploy: ${{ (github.event_name == 'repository_dispatch' && github.event.action == 'preview') || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'dev-preview')) }}
Expand Down Expand Up @@ -129,9 +130,52 @@ jobs:
echo "version=$version" >> $GITHUB_OUTPUT
echo "### $version" >> $GITHUB_STEP_SUMMARY

- name: Resolve Elasticsearch image
id: elasticsearch_image
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PUSH_BEFORE_SHA: ${{ github.event.before }}
run: |
version=$(sed -n 's/.*elasticsearch:\([^ ]*\).*/\1/p' build/docker/elasticsearch/9.x/Dockerfile)
tag=$version
image_changed=false

if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]] &&
! git diff --quiet "$PR_BASE_SHA"...HEAD -- build/docker/elasticsearch/9.x .github/workflows/elasticsearch-docker-9.yml; then
Comment thread
ejsmith marked this conversation as resolved.
image_changed=true
Comment on lines +143 to +145

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Build fork candidates before waiting for them

For any pull request from a fork that changes the Elasticsearch Docker inputs, this branch selects the content-addressed candidate and waits for its manifest, but .github/workflows/elasticsearch-docker-9.yml only publishes on push; a push in the contributor's fork cannot use this repository's Docker Hub credentials, so that tag is never published and the version job times out, blocking both API and E2E validation. Add a trusted mechanism that builds/publishes fork candidates, or validate them locally without requiring publication.

AGENTS.md reference: AGENTS.md:L85-L88

Useful? React with 👍 / 👎.

elif [[ "$GITHUB_EVENT_NAME" == "push" && "$GITHUB_REF" == "refs/heads/main" ]] &&
! git diff --quiet "$PUSH_BEFORE_SHA"..HEAD -- build/docker/elasticsearch/9.x .github/workflows/elasticsearch-docker-9.yml; then
image_changed=true
fi

if [[ "$image_changed" == "true" ]]; then
image_sha=$(sha256sum build/docker/elasticsearch/9.x/Dockerfile | cut -d " " -f 1)
tag="$version-sha256-$image_sha"
Comment thread
ejsmith marked this conversation as resolved.
Outdated
image="exceptionless/elasticsearch:$tag"

for attempt in {1..30}; do
if docker manifest inspect "$image" > /dev/null 2>&1; then
break
fi

if [[ "$attempt" -eq 30 ]]; then
echo "::error::Timed out waiting for $image to be published."
exit 1
fi

sleep 10
done
fi

echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "### Elasticsearch image: exceptionless/elasticsearch:$tag" >> "$GITHUB_STEP_SUMMARY"

test-api:
needs: version
runs-on: ubuntu-latest
timeout-minutes: 30
env:
Elasticsearch__ImageTag: ${{ needs.version.outputs.elasticsearch_image_tag }}

steps:
- name: Checkout
Expand Down Expand Up @@ -223,8 +267,11 @@ jobs:
run: echo "npm run test:integration"

test-e2e:
needs: version
runs-on: ubuntu-latest
timeout-minutes: 45
env:
Elasticsearch__ImageTag: ${{ needs.version.outputs.elasticsearch_image_tag }}

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/elasticsearch-docker-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
working-directory: build/docker/elasticsearch/8.x
run: |
VERSION=$(sed -n 's/.*elasticsearch:\([^ ]*\).*/\1/p' Dockerfile)
docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --tag exceptionless/elasticsearch:$VERSION --tag exceptionless/elasticsearch:latest
docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . --tag exceptionless/elasticsearch:$VERSION
53 changes: 53 additions & 0 deletions .github/workflows/elasticsearch-docker-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Elasticsearch 9.x Docker Image CI

on:
push:
paths:
- "build/docker/elasticsearch/9.x/**"
- ".github/workflows/elasticsearch-docker-9.yml"

jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') != true

steps:
- uses: actions/checkout@v7
- name: Setup .NET Core
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.301
- name: Build Reason
env:
GITHUB_EVENT: ${{ toJson(github) }}
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
- name: Build Version
run: |
dotnet tool install --global minver-cli --version 7.0.0
version=$(minver --tag-prefix v)
echo "MINVERVERSIONOVERRIDE=$version" >> $GITHUB_ENV
echo "VERSION=$version" >> $GITHUB_ENV
echo "### Version: $version" >> $GITHUB_STEP_SUMMARY
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Login to DockerHub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
with:
platforms: linux/amd64,linux/arm64
- name: Build custom Elasticsearch 9.x docker image
working-directory: build/docker/elasticsearch/9.x
env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
run: |
VERSION=$(sed -n 's/.*elasticsearch:\([^ ]*\).*/\1/p' Dockerfile)
IMAGE_SHA=$(sha256sum Dockerfile | cut -d " " -f 1)
TAGS=(--tag "exceptionless/elasticsearch:$VERSION-sha256-$IMAGE_SHA")
if [[ "$GITHUB_REF" == "refs/heads/$DEFAULT_BRANCH" ]]; then
TAGS+=(--tag "exceptionless/elasticsearch:$VERSION" --tag "exceptionless/elasticsearch:latest")
fi
docker buildx build --platform linux/amd64,linux/arm64 --output "type=image,push=true" --file ./Dockerfile . "${TAGS[@]}"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ENTRYPOINT ["/app/app-docker-entrypoint.sh"]

# completely self-contained

FROM exceptionless/elasticsearch:8.19.15 AS exceptionless
FROM exceptionless/elasticsearch:9.4.4 AS exceptionless

WORKDIR /app
COPY --from=job-publish /app/src/Exceptionless.Job/out ./
Expand Down
4 changes: 4 additions & 0 deletions build/docker/elasticsearch/9.x/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://www.docker.elastic.co/
FROM docker.elastic.co/elasticsearch/elasticsearch:9.4.4

RUN elasticsearch-plugin install -b mapper-size
8 changes: 4 additions & 4 deletions docker/docker-compose.apm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2.2"

services:
setup:
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.15
image: docker.elastic.co/elasticsearch/elasticsearch:9.4.4
volumes:
- certs:/usr/share/elasticsearch/config/certs
user: "0"
Expand Down Expand Up @@ -53,7 +53,7 @@ services:
depends_on:
setup:
condition: service_healthy
image: docker.elastic.co/elasticsearch/elasticsearch:8.19.15
image: docker.elastic.co/elasticsearch/elasticsearch:9.4.4
volumes:
- certs:/usr/share/elasticsearch/config/certs
- esdata:/usr/share/elasticsearch/data
Expand Down Expand Up @@ -98,7 +98,7 @@ services:
depends_on:
elasticsearch:
condition: service_healthy
image: docker.elastic.co/kibana/kibana:8.19.15
image: docker.elastic.co/kibana/kibana:9.4.4
volumes:
- certs:/usr/share/kibana/config/certs
ports:
Expand All @@ -124,7 +124,7 @@ services:
depends_on:
elasticsearch:
condition: service_healthy
image: docker.elastic.co/apm/apm-server:8.19.15
image: docker.elastic.co/apm/apm-server:9.4.4
volumes:
- certs:/usr/share/apm-server/certs
ports:
Expand Down
6 changes: 4 additions & 2 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
- appdata:/app/storage

elasticsearch:
image: exceptionless/elasticsearch:8.19.15
image: exceptionless/elasticsearch:9.4.4
Comment thread
ejsmith marked this conversation as resolved.
environment:
discovery.type: single-node
xpack.security.enabled: "false"
Expand All @@ -59,6 +59,8 @@ services:
- 9200:9200
- 9300:9300
volumes:
# Complete the Elasticsearch 8.19 upgrade preflight before reusing this volume with Elasticsearch 9.
# See https://exceptionless.com/docs/self-hosting/upgrading-self-hosted-instance
- esdata7:/usr/share/elasticsearch/data
healthcheck:
test:
Expand All @@ -74,7 +76,7 @@ services:
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:8.19.15
image: docker.elastic.co/kibana/kibana:9.4.4
ports:
- 5601:5601

Expand Down
6 changes: 4 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
elasticsearch:
image: exceptionless/elasticsearch:8.19.15
image: exceptionless/elasticsearch:9.4.4
environment:
node.name: elasticsearch
cluster.name: exceptionless
Expand All @@ -11,6 +11,8 @@ services:
ports:
- 9200:9200
volumes:
# Complete the Elasticsearch 8.19 upgrade preflight before reusing this volume with Elasticsearch 9.
# See https://exceptionless.com/docs/self-hosting/upgrading-self-hosted-instance
- esdata:/usr/share/elasticsearch/data
healthcheck:
test:
Expand All @@ -26,7 +28,7 @@ services:
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:8.19.15
image: docker.elastic.co/kibana/kibana:9.4.4
environment:
xpack.security.enabled: "false"
ports:
Expand Down
35 changes: 35 additions & 0 deletions docs/docs/self-hosting/upgrading-self-hosted-instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,41 @@ title: "Upgrading"

**If you are upgrading from v1 or [v2](https://github.com/exceptionless/Exceptionless/releases/tag/v2.0.0) you will need to upgrade to [v3.0](https://github.com/exceptionless/Exceptionless/releases/tag/v3.0.0) before upgrading to the latest release.**

## Upgrading from v8 to v9

Exceptionless v9 uses Elasticsearch 9. Do not point an Elasticsearch 9 node at an existing data volume until the cluster has been prepared with Elasticsearch 8.19. Elasticsearch 9 can fail to start when incompatible indices created before Elasticsearch 8 remain.

Use this upgrade path for an existing self-hosted installation:

1. Take a current Elasticsearch snapshot or other verified backup and test that it can be restored. Elasticsearch does not support downgrading a data directory after it has been upgraded.
2. Upgrade Elasticsearch and Kibana to the latest 8.19.x patch release first, using the existing data volume. Do not start Elasticsearch 9 yet.
3. Stop the Exceptionless app and job services, but leave Elasticsearch and Kibana 8.19 running. This prevents writes while legacy indices are reindexed.
4. Open Kibana's **Upgrade Assistant** and resolve every critical issue. Reindex every active Exceptionless index created before Elasticsearch 8. Delete only indices you have confirmed are no longer needed; do not mark active Exceptionless indices as read-only.
5. If this data volume previously ran Elasticsearch 7, temporarily disable the GeoIP downloader while still on Elasticsearch 8.19. Elasticsearch deletes its downloaded `.geoip_databases` system index when this setting is disabled; Exceptionless data is not affected.

```bash
curl -fsS -X PUT "http://localhost:9200/_cluster/settings" \
-H "Content-Type: application/json" \
-d '{"persistent":{"ingest.geoip.downloader.enabled":false}}'
```

6. Confirm that the deprecation API reports no critical issues:

```bash
curl -fsS "http://localhost:9200/_migration/deprecations?pretty"
```

7. Stop Elasticsearch and Kibana 8.19 without deleting their data volume. Update the Elasticsearch and Kibana images to the v9 versions, start them, and verify cluster health before restarting the Exceptionless app and jobs. In Docker Compose, do not run `docker compose down -v` because `-v` deletes the data volume.
8. After Elasticsearch 9 is healthy, restore the default GeoIP downloader behavior:

```bash
curl -fsS -X PUT "http://localhost:9200/_cluster/settings" \
-H "Content-Type: application/json" \
-d '{"persistent":{"ingest.geoip.downloader.enabled":null}}'
```

See Elastic's [prepare-to-upgrade guide](https://www.elastic.co/docs/deploy-manage/upgrade/prepare-to-upgrade) for the supported 8.x to 9.x upgrade requirements and Upgrade Assistant details.

## Upgrading from v7.1 to v8

We simplified the self hosting process by integrating the UI into the existing app images. As such `exceptionless/ui` docker images are deprecated and we recommend using `exceptionless/app`.
Expand Down
8 changes: 4 additions & 4 deletions k8s/elastic-monitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: elastic-monitor
namespace: elastic-system
spec:
version: 8.19.15
version: 9.4.4
podDisruptionBudget: {}
nodeSets:
- name: main
Expand Down Expand Up @@ -228,7 +228,7 @@ metadata:
name: kibana-monitor
namespace: elastic-system
spec:
version: 8.19.15
version: 9.4.4
count: 1
http:
tls:
Expand Down Expand Up @@ -364,7 +364,7 @@ metadata:
name: fleet-server
namespace: elastic-system
spec:
version: 8.19.15
version: 9.4.4
kibanaRef:
name: kibana-monitor
elasticsearchRefs:
Expand All @@ -388,7 +388,7 @@ metadata:
name: elastic-agent
namespace: elastic-system
spec:
version: 8.19.15
version: 9.4.4
kibanaRef:
name: kibana-monitor
fleetServerRef:
Expand Down
6 changes: 3 additions & 3 deletions k8s/ex-dev-elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ metadata:
name: ex-dev
namespace: ex-dev
spec:
version: 8.19.15
image: exceptionless/elasticsearch:8.19.15 # https://github.com/exceptionless/Exceptionless/tree/main/build/docker/elasticsearch
version: 9.4.4
image: exceptionless/elasticsearch:9.4.4 # https://github.com/exceptionless/Exceptionless/tree/main/build/docker/elasticsearch
secureSettings:
- secretName: ex-dev-snapshots
http:
Expand Down Expand Up @@ -68,7 +68,7 @@ metadata:
name: ex-dev
namespace: ex-dev
spec:
version: 8.19.15
version: 9.4.4
count: 1
elasticsearchRef:
name: ex-dev
Expand Down
6 changes: 3 additions & 3 deletions k8s/ex-prod-elasticsearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ metadata:
name: ex-prod
namespace: ex-prod
spec:
version: 8.19.15
image: exceptionless/elasticsearch:8.19.15 # https://github.com/exceptionless/Exceptionless/tree/main/build/docker/elasticsearch
version: 9.4.4
image: exceptionless/elasticsearch:9.4.4 # https://github.com/exceptionless/Exceptionless/tree/main/build/docker/elasticsearch
monitoring:
metrics:
elasticsearchRefs:
Expand Down Expand Up @@ -79,7 +79,7 @@ metadata:
name: ex-prod
namespace: ex-prod
spec:
version: 8.19.15
version: 9.4.4
count: 1
elasticsearchRef:
name: ex-prod
Expand Down
2 changes: 1 addition & 1 deletion k8s/exceptionless/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ elasticsearch:
connectionString:
image:
repository: exceptionless/elasticsearch
tag: 8.19.15
tag: 9.4.4
pullPolicy: IfNotPresent

redis:
Expand Down
2 changes: 1 addition & 1 deletion samples/docker-compose.all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:8.19.15
image: docker.elastic.co/kibana/kibana:9.4.4
ports:
- 5601:5601

Expand Down
4 changes: 2 additions & 2 deletions samples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
- ex_appdata:/app/storage

elasticsearch:
image: exceptionless/elasticsearch:8.19.15
image: exceptionless/elasticsearch:9.4.4
environment:
discovery.type: single-node
xpack.security.enabled: "false"
Expand All @@ -58,7 +58,7 @@ services:
kibana:
depends_on:
- elasticsearch
image: docker.elastic.co/kibana/kibana:8.19.15
image: docker.elastic.co/kibana/kibana:9.4.4
ports:
- 5601:5601

Expand Down
Loading
Loading