Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Make orkes queue default #3435

Merged
merged 9 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
33 changes: 33 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,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:
Expand All @@ -45,6 +51,15 @@ 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:8.6.2
container_name: elasticsearch
Expand All @@ -70,6 +85,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:
Expand Down
6 changes: 3 additions & 3 deletions docker/server/config/config-local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
1 change: 1 addition & 0 deletions server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ dependencies {
implementation 'org.apache.logging.log4j:log4j-web'

implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation "io.orkes.queues:orkes-conductor-queues:${revOrkesQueues}"

implementation "org.springdoc:springdoc-openapi-ui:${revOpenapi}"

Expand Down
2 changes: 2 additions & 0 deletions server/src/main/java/com/netflix/conductor/Conductor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion server/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ springdoc.api-docs.path=/api-docs
loadSample=true

conductor.db.type=memory
conductor.queue.type=redis_standalone
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this add redis standalone dependency to starting Conductor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes @aravindanr , this will add the dependency on redis standalone

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manan164 is there a chance you could update this doc to mention we need to run redis standalone before we start server locally?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if i didn't define this config conductor.queue.type, will I still use the orkes_queue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No @lijia-rengage , We need to mention the queue type otherwise it will use dynomite.


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=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -43,6 +44,7 @@
*/
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
@RunWith(SpringRunner.class)
@TestPropertySource(properties = "conductor.queue.type=")
public class ConductorObjectMapperTest {

@Autowired ObjectMapper objectMapper;
Expand Down