Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump kafka and zookeeper versions #2988

Merged
merged 9 commits into from
Apr 30, 2024
Prev Previous commit
Next Next commit
add script to modify docker volume permissions
  • Loading branch information
hubertdeng123 committed Apr 26, 2024
commit ee357279d738ca927340dc9ca781d415ec9cdca8
23 changes: 23 additions & 0 deletions .github/workflows/sample-test-runs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test
on:
schedule:
# kick off a job every 5 minutes
- cron: "*/5 * * * *"
defaults:
run:
shell: bash
jobs:
e2e-test:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-22.04
name: "Sentry self-hosted end-to-end tests"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: self-hosted

- name: End to end tests
uses: getsentry/action-self-hosted-e2e-tests@main
with:
project_name: self-hosted
12 changes: 0 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,6 @@ jobs:
with:
path: self-hosted

- name: Get Compose
run: |
# Always remove `docker compose` support as that's the newer version
# and comes installed by default nowadays.
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
# Docker Compose v1 is installed here, remove it
sudo rm -f "/usr/local/bin/docker-compose"
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
sudo mkdir -p "/usr/local/lib/docker/cli-plugins"
sudo curl -L https://github.com/docker/compose/releases/download/v2.7.0/docker-compose-`uname -s`-`uname -m` -o "/usr/local/lib/docker/cli-plugins/docker-compose"
sudo chmod +x "/usr/local/lib/docker/cli-plugins/docker-compose"

- name: End to end tests
uses: getsentry/action-self-hosted-e2e-tests@main
with:
Expand Down
6 changes: 5 additions & 1 deletion _integration-test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
with open("sentry/requirements.txt", "w") as req_file:
req_file.write("python-ldap\n")
os.environ["MINIMIZE_DOWNTIME"] = "1"
subprocess.run(["./install.sh"], check=True)
subprocess.run(

Check warning on line 55 in _integration-test/conftest.py

View check run for this annotation

Codecov / codecov/patch

_integration-test/conftest.py#L55

Added line #L55 was not covered by tests
["./install.sh"],
check=True,
capture_output=True,
)
# Create test user
subprocess.run(
[
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ services:
target: /opt/sentry/
zookeeper:
<<: *restart_policy
image: "confluentinc/cp-zookeeper:7.5.0"
image: "confluentinc/cp-zookeeper:7.6.1"
environment:
ZOOKEEPER_CLIENT_PORT: "2181"
CONFLUENT_SUPPORT_METRICS_ENABLE: "false"
Expand All @@ -184,7 +184,7 @@ services:
depends_on:
zookeeper:
<<: *depends_on-healthy
image: "confluentinc/cp-kafka:7.5.0"
image: "confluentinc/cp-kafka:7.6.1"
environment:
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT:https://kafka:9092"
Expand Down
1 change: 1 addition & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ source install/check-minimum-requirements.sh

# Let's go! Start impacting things.
source install/turn-things-off.sh
source install/update-docker-volume-permissions.sh
source install/create-docker-volumes.sh
source install/ensure-files-from-examples.sh
source install/check-memcached-backend.sh
Expand Down
11 changes: 11 additions & 0 deletions install/update-docker-volume-permissions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
echo "${_group}Ensuring Kafka and Zookeeper volumes have correct permissions ..."

# Only supporting platforms on linux x86 platforms and not apple silicon. I'm assuming that folks using apple silicon are doing it for dev purposes and it's difficult
# to change permissions of docker volumes since it is run in a VM.
if [[ "$DOCKER_PLATFORM" = "linux/amd64" && -n "$(docker volume ls -q -f name=sentry-zookeeper)" && -n "$(docker volume ls -q -f name=sentry-kafka)" ]]; then
chmod -R a+w /var/lib/docker/volumes/sentry-zookeeper/_data || true
chmod -R a+w /var/lib/docker/volumes/sentry-kafka/_data || true
chmod -R a+w /var/lib/docker/volumes/sentry-self-hosted_sentry-zookeeper-log/_data || true
fi

echo "${_endgroup}"
1 change: 1 addition & 0 deletions sentry/sentry.conf.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def get_internal_network():
"organizations:mobile-ttid-ttfd-contribution",
"organizations:starfish-mobile-appstart",
"organizations:standalone-span-ingestion",
"organizations:spans-first-ui",
) # starfish related flags
}
)
Expand Down
Loading