-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into jgd_WX-1387
- Loading branch information
Showing
7 changed files
with
197 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
runConfigurations/Repo template_ Cromwell server Terra TES.run.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Repo template: Cromwell server Terra TES" type="Application" factoryName="Application"> | ||
<option name="ALTERNATIVE_JRE_PATH" value="$PROJECT_DIR$/../.sdkman/candidates/java/current" /> | ||
<envs> | ||
<env name="CROMWELL_BUILD_CENTAUR_SLICK_PROFILE" value="slick.jdbc.MySQLProfile$" /> | ||
<env name="CROMWELL_BUILD_CENTAUR_JDBC_DRIVER" value="com.mysql.cj.jdbc.Driver" /> | ||
<env name="CROMWELL_BUILD_CENTAUR_JDBC_URL" value="jdbc:mysql://localhost:3306/cromwell_test?allowPublicKeyRetrieval=true&useSSL=false&rewriteBatchedStatements=true&serverTimezone=UTC&useInformationSchema=true" /> | ||
<env name="CROMWELL_BUILD_RESOURCES_DIRECTORY" value="target/ci/resources" /> | ||
<env name="CROMWELL_BUILD_PAPI_JSON_FILE" value="target/ci/resources/cromwell-centaur-service-account.json" /> | ||
<env name="CROMWELL_BUILD_CENTAUR_READ_LINES_LIMIT" value="128000" /> | ||
<env name="CROMWELL_BUILD_CENTAUR_256_BITS_KEY" value="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" /> | ||
</envs> | ||
<option name="MAIN_CLASS_NAME" value="cromwell.CromwellApp" /> | ||
<module name="cromwell" /> | ||
<option name="PROGRAM_PARAMETERS" value="server" /> | ||
<option name="VM_PARAMETERS" value="-Dconfig.file=target/ci/resources/terra_tes_application.conf" /> | ||
<method v="2"> | ||
<option name="Make" enabled="true" /> | ||
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_Acquire Google B2C Token" /> | ||
<option name="RunConfigurationTask" enabled="true" run_configuration_name="renderCiResources" run_configuration_type="SbtRunConfiguration" /> | ||
</method> | ||
</configuration> | ||
</component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# This script acquires a b2c token using gcloud auth and writes it to a file. | ||
# This file is used by renderCiResources to populate the CROMWELL_B2C_TOKEN in tes_application.conf. | ||
# It should be run as a "Before Launch" task in IntelliJ so the token is refreshed regularly. | ||
|
||
### Setting up this script for the first time in IntelliJ? | ||
### 1. Open the "Run/Debug Configurations" dialog for the TES repo template. | ||
### 2. Add a new "Before Launch" task, selecting "Run External Tool". | ||
### This task should run BEFORE the renderCiResources task. | ||
### 3. Configure the new task: | ||
### - Name: "Acquire b2c token" | ||
### - Program: /full/path/to/src/ci/resources/acquire_b2c_token.sh | ||
### - Arguments: ./env.temp | ||
### - Working directory: /full/path/to/src/ci/resources | ||
### - Advanced Options > Uncheck "Synchronize files after execution" | ||
### 4. Click "OK" to save the new task. Apply and close the "Run/Debug Configurations" dialog. | ||
|
||
# User must provide an output file path as an argument. | ||
# This can be provided by IntelliJ as a program argument in the run configuration. | ||
if [ -z "$1" ]; then | ||
echo "Error: Must specify an output file path for the environment file." | ||
exit 1 | ||
fi | ||
|
||
# Acquire a b2c token using gcloud auth. | ||
# Send stderr to /dev/null so that any gcloud auth errors/update prompts don't pollute the token output. | ||
echo "Using local gcloud auth to acquire a b2c token..." | ||
B2C_TOKEN=$(gcloud auth print-access-token 2>/dev/null) | ||
if [ $? -eq 0 ]; then | ||
echo "Acquired b2c token: ${B2C_TOKEN:0:4}****" | ||
else | ||
echo "Failed to acquire b2c token. Is your local shell logged into gcloud?" | ||
fi | ||
|
||
# Create the output directory if it doesn't exist | ||
output_dir=$(dirname "$1") | ||
mkdir -p "$output_dir" | ||
|
||
# Write the token to the output file. dsde-toolbox will call `source` on this file that we're writing, | ||
# so it's expected that this file contains valid bash syntax for setting an environment variable. | ||
echo "export CROMWELL_B2C_TOKEN=${B2C_TOKEN}" > "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
include required(classpath("application.conf")) | ||
include "build_application.inc.conf" | ||
|
||
filesystems { | ||
blob { | ||
class = "cromwell.filesystems.blob.BlobPathBuilderFactory" | ||
global { | ||
class = "cromwell.filesystems.blob.BlobFileSystemManager" | ||
config { | ||
workspace-manager: { | ||
# static: Where is WSM Endpoint | ||
url: "https://workspace.dsde-dev.broadinstitute.org" | ||
# See comment in src/ci/resources/acquire_b2c_token.sh for the one-time setup required to automatically acquire this. | ||
# This token can also be manually acquired with gcloud auth print-access-token myAccount@gmail.com | ||
b2cToken: "{{ env "CROMWELL_B2C_TOKEN" }}" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
engine { | ||
filesystems { | ||
local { | ||
enabled: true | ||
} | ||
http { | ||
enabled: true | ||
} | ||
blob { | ||
enabled: true | ||
} | ||
} | ||
} | ||
|
||
|
||
backend { | ||
default = "TES" | ||
providers { | ||
TES { | ||
actor-factory = "cromwell.backend.impl.tes.TesBackendLifecycleActorFactory" | ||
config { | ||
# Root of a blob storage container to use | ||
# Might look something like: https://lz813a3d637adefec2c6e88f.blob.core.windows.net/sc-d8143fd8-aa07-446d-9ba0-af72203f1794/some/path/" | ||
root = "" | ||
dockerRoot = "/cromwell-executions" | ||
# TES Endpoint for cromwell to use. Might look something like: "https://lz7388ada396994bb48ea5c87a02eed673689c82c2af423d03.servicebus.windows.net/something/tes/v1/tasks | ||
endpoint = "" | ||
concurrent-job-limit = 1000 | ||
# Identity to execute the workflow as. Might look something like: "pet-2676571657071603a9eab" | ||
workflow-execution-identity = "" | ||
# See comment in src/ci/resources/acquire_b2c_token.sh for the one-time setup required to automatically acquire this. | ||
# This token can also be manually acquired with gcloud auth print-access-token myAccount@gmail.com | ||
bearer-token="Bearer {{ env "CROMWELL_B2C_TOKEN" }}" | ||
# Override default polling to make it faster for speedy tests | ||
poll-backoff { | ||
min: "10 seconds" | ||
max: "5 minutes" | ||
multiplier: 1.1 | ||
randomization-factor: 0.5 | ||
} | ||
|
||
filesystems { | ||
blob { | ||
enabled: true | ||
} | ||
local { | ||
enabled: false | ||
} | ||
http { | ||
enabled: true | ||
} | ||
} | ||
} | ||
|
||
# Have the engine (maybe) authenticate to docker.io. See BT-141 for more info. | ||
include "dockerhub_provider_config_v1.inc.conf" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters