Skip to content

Commit

Permalink
created a new migrate-minio task that creates an askem bucket if it d… (
Browse files Browse the repository at this point in the history
#5486)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
dgauldie and github-actions[bot] authored Nov 14, 2024
1 parent aeba4ae commit 4baaa50
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 15 deletions.
21 changes: 20 additions & 1 deletion containers/scripts/docker-compose-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,31 @@ services:
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: admin123
MINIO_BUCKET: askem-local-storage
volumes:
- minio-data:/data
extra_hosts:
- "${local_host_name}:host-gateway"

migrate-minio:
container_name: migrate-minio
image: minio/mc
networks:
- terarium
restart: on-failure
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set local_minio http://minio:9000 admin admin123;
/usr/bin/mc mb --ignore-existing local_minio/askem-local-storage;
/usr/bin/mc anonymous set public local_minio/askem-local-storage;
/usr/bin/mc mb --ignore-existing local_minio/askem-test-storage;
/usr/bin/mc anonymous set public local_minio/askem-test-storage;
"
depends_on:
minio:
condition: service_healthy
extra_hosts:
- "${local_host_name}:host-gateway"

elasticsearch:
container_name: elasticsearch
image: elasticsearch:8.12.1
Expand Down
2 changes: 1 addition & 1 deletion packages/client/hmi-client/src/types/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,9 @@ export interface ModelUnit {
}

export interface GroundedSemantic {
grounding?: ModelGrounding;
id: string;
name?: string;
grounding?: ModelGrounding;
description?: string;
}

Expand Down
17 changes: 17 additions & 0 deletions packages/server/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx4096m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class S3FileController {

@PostConstruct
void init() {
// Create the file storage bucket if it doesn't exist
final S3Service s3Service = s3ClientService.getS3Service(FILE_STORAGE_DEFAULT_S3_CLIENT_NAME);
if (!s3Service.bucketExists(FILE_STORAGE_DEFAULT_BUCKET_NAME)) {
s3Service.createBucket(FILE_STORAGE_DEFAULT_BUCKET_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ public synchronized void complete(final TaskResponse resp) {

// private final Map<String, RabbitTemplate> rabbitTemplates;
private Map<String, RabbitAdmin> rabbitAdmins;
private final Map<String, CachingConnectionFactory> connectionFactories = new HashMap<>();
private final Config config;
private final ObjectMapper objectMapper;
private final NotificationService notificationService;
Expand Down Expand Up @@ -359,10 +360,17 @@ private void initRabbitAdmins() {

final URI rabbitAddress = new URI(rabbitConfig.getAddresses());

final CachingConnectionFactory connectionFactory = new CachingConnectionFactory();
connectionFactory.setUri(rabbitAddress);
connectionFactory.setUsername(rabbitConfig.getUsername());
connectionFactory.setPassword(rabbitConfig.getPassword());
final CachingConnectionFactory connectionFactory;
if (!connectionFactories.containsKey(rabbitAddress.toString())) {
connectionFactory = new CachingConnectionFactory();
connectionFactory.setUri(rabbitAddress);
connectionFactory.setUsername(rabbitConfig.getUsername());
connectionFactory.setPassword(rabbitConfig.getPassword());

connectionFactories.put(rabbitAddress.toString(), connectionFactory);
} else {
connectionFactory = connectionFactories.get(rabbitAddress.toString());
}

final RabbitAdmin rabbitAdmin = new RabbitAdmin(connectionFactory);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ terarium.clientConfig.documentationUrl=https://documentation.dev.terarium.ai
########################################################################################################################
# Application configuration
########################################################################################################################
terarium.documentationUrl=https://documentation.dev.terarium.ai

########################################################################################################################
# Server configuration
Expand Down
30 changes: 23 additions & 7 deletions packages/server/src/test/resources/application-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ terarium.elasticsearch.index.prefix=tds_test
# Caching
########################################################################################################################

########################################################################################################################
# Client configuration
########################################################################################################################
terarium.clientConfig.documentationUrl=https://documentation.dev.terarium.ai

########################################################################################################################
# Keycloak configuration
########################################################################################################################
Expand Down Expand Up @@ -73,8 +78,10 @@ terarium.swagger.server-url=http://localhost:3000
########################################################################################################################
aws-access-key-id=admin
aws-secret-access-key=admin123
aws-static-index-access-key-id=admin
aws-static-index-secret-access-key=admin123
aws-url=http://localhost:9000
terarium.file-storage-s3-bucket-name=askem-test-storage
terarium.amazon.s3.static-index.url=http://localhost:9000

########################################################################################################################
# Microservice configuration
Expand Down Expand Up @@ -120,14 +127,23 @@ terarium.taskrunner.rabbitmq.default.addresses=amqp://localhost:5672
terarium.taskrunner.rabbitmq.default.username=terarium
terarium.taskrunner.rabbitmq.default.password=terarium123
terarium.taskrunner.rabbitmq.equation_extraction.addresses=amqp://localhost:5672
terarium.taskrunner.rabbitmq.equation_extraction.username=terarium
terarium.taskrunner.rabbitmq.equation_extraction.password=terarium123
terarium.taskrunner.rabbitmq.equation_extraction.password=terarium
terarium.taskrunner.rabbitmq.equation_extraction.username=terarium123
terarium.taskrunner.rabbitmq.funman.addresses=amqp://localhost:5672
terarium.taskrunner.rabbitmq.funman.password=terarium
terarium.taskrunner.rabbitmq.funman.username=terarium123
terarium.taskrunner.rabbitmq.gollm.addresses=amqp://localhost:5672
terarium.taskrunner.rabbitmq.gollm.password=terarium
terarium.taskrunner.rabbitmq.gollm.username=terarium123
terarium.taskrunner.rabbitmq.mira.addresses=amqp://localhost:5672
terarium.taskrunner.rabbitmq.mira.password=terarium
terarium.taskrunner.rabbitmq.mira.username=terarium123
terarium.taskrunner.rabbitmq.table_extraction.addresses=amqp://localhost:5672
terarium.taskrunner.rabbitmq.table_extraction.username=terarium
terarium.taskrunner.rabbitmq.table_extraction.password=terarium123
terarium.taskrunner.rabbitmq.table_extraction.password=terarium
terarium.taskrunner.rabbitmq.table_extraction.username=terarium123
terarium.taskrunner.rabbitmq.text_extraction.addresses=amqp://localhost:5672
terarium.taskrunner.rabbitmq.text_extraction.username=terarium
terarium.taskrunner.rabbitmq.text_extraction.password=terarium123
terarium.taskrunner.rabbitmq.text_extraction.password=terarium
terarium.taskrunner.rabbitmq.text_extraction.username=terarium123

########################################################################################################################
# Logging
Expand Down

0 comments on commit 4baaa50

Please sign in to comment.