-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 2 commits.
# The first commit's message is: Initial JES backend work # The 2nd commit message will be skipped: # Make application.conf basic
- Loading branch information
1 parent
c56b1bc
commit 93250fa
Showing
70 changed files
with
1,848 additions
and
369 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
Binary file not shown.
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,5 @@ | ||
package cromwell.parser; | ||
|
||
public enum BackendType { | ||
LOCAL, JES; | ||
} |
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,35 @@ | ||
package cromwell.parser; | ||
|
||
/** | ||
* Convenience enum for parsing memory specifications. If feels like there should be a preexisting library | ||
* for this but I couldn't find one. | ||
*/ | ||
public enum MemorySize { | ||
Bytes(1, "B"), | ||
KiB(1_000, "KiB"), | ||
MiB(KiB.multiplier * KiB.multiplier, "MiB"), | ||
GiB(KiB.multiplier * MiB.multiplier, "GiB"), | ||
TiB(KiB.multiplier * GiB.multiplier, "TiB"), | ||
KB(1 << 10, "KB"), | ||
MB(KB.multiplier * KB.multiplier, "MB"), | ||
GB(KB.multiplier * MB.multiplier, "GB"), | ||
TB(KB.multiplier * GB.multiplier, "TB"); | ||
|
||
public final long multiplier; | ||
public final String suffix; | ||
|
||
MemorySize(long multiplier, String suffix) { | ||
this.multiplier = multiplier; | ||
this.suffix = suffix; | ||
} | ||
|
||
/** Convert from the units of this memory size to individual bytes. */ | ||
public double toBytes(double prefix) { | ||
return prefix * multiplier; | ||
} | ||
|
||
/** Convert from individual bytes to units of this memory size. */ | ||
public double fromBytes(double bytes) { | ||
return bytes / multiplier; | ||
} | ||
} |
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,65 @@ | ||
package cromwell.parser; | ||
|
||
import static cromwell.parser.BackendType.JES; | ||
import static cromwell.parser.BackendType.LOCAL; | ||
|
||
/** | ||
* Backend runtime keys and the backends which are known to support them. | ||
*/ | ||
public enum RuntimeKey { | ||
CPU("cpu", JES), | ||
DEFAULT_DISKS("defaultDisks", JES), | ||
DEFAULT_ZONES("defaultZones", JES), | ||
DOCKER("docker", new BackendType[]{JES}, LOCAL), | ||
FAIL_ON_STDERR("failOnStderr", LOCAL, JES), | ||
MEMORY("memory", JES), | ||
PREEMPTIBLE("preemptible", JES); | ||
|
||
public final String key; | ||
|
||
/** | ||
* BackendTypes on which this key is mandatory. | ||
*/ | ||
public final BackendType[] mandatory; | ||
|
||
/** | ||
* BackendTypes optionally supporting this key. A BackendType need only appear in one | ||
* of the mandatory or optional arrays. | ||
*/ | ||
public final BackendType[] optional; | ||
|
||
RuntimeKey(String key, BackendType... optional) { | ||
this(key, new BackendType[0], optional); | ||
} | ||
|
||
RuntimeKey(String key, BackendType [] mandatory, BackendType... optional) { | ||
this.key = key; | ||
this.mandatory = mandatory; | ||
this.optional = optional; | ||
} | ||
|
||
public boolean isMandatory(BackendType backendType) { | ||
for (BackendType type : mandatory) { | ||
if (type == backendType) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
public boolean isOptional(BackendType backendType) { | ||
for (BackendType type : optional) { | ||
if (type == backendType) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
|
||
/** | ||
* Returns true if the specified key is mandatory or optional on this backend. | ||
*/ | ||
public boolean supports(BackendType backendType) { | ||
return isOptional(backendType) || isMandatory(backendType); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,12 +1,88 @@ | ||
akka { | ||
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] | ||
loggers = ["akka.event.slf4j.Slf4jLogger"] | ||
loglevel = "DEBUG" | ||
actor { | ||
debug { | ||
receive = on | ||
event-stream = on | ||
fsm = on | ||
webservice.port = 8000 | ||
webservice.interface = 0.0.0.0 | ||
instance.name = "reference" | ||
|
||
swagger { | ||
apiDocs = "api-docs" | ||
apiVersion = "0.1" | ||
baseUrl = "/" | ||
contact = "dsde@broadinstitute.org" | ||
description = "One workflow service to rule them all..." | ||
info = "Cromwell" | ||
license = "BSD" | ||
licenseUrl = "http://opensource.org/licenses/BSD-3-Clause" | ||
swaggerVersion = "1.2" | ||
termsOfServiceUrl = "http://www.github.com/broadinstitute/cromwell" | ||
} | ||
|
||
spray.can { | ||
server { | ||
request-timeout = 40s | ||
} | ||
client { | ||
request-timeout = 40s | ||
connecting-timeout = 40s | ||
} | ||
} | ||
|
||
|
||
backend { | ||
backend = "local" // Either "JES" or "local", case insensitive | ||
|
||
// If backend is JES, must supply a 'jes' stanza: | ||
// jes | ||
// applicationName | ||
// project (i.e. google project name) | ||
// baseExecutionBucket (GCS path where things will be written to) | ||
} | ||
|
||
// If authenticating with Google (e.g. if backend is 'JES') you must supply a top level stanza 'google': | ||
|
||
// authScheme - Either "service" for service account or "user" for user-based, case insensitive | ||
// If "user" you must supply: | ||
// userAuth | ||
// user | ||
// secretsFile | ||
// dataStoreDir (dir to cache oauth credentials) | ||
// You will be asked to do the oauth browser dance | ||
|
||
// If "service" you must supply: | ||
// p12File | ||
// serviceAccountId | ||
|
||
database { | ||
config = main.hsqldb | ||
|
||
main { | ||
hsqldb { | ||
url = "jdbc:hsqldb:mem:${slick.uniqueSchema};shutdown=false" | ||
driver = "org.hsqldb.jdbcDriver" | ||
slick.driver = "slick.driver.HsqldbDriver" | ||
slick.createSchema = true | ||
} | ||
} | ||
|
||
test { | ||
hsqldb { | ||
url = "jdbc:hsqldb:mem:testdb;shutdown=false" | ||
driver = "org.hsqldb.jdbcDriver" | ||
slick.driver = "slick.driver.HsqldbDriver" | ||
liquibase = { | ||
changelog = "src/main/migrations/changelog.xml" | ||
connection = "liquibase.database.jvm.HsqlConnection" | ||
} | ||
} | ||
|
||
mysql { | ||
url = "jdbc:mysql://localhost/cromwell_test" | ||
user = "travis" | ||
password = "" | ||
driver = "com.mysql.jdbc.Driver" | ||
slick.driver = "slick.driver.MySQLDriver" | ||
liquibase = { | ||
changelog = "src/main/migrations/changelog.xml" | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.