Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
fae3363
Replace GKE/Helm Galaxy path with GCE VM-based deployment
Apr 7, 2026
6dbafe6
fix format
Apr 7, 2026
27d5780
Grant pet SA GCP Batch IAM roles at Galaxy VM creation time
Apr 7, 2026
d5d0097
add SA permissions and fix unit tests
Apr 7, 2026
9a69ccc
fix the last two unit tests
Apr 8, 2026
049f466
handle Batch SA creation and fix restore Galaxy
Apr 10, 2026
606e510
fix compiler issues
Apr 10, 2026
339ca5d
Fix Leo proxy for Galaxy VM: use HTTP on port 80 via VM internal IP
Apr 13, 2026
cb11878
Fix Galaxy VM readiness check: use direct HTTP to VM internal IP
Apr 13, 2026
ce1b4e1
Fix Galaxy VM proxy: use external IP instead of internal IP
Apr 13, 2026
6fc11f3
Fix Galaxy VM bootstrap: use galaxy-k8s-boot image
Apr 13, 2026
6149be9
increase boot disk size to Galaxy VM disk image reqs
Apr 14, 2026
30169a2
mark cluster as deleted and wait for iam to propagate
Apr 14, 2026
2a992dd
fix Gb to Gib conversion
Apr 15, 2026
3298f65
strip leo proxy prefix
Apr 15, 2026
f5d6f65
pass the galaxy_url_prefix
Apr 15, 2026
09b21d0
use new proxy path env variable
May 8, 2026
5e088d0
Address review findings: galaxy_user email, Source leak, anvil branch…
Jun 12, 2026
4aae1c1
Switch Galaxy bootstrap from cloud-init user-data to GCE startup-script
Jun 12, 2026
0dd49b4
Fix ansible inventory group name: [vm] -> [vms] to match hosts: vms i…
Jun 12, 2026
cc14cc3
Revert sourceImage to v2026-02-25: v2026-06-10 has Helm incompatibili…
Jun 15, 2026
455bbc0
Fix Galaxy blank page: set galaxy_url_prefix and improve Running heal…
Jun 15, 2026
ad5e132
Fix YAML syntax in galaxy_prefix.yml: use single quotes so backslash …
Jun 15, 2026
9bec16b
Fix galaxy_url_prefix Helm key: add missing .galaxy. nesting
Jun 15, 2026
b43c0ce
Fix Galaxy blank page: strip Authorization header and improve readine…
Jun 16, 2026
2a97bf9
Fix Galaxy VM restore: save lastUsedBy on keep-disk delete and accept…
Jun 16, 2026
74d2402
format fix
Jun 16, 2026
2b66294
Fix test: Galaxy VM create sets lastUsedBy, appRestore is now AppRest…
Jun 17, 2026
a187627
Update Galaxy VM source image to v2026-06-30
Jul 17, 2026
88c8a3a
fix(access-controller): give each Galaxy VM app its own Leo cluster r…
Jul 30, 2026
0a0c2fe
fix(access-controller): allow multiple Galaxy VM cluster records per …
Jul 30, 2026
6793c51
style(access-controller): apply scalafmt formatting
Jul 30, 2026
ed0aef1
test(access-controller): remove unique-constraint test for Galaxy VM …
Jul 30, 2026
1965048
feat(access-controller): pass Terra workspace context to Galaxy VM an…
Jul 31, 2026
df8ea17
fix(access-controller): inject X-Forwarded-Proto: https for Galaxy VM…
Jul 31, 2026
4de192f
fix(access-controller): enable ingress-nginx use-forwarded-headers fo…
Aug 3, 2026
5ec07be
fix(access-controller): rewrite http Location headers to https for Ga…
Aug 3, 2026
042aca3
fix(access-controller): pass GCP project ID to Galaxy VM ansible for …
Aug 3, 2026
c8aaee9
fix(access-controller): forward workspace name to Galaxy VM for Terra…
Aug 3, 2026
a847547
fix(access-controller): wire ORCH_URL env var to galaxyVm.orchUrl config
Aug 3, 2026
399a43c
fix(access-controller): allow Galaxy app recreate when prior disk has…
Aug 4, 2026
b509b6d
fix(access-controller): pass correct Terra billing namespace and GCP …
Aug 4, 2026
c4c4c68
fix(access-controller): pass galaxy_infrastructure_url so Galaxy gene…
Aug 5, 2026
4270d17
fix(access-controller): accept Origin header as Referer fallback for …
Aug 5, 2026
b242aac
fix(access-controller): pass VPC network/subnet to Galaxy ansible for…
Aug 5, 2026
ec1ed64
fix(access-controller): add userinfo scopes to Galaxy GCE VM service …
Aug 5, 2026
3acc4d4
fix(access-controller): pass GCP Batch boot image as VM metadata to a…
Aug 5, 2026
0aa3dea
fix(access-controller): scalafmt
Aug 5, 2026
661b35a
revert(access-controller): remove gcp-batch-boot-image metadata
Aug 5, 2026
4706f10
fix(access-controller): quote terra_workspace/namespace as JSON extra…
Aug 5, 2026
334d3b0
fix(access-controller): allow same-origin requests with no Referer or…
Aug 6, 2026
dd7c1a2
feat(access-controller): enable Private Google Access on Leo-created …
Aug 6, 2026
0b55121
Revert "feat(access-controller): enable Private Google Access on Leo-…
Aug 6, 2026
7c584b9
fix(access-controller): add roles/batch.agentReporter to galaxy-batch…
Aug 7, 2026
634a28a
fix(access-controller): add roles/logging.logWriter to galaxy-batch-r…
Aug 7, 2026
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
200 changes: 200 additions & 0 deletions http/src/main/resources/init-resources/galaxy-user-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
#!/bin/bash
# Sourced from https://github.com/galaxyproject/galaxy-k8s-boot/blob/anvil/bin/user_data.sh
# When updating this file, sync it manually from that repository and verify the changes.
# Passed to the GCE instance as the "startup-script" metadata key so the Guest Agent
# executes it on every boot (cloud-init user-data is skipped on pre-baked images).

echo "[$(date)] - Starting galaxy_bootstrap script..."

# 1. Setup persistent disk if available
DISK_DEVICE="/dev/disk/by-id/google-galaxy-data"
if [ -b "$DISK_DEVICE" ]; then
echo "[$(date)] - Found persistent disk at $DISK_DEVICE"

if ! blkid "$DISK_DEVICE" > /dev/null 2>&1; then
echo "[$(date)] - Formatting disk $DISK_DEVICE with ext4"
mkfs -t ext4 "$DISK_DEVICE"
else
echo "[$(date)] - Disk $DISK_DEVICE is already formatted"
fi

mkdir -p /mnt/block_storage
mount "$DISK_DEVICE" /mnt/block_storage

DISK_UUID=$(blkid -s UUID -o value "$DISK_DEVICE")
if [ -n "$DISK_UUID" ] && ! grep -q "$DISK_UUID" /etc/fstab; then
echo "UUID=$DISK_UUID /mnt/block_storage ext4 defaults 0 2" >> /etc/fstab
fi

chown debian:debian /mnt/block_storage
echo "[$(date)] - Persistent disk mounted at /mnt/block_storage"
else
echo "[$(date)] - No persistent disk found at $DISK_DEVICE. Galaxy will use ephemeral storage."
fi

# 2. Setup PostgreSQL disk if available
POSTGRES_DISK_DEVICE="/dev/disk/by-id/google-galaxy-postgres-data"
if [ -b "$POSTGRES_DISK_DEVICE" ]; then
echo "[$(date)] - Found PostgreSQL disk at $POSTGRES_DISK_DEVICE"

if ! blkid "$POSTGRES_DISK_DEVICE" > /dev/null 2>&1; then
echo "[$(date)] - Formatting PostgreSQL disk $POSTGRES_DISK_DEVICE with ext4"
mkfs -t ext4 "$POSTGRES_DISK_DEVICE"
else
echo "[$(date)] - PostgreSQL disk $POSTGRES_DISK_DEVICE is already formatted"
fi

mkdir -p /mnt/postgres_storage
mount "$POSTGRES_DISK_DEVICE" /mnt/postgres_storage

POSTGRES_DISK_UUID=$(blkid -s UUID -o value "$POSTGRES_DISK_DEVICE")
if [ -n "$POSTGRES_DISK_UUID" ] && ! grep -q "$POSTGRES_DISK_UUID" /etc/fstab; then
echo "UUID=$POSTGRES_DISK_UUID /mnt/postgres_storage ext4 defaults 0 2" >> /etc/fstab
fi

chown debian:debian /mnt/postgres_storage
echo "[$(date)] - PostgreSQL disk mounted at /mnt/postgres_storage"
else
echo "[$(date)] - No PostgreSQL disk found at $POSTGRES_DISK_DEVICE. PostgreSQL will use ephemeral storage."
fi

# 3. Run ansible-pull as the debian user.
# Single-quoted heredoc delimiter means the outer (root) shell does not expand any
# variables — all expansion happens inside the debian bash session.
sudo -u debian bash <<'DEBIAN_EOF'
export HOME=/home/debian

HOST_IP=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/access-configs/0/external-ip" \
-H "Metadata-Flavor: Google" 2>/dev/null || curl -s ifconfig.me)

PV_SIZE=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/persistent-volume-size" \
-H "Metadata-Flavor: Google" 2>/dev/null)
if [ -z "$PV_SIZE" ]; then
echo "[$(date)] - persistent-volume-size metadata not found or empty, using default."
PV_SIZE="139Gi"
fi
echo "[$(date)] - NFS storage size for Galaxy: ${PV_SIZE}"

RESTORE_GALAXY=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/restore_galaxy" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "false")

GCP_BATCH_SERVICE_ACCOUNT_EMAIL=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/gcp_batch_service_account_email" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "galaxy-batch-runner@anvil-and-terra-development.iam.gserviceaccount.com")
echo "[$(date)] - GCP Batch service account email: ${GCP_BATCH_SERVICE_ACCOUNT_EMAIL}"

TERRA_WORKSPACE=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/terra-workspace" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
TERRA_NAMESPACE=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/terra-namespace" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
GCP_PROJECT_ID=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/gcp-project-id" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
GCP_NETWORK=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/gcp-network" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
GCP_SUBNET=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/gcp-subnet" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
echo "[$(date)] - GCP network: ${GCP_NETWORK}, subnet: ${GCP_SUBNET}"
GCP_BATCH_BOOT_IMAGE=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/gcp-batch-boot-image" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
echo "[$(date)] - GCP Batch boot image: ${GCP_BATCH_BOOT_IMAGE}"
TERRA_DRS_URL=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/terra-drs-url" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
TERRA_API_URL=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/terra-api-url" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")

# Leo proxy path prefix (e.g. /proxy/google/v1/apps/{project}/{appName}/galaxy).
# Passed to ansible-pull as galaxy_prefix so Galaxy nginx ingress is configured at
# the correct subpath. Without this Galaxy generates links rooted at / which the
# browser resolves against Leo host and gets 404s.
GALAXY_URL_PREFIX=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/galaxy-url-prefix" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
echo "[$(date)] - Galaxy URL prefix: ${GALAXY_URL_PREFIX}"

GALAXY_PROXY_BASE_URL=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/galaxy-proxy-base-url" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
# Full HTTPS URL Galaxy uses to generate absolute links (history exports, API callbacks, etc.).
# Without this Galaxy infers http:// from its internal connection and produces links that
# browsers refuse to send the Secure LeoToken cookie on.
GALAXY_INFRASTRUCTURE_URL="${GALAXY_PROXY_BASE_URL}${GALAXY_URL_PREFIX}"
echo "[$(date)] - Galaxy infrastructure URL: ${GALAXY_INFRASTRUCTURE_URL}"

GALAXY_USER=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/galaxy-user-email" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "")
echo "[$(date)] - Galaxy user email: ${GALAXY_USER}"

GIT_REPO=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/git-repo" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "https://github.com/galaxyproject/galaxy-k8s-boot.git")
GIT_BRANCH=$(curl -s -f "http://metadata.google.internal/computeMetadata/v1/instance/attributes/git-branch" \
-H "Metadata-Flavor: Google" 2>/dev/null || echo "anvil")

PULL_ARGS=(
-U "${GIT_REPO}"
-C "${GIT_BRANCH}"
-d /home/debian/ansible
-i /tmp/ansible-inventory/localhost
--accept-host-key
--limit 127.0.0.1
--extra-vars "gcp_batch_service_account_email=${GCP_BATCH_SERVICE_ACCOUNT_EMAIL}"
--extra-vars "{\"terra_workspace\": \"${TERRA_WORKSPACE}\", \"terra_namespace\": \"${TERRA_NAMESPACE}\"}"
--extra-vars "terra_drs_url=${TERRA_DRS_URL}"
--extra-vars "terra_api_url=${TERRA_API_URL}"
--extra-vars "ingress_use_forwarded_headers=true"
--extra-vars "gcp_project_id=${GCP_PROJECT_ID}"
)

if [ -n "$GCP_NETWORK" ]; then
PULL_ARGS+=(--extra-vars "gcp_batch_network=${GCP_NETWORK}")
echo "[$(date)] - GCP Batch network passed to ansible: ${GCP_NETWORK}"
fi

if [ -n "$GCP_SUBNET" ]; then
PULL_ARGS+=(--extra-vars "gcp_batch_subnet=${GCP_SUBNET}")
echo "[$(date)] - GCP Batch subnet passed to ansible: ${GCP_SUBNET}"
fi

if [ -n "$GCP_BATCH_BOOT_IMAGE" ]; then
PULL_ARGS+=(--extra-vars "gcp_batch_boot_image=${GCP_BATCH_BOOT_IMAGE}")
echo "[$(date)] - GCP Batch boot image passed to ansible: ${GCP_BATCH_BOOT_IMAGE}"
fi

if [ "$RESTORE_GALAXY" = "true" ]; then
PULL_ARGS+=(--extra-vars "restore_galaxy=true")
echo "[$(date)] - Galaxy Restore Mode: Enabled"
else
echo "[$(date)] - Galaxy Restore Mode: Disabled"
fi

if [ -n "$GALAXY_URL_PREFIX" ]; then
PULL_ARGS+=(--extra-vars "galaxy_prefix=${GALAXY_URL_PREFIX}")
echo "[$(date)] - Galaxy URL prefix passed to ansible: ${GALAXY_URL_PREFIX}"
fi

if [ -n "$GALAXY_INFRASTRUCTURE_URL" ]; then
PULL_ARGS+=(--extra-vars "galaxy_infrastructure_url=${GALAXY_INFRASTRUCTURE_URL}")
echo "[$(date)] - Galaxy infrastructure URL passed to ansible: ${GALAXY_INFRASTRUCTURE_URL}"
fi

PULL_ARGS+=(playbook.yml)

mkdir -p /tmp/ansible-inventory
cat > /tmp/ansible-inventory/localhost << EOF
[vms]
127.0.0.1 ansible_connection=local ansible_python_interpreter="/usr/bin/python3"

[all:vars]
ansible_user="debian"
rke2_token="defaultSecret12345"
rke2_additional_sans=["${HOST_IP}"]
rke2_debug=true
nfs_size="${PV_SIZE}"
galaxy_persistence_size="${PV_SIZE}"
galaxy_db_password="gxy-db-password"
galaxy_user="${GALAXY_USER}"
EOF

echo "[$(date)] - Inventory file created at /tmp/ansible-inventory/localhost; running ansible-pull..."
echo "[$(date)] - Running: ANSIBLE_CALLBACKS_ENABLED=profile_tasks ANSIBLE_HOST_PATTERN_MISMATCH=ignore ansible-pull ${PULL_ARGS[@]}"

ANSIBLE_CALLBACKS_ENABLED=profile_tasks ANSIBLE_HOST_PATTERN_MISMATCH=ignore ansible-pull "${PULL_ARGS[@]}"
DEBIAN_EOF

echo "[$(date)] - Bootstrap script completed."
4 changes: 4 additions & 0 deletions http/src/main/resources/init-resources/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ function failScriptIfError() {

function validateCert() {
certFileDirectory=$1
## Only the master node has certs; worker nodes in multi-node Dataproc clusters do not.
if [ ! -f "${certFileDirectory}/jupyter-server.crt" ]; then
return 0
fi
## This helps when we need to rotate certs.
notAfter=`openssl x509 -enddate -noout -in ${certFileDirectory}/jupyter-server.crt` # output should be something like `notAfter=Jul 4 20:31:52 2026 GMT`

Expand Down
4 changes: 4 additions & 0 deletions http/src/main/resources/leo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ gce {
}
}

galaxyVm {
orchUrl = ${?ORCH_URL}
}

gke {
cluster {
version = ${?KUBERNETES_VERSION}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,5 @@
<include file="changesets/20251024_delete_app_controlled_resource_table.xml" relativeToChangelogFile="true" />
<include file="changesets/20251024_delete_runtime_controlled_resource_table.xml" relativeToChangelogFile="true" />
<include file="changesets/20251024_delete_update_app_log_table.xml" relativeToChangelogFile="true" />
<include file="changesets/20260730_allow_multiple_galaxy_vm_clusters.xml" relativeToChangelogFile="true" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog logicalFilePath="leonardo" xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet logicalFilePath="leonardo" author="lbaldo" id="lbaldo_20260730_allow_multiple_galaxy_vm_clusters">
<!-- Galaxy VM-based deployment creates one Leo KubernetesCluster record per app (rather than
one per project) so that each app can store its own VM's external IP via updateAsyncFields
without overwriting another app's IP. Drop the project-level uniqueness constraint so that
multiple active cluster records can coexist in the same cloud context.
Application-level Serializable-isolation logic in saveOrGetClusterForApp continues to
enforce single-cluster-per-project semantics for GKE-based apps. -->
<dropUniqueConstraint tableName="KUBERNETES_CLUSTER" constraintName="IDX_KUBERNETES_CLUSTER_UNIQUE_V2"/>
</changeSet>
</databaseChangeLog>
55 changes: 55 additions & 0 deletions http/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,44 @@ vpc {
northamerica-northeast2 = "10.26.0.0/20"
}
firewallsToAdd = [
# Allows Galaxy VM traffic on port 80 (nginx ingress on hostNetwork)
{
name-prefix = "leonardo-allow-http"
sourceRanges = {
us-central1 = ["0.0.0.0/0"]
northamerica-northeast1 = ["0.0.0.0/0"]
southamerica-east1 = ["0.0.0.0/0"]
us-east1 = ["0.0.0.0/0"]
us-east4 = ["0.0.0.0/0"]
us-west1 = ["0.0.0.0/0"]
us-west2 = ["0.0.0.0/0"]
us-west3 = ["0.0.0.0/0"]
us-west4 = ["0.0.0.0/0"]
europe-central2 = ["0.0.0.0/0"]
europe-north1 = ["0.0.0.0/0"]
europe-west1 = ["0.0.0.0/0"]
europe-west2 = ["0.0.0.0/0"]
europe-west3 = ["0.0.0.0/0"]
europe-west4 = ["0.0.0.0/0"]
europe-west6 = ["0.0.0.0/0"]
asia-east1 = ["0.0.0.0/0"]
asia-east2 = ["0.0.0.0/0"]
asia-northeast1 = ["0.0.0.0/0"]
asia-northeast2 = ["0.0.0.0/0"]
asia-northeast3 = ["0.0.0.0/0"]
asia-south1 = ["0.0.0.0/0"]
asia-southeast1 = ["0.0.0.0/0"]
asia-southeast2 = ["0.0.0.0/0"]
australia-southeast1 = ["0.0.0.0/0"]
northamerica-northeast2 = ["0.0.0.0/0"]
}
allowed = [
{
protocol = "tcp"
port = "80"
}
]
},
# Allows Leonardo proxy traffic on port 443
{
name-prefix = "leonardo-allow-https"
Expand Down Expand Up @@ -395,6 +433,23 @@ groups {
}
}

galaxyVm {
# Pre-built galaxy-k8s-boot image with all dependencies (Ansible, RKE2, etc.) pre-installed.
# Has cloud-init, which processes the "user-data" metadata key on first boot.
# Source: https://github.com/galaxyproject/galaxy-k8s-boot (image built by the Galaxy team)
sourceImage = "projects/anvil-and-terra-development/global/images/galaxy-k8s-boot-v2026-06-30"
machineType = "n1-highmem-8"
bootDiskSizeGb = 100
postgresDiskSizeGb = 10
# Suffix appended to the NFS disk name to derive the postgres disk name.
# Must match the value used in LeoPubsubMessageSubscriber (galaxyDisk.postgresDiskNameSuffix).
postgresDiskNameSuffix = ${gke.galaxyDisk.postgresDiskNameSuffix}
gitRepo = "https://github.com/galaxyproject/galaxy-k8s-boot.git"
gitBranch = "anvil"
orchUrl = "https://firecloud-orchestration.dsde-dev.broadinstitute.org/api/"
drsUrl = ${drs.url}
}

gke {
cluster {
location = "us-central1-a",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,20 @@ object Config {
)
}

implicit private val galaxyVmConfigReader: ValueReader[GalaxyVmConfig] = ValueReader.relative { config =>
GalaxyVmConfig(
config.as[GceCustomImage]("sourceImage"),
config.as[MachineTypeName]("machineType"),
config.as[DiskSize]("bootDiskSizeGb"),
config.as[DiskSize]("postgresDiskSizeGb"),
config.as[String]("postgresDiskNameSuffix"),
config.as[String]("gitRepo"),
config.as[String]("gitBranch"),
config.as[String]("orchUrl"),
config.as[String]("drsUrl")
)
}

implicit private val gceConfigReader: ValueReader[GceConfig] = ValueReader.relative { config =>
GceConfig(
config.as[GceCustomImage]("customGceImage"),
Expand Down Expand Up @@ -497,6 +511,7 @@ object Config {
val googleGroupsConfig = config.as[GoogleGroupsConfig]("groups")

val dataprocConfig = config.as[DataprocConfig]("dataproc")
val galaxyVmConfig = config.as[GalaxyVmConfig]("galaxyVm")
val gceConfig = config.as[GceConfig]("gce")
val imageConfig = config.as[ImageConfig]("image")
val prometheusConfig = config.as[PrometheusConfig]("prometheus")
Expand Down Expand Up @@ -901,13 +916,13 @@ object Config {
vpcConfig.networkTag,
org.broadinstitute.dsde.workbench.leonardo.http.ConfigReader.appConfig.terraAppSetupChart,
gkeIngressConfig,
gkeGalaxyAppConfig,
gkeCromwellAppConfig,
gkeCustomAppConfig,
gkeAllowedAppConfig,
appMonitorConfig,
gkeClusterConfig,
proxyConfig,
gkeGalaxyDiskConfig
gkeGalaxyDiskConfig,
galaxyVmConfig
)
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package org.broadinstitute.dsde.workbench.leonardo.config

import org.broadinstitute.dsde.workbench.google2.KubernetesSerializableName.ServiceAccountName
import org.broadinstitute.dsde.workbench.google2.{KubernetesSerializableName, MachineTypeName}
import KubernetesSerializableName.ServiceAccountName
import org.broadinstitute.dsde.workbench.leonardo.AppType._
import org.broadinstitute.dsde.workbench.leonardo.CustomImage.GceCustomImage
import org.broadinstitute.dsde.workbench.leonardo._
import org.broadinstitute.dsp.{ChartName, ChartVersion}

Expand Down Expand Up @@ -92,6 +94,18 @@ final case class CustomAppConfig(chartName: ChartName,
val appType: AppType = AppType.Custom
}

final case class GalaxyVmConfig(
sourceImage: GceCustomImage,
machineType: MachineTypeName,
bootDiskSizeGb: DiskSize,
postgresDiskSizeGb: DiskSize,
postgresDiskNameSuffix: String,
gitRepo: String,
gitBranch: String,
orchUrl: String,
drsUrl: String
)

final case class ContainerRegistryUsername(asString: String) extends AnyVal
final case class ContainerRegistryPassword(asString: String) extends AnyVal
final case class ContainerRegistryCredentials(username: ContainerRegistryUsername, password: ContainerRegistryPassword)
Expand Down
Loading
Loading