From 026560e6fe0a214769a219fa4faeed1bfe8a80d4 Mon Sep 17 00:00:00 2001 From: Manan Bhatt Date: Mon, 2 Jan 2023 19:29:48 +0530 Subject: [PATCH 1/5] es7 docker setup --- docker/docker-compose.yaml | 35 +++++++++++++++++++- docker/server/config/config-local.properties | 6 ++-- 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 8b665b09f3..6b4f846211 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -19,9 +19,15 @@ services: retries: 12 links: - elasticsearch:es + - redis:rs + - rabbitmq:amqp depends_on: elasticsearch: condition: service_healthy + redis: + condition: service_healthy + rabbitmq: + condition: service_healthy logging: driver: "json-file" options: @@ -43,8 +49,17 @@ services: - conductor-server stdin_open: true + redis: + image: redis:6.2.3-alpine + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + ports: + - 6379:6379 + healthcheck: + test: [ "CMD", "redis-cli","ping" ] + elasticsearch: - image: elasticsearch:6.8.15 + image: elasticsearch:7.17.6 environment: - "ES_JAVA_OPTS=-Xms512m -Xmx1024m" - transport.host=0.0.0.0 @@ -67,6 +82,24 @@ services: options: max-size: "1k" max-file: "3" + rabbitmq: + image: rabbitmq:3-management-alpine + container_name: rabbitmq + volumes: + - ./.docker/rabbitmq/etc/:/etc/rabbitmq/ + - ./.docker/rabbitmq/data/:/var/lib/rabbitmq/ + - ./.docker/rabbitmq/logs/:/var/log/rabbitmq/ + environment: + RABBITMQ_DEFAULT_USER: guest + RABBITMQ_DEFAULT_PASS: guest + healthcheck: + test: [ "CMD", "curl", "-f", "http://localhost:15672" ] + interval: 30s + timeout: 10s + retries: 5 + ports: + - 5672:5672 + - 15672:15672 volumes: esdata-conductor: diff --git a/docker/server/config/config-local.properties b/docker/server/config/config-local.properties index 6e5071ea7a..44d4d38b81 100755 --- a/docker/server/config/config-local.properties +++ b/docker/server/config/config-local.properties @@ -2,11 +2,11 @@ conductor.grpc-server.enabled=false # Database persistence model. -conductor.db.type=memory +conductor.db.type=redis_standalone # Dynomite Cluster details. # format is host:port:rack separated by semicolon -conductor.redis.hosts=dyno1:8102:us-east-1c +conductor.redis.hosts=rs:63709:us-east-1c # Namespace for the keys stored in Dynomite/Redis conductor.redis.workflowNamespacePrefix=conductor @@ -26,7 +26,7 @@ conductor.app.workflowRepairServiceEnabled=true conductor.redis.queuesNonQuorumPort=22122 # Elastic search instance indexing is disabled. -conductor.indexing.enabled=false +conductor.indexing.enabled=true conductor.elasticsearch.url=http://es:9200 conductor.elasticsearch.indexReplicasCount=0 From 5a0dcc1e5def3253f4560baa89828976514c1cc3 Mon Sep 17 00:00:00 2001 From: manan164 Date: Tue, 10 Jan 2023 19:03:00 +0530 Subject: [PATCH 2/5] Make orkes queue default Deprecate dyno queue. --- dependencies.gradle | 1 + server/build.gradle | 3 ++- server/src/main/java/com/netflix/conductor/Conductor.java | 2 ++ server/src/main/resources/application.properties | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dependencies.gradle b/dependencies.gradle index 7f49e20bf7..fa71f80a37 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -41,6 +41,7 @@ ext { revJsr311Api = '1.1.1' revMockServerClient = '5.12.0' revOpenapi = '1.6.+' + revOrkesQueues = '1.0.3' revPowerMock = '2.0.9' revProtoBuf = '3.13.0' revProtogenAnnotations = '1.0.0' diff --git a/server/build.gradle b/server/build.gradle index 5a9183081b..a89320ba99 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -38,7 +38,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-log4j2' implementation 'org.apache.logging.log4j:log4j-web' - implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation 'org.springframeworak.boot:spring-boot-starter-actuator' + implementation "io.orkes.queues:orkes-conductor-queues:${revOrkesQueues}" implementation "org.springdoc:springdoc-openapi-ui:${revOpenapi}" diff --git a/server/src/main/java/com/netflix/conductor/Conductor.java b/server/src/main/java/com/netflix/conductor/Conductor.java index de253a7e20..be5bda17b6 100644 --- a/server/src/main/java/com/netflix/conductor/Conductor.java +++ b/server/src/main/java/com/netflix/conductor/Conductor.java @@ -21,12 +21,14 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import org.springframework.context.annotation.ComponentScan; import org.springframework.core.io.FileSystemResource; // Prevents from the datasource beans to be loaded, AS they are needed only for specific databases. // In case that SQL database is selected this class will be imported back in the appropriate // database persistence module. @SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@ComponentScan(basePackages = {"com.netflix.conductor", "io.orkes.conductor"}) public class Conductor { private static final Logger log = LoggerFactory.getLogger(Conductor.class); diff --git a/server/src/main/resources/application.properties b/server/src/main/resources/application.properties index e002b55e23..db200d43ff 100644 --- a/server/src/main/resources/application.properties +++ b/server/src/main/resources/application.properties @@ -16,6 +16,7 @@ springdoc.api-docs.path=/api-docs loadSample=true conductor.db.type=memory +conductor.queue.type=redis_standalone conductor.indexing.enabled=false From 76921a7442d6a7946bcd78f2a94244c54a666c9d Mon Sep 17 00:00:00 2001 From: manan164 Date: Tue, 10 Jan 2023 20:48:18 +0530 Subject: [PATCH 3/5] correct dependency --- server/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/build.gradle b/server/build.gradle index a89320ba99..1bee569167 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -38,7 +38,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-log4j2' implementation 'org.apache.logging.log4j:log4j-web' - implementation 'org.springframeworak.boot:spring-boot-starter-actuator' + implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation "io.orkes.queues:orkes-conductor-queues:${revOrkesQueues}" implementation "org.springdoc:springdoc-openapi-ui:${revOpenapi}" From c38ef47829f214fb9c07554fa210a2256d326799 Mon Sep 17 00:00:00 2001 From: manan164 Date: Tue, 10 Jan 2023 21:30:17 +0530 Subject: [PATCH 4/5] test fix --- .../conductor/common/config/ConductorObjectMapperTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/src/test/java/com/netflix/conductor/common/config/ConductorObjectMapperTest.java b/server/src/test/java/com/netflix/conductor/common/config/ConductorObjectMapperTest.java index 9fe058d20c..a02b7ce34a 100644 --- a/server/src/test/java/com/netflix/conductor/common/config/ConductorObjectMapperTest.java +++ b/server/src/test/java/com/netflix/conductor/common/config/ConductorObjectMapperTest.java @@ -21,6 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; import com.netflix.conductor.common.metadata.workflow.WorkflowDef; @@ -43,6 +44,7 @@ */ @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE) @RunWith(SpringRunner.class) +@TestPropertySource(properties = "conductor.queue.type=") public class ConductorObjectMapperTest { @Autowired ObjectMapper objectMapper; From 5db9bd25f2fdb8c930da8b738802ff8a926e4df6 Mon Sep 17 00:00:00 2001 From: manan164 Date: Tue, 14 Mar 2023 13:22:52 +0530 Subject: [PATCH 5/5] Added missing property --- server/src/main/resources/application.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/resources/application.properties b/server/src/main/resources/application.properties index db200d43ff..09b8f22b46 100644 --- a/server/src/main/resources/application.properties +++ b/server/src/main/resources/application.properties @@ -23,7 +23,8 @@ conductor.indexing.enabled=false #Redis configuration details. #format is host:port:rack separated by semicolon #Auth is supported. Password is taken from host[0]. format: host:port:rack:password -conductor.redis.hosts=host1:port:rack;host2:port:rack:host3:port:rack +#conductor.redis.hosts=host1:port:rack;host2:port:rack:host3:port:rack +conductor.redis.hosts=localhost:6379:us-east-1c #namespace for the keys stored in Dynomite/Redis conductor.redis.workflowNamespacePrefix=