From db760854ec746b581180c68096751ab0f76fd0b8 Mon Sep 17 00:00:00 2001 From: Viren Baraiya Date: Thu, 28 Sep 2023 22:14:31 -0700 Subject: [PATCH] update conductor server version and JDK --- .github/workflows/build_on_pr.yaml | 4 +- .github/workflows/ci.yaml | 4 +- .github/workflows/release.yaml | 4 +- build.gradle | 6 +-- docker/DockerfileServer | 5 ++- docker/DockerfileStandalone | 5 ++- docker/docker-compose.yaml | 53 ++++++++++++++++++++++++ gradle/wrapper/gradle-wrapper.properties | 3 +- run_tests.sh | 2 +- 9 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 docker/docker-compose.yaml diff --git a/.github/workflows/build_on_pr.yaml b/.github/workflows/build_on_pr.yaml index de30294..9d9b96c 100644 --- a/.github/workflows/build_on_pr.yaml +++ b/.github/workflows/build_on_pr.yaml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 - - name: Set up Zulu JDK 11 + - name: Set up Zulu JDK 17 uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - name: Build run: ./gradlew clean build diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 58831ed..68169b9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,10 +9,10 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 - - name: Set up Zulu JDK 11 + - name: Set up Zulu JDK 17 uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - name: Build run: ./run_tests.sh \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index f2203a0..01a95cd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,11 +20,11 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v3 - - name: Set up Zulu JDK 11 + - name: Set up Zulu JDK 17 uses: actions/setup-java@v3 with: distribution: 'zulu' - java-version: '11' + java-version: '17' - name: Build run: | export VERSION=${{github.ref_name}} diff --git a/build.gradle b/build.gradle index 494c861..44ee045 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ ext { springBootVersion = '2.7.6' versions = [ - revConductor : '3.13.8', + revConductor : '3.14.0', revTestContainer : '1.17.2', revGuava : '32.0.0-jre', revLog4j : '2.17.1', @@ -135,8 +135,8 @@ subprojects { compileJava { - sourceCompatibility = 11 - targetCompatibility = 11 + sourceCompatibility = 17 + targetCompatibility = 17 } spotless { diff --git a/docker/DockerfileServer b/docker/DockerfileServer index 0e24b67..23e104b 100644 --- a/docker/DockerfileServer +++ b/docker/DockerfileServer @@ -4,7 +4,7 @@ MAINTAINER Orkes Inc RUN apk add nginx -RUN apk add openjdk11 +RUN apk add openjdk17 RUN apk add coreutils RUN apk add curl @@ -13,9 +13,10 @@ RUN apk add curl RUN mkdir -p /app/config /app/logs /app/libs /app/info # Add UI +# Make sure to run build-ui.sh script before running the docker build to pull and build the UI WORKDIR /usr/share/nginx/html RUN rm -rf ./* -COPY tmp/ui/conductor/ui/build . +COPY docker/tmp/ui/conductor/ui/build . COPY docker/config/nginx.conf /etc/nginx/http.d/default.conf # Startup script(s) diff --git a/docker/DockerfileStandalone b/docker/DockerfileStandalone index aceb84c..2a756b1 100644 --- a/docker/DockerfileStandalone +++ b/docker/DockerfileStandalone @@ -4,7 +4,7 @@ MAINTAINER Orkes Inc # Install software required to run conductor stack RUN apk add nginx RUN apk add coreutils -RUN apk add openjdk11 +RUN apk add openjdk17 RUN apk add redis RUN apk add postgresql14 @@ -12,9 +12,10 @@ RUN apk add postgresql14 RUN mkdir -p /app/config /app/logs /app/libs /app/info # Add UI +# Make sure to run build-ui.sh script before running the docker build to pull and build the UI WORKDIR /usr/share/nginx/html RUN rm -rf ./* -COPY tmp/ui/conductor/ui/build . +COPY docker/tmp/ui/conductor/ui/build . COPY docker/config/nginx.conf /etc/nginx/http.d/default.conf diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml new file mode 100644 index 0000000..6ce02c3 --- /dev/null +++ b/docker/docker-compose.yaml @@ -0,0 +1,53 @@ +--- +version: '2.3' + +services: + postgresql: + image: postgres:11.15-alpine + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=postgres + - POSTGRES_DB=postgres + ports: + - "7432:5432" + networks: + - internal + + r1: + image: redis:alpine + restart: on-failure + command: "redis-server --save 60 1 --appendonly yes --loglevel warning" + healthcheck: + test: [ "CMD", "redis-cli","ping" ] + ports: + - "7379:6379" + networks: + - internal + + server-1: + container_name: conductor + build: + context: ../ + dockerfile: docker/DockerfileServer + environment: + - spring.datasource.url=jdbc:postgresql://postgresql:5432/postgres + - conductor.redis-lock.serverAddress=redis://r1:6379 + - conductor.redis.hosts=r1:6379:us-east-1c + - conductor.queue.type=redis_standalone + - conductor.db.type=redis_standalone + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:8080/health" ] + depends_on: + r1: + condition: service_healthy + links: + - r1 + - postgresql + ports: + - "9090:8080" + - "6000:5000" + networks: + - internal + +networks: + internal: diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 69a9715..5925064 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip +distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302 +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/run_tests.sh b/run_tests.sh index 6c2f39f..6ed379b 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -3,7 +3,7 @@ mkdir -p tmp/ui/conductor/ui/build docker rm -f conductor_test_container docker build -f docker/DockerfileStandalone . -t conductor_test_container -docker run -dit --name conductor_test_container -p 8899:8080 -t conductor_test_container +docker run -dit --name conductor_test_container -p 8899:8080 -p 4535:5000 -t conductor_test_container while ! curl -s http://localhost:8899/api/metadata/workflow -o /dev/null do echo "$(date) - still trying"