Skip to content

Commit

Permalink
Second version using docker
Browse files Browse the repository at this point in the history
  • Loading branch information
adutra committed Jan 7, 2025
1 parent 7a9157a commit 3bbf02c
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 45 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ jobs:
with:
fetch-depth: 0

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Set up Helm
uses: azure/[email protected]
with:
Expand Down Expand Up @@ -80,40 +86,36 @@ jobs:
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --debug --charts ./helm/polaris

- name: Set up Minikube
#if: steps.list-changed.outputs.changed == 'true'
if: steps.list-changed.outputs.changed == 'true'
uses: medyagh/[email protected]
with:
driver: podman
container-runtime: cri-o

- name: Print Podman info
#if: steps.list-changed.outputs.changed == 'true'
- name: Print Docker info
if: steps.list-changed.outputs.changed == 'true'
run: |
podman -v
podman machine info
minikube podman-env
docker -v
minikube docker-env
- name: Image build
#if: steps.list-changed.outputs.changed == 'true'
if: steps.list-changed.outputs.changed == 'true'
run: |
BUILD_TAG=helm-ci-$(date +%s)
export BUILD_TAG=helm-ci-$(date +%s)
echo BUILD_TAG=${BUILD_TAG} >> ${GITHUB_ENV}
eval $(minikube podman-env)
eval $(minikube -p minikube docker-env)
./gradlew :polaris-quarkus-service:build -x check \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.tag=${BUILD_TAG} \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
-Dquarkus.container-image.name=polaris-testing \
-Dquarkus.container-image.tag=${BUILD_TAG}
- name: Install fixtures
#if: steps.list-changed.outputs.changed == 'true'
if: steps.list-changed.outputs.changed == 'true'
run: |
kubectl create namespace polaris-ns
kubectl apply --namespace polaris-ns $(find helm/polaris/ci/fixtures -name "*.yaml" -exec echo -n "-f {} " \;)
- name: Run chart-testing (install)
#if: steps.list-changed.outputs.changed == 'true'
if: steps.list-changed.outputs.changed == 'true'
run: |
ct install --target-branch ${{ github.event.repository.default_branch }} \
--namespace polaris-ns \
--helm-extra-set-args "--set=image.repository=apache/polaris --set=image.tag=${BUILD_TAG}" \
--helm-extra-set-args "--set=image.repository=apache/polaris-testing --set=image.tag=${BUILD_TAG}" \
--debug --charts ./helm/polaris
22 changes: 11 additions & 11 deletions .github/workflows/regtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Fix permissions
run: mkdir -p regtests/output && chmod 777 regtests/output && chmod 777 regtests/t_*/ref/*

- name: Print Podman info
run: |
podman -v
podman machine info
minikube podman-env
- name: Image build
run: |
BUILD_TAG=helm-ci-$(date +%s)
export BUILD_TAG=regtests-ci-$(date +%s)
echo BUILD_TAG=${BUILD_TAG} >> ${GITHUB_ENV}
./gradlew :polaris-quarkus-service:build -x check \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.tag=${BUILD_TAG} \
-PeclipseLinkDeps=com.h2database:h2:2.3.232
-Dquarkus.container-image.name=polaris-testing \
-Dquarkus.container-image.tag=${BUILD_TAG}
- name: Regression Test
env:
Expand All @@ -62,6 +62,6 @@ jobs:
cat <<EOF > docker-compose.override.yml
services:
polaris:
image: apache/polaris:${BUILD_TAG}
image: apache/polaris-testing:${BUILD_TAG}
EOF
podman compose up --build --exit-code-from regtest
docker compose up --build --exit-code-from regtest
2 changes: 1 addition & 1 deletion LICENSE-BINARY-DIST
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ io.quarkus:quarkus-arc
io.quarkus:quarkus-bootstrap-runner
io.quarkus:quarkus-classloader-commons
io.quarkus:quarkus-container-image
io.quarkus:quarkus-container-image-podman
io.quarkus:quarkus-container-image-docker
io.quarkus:quarkus-container-image-docker-common
io.quarkus:quarkus-core
io.quarkus:quarkus-credentials
Expand Down
2 changes: 0 additions & 2 deletions helm/polaris/ci/persistence-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ image:
tag: latest
pullPolicy: Never

bootstrapMetastoreManager: true

persistenceConfigSecret: polaris-persistence

polarisServerConfig:
Expand Down
6 changes: 2 additions & 4 deletions helm/polaris/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ spec:
{{- end }}
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . | default .Chart.Version }}"
imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
command: ["/app/bin/polaris-service"]
args: ["server", "/app/config/polaris-server.yml"]
{{- if .Values.extraEnv }}
env:
{{- tpl (toYaml .Values.extraEnv) . | nindent 12 }}
Expand All @@ -107,7 +105,7 @@ spec:
{{- end }}
livenessProbe:
httpGet:
path: /healthcheck
path: /q/health/live
port: "polaris-metrics"
scheme: HTTP
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
Expand All @@ -118,7 +116,7 @@ spec:
terminationGracePeriodSeconds: {{ .Values.livenessProbe.terminationGracePeriodSeconds }}
readinessProbe:
httpGet:
path: /healthcheck
path: /q/health/ready
port: "polaris-metrics"
scheme: HTTP
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
Expand Down
2 changes: 1 addition & 1 deletion helm/polaris/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ spec:
- name: wget
image: busybox
command: ['wget']
args: ['{{ include "polaris.fullname" . }}:{{ index .Values.service.ports "polaris-metrics" }}/healthcheck']
args: ['{{ include "polaris.fullname" . }}:{{ index .Values.service.ports "polaris-metrics" }}/q/health']
restartPolicy: Never
2 changes: 1 addition & 1 deletion helm/polaris/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ replicaCount: 1

image:
# -- The image repository to pull from.
repository: localhost:5001/polaris
repository: apache/polaris
# -- The image pull policy.
pullPolicy: IfNotPresent
# -- The image tag.
Expand Down
2 changes: 1 addition & 1 deletion quarkus/service/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
implementation("io.quarkus:quarkus-micrometer")
implementation("io.quarkus:quarkus-micrometer-registry-prometheus")
implementation("io.quarkus:quarkus-opentelemetry")
implementation("io.quarkus:quarkus-container-image-podman")
implementation("io.quarkus:quarkus-container-image-docker")
implementation("io.quarkus:quarkus-smallrye-context-propagation")

implementation(libs.jakarta.enterprise.cdi.api)
Expand Down
2 changes: 0 additions & 2 deletions quarkus/service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ quarkus.container-image.push=false
quarkus.container-image.registry=docker.io
quarkus.container-image.group=apache
quarkus.container-image.name=polaris
quarkus.container-image.additional-tags=latest
quarkus.podman.platform=linux/amd64,linux/arm64

quarkus.http.auth.basic=false
quarkus.http.access-log.enabled=true
Expand Down
11 changes: 6 additions & 5 deletions regtests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
#

services:

polaris:
image: apache/polaris:helm-ci-1735909087
image: apache/polaris:latest
ports:
- "8181"
- "8182"
Expand All @@ -31,17 +32,17 @@ services:
AZURE_TENANT_ID: $AZURE_TENANT_ID
AZURE_CLIENT_ID: $AZURE_CLIENT_ID
AZURE_CLIENT_SECRET: $AZURE_CLIENT_SECRET
POLARIS_AUTHENTICATION_AUTHENTICATOR_TYPE: test
POLARIS_AUTHENTICATION_TOKEN_SERVICE_TYPE: test
QUARKUS_OTEL_SDK_DISABLED: "true"
polaris.authentication.authenticator.type: test
polaris.authentication.token-service.type: test
quarkus.otel.sdk.disabled: "true"
volumes:
- ./credentials:/tmp/credentials/

healthcheck:
test: ["CMD", "curl", "http://localhost:8182/q/health"]
interval: 10s
timeout: 10s
retries: 5

regtest:
build:
context: .
Expand Down

0 comments on commit 3bbf02c

Please sign in to comment.