-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(install): Adds support for podman(compose) #3673
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
Changes from 5 commits
d87c155
cd24311
64c9741
8034a6e
0fca38e
d98e2fb
27e524d
d711b5b
0e5e24e
f89f0c2
7c886c9
8039e03
00f4c81
b467a55
b9bff98
8185732
3bd844c
fc3d976
059f0c7
ed1e604
abb4551
b8a0206
5ae7db9
e2d60ee
dd74c39
cfa9157
9df8ab4
b679f06
400e4ea
5abf5a7
cb54be2
6416fa6
43f5431
09f54a0
257dc2d
7259d27
705a8b7
8e6e116
7d7f1c2
ffe08d8
2544ec8
06e6e24
8f0ba1a
ab342b9
1973cb0
a61a7a5
69e671d
dc4c1db
485c264
fe231a4
ca40557
dbe912d
a2792f7
69d76b2
9f9add5
5ebfd90
fba8afc
1aaaadc
82944e0
33d7596
091d949
149a822
fbd0181
9c723b9
b1e9178
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
echo "${_group}Creating volumes for persistent storage ..." | ||
|
||
echo "Created $(docker volume create --name=sentry-clickhouse)." | ||
echo "Created $(docker volume create --name=sentry-data)." | ||
echo "Created $(docker volume create --name=sentry-kafka)." | ||
echo "Created $(docker volume create --name=sentry-postgres)." | ||
echo "Created $(docker volume create --name=sentry-redis)." | ||
echo "Created $(docker volume create --name=sentry-symbolicator)." | ||
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-clickhouse)." | ||
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-data)." | ||
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-kafka)." | ||
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-postgres)." | ||
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-redis)." | ||
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-symbolicator)." | ||
|
||
echo "${_endgroup}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
echo "${_group}Detecting container engine ..." | ||
|
||
if [[ "${CONTAINER_ENGINE_PODMAN:-0}" -eq 1 ]] && command -v podman &> /dev/null; then | ||
export CONTAINER_ENGINE="podman" | ||
elif command -v docker &> /dev/null; then | ||
export CONTAINER_ENGINE="docker" | ||
else | ||
echo "FAIL: Neither podman nor docker is installed on the system." | ||
exit 1 | ||
fi | ||
echo "Detected container engine: $CONTAINER_ENGINE" | ||
echo "${_endgroup}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ show_help() { | |
cat <<EOF | ||
Usage: $0 [options] | ||
Install Sentry with \`docker compose\`. | ||
Install Sentry with \`docker|podman compose\`. | ||
Options: | ||
-h, --help Show this message and exit. | ||
|
@@ -29,6 +29,8 @@ Options: | |
--no-report-self-hosted-issues | ||
Do not report error and performance data about your | ||
self-hosted instance upstream to Sentry. | ||
--container-engine-podman | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above: how about this just being There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I understand your intent. This was thought as a switch to activate podman over docker. We can surely remove the autodetection and completely rely on this switch. I'd still keep it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DuncanConroy sorry for not being clearer. What I had in mind was making Although we would only support There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure how to do this with bash, tbh. :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll see what I can do about this 😅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is quite simple... unless you want to validate argument :) case "$1" in
<...>
--container-engine) CONTAINER_ENGINE="$2"; shift ;; |
||
Use podman as the container engine. | ||
EOF | ||
} | ||
|
||
|
@@ -46,6 +48,7 @@ MINIMIZE_DOWNTIME="${MINIMIZE_DOWNTIME:-}" | |
SKIP_COMMIT_CHECK="${SKIP_COMMIT_CHECK:-}" | ||
REPORT_SELF_HOSTED_ISSUES="${REPORT_SELF_HOSTED_ISSUES:-}" | ||
SKIP_SSE42_REQUIREMENTS="${SKIP_SSE42_REQUIREMENTS:-}" | ||
CONTAINER_ENGINE_PODMAN="${CONTAINER_ENGINE_PODMAN:-}" | ||
|
||
while (($#)); do | ||
case "$1" in | ||
|
@@ -67,6 +70,7 @@ while (($#)); do | |
--report-self-hosted-issues) REPORT_SELF_HOSTED_ISSUES=1 ;; | ||
--no-report-self-hosted-issues) REPORT_SELF_HOSTED_ISSUES=0 ;; | ||
--skip-sse42-requirements) SKIP_SSE42_REQUIREMENTS=1 ;; | ||
--container-engine-podman) CONTAINER_ENGINE_PODMAN=1 ;; | ||
--) ;; | ||
*) | ||
echo "Unexpected argument: $1. Use --help for usage information." | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
echo "${_group}Fetching and updating Docker images ..." | ||
echo "${_group}Fetching and updating $CONTAINER_ENGINE images ..." | ||
|
||
# We tag locally built images with a '-self-hosted-local' suffix. `docker | ||
# compose pull` tries to pull these too and shows a 404 error on the console | ||
# which is confusing and unnecessary. To overcome this, we add the | ||
# stderr>stdout redirection below and pass it through grep, ignoring all lines | ||
# having this '-onpremise-local' suffix. | ||
|
||
$dc pull -q --ignore-pull-failures 2>&1 | grep -v -- -self-hosted-local || true | ||
$dc pull --ignore-pull-failures 2>&1 | grep -v -- -self-hosted-local || true | ||
|
||
# We may not have the set image on the repo (local images) so allow fails | ||
docker pull ${SENTRY_IMAGE} || true | ||
$CONTAINER_ENGINE pull ${SENTRY_IMAGE} || true | ||
|
||
echo "${_endgroup}" |
Uh oh!
There was an error while loading. Please reload this page.