Skip to content

Commit 6764a88

Browse files
Add podman support (#2143)
1 parent 085eefa commit 6764a88

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ SHELL = /usr/bin/env bash -o pipefail
2222

2323
## Variables
2424
BUILD_IMAGE ?= true
25-
CONTAINER_TOOL ?= docker
25+
DOCKER ?= docker
2626
MINIKUBE_PROFILE ?= minikube
2727
DEPENDENCIES ?= ct helm helm-docs java21 git
2828
OPTIONAL_DEPENDENCIES := jq kubectl minikube
@@ -47,26 +47,26 @@ version: ## Display version information
4747
.PHONY: build
4848
build: build-server build-admin ## Build Polaris server, admin, and container images
4949

50-
build-server: DEPENDENCIES := java21 $(CONTAINER_TOOL)
50+
build-server: DEPENDENCIES := java21 $(DOCKER)
5151
.PHONY: build-server
5252
build-server: check-dependencies ## Build Polaris server and container image
5353
@echo "--- Building Polaris server ---"
5454
@./gradlew \
5555
:polaris-server:assemble \
5656
:polaris-server:quarkusAppPartsBuild --rerun \
5757
-Dquarkus.container-image.build=$(BUILD_IMAGE) \
58-
-Dquarkus.docker.executable-name=$(CONTAINER_TOOL)
58+
-Dquarkus.docker.executable-name=$(DOCKER)
5959
@echo "--- Polaris server build complete ---"
6060

61-
build-admin: DEPENDENCIES := java21 $(CONTAINER_TOOL)
61+
build-admin: DEPENDENCIES := java21 $(DOCKER)
6262
.PHONY: build-admin
6363
build-admin: check-dependencies ## Build Polaris admin and container image
6464
@echo "--- Building Polaris admin ---"
6565
@./gradlew \
6666
:polaris-admin:assemble \
6767
:polaris-admin:quarkusAppPartsBuild --rerun \
6868
-Dquarkus.container-image.build=$(BUILD_IMAGE) \
69-
-Dquarkus.docker.executable-name=$(CONTAINER_TOOL)
69+
-Dquarkus.docker.executable-name=$(DOCKER)
7070
@echo "--- Polaris admin build complete ---"
7171

7272
build-spark-plugin-3.5-2.12: DEPENDENCIES := java21
@@ -125,23 +125,23 @@ helm-lint: check-dependencies ## Run Helm chart lint check
125125

126126
##@ Minikube
127127

128-
minikube-start-cluster: DEPENDENCIES := minikube $(CONTAINER_TOOL)
128+
minikube-start-cluster: DEPENDENCIES := minikube $(DOCKER)
129129
.PHONY: minikube-start-cluster
130130
minikube-start-cluster: check-dependencies ## Start the Minikube cluster
131131
@echo "--- Checking Minikube cluster status ---"
132132
@if minikube status -p $(MINIKUBE_PROFILE) --format "{{.Host}}" | grep -q "Running"; then \
133133
echo "--- Minikube cluster is already running. Skipping start ---"; \
134134
else \
135135
echo "--- Starting Minikube cluster ---"; \
136-
if [ "$(CONTAINER_TOOL)" = "podman" ]; then \
137-
minikube start -p $(MINIKUBE_PROFILE) --driver=$(CONTAINER_TOOL) --container-runtime=cri-o; \
136+
if [ "$(DOCKER)" = "podman" ]; then \
137+
minikube start -p $(MINIKUBE_PROFILE) --driver=$(DOCKER) --container-runtime=cri-o; \
138138
else \
139-
minikube start -p $(MINIKUBE_PROFILE) --driver=$(CONTAINER_TOOL); \
139+
minikube start -p $(MINIKUBE_PROFILE) --driver=$(DOCKER); \
140140
fi; \
141141
echo "--- Minikube cluster started ---"; \
142142
fi
143143

144-
minikube-stop-cluster: DEPENDENCIES := minikube $(CONTAINER_TOOL)
144+
minikube-stop-cluster: DEPENDENCIES := minikube $(DOCKER)
145145
.PHONY: minikube-stop-cluster
146146
minikube-stop-cluster: check-dependencies ## Stop the Minikube cluster
147147
@echo "--- Checking Minikube cluster status ---"
@@ -153,7 +153,7 @@ minikube-stop-cluster: check-dependencies ## Stop the Minikube cluster
153153
echo "--- Minikube cluster is already stopped or does not exist. Skipping stop ---"; \
154154
fi
155155

156-
minikube-load-images: DEPENDENCIES := minikube $(CONTAINER_TOOL)
156+
minikube-load-images: DEPENDENCIES := minikube $(DOCKER)
157157
.PHONY: minikube-load-images
158158
minikube-load-images: minikube-start-cluster check-dependencies ## Load local Docker images into the Minikube cluster
159159
@echo "--- Loading images into Minikube cluster ---"
@@ -163,7 +163,7 @@ minikube-load-images: minikube-start-cluster check-dependencies ## Load local Do
163163
@minikube image tag -p $(MINIKUBE_PROFILE) docker.io/apache/polaris-admin-tool:latest docker.io/apache/polaris-admin-tool:$(BUILD_VERSION)
164164
@echo "--- Images loaded into Minikube cluster ---"
165165

166-
minikube-cleanup: DEPENDENCIES := minikube $(CONTAINER_TOOL)
166+
minikube-cleanup: DEPENDENCIES := minikube $(DOCKER)
167167
.PHONY: minikube-cleanup
168168
minikube-cleanup: check-dependencies ## Cleanup the Minikube cluster
169169
@echo "--- Checking Minikube cluster status ---"

client/templates/regenerate.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
set -e
2222

23+
[[ -z ${DOCKER} ]] && DOCKER="$(which podman > /dev/null && echo podman || echo docker)"
24+
2325
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2426
pushd "$SCRIPT_DIR/../python" > /dev/null
2527

@@ -62,7 +64,7 @@ echo "Regenerating python from the spec"
6264

6365
OPEN_API_CLI_VERSION="v7.11.0"
6466

65-
docker run --rm \
67+
${DOCKER} run --rm \
6668
-v "${SCRIPT_DIR}/../..:/local" \
6769
openapitools/openapi-generator-cli:${OPEN_API_CLI_VERSION} generate \
6870
-i /local/spec/polaris-management-service.yml \
@@ -73,7 +75,7 @@ docker run --rm \
7375
--additional-properties=pythonVersion=3.9 \
7476
--ignore-file-override /local/client/python/.openapi-generator-ignore > /dev/null
7577

76-
docker run --rm \
78+
${DOCKER} run --rm \
7779
-v "${SCRIPT_DIR}/../..:/local" \
7880
openapitools/openapi-generator-cli:${OPEN_API_CLI_VERSION} generate \
7981
-i /local/spec/polaris-catalog-service.yaml \
@@ -85,7 +87,7 @@ docker run --rm \
8587
--additional-properties=pythonVersion=3.9 \
8688
--ignore-file-override /local/client/python/.openapi-generator-ignore > /dev/null
8789

88-
docker run --rm \
90+
${DOCKER} run --rm \
8991
-v "${SCRIPT_DIR}/../..:/local" \
9092
openapitools/openapi-generator-cli:${OPEN_API_CLI_VERSION} generate \
9193
-i /local/spec/iceberg-rest-catalog-open-api.yaml \

0 commit comments

Comments
 (0)