Skip to content

Commit cd24311

Browse files
author
Daniel Bunte
committed
Renames container-technology -> container-engine
1 parent d87c155 commit cd24311

12 files changed

+54
-54
lines changed

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ source install/_lib.sh
1111

1212
# Pre-flight. No impact yet.
1313
source install/parse-cli.sh
14-
source install/detect-container-technology.sh
14+
source install/detect-container-engine.sh
1515
source install/detect-platform.sh
1616
source install/dc-detect-version.sh
1717
source install/error-handling.sh

install/check-minimum-requirements.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ echo "${_group}Checking minimum requirements ..."
22

33
source install/_min-requirements.sh
44

5-
DOCKER_VERSION=$($CONTAINER_TECHNOLOGY version --format '{{.Server.Version}}' || echo '')
5+
DOCKER_VERSION=$($CONTAINER_ENGINE version --format '{{.Server.Version}}' || echo '')
66
if [[ -z "$DOCKER_VERSION" ]]; then
7-
echo "FAIL: Unable to get $CONTAINER_TECHNOLOGY version, is the $CONTAINER_TECHNOLOGY daemon running?"
7+
echo "FAIL: Unable to get $CONTAINER_ENGINE version, is the $CONTAINER_ENGINE daemon running?"
88
exit 1
99
fi
1010

11-
if [[ "$CONTAINER_TECHNOLOGY" == "docker" ]]; then
11+
if [[ "$CONTAINER_ENGINE" == "docker" ]]; then
1212
if ! vergte ${DOCKER_VERSION//v/} $MIN_DOCKER_VERSION; then
1313
echo "FAIL: Expected minimum docker version to be $MIN_DOCKER_VERSION but found $DOCKER_VERSION"
1414
exit 1
@@ -17,7 +17,7 @@ if [[ "$CONTAINER_TECHNOLOGY" == "docker" ]]; then
1717
echo "FAIL: Expected minimum $dc_base version to be $MIN_COMPOSE_VERSION but found $COMPOSE_VERSION"
1818
exit 1
1919
fi
20-
elif [[ "$CONTAINER_TECHNOLOGY" == "podman" ]]; then
20+
elif [[ "$CONTAINER_ENGINE" == "podman" ]]; then
2121
if ! vergte ${DOCKER_VERSION//v/} $MIN_PODMAN_VERSION; then
2222
echo "FAIL: Expected minimum podman version to be $MIN_PODMAN_VERSION but found $DOCKER_VERSION"
2323
exit 1
@@ -27,16 +27,16 @@ elif [[ "$CONTAINER_TECHNOLOGY" == "podman" ]]; then
2727
exit 1
2828
fi
2929
fi
30-
echo "Found $CONTAINER_TECHNOLOGY version $DOCKER_VERSION"
31-
echo "Found $CONTAINER_TECHNOLOGY Compose version $COMPOSE_VERSION"
30+
echo "Found $CONTAINER_ENGINE version $DOCKER_VERSION"
31+
echo "Found $CONTAINER_ENGINE Compose version $COMPOSE_VERSION"
3232

33-
CPU_AVAILABLE_IN_DOCKER=$($CONTAINER_TECHNOLOGY run --rm busybox nproc --all)
33+
CPU_AVAILABLE_IN_DOCKER=$($CONTAINER_ENGINE run --rm busybox nproc --all)
3434
if [[ "$CPU_AVAILABLE_IN_DOCKER" -lt "$MIN_CPU_HARD" ]]; then
3535
echo "FAIL: Required minimum CPU cores available to Docker is $MIN_CPU_HARD, found $CPU_AVAILABLE_IN_DOCKER"
3636
exit 1
3737
fi
3838

39-
RAM_AVAILABLE_IN_DOCKER=$($CONTAINER_TECHNOLOGY run --rm busybox free -m 2>/dev/null | awk '/Mem/ {print $2}')
39+
RAM_AVAILABLE_IN_DOCKER=$($CONTAINER_ENGINE run --rm busybox free -m 2>/dev/null | awk '/Mem/ {print $2}')
4040
if [[ "$RAM_AVAILABLE_IN_DOCKER" -lt "$MIN_RAM_HARD" ]]; then
4141
echo "FAIL: Required minimum RAM available to Docker is $MIN_RAM_HARD MB, found $RAM_AVAILABLE_IN_DOCKER MB"
4242
exit 1
@@ -45,9 +45,9 @@ fi
4545
#SSE4.2 required by Clickhouse (https://clickhouse.yandex/docs/en/operations/requirements/)
4646
# On KVM, cpuinfo could falsely not report SSE 4.2 support, so skip the check. https://github.com/ClickHouse/ClickHouse/issues/20#issuecomment-226849297
4747
# This may also happen on other virtualization software such as on VMWare ESXi hosts.
48-
IS_KVM=$($CONTAINER_TECHNOLOGY run --rm busybox grep -c 'Common KVM processor' /proc/cpuinfo || :)
48+
IS_KVM=$($CONTAINER_ENGINE run --rm busybox grep -c 'Common KVM processor' /proc/cpuinfo || :)
4949
if [[ ! "$SKIP_SSE42_REQUIREMENTS" -eq 1 && "$IS_KVM" -eq 0 && "$DOCKER_ARCH" = "x86_64" ]]; then
50-
SUPPORTS_SSE42=$($CONTAINER_TECHNOLOGY run --rm busybox grep -c sse4_2 /proc/cpuinfo || :)
50+
SUPPORTS_SSE42=$($CONTAINER_ENGINE run --rm busybox grep -c sse4_2 /proc/cpuinfo || :)
5151
if [[ "$SUPPORTS_SSE42" -eq 0 ]]; then
5252
echo "FAIL: The CPU your machine is running on does not support the SSE 4.2 instruction set, which is required for one of the services Sentry uses (Clickhouse). See https://github.com/getsentry/self-hosted/issues/340 for more info."
5353
exit 1

install/create-docker-volumes.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
echo "${_group}Creating volumes for persistent storage ..."
22

3-
echo "Created $($CONTAINER_TECHNOLOGY volume create --name=sentry-clickhouse)."
4-
echo "Created $($CONTAINER_TECHNOLOGY volume create --name=sentry-data)."
5-
echo "Created $($CONTAINER_TECHNOLOGY volume create --name=sentry-kafka)."
6-
echo "Created $($CONTAINER_TECHNOLOGY volume create --name=sentry-postgres)."
7-
echo "Created $($CONTAINER_TECHNOLOGY volume create --name=sentry-redis)."
8-
echo "Created $($CONTAINER_TECHNOLOGY volume create --name=sentry-symbolicator)."
3+
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-clickhouse)."
4+
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-data)."
5+
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-kafka)."
6+
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-postgres)."
7+
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-redis)."
8+
echo "Created $($CONTAINER_ENGINE volume create --name=sentry-symbolicator)."
99

1010
echo "${_endgroup}"

install/dc-detect-version.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ fi
99
echo "${_group}Initializing Docker|Podman Compose ..."
1010

1111
# To support users that are symlinking to docker-compose
12-
dc_base="$(${CONTAINER_TECHNOLOGY} compose version --short &>/dev/null && echo "$CONTAINER_TECHNOLOGY compose" || echo '')"
13-
dc_base_standalone="$(${CONTAINER_TECHNOLOGY}-compose version --short &>/dev/null && echo "$CONTAINER_TECHNOLOGY-compose" || echo '')"
12+
dc_base="$(${CONTAINER_ENGINE} compose version --short &>/dev/null && echo "$CONTAINER_ENGINE compose" || echo '')"
13+
dc_base_standalone="$(${CONTAINER_ENGINE}-compose version --short &>/dev/null && echo "$CONTAINER_ENGINE-compose" || echo '')"
1414

1515
COMPOSE_VERSION=$([ -n "$dc_base" ] && $dc_base version --short || echo '')
1616
STANDALONE_COMPOSE_VERSION=$([ -n "$dc_base_standalone" ] && $dc_base_standalone version --short || echo '')
@@ -25,9 +25,9 @@ if [[ -z "$COMPOSE_VERSION" ]] || [[ -n "$STANDALONE_COMPOSE_VERSION" ]] && ! ve
2525
dc_base="$dc_base_standalone"
2626
fi
2727

28-
if [[ "$CONTAINER_TECHNOLOGY" == "docker" ]]; then
28+
if [[ "$CONTAINER_ENGINE" == "docker" ]]; then
2929
NO_ANSI="--ansi never"
30-
elif [[ "$CONTAINER_TECHNOLOGY" == "podman" ]]; then
30+
elif [[ "$CONTAINER_ENGINE" == "podman" ]]; then
3131
NO_ANSI="--no-ansi"
3232
fi
3333

@@ -37,13 +37,13 @@ else
3737
dc="$dc_base $NO_ANSI"
3838
fi
3939

40-
if [[ "$CONTAINER_TECHNOLOGY" == "docker" ]]; then
40+
if [[ "$CONTAINER_ENGINE" == "docker" ]]; then
4141
proxy_args="--build-arg http_proxy=${http_proxy:-} --build-arg https_proxy=${https_proxy:-} --build-arg no_proxy=${no_proxy:-}"
42-
elif [[ "$CONTAINER_TECHNOLOGY" == "podman" ]]; then
42+
elif [[ "$CONTAINER_ENGINE" == "podman" ]]; then
4343
proxy_args="--podman-build-args http_proxy=${http_proxy:-},https_proxy=${https_proxy:-},no_proxy=${no_proxy:-}"
4444
fi
4545
dcr="$dc run --pull=never --rm"
4646
dcb="$dc build $proxy_args"
47-
dbuild="$CONTAINER_TECHNOLOGY build $proxy_args"
47+
dbuild="$CONTAINER_ENGINE build $proxy_args"
4848

4949
echo "${_endgroup}"

install/detect-container-engine.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
echo "${_group}Detecting container engine ..."
2+
3+
export CONTAINER_ENGINE=""
4+
5+
if command -v podman &> /dev/null; then
6+
CONTAINER_ENGINE="podman"
7+
elif command -v docker &> /dev/null; then
8+
CONTAINER_ENGINE="docker"
9+
else
10+
echo "FAIL: Neither podman nor docker is installed on the system."
11+
exit 1
12+
fi
13+
echo "Detected container engine: $CONTAINER_ENGINE"
14+
echo "${_endgroup}"

install/detect-container-technology.sh

Lines changed: 0 additions & 14 deletions
This file was deleted.

install/detect-platform.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ echo "${_group}Detecting Docker platform"
1313
# See https://github.com/docker/cli/issues/3286 for the Docker bug.
1414

1515
FORMAT=""
16-
if [[ $CONTAINER_TECHNOLOGY == "podman" ]]; then
16+
if [[ $CONTAINER_ENGINE == "podman" ]]; then
1717
FORMAT="{{.Host.Arch}}"
18-
elif [[ $CONTAINER_TECHNOLOGY == "docker" ]]; then
18+
elif [[ $CONTAINER_ENGINE == "docker" ]]; then
1919
FORMAT="{{.Architecture}}"
2020
fi
2121

22-
export DOCKER_ARCH=$($CONTAINER_TECHNOLOGY info --format "$FORMAT")
22+
export DOCKER_ARCH=$($CONTAINER_ENGINE info --format "$FORMAT")
2323
if [[ "$DOCKER_ARCH" = "x86_64" ]]; then
2424
export DOCKER_PLATFORM="linux/amd64"
2525
elif [[ "$DOCKER_ARCH" = "aarch64" ]]; then

install/error-handling.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ fi
66

77
$dbuild -t sentry-self-hosted-jq-local --platform="$DOCKER_PLATFORM" jq
88

9-
jq="$CONTAINER_TECHNOLOGY run --rm -i sentry-self-hosted-jq-local"
10-
sentry_cli="$CONTAINER_TECHNOLOGY run --rm -v /tmp:/work -e SENTRY_DSN=$SENTRY_DSN getsentry/sentry-cli"
9+
jq="$CONTAINER_ENGINE run --rm -i sentry-self-hosted-jq-local"
10+
sentry_cli="$CONTAINER_ENGINE run --rm -v /tmp:/work -e SENTRY_DSN=$SENTRY_DSN getsentry/sentry-cli"
1111

1212
send_envelope() {
1313
# Send envelope

install/geoip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ install_geoip() {
2121
else
2222
echo "IP address geolocation is configured for updates."
2323
echo "Updating IP address geolocation database ... "
24-
if ! $CONTAINER_TECHNOLOGY run --rm -v "./geoip:/sentry" --entrypoint '/usr/bin/geoipupdate' "ghcr.io/maxmind/geoipupdate:v6.1.0" "-d" "/sentry" "-f" "/sentry/GeoIP.conf"; then
24+
if ! $CONTAINER_ENGINE run --rm -v "./geoip:/sentry" --entrypoint '/usr/bin/geoipupdate' "ghcr.io/maxmind/geoipupdate:v6.1.0" "-d" "/sentry" "-f" "/sentry/GeoIP.conf"; then
2525
result='Error'
2626
fi
2727
echo "$result updating IP address geolocation database."

install/update-docker-images.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
echo "${_group}Fetching and updating $CONTAINER_TECHNOLOGY images ..."
1+
echo "${_group}Fetching and updating $CONTAINER_ENGINE images ..."
22

33
# We tag locally built images with a '-self-hosted-local' suffix. `docker
44
# compose pull` tries to pull these too and shows a 404 error on the console
@@ -9,6 +9,6 @@ echo "${_group}Fetching and updating $CONTAINER_TECHNOLOGY images ..."
99
$dc pull --ignore-pull-failures 2>&1 | grep -v -- -self-hosted-local || true
1010

1111
# We may not have the set image on the repo (local images) so allow fails
12-
$CONTAINER_TECHNOLOGY pull ${SENTRY_IMAGE} || true
12+
$CONTAINER_ENGINE pull ${SENTRY_IMAGE} || true
1313

1414
echo "${_endgroup}"

0 commit comments

Comments
 (0)