Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minio to use RELEASE.2022-06-11T19-55-32Z #3708

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 5 additions & 1 deletion packages/scripts/src/helpers/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { address } from 'ip';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
import {
toBoolean, toSafeString, isCI, toIntegerOrThrow
} from '@terascope/utils';
Expand Down Expand Up @@ -66,10 +69,11 @@ export const MINIO_HOSTNAME = process.env.MINIO_HOSTNAME || HOST_IP;
export const MINIO_PORT = process.env.MINIO_PORT || '49000';
export const ENCRYPT_MINIO = toBoolean(process.env.ENCRYPT_MINIO ?? false);
export const MINIO_HOST = `http${ENCRYPT_MINIO ? 's' : ''}://${MINIO_HOSTNAME}:${MINIO_PORT}`;
export const MINIO_VERSION = process.env.MINIO_VERSION || 'RELEASE.2020-02-07T23-28-16Z';
export const MINIO_VERSION = process.env.MINIO_VERSION || 'RELEASE.2022-06-11T19-55-32Z';
export const MINIO_DOCKER_IMAGE = process.env.MINIO_DOCKER_IMAGE || 'minio/minio';
export const MINIO_ACCESS_KEY = process.env.MINIO_ACCESS_KEY || 'minioadmin';
export const MINIO_SECRET_KEY = process.env.MINIO_SECRET_KEY || 'minioadmin';
export const MINIO_VOLUME = fs.mkdtempSync(path.join(os.tmpdir(), 'ts-minio'));

export const RABBITMQ_VERSION = process.env.RABBITMQ_VERSION || '3.8.16-management-alpine';
export const RABBITMQ_DOCKER_IMAGE = process.env.RABBITMQ_DOCKER_IMAGE || 'rabbitmq';
Expand Down
6 changes: 4 additions & 2 deletions packages/scripts/src/helpers/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export type DockerRunOptions = {
env?: ExecEnv;
network?: string;
args?: string[];
mount?: string
mount?: string[]
};

export async function dockerRun(
Expand All @@ -271,7 +271,9 @@ export async function dockerRun(
}

if (opt.mount && !ignoreMount) {
args.push('--mount', opt.mount);
for (const mount of opt.mount) {
args.push('--mount', mount);
}
}

if (opt.ports && opt.ports.length) {
Expand Down
17 changes: 10 additions & 7 deletions packages/scripts/src/helpers/test-runner/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const services: Readonly<Record<Service, Readonly<DockerRunOptions>>> = {
[Service.RestrainedElasticsearch]: {
image: config.ELASTICSEARCH_DOCKER_IMAGE,
name: `${config.TEST_NAMESPACE}_${config.ELASTICSEARCH_NAME}`,
mount: `type=bind,source=${restrainedElasticsearchConfigPath},target=/usr/share/elasticsearch/config/elasticsearch.yml`,
mount: [`type=bind,source=${restrainedElasticsearchConfigPath},target=/usr/share/elasticsearch/config/elasticsearch.yml`],
ports: [`${config.RESTRAINED_ELASTICSEARCH_PORT}:${config.RESTRAINED_ELASTICSEARCH_PORT}`],
env: {
ES_JAVA_OPTS: config.SERVICE_HEAP_OPTS,
Expand Down Expand Up @@ -131,13 +131,16 @@ const services: Readonly<Record<Service, Readonly<DockerRunOptions>>> = {
[Service.Minio]: {
image: config.MINIO_DOCKER_IMAGE,
name: `${config.TEST_NAMESPACE}_${config.MINIO_NAME}`,
tmpfs: config.SERVICES_USE_TMPFS
? ['/data']
: undefined,
/// We will be able to go back and use this on a later version of minio
sotojn marked this conversation as resolved.
Show resolved Hide resolved
// tmpfs: config.SERVICES_USE_TMPFS
// ? ['/data']
// : undefined,
ports: [`${config.MINIO_PORT}:${config.MINIO_PORT}`],
mount: config.ENCRYPT_MINIO
? `type=bind,source=${path.join(getRootDir(), '/e2e/test/certs')},target=/opt/certs`
: '',
? [`type=bind,source=${path.join(getRootDir(), '/e2e/test/certs')},target=/opt/certs`,
`type=bind,source=${config.MINIO_VOLUME},target=/data`
]
: [`type=bind,source=${config.MINIO_VOLUME},target=/data`],
env: {
MINIO_ACCESS_KEY: config.MINIO_ACCESS_KEY,
MINIO_SECRET_KEY: config.MINIO_SECRET_KEY,
Expand All @@ -151,7 +154,7 @@ const services: Readonly<Record<Service, Readonly<DockerRunOptions>>> = {
image: config.RABBITMQ_DOCKER_IMAGE,
name: `${config.TEST_NAMESPACE}_${config.RABBITMQ_NAME}`,
ports: [`${config.RABBITMQ_MANAGEMENT_PORT}:15672`, `${config.RABBITMQ_PORT}:5672`],
mount: `type=bind,source=${rabbitConfigPath},target=/etc/rabbitmq/rabbitmq.conf`,
mount: [`type=bind,source=${rabbitConfigPath},target=/etc/rabbitmq/rabbitmq.conf`],
env: {
RABBITMQ_HOSTNAME: '0.0.0.0',
RABBITMQ_USER: config.RABBITMQ_USER,
Expand Down