Skip to content

Commit

Permalink
Wire up DRS url to cromwell
Browse files Browse the repository at this point in the history
  • Loading branch information
rtitle committed Nov 30, 2022
1 parent 3628651 commit 4c0ceea
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
6 changes: 5 additions & 1 deletion http/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ gke {
# Templated by firecloud-develop
postgres.password = "replace-me"
orchUrl = "https://firecloud-orchestration.dsde-dev.broadinstitute.org/api/"
drsUrl = "https://drshub.dsde-dev.broadinstitute.org/api/v4/drs/resolve"
drsUrl = ${drs.url}
minMemoryGb = 5
minNumOfCpus = 3
}
Expand Down Expand Up @@ -946,3 +946,7 @@ app-service {
# Defaults to true, but disabled for fiab runs
enable-custom-app-check = true
}

drs {
url = "https://drshub.dsde-dev.broadinstitute.org/api/v4/drs/resolve"
}
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ object Boot extends IOApp {
ConfigReader.appConfig.azure.appRegistration,
samConfig,
appMonitorConfig,
ConfigReader.appConfig.azure.wsm
ConfigReader.appConfig.azure.wsm,
ConfigReader.appConfig.drs
),
helmClient,
azureContainerService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ final case class AadPodIdentityConfig(namespace: Namespace,
values: Values
)

final case class DrsConfig(url: String)

// Note: pureconfig supports reading kebab case into camel case in code by default
// More docs see https://pureconfig.github.io/docs/index.html
final case class AppConfig(
terraAppSetupChart: TerraAppSetupChartConfig,
persistentDisk: PersistentDiskConfig,
azure: AzureConfig,
oidc: OidcAuthConfig
oidc: OidcAuthConfig,
drs: DrsConfig
)
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class AKSInterpreter[F[_]](config: AKSInterpreterConfig,
// TODO (TOAZ-241): pass correct information for TES running in a Terra workspace
raw"config.batchAccountName=${landingZoneResources.batchAccountName.value}",
raw"config.batchNodesSubnetId=${landingZoneResources.batchNodesSubnetName.value}",
raw"config.drsUrl=???",
raw"config.drsUrl=${config.drsConfig.url}",

// relay configs
raw"relay.path=$relayEndpoint",
Expand All @@ -315,7 +315,7 @@ class AKSInterpreter[F[_]](config: AKSInterpreterConfig,
raw"persistence.leoAppInstanceName=${appName.value}",
raw"persistence.workspaceManager.url=${config.wsmConfig.uri.renderString}",
raw"persistence.workspaceManager.workspaceId=${workspaceId.value}",
raw"persistence.workspaceManager.workspaceContainerId=${storageContainer.resourceId.value.toString}",
raw"persistence.workspaceManager.containerResourceId=${storageContainer.resourceId.value.toString}",

// identity configs
raw"identity.name=${petManagedIdentity.name()}",
Expand Down Expand Up @@ -679,5 +679,6 @@ final case class AKSInterpreterConfig(
appRegistrationConfig: AzureAppRegistrationConfig,
samConfig: SamConfig,
appMonitorConfig: AppMonitorConfig,
wsmConfig: HttpWsmDaoConfig
wsmConfig: HttpWsmDaoConfig,
drsConfig: DrsConfig
)
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class ConfigReaderSpec extends AnyFlatSpec with Matchers {
org.broadinstitute.dsde.workbench.oauth2.ClientId("fakeClientId"),
Some(org.broadinstitute.dsde.workbench.oauth2.ClientSecret("fakeClientSecret")),
org.broadinstitute.dsde.workbench.oauth2.ClientId("legacyClientSecret")
),
DrsConfig(
"https://drshub.dsde-dev.broadinstitute.org/api/v4/drs/resolve"
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class AKSInterpreterSpec extends AnyFlatSpecLike with TestComponent with Leonard
ConfigReader.appConfig.azure.appRegistration,
SamConfig("https://sam"),
appMonitorConfig,
ConfigReader.appConfig.azure.wsm
ConfigReader.appConfig.azure.wsm,
ConfigReader.appConfig.drs
)

val mockSamDAO = setUpMockSamDAO
Expand Down Expand Up @@ -136,14 +137,14 @@ class AKSInterpreterSpec extends AnyFlatSpecLike with TestComponent with Leonard
"config.resourceGroup=mrg," +
"config.batchAccountName=batch," +
"config.batchNodesSubnetId=subnet1," +
"config.drsUrl=???," +
s"config.drsUrl=${ConfigReader.appConfig.drs.url}," +
"relay.path=https://relay.com/app," +
"persistence.storageAccount=storage," +
"persistence.blobContainer=sc-container," +
"persistence.leoAppInstanceName=app," +
s"persistence.workspaceManager.url=${ConfigReader.appConfig.azure.wsm.uri.renderString}," +
s"persistence.workspaceManager.workspaceId=${workspaceId.value}," +
s"persistence.workspaceManager.workspaceContainerId=${storageContainer.resourceId.value.toString}," +
s"persistence.workspaceManager.containerResourceId=${storageContainer.resourceId.value.toString}," +
"identity.name=identity-name," +
"identity.resourceId=identity-id," +
"identity.clientId=identity-client-id," +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ object AKSManualTest {
appRegConfig,
SamConfig("https://sam.dsde-dev.broadinstitute.org/"),
appMonitorConfig,
ConfigReader.appConfig.azure.wsm
ConfigReader.appConfig.azure.wsm,
ConfigReader.appConfig.drs
)
// TODO Sam and Cromwell should not be using mocks
} yield new AKSInterpreter(
Expand Down

0 comments on commit 4c0ceea

Please sign in to comment.