├── consonance-arch ├── lib │ └── touch ├── scripts │ ├── setup-master.sh │ ├── setup-worker.sh │ ├── cleanup.sh │ └── ubuntu_cleanup.sh ├── src │ ├── test │ │ ├── resources │ │ │ ├── node-engine.cwl │ │ │ ├── image-descriptor.cwl │ │ │ ├── testInitialHeartbeat.txt │ │ │ ├── err_output.sh │ │ │ ├── testResult_End.txt │ │ │ ├── testResult_Start.txt │ │ │ ├── workerConfig │ │ │ ├── coordinatorConfig.json │ │ │ ├── workerConfig.ini │ │ │ ├── config.check_hash │ │ │ ├── coordinatorConfig │ │ │ ├── config │ │ │ ├── collab-cwl-job-pre.json │ │ │ ├── config.json │ │ │ ├── collab.cwl │ │ │ ├── testFinalHeartbeat.txt │ │ │ └── logback-test.xml │ │ └── java │ │ │ └── io │ │ │ └── consonance │ │ │ └── arch │ │ │ ├── worker │ │ │ └── WorkerRunnableIT.java │ │ │ └── containerProvisioner │ │ │ └── ContainerProvisionerThreadsIT.java │ └── main │ │ ├── resources │ │ ├── config │ │ └── workerConfig.ini │ │ └── java │ │ └── io │ │ └── consonance │ │ └── arch │ │ ├── worker │ │ ├── package-info.java │ │ └── WorkflowResult.java │ │ ├── util │ │ └── package-info.java │ │ ├── containerProvisioner │ │ └── package-info.java │ │ ├── jobGenerator │ │ └── package-info.java │ │ └── coordinator │ │ └── package-info.java ├── findbugs-exclude.xml ├── ini │ ├── test1.ini │ └── test2.ini ├── img │ ├── arch.png │ ├── flow.png │ ├── error.png │ └── state.png ├── conf │ └── config.json └── init.d │ ├── sample_worker.sh │ └── sample_master.sh ├── mvnvm.properties ├── container-admin ├── example_tags.json ├── key.pem.template ├── images │ └── security_groups.png ├── init_webservice.sh ├── aws.config.template ├── init_coordinator.sh ├── init_provisioner.sh ├── init_client.sh ├── bag_params.json.template ├── config.template ├── youxia_config.template ├── docker-compose.yml ├── Dockerfile_coordinator.template ├── web.yml.template └── Dockerfile_webservice.template ├── swagger-ga4gh-client ├── .swagger-codegen │ └── VERSION ├── docs │ ├── Ga4ghWesServiceInfoRequest.md │ ├── Ga4ghWesParameterTypes.md │ ├── Ga4ghWesWorkflowRunId.md │ ├── Ga4ghWesWorkflowTypeVersion.md │ ├── Ga4ghWesWorkflowDesc.md │ ├── Ga4ghWesWorkflowStatus.md │ ├── Ga4ghWesWorkflowListResponse.md │ ├── Ga4ghWesParameter.md │ ├── Ga4ghWesState.md │ ├── Ga4ghWesWorkflowRequest.md │ ├── Ga4ghWesLog.md │ ├── Ga4ghWesWorkflowListRequest.md │ ├── Ga4ghWesWorkflowLog.md │ └── Ga4ghWesServiceInfo.md ├── findbugs-exclude.xml ├── .gitignore └── src │ └── main │ └── java │ └── io │ └── swagger │ └── client │ ├── auth │ ├── OAuthFlow.java │ ├── Authentication.java │ ├── OAuth.java │ ├── HttpBasicAuth.java │ └── ApiKeyAuth.java │ ├── Configuration.java │ ├── Pair.java │ ├── model │ ├── Ga4ghWesServiceInfoRequest.java │ ├── Ga4ghWesParameterTypes.java │ └── Ga4ghWesState.java │ ├── ApiResponse.java │ ├── StringUtil.java │ └── ApiCallback.java ├── consonance-client ├── findbugs-exclude.xml ├── README.md └── src │ ├── test │ └── resources │ │ └── config │ └── main │ ├── java │ └── io │ │ └── consonance │ │ └── client │ │ ├── package-info.java │ │ ├── mix │ │ ├── package-info.java │ │ └── JobMixIn.java │ │ ├── cli │ │ └── package-info.java │ │ └── WebClient.java │ └── resources │ └── logback.xml ├── swagger-java-client ├── findbugs-exclude.xml └── src │ └── main │ └── java │ └── io │ └── swagger │ └── client │ ├── auth │ ├── Authentication.java │ ├── OAuth.java │ ├── HttpBasicAuth.java │ └── ApiKeyAuth.java │ ├── Configuration.java │ ├── TypeRef.java │ ├── Pair.java │ ├── model │ ├── User.java │ └── ExtraFile.java │ ├── StringUtil.java │ ├── JSON.java │ ├── api │ └── ConfigurationApi.java │ └── ApiException.java ├── consonance-server-common ├── findbugs-exclude.xml └── src │ ├── test │ └── resources │ │ ├── config │ │ ├── config.json │ │ └── logback-test.xml │ └── main │ └── java │ └── io │ └── consonance │ └── arch │ ├── package-info.java │ ├── utils │ └── package-info.java │ ├── beans │ ├── package-info.java │ ├── JobState.java │ ├── ProvisionState.java │ └── StatusState.java │ ├── persistence │ └── package-info.java │ └── CloudTypes.java ├── .travis ├── consonance_config └── youxia_config ├── consonance-integration-testing ├── findbugs-exclude.xml ├── src │ └── test │ │ └── resources │ │ ├── hello.cwl.json │ │ ├── hello.wdl.json │ │ ├── hello.wdl │ │ ├── hello.cwl │ │ ├── workerConfig.ini │ │ ├── config │ │ └── run-fox.yml └── ini │ ├── test1.ini │ └── test2.ini ├── consonance-webservice ├── src │ ├── test │ │ └── resources │ │ │ ├── fixtures │ │ │ ├── user.json │ │ │ └── job.json │ │ │ ├── config │ │ │ └── run-fox.yml │ └── main │ │ ├── java │ │ └── io │ │ │ ├── swagger │ │ │ ├── task │ │ │ │ ├── model │ │ │ │ │ ├── Ga4ghTaskExecState.java │ │ │ │ │ └── Ga4ghTaskExecJobId.java │ │ │ │ └── api │ │ │ │ │ ├── ApiException.java │ │ │ │ │ ├── NotFoundException.java │ │ │ │ │ ├── factories │ │ │ │ │ └── V1ApiServiceFactory.java │ │ │ │ │ ├── JacksonJsonProvider.java │ │ │ │ │ ├── V1ApiService.java │ │ │ │ │ ├── ApiOriginFilter.java │ │ │ │ │ ├── StringUtil.java │ │ │ │ │ └── ApiResponseMessage.java │ │ │ ├── workflow │ │ │ │ └── api │ │ │ │ │ ├── ApiException.java │ │ │ │ │ ├── NotFoundException.java │ │ │ │ │ ├── JobsApiService.java │ │ │ │ │ ├── factories │ │ │ │ │ ├── RunApiServiceFactory.java │ │ │ │ │ └── JobsApiServiceFactory.java │ │ │ │ │ ├── JacksonJsonProvider.java │ │ │ │ │ ├── RunApiService.java │ │ │ │ │ ├── ApiOriginFilter.java │ │ │ │ │ ├── StringUtil.java │ │ │ │ │ ├── ApiResponseMessage.java │ │ │ │ │ ├── JobsApi.java │ │ │ │ │ └── RunApi.java │ │ │ └── wes │ │ │ │ ├── api │ │ │ │ ├── ApiException.java │ │ │ │ ├── NotFoundException.java │ │ │ │ ├── factories │ │ │ │ │ └── Ga4ghApiServiceFactory.java │ │ │ │ ├── RFC3339DateFormat.java │ │ │ │ ├── ApiOriginFilter.java │ │ │ │ ├── JacksonJsonProvider.java │ │ │ │ ├── Bootstrap.java │ │ │ │ ├── StringUtil.java │ │ │ │ ├── Ga4ghApiService.java │ │ │ │ └── ApiResponseMessage.java │ │ │ │ └── model │ │ │ │ ├── Ga4ghWesParameterTypes.java │ │ │ │ ├── Ga4ghWesState.java │ │ │ │ └── Ga4ghWesServiceInfoRequest.java │ │ │ └── consonance │ │ │ └── webservice │ │ │ ├── package-info.java │ │ │ ├── core │ │ │ └── package-info.java │ │ │ ├── jdbi │ │ │ ├── package-info.java │ │ │ ├── ProvisionDAO.java │ │ │ ├── JobDAO.java │ │ │ └── ConsonanceUserDAO.java │ │ │ ├── resources │ │ │ ├── package-info.java │ │ │ └── TemplateHealthCheck.java │ │ │ ├── SimpleAuthorizer.java │ │ │ └── SimpleJPAAuthenticator.java │ │ └── resources │ │ ├── assets │ │ └── index.htm │ │ └── logback.xml ├── README.md └── findbugs-exclude.xml ├── consonance-common ├── src │ ├── test │ │ ├── resources │ │ │ ├── config │ │ │ └── logback-test.xml │ │ └── java │ │ │ └── BasicPostgresIT.java │ └── main │ │ └── java │ │ └── io │ │ └── consonance │ │ └── common │ │ ├── package-info.java │ │ └── Utilities.java └── findbugs-exclude.xml ├── consonance-reporting ├── src │ ├── test │ │ └── resources │ │ │ ├── config │ │ │ └── logback-test.xml │ └── main │ │ └── java │ │ └── io │ │ └── consonance │ │ └── arch │ │ ├── reportcli │ │ └── package-info.java │ │ ├── reportbot │ │ └── package-info.java │ │ └── reporting │ │ ├── package-info.java │ │ └── ReportAPIFactory.java ├── findbugs-exclude.xml └── README.md ├── .tidelift.yml ├── .gitignore ├── .travis.yml └── findbugs-exclude.xml /consonance-arch/lib/touch: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mvnvm.properties: -------------------------------------------------------------------------------- 1 | mvn_version=3.2.3 2 | -------------------------------------------------------------------------------- /consonance-arch/scripts/setup-master.sh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /consonance-arch/scripts/setup-worker.sh: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /container-admin/example_tags.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/node-engine.cwl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 2.2.3 -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/image-descriptor.cwl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /consonance-arch/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | ../findbugs-exclude.xml -------------------------------------------------------------------------------- /consonance-client/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | ../findbugs-exclude.xml -------------------------------------------------------------------------------- /swagger-java-client/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | ../findbugs-exclude.xml -------------------------------------------------------------------------------- /consonance-server-common/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | ../findbugs-exclude.xml -------------------------------------------------------------------------------- /.travis/consonance_config: -------------------------------------------------------------------------------- 1 | ../consonance-common/src/test/resources/config -------------------------------------------------------------------------------- /consonance-integration-testing/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | ../findbugs-exclude.xml -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/testInitialHeartbeat.txt: -------------------------------------------------------------------------------- 1 | "vmUuid": "vm123456" -------------------------------------------------------------------------------- /consonance-integration-testing/src/test/resources/hello.cwl.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": "hello!" 3 | } -------------------------------------------------------------------------------- /container-admin/key.pem.template: -------------------------------------------------------------------------------- 1 | put your private pem key contents in a file called key.pem 2 | -------------------------------------------------------------------------------- /consonance-arch/ini/test1.ini: -------------------------------------------------------------------------------- 1 | test=test 2 | donor_id=CGP_donor_1187031 3 | project_code=BRCA-UK 4 | -------------------------------------------------------------------------------- /consonance-arch/ini/test2.ini: -------------------------------------------------------------------------------- 1 | test=test 2 | donor_id=CGP_donor_1187032 3 | project_code=BRCA-UK 4 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/err_output.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | >&2 echo 123_err && sleep 2 3 | 4 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/testResult_End.txt: -------------------------------------------------------------------------------- 1 | WORKER FOR VM UUID HAS FINISHED!!!: 'vm123456' -------------------------------------------------------------------------------- /consonance-integration-testing/src/test/resources/hello.wdl.json: -------------------------------------------------------------------------------- 1 | { 2 | "test.hello.name": "hello!!" 3 | } -------------------------------------------------------------------------------- /consonance-arch/img/arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consonance/consonance/HEAD/consonance-arch/img/arch.png -------------------------------------------------------------------------------- /consonance-arch/img/flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consonance/consonance/HEAD/consonance-arch/img/flow.png -------------------------------------------------------------------------------- /consonance-arch/img/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consonance/consonance/HEAD/consonance-arch/img/error.png -------------------------------------------------------------------------------- /consonance-arch/img/state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consonance/consonance/HEAD/consonance-arch/img/state.png -------------------------------------------------------------------------------- /consonance-integration-testing/ini/test1.ini: -------------------------------------------------------------------------------- 1 | test=test 2 | donor_id=CGP_donor_1187031 3 | project_code=BRCA-UK 4 | -------------------------------------------------------------------------------- /consonance-integration-testing/ini/test2.ini: -------------------------------------------------------------------------------- 1 | test=test 2 | donor_id=CGP_donor_1187032 3 | project_code=BRCA-UK 4 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/testResult_Start.txt: -------------------------------------------------------------------------------- 1 | "job_id" : 0, 2 | "state" : "START", 3 | "job_hash" : "asdlk2390aso12jvrej", -------------------------------------------------------------------------------- /container-admin/images/security_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Consonance/consonance/HEAD/container-admin/images/security_groups.png -------------------------------------------------------------------------------- /container-admin/init_webservice.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -jar consonance-webservice-*.jar server web.yml | tee /consonance_logs/webservice.out 4 | -------------------------------------------------------------------------------- /container-admin/aws.config.template: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_secret_access_key = {{ AWS_SECRET_ACCESS_KEY }} 3 | aws_access_key_id = {{ AWS_ACCESS_KEY_ID }} 4 | region = {{ AWS_REGION }} 5 | -------------------------------------------------------------------------------- /consonance-client/README.md: -------------------------------------------------------------------------------- 1 | # Consonance Client 2 | 3 | This is the independent client for the web service that will eventually be integrated into the Collaboratory command-line. 4 | 5 | ## Usage 6 | 7 | -------------------------------------------------------------------------------- /container-admin/init_coordinator.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -cp consonance-arch-*.jar io.consonance.arch.coordinator.Coordinator --config config --endless | tee /consonance_logs/coordinator_nohup.out 4 | -------------------------------------------------------------------------------- /consonance-webservice/src/test/resources/fixtures/user.json: -------------------------------------------------------------------------------- 1 | { 2 | "createTimestamp": 0, 3 | "updateTimestamp": 0, 4 | "userID": 0, 5 | "name": "funky user", 6 | "admin": false, 7 | "hashedPassword": "password" 8 | } -------------------------------------------------------------------------------- /container-admin/init_provisioner.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | java -cp consonance-arch-*.jar io.consonance.arch.containerProvisioner.ContainerProvisionerThreads --config config --endless | tee /consonance_logs/container_provisioner_nohup.out 4 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesServiceInfoRequest.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesServiceInfoRequest 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/model/Ga4ghTaskExecState.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.model; 2 | 3 | public enum Ga4ghTaskExecState { 4 | Unknown, Queued, Running, Paused, Complete, Error, SystemError, Canceled 5 | } 6 | 7 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesParameterTypes.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesParameterTypes 3 | 4 | ## Enum 5 | 6 | 7 | * `DIRECTORY` (value: `"Directory"`) 8 | 9 | * `FILE` (value: `"File"`) 10 | 11 | * `PARAMETER` (value: `"Parameter"`) 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /consonance-integration-testing/src/test/resources/hello.wdl: -------------------------------------------------------------------------------- 1 | task hello { 2 | String name 3 | 4 | command { 5 | echo 'Hello ${name}!' 6 | } 7 | output { 8 | File response = stdout() 9 | } 10 | } 11 | 12 | workflow test { 13 | call hello 14 | } -------------------------------------------------------------------------------- /consonance-integration-testing/src/test/resources/hello.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | 3 | cwlVersion: v1.0 4 | class: CommandLineTool 5 | baseCommand: echo 6 | inputs: 7 | message: 8 | type: string 9 | inputBinding: 10 | position: 1 11 | outputs: [] 12 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowRunId.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowRunId 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflowId** | **String** | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /container-admin/init_client.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | psql -h postgres -U postgres -c "insert into consonance_user(user_id, admin, hashed_password, name) VALUES (1,true,'8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918','admin@admin.com') on conflict do nothing;" 4 | 5 | /bin/bash 6 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowTypeVersion.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowTypeVersion 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflowTypeVersion** | **List<String>** | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /consonance-arch/src/main/resources/config: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQHost = localhost 3 | rabbitMQUser = guest 4 | rabbitMQPass = guest 5 | rabbitMQQueueName : consonance_arch 6 | 7 | 8 | [worker] 9 | heartbeatRate = 60 10 | preworkerSleep = 5 11 | postworkerSleep = 5 12 | max-runs = 1 13 | hostUserName = sshorser 14 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/workerConfig: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQHost = localhost 3 | rabbitMQUser = guest 4 | rabbitMQPass = guest 5 | rabbitMQQueueName : arch_3_worker 6 | 7 | 8 | [worker] 9 | heartbeatRate = 60 10 | preworkerSleep = 5 11 | postworkerSleep = 5 12 | hostUserName = someUser 13 | endless = false 14 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowDesc.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowDesc 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflowId** | **String** | | [optional] 8 | **state** | [**Ga4ghWesState**](Ga4ghWesState.md) | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowStatus.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowStatus 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflowId** | **String** | | [optional] 8 | **state** | [**Ga4ghWesState**](Ga4ghWesState.md) | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowListResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowListResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflows** | [**List<Ga4ghWesWorkflowDesc>**](Ga4ghWesWorkflowDesc.md) | | [optional] 8 | **nextPageToken** | **String** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/ApiException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 4 | public class ApiException extends Exception{ 5 | private int code; 6 | public ApiException (int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/ApiException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 4 | public class ApiException extends Exception{ 5 | private int code; 6 | public ApiException (int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesParameter.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesParameter 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **String** | | [optional] 8 | **value** | **String** | | [optional] 9 | **location** | **String** | | [optional] 10 | **type** | [**Ga4ghWesParameterTypes**](Ga4ghWesParameterTypes.md) | | [optional] 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/ApiException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 4 | public class ApiException extends Exception{ 5 | private int code; 6 | public ApiException (int code, String msg) { 7 | super(msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 4 | public class NotFoundException extends ApiException { 5 | private int code; 6 | public NotFoundException (int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/coordinatorConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "rabbitMQQueueName":"consonance_arch", 3 | "rabbitMQHost":"localhost", 4 | "rabbitMQUser":"guest", 5 | "rabbitMQPass":"guest", 6 | "heartbeatRate":"2.5", 7 | "preworkerSleep":"1", 8 | "postworkerSleep":"1", 9 | "max-runs":"1", 10 | "hostUserName":"sshorser", 11 | "postgresHost":"localhost", 12 | "postgresUser":"dbuser", 13 | "postgresPass":"pass", 14 | "postgresDBName":"dbname" 15 | } -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 4 | public class NotFoundException extends ApiException { 5 | private int code; 6 | public NotFoundException (int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/NotFoundException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 4 | public class NotFoundException extends ApiException { 5 | private int code; 6 | public NotFoundException (int code, String msg) { 7 | super(code, msg); 8 | this.code = code; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # exclude jar for gradle wrapper 12 | !gradle/wrapper/*.jar 13 | 14 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 15 | hs_err_pid* 16 | 17 | # build files 18 | **/target 19 | target 20 | .gradle 21 | build 22 | 23 | .swagger-codegen-ignore 24 | build.sbt 25 | git_push.sh 26 | 27 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesState.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesState 3 | 4 | ## Enum 5 | 6 | 7 | * `UNKNOWN` (value: `"Unknown"`) 8 | 9 | * `QUEUED` (value: `"Queued"`) 10 | 11 | * `RUNNING` (value: `"Running"`) 12 | 13 | * `PAUSED` (value: `"Paused"`) 14 | 15 | * `COMPLETE` (value: `"Complete"`) 16 | 17 | * `ERROR` (value: `"Error"`) 18 | 19 | * `SYSTEMERROR` (value: `"SystemError"`) 20 | 21 | * `CANCELED` (value: `"Canceled"`) 22 | 23 | * `INITIALIZING` (value: `"Initializing"`) 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowRequest.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowRequest 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflowDescriptor** | **String** | | [optional] 8 | **workflowParams** | **String** | | [optional] 9 | **workflowType** | **String** | | [optional] 10 | **workflowTypeVersion** | **String** | | [optional] 11 | **keyValues** | **Map<String, String>** | | [optional] 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesLog.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesLog 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **name** | **String** | | [optional] 8 | **cmd** | **List<String>** | | [optional] 9 | **startTime** | **String** | | [optional] 10 | **endTime** | **String** | | [optional] 11 | **stdout** | **String** | | [optional] 12 | **stderr** | **String** | | [optional] 13 | **exitCode** | **Integer** | | [optional] 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/workerConfig.ini: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQQueueName=consonance_arch 3 | rabbitMQHost=localhost 4 | rabbitMQUser=guest 5 | rabbitMQPass=guest 6 | 7 | [worker] 8 | heartbeatRate=2.5 9 | preworkerSleep=1 10 | postworkerSleep=1 11 | hostUserName=someUser 12 | endless=false 13 | # If you do not specify an engine, the whitestar engine will be used by default. 14 | #seqware-engine=whitestar 15 | # Only enable seqware-settings-file if you actually have one. 16 | #seqware-settings-file=/home/ubuntu/custom-seqware.settings -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client.auth; 2 | 3 | import io.swagger.client.Pair; 4 | 5 | import java.util.Map; 6 | import java.util.List; 7 | 8 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 9 | public interface Authentication { 10 | /** Apply authentication settings to header and query params. */ 11 | void applyToParams(List queryParams, Map headerParams); 12 | } 13 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client.auth; 2 | 3 | import io.swagger.client.Pair; 4 | 5 | import java.util.Map; 6 | import java.util.List; 7 | 8 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 9 | public class OAuth implements Authentication { 10 | @Override 11 | public void applyToParams(List queryParams, Map headerParams) { 12 | // TODO: support oauth 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /consonance-arch/src/main/resources/workerConfig.ini: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQQueueName=consonance_arch 3 | rabbitMQHost=localhost 4 | rabbitMQUser=guest 5 | rabbitMQPass=guest 6 | 7 | [worker] 8 | heartbeatRate=60 9 | preworkerSleep=5 10 | postworkerSleep=5 11 | hostUserName=someUser 12 | endless=false 13 | # If you do not specify an engine, the whitestar engine will be used by default. 14 | #seqware-engine=whitestar 15 | # Only enable seqware-settings-file if you actually have one. 16 | #seqware-settings-file=/home/ubuntu/custom-seqware.settings 17 | -------------------------------------------------------------------------------- /consonance-integration-testing/src/test/resources/workerConfig.ini: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQQueueName=consonance_arch 3 | rabbitMQHost=localhost 4 | rabbitMQUser=guest 5 | rabbitMQPass=guest 6 | 7 | [worker] 8 | heartbeatRate=2.5 9 | preworkerSleep=1 10 | postworkerSleep=1 11 | hostUserName=someUser 12 | endless=false 13 | # If you do not specify an engine, the whitestar engine will be used by default. 14 | #seqware-engine=whitestar 15 | # Only enable seqware-settings-file if you actually have one. 16 | #seqware-settings-file=/home/ubuntu/custom-seqware.settings -------------------------------------------------------------------------------- /consonance-arch/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | for i in `rabbitmqadmin list queues name | grep -v name | awk '{print $2}'`; do echo $i; rabbitmqadmin delete queue name="$i"; done; 4 | for i in `rabbitmqadmin list exchanges name | grep -v name | awk '{print $2}'`; do echo $i; rabbitmqadmin delete exchange name="$i"; done; 5 | 6 | dropdb queue_status 7 | createdb queue_status 8 | psql -h 127.0.0.1 -U queue_user queue_status < sql/schema.sql 9 | 10 | psql -h 127.0.0.1 -U queue_user queue_status -c 'delete from job; delete from provision;' 11 | 12 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowListRequest.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowListRequest 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **pageSize** | **Long** | OPTIONAL Number of workflows to return at once. Defaults to 256, and max is 2048. | [optional] 8 | **pageToken** | **String** | OPTIONAL Token to use to indicate where to start getting results. If unspecified, returns the first page of results. | [optional] 9 | **keyValueSearch** | **String** | | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/factories/V1ApiServiceFactory.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api.factories; 2 | 3 | import io.swagger.task.api.V1ApiService; 4 | import io.swagger.task.api.impl.V1ApiServiceImpl; 5 | 6 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 7 | public class V1ApiServiceFactory { 8 | 9 | private final static V1ApiService service = new V1ApiServiceImpl(); 10 | 11 | public static V1ApiService getV1Api() 12 | { 13 | return service; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/factories/Ga4ghApiServiceFactory.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api.factories; 2 | 3 | import io.swagger.wes.api.Ga4ghApiService; 4 | import io.swagger.wes.api.impl.Ga4ghApiServiceImpl; 5 | 6 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 7 | public class Ga4ghApiServiceFactory { 8 | private final static Ga4ghApiService service = new Ga4ghApiServiceImpl(); 9 | 10 | public static Ga4ghApiService getGa4ghApi() { 11 | return service; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/JobsApiService.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | import io.consonance.webservice.core.ConsonanceUser; 4 | 5 | import javax.ws.rs.core.Response; 6 | import javax.ws.rs.core.UriInfo; 7 | 8 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 9 | public abstract class JobsApiService { 10 | public abstract Response jobsDescriptorUrlGet(String descriptorUrl, ConsonanceUser securityContext, UriInfo uriInfo) 11 | throws NotFoundException; 12 | } 13 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/config.check_hash: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQHost = localhost 3 | rabbitMQUser = guest 4 | rabbitMQPass = guest 5 | rabbitMQQueueName = consonance_arch 6 | 7 | [database] 8 | postgresHost = 127.0.0.1 9 | postgresUser = queue_user 10 | postgresPass = queue 11 | postgresDBName = queue_status 12 | 13 | [generator] 14 | results = consonance_arch.json 15 | youxia_deployer_parameters = --max-spot-price 1 --batch-size 1 16 | check_previous_job_hash = true 17 | 18 | 19 | [provision] 20 | max_running_containers = 5 21 | 22 | 23 | 24 | [coordinator] 25 | max_seconds_before_lost = 10 26 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | public enum OAuthFlow { 17 | accessCode, implicit, password, application 18 | } 19 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/factories/RunApiServiceFactory.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api.factories; 2 | 3 | import io.swagger.workflow.api.RunApiService; 4 | import io.swagger.workflow.api.impl.RunApiServiceImpl; 5 | 6 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 7 | public class RunApiServiceFactory { 8 | 9 | private final static RunApiService service = new RunApiServiceImpl(); 10 | 11 | public static RunApiService getRunApi() 12 | { 13 | return service; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/coordinatorConfig: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQHost = localhost 3 | rabbitMQUser = guest 4 | rabbitMQPass = guest 5 | rabbitMQQueueName : consonance_arch 6 | 7 | [database] 8 | postgresHost = 127.0.0.1 9 | postgresUser = queue_user 10 | postgresPass = queue 11 | postgresDBName = queue_status 12 | 13 | [generator] 14 | results = consonance_arch.json 15 | youxia_deployer_parameters = --max-spot-price 1 --batch-size 1 16 | hostUserName = ubuntu 17 | 18 | [provision] 19 | max_running_containers = 5 20 | 21 | [coordinator] 22 | check_previous_job_hash = true 23 | max_seconds_before_lost = 10 24 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/factories/JobsApiServiceFactory.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api.factories; 2 | 3 | import io.swagger.workflow.api.JobsApiService; 4 | import io.swagger.workflow.api.impl.JobsApiServiceImpl; 5 | 6 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 7 | public class JobsApiServiceFactory { 8 | 9 | private final static JobsApiService service = new JobsApiServiceImpl(); 10 | 11 | public static JobsApiService getJobsApi() 12 | { 13 | return service; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/config: -------------------------------------------------------------------------------- 1 | # launcher CWL 2 | working-directory=./datastore/ 3 | 4 | [rabbit] 5 | rabbitMQHost = localhost 6 | rabbitMQUser = guest 7 | rabbitMQPass = guest 8 | rabbitMQQueueName = consonance_arch 9 | 10 | [database] 11 | postgresHost = 127.0.0.1 12 | postgresUser = queue_user 13 | postgresPass = queue 14 | postgresDBName = queue_status 15 | 16 | [generator] 17 | results = consonance_arch.json 18 | youxia_deployer_parameters = --max-spot-price 1 --batch-size 1 19 | check_previous_job_hash = false 20 | 21 | 22 | [provision] 23 | max_running_containers = 5 24 | 25 | 26 | 27 | [coordinator] 28 | max_seconds_before_lost = 10 29 | -------------------------------------------------------------------------------- /consonance-client/src/test/resources/config: -------------------------------------------------------------------------------- 1 | [webservice] 2 | base_path = http://localhost:8080 3 | token = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 4 | 5 | [rabbit] 6 | rabbitMQHost = localhost 7 | rabbitMQUser = guest 8 | rabbitMQPass = guest 9 | rabbitMQQueueName : consonance_arch 10 | 11 | [database] 12 | postgresHost = 127.0.0.1 13 | postgresUser = queue_user 14 | postgresPass = queue 15 | postgresDBName = queue_status 16 | 17 | [generator] 18 | results = consonance_arch.json 19 | 20 | 21 | [provision] 22 | max_running_containers = 5 23 | 24 | 25 | [coordinator] 26 | check_previous_job_hash = true 27 | max_seconds_before_lost = 10 28 | -------------------------------------------------------------------------------- /consonance-common/src/test/resources/config: -------------------------------------------------------------------------------- 1 | [webservice] 2 | base_path = http://localhost:8080 3 | token = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 4 | 5 | [rabbit] 6 | rabbitMQHost = localhost 7 | rabbitMQUser = guest 8 | rabbitMQPass = guest 9 | rabbitMQQueueName : consonance_arch 10 | 11 | [database] 12 | postgresHost = 127.0.0.1 13 | postgresUser = queue_user 14 | postgresPass = queue 15 | postgresDBName = queue_status 16 | 17 | [generator] 18 | results = consonance_arch.json 19 | 20 | 21 | [provision] 22 | max_running_containers = 5 23 | 24 | 25 | [coordinator] 26 | check_previous_job_hash = true 27 | max_seconds_before_lost = 10 28 | -------------------------------------------------------------------------------- /consonance-reporting/src/test/resources/config: -------------------------------------------------------------------------------- 1 | [webservice] 2 | base_path = http://localhost:8080 3 | token = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 4 | 5 | [rabbit] 6 | rabbitMQHost = localhost 7 | rabbitMQUser = guest 8 | rabbitMQPass = guest 9 | rabbitMQQueueName : consonance_arch 10 | 11 | [database] 12 | postgresHost = 127.0.0.1 13 | postgresUser = queue_user 14 | postgresPass = queue 15 | postgresDBName = queue_status 16 | 17 | [generator] 18 | results = consonance_arch.json 19 | 20 | 21 | [provision] 22 | max_running_containers = 5 23 | 24 | 25 | [coordinator] 26 | check_previous_job_hash = true 27 | max_seconds_before_lost = 10 28 | -------------------------------------------------------------------------------- /consonance-server-common/src/test/resources/config: -------------------------------------------------------------------------------- 1 | [webservice] 2 | base_path = http://localhost:8080 3 | token = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 4 | 5 | [rabbit] 6 | rabbitMQHost = localhost 7 | rabbitMQUser = guest 8 | rabbitMQPass = guest 9 | rabbitMQQueueName : consonance_arch 10 | 11 | [database] 12 | postgresHost = 127.0.0.1 13 | postgresUser = queue_user 14 | postgresPass = queue 15 | postgresDBName = queue_status 16 | 17 | [generator] 18 | results = consonance_arch.json 19 | 20 | 21 | [provision] 22 | max_running_containers = 5 23 | 24 | 25 | [coordinator] 26 | check_previous_job_hash = true 27 | max_seconds_before_lost = 10 28 | -------------------------------------------------------------------------------- /consonance-webservice/src/test/resources/config: -------------------------------------------------------------------------------- 1 | [webservice] 2 | base_path = http://localhost:8080 3 | token = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 4 | 5 | [rabbit] 6 | rabbitMQHost = localhost 7 | rabbitMQUser = guest 8 | rabbitMQPass = guest 9 | rabbitMQQueueName : consonance_arch 10 | 11 | [database] 12 | postgresHost = 127.0.0.1 13 | postgresUser = queue_user 14 | postgresPass = queue 15 | postgresDBName = queue_status 16 | 17 | [generator] 18 | results = consonance_arch.json 19 | 20 | 21 | [provision] 22 | max_running_containers = 5 23 | 24 | 25 | [coordinator] 26 | check_previous_job_hash = true 27 | max_seconds_before_lost = 10 28 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesWorkflowLog.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesWorkflowLog 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflowId** | **String** | | [optional] 8 | **request** | [**Ga4ghWesWorkflowRequest**](Ga4ghWesWorkflowRequest.md) | | [optional] 9 | **state** | [**Ga4ghWesState**](Ga4ghWesState.md) | | [optional] 10 | **workflowLog** | [**Ga4ghWesLog**](Ga4ghWesLog.md) | | [optional] 11 | **taskLogs** | [**List<Ga4ghWesLog>**](Ga4ghWesLog.md) | | [optional] 12 | **outputs** | [**List<Ga4ghWesParameter>**](Ga4ghWesParameter.md) | | [optional] 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /consonance-arch/scripts/ubuntu_cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sudo rabbitmq-plugins enable rabbitmq_management 4 | sudo wget -O - -q http://localhost:15672/cli/rabbitmqadmin > /usr/local/sbin/rabbitmqadmin 5 | sudo chmod a+x /usr/local/sbin/rabbitmqadmin 6 | for i in `/usr/local/sbin/rabbitmqadmin list queues name | grep -v name | awk '{print $2}'`; do echo $i; /usr/local/sbin/rabbitmqadmin delete queue name="$i"; done; 7 | 8 | sudo -u postgres dropdb queue_status 9 | sudo -u postgres createdb queue_status 10 | psql -h 127.0.0.1 -U queue_user queue_status < sql/schema.sql 11 | 12 | psql -h 127.0.0.1 -U queue_user queue_status -c 'delete from job; delete from provision;' 13 | 14 | -------------------------------------------------------------------------------- /consonance-integration-testing/src/test/resources/config: -------------------------------------------------------------------------------- 1 | [webservice] 2 | base_path = http://localhost:8080 3 | token = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 4 | 5 | [rabbit] 6 | rabbitMQHost = localhost 7 | rabbitMQUser = guest 8 | rabbitMQPass = guest 9 | rabbitMQQueueName : consonance_arch 10 | 11 | [database] 12 | postgresHost = 127.0.0.1 13 | postgresUser = queue_user 14 | postgresPass = queue 15 | postgresDBName = queue_status 16 | 17 | [generator] 18 | results = consonance_arch.json 19 | 20 | 21 | [provision] 22 | max_running_containers = 5 23 | 24 | 25 | [coordinator] 26 | check_previous_job_hash = true 27 | max_seconds_before_lost = 10 28 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/JacksonJsonProvider.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; 5 | import io.swagger.util.Json; 6 | 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | import javax.ws.rs.ext.Provider; 10 | 11 | @Provider 12 | @Produces({MediaType.APPLICATION_JSON}) 13 | public class JacksonJsonProvider extends JacksonJaxbJsonProvider { 14 | private static ObjectMapper commonMapper = Json.mapper(); 15 | 16 | public JacksonJsonProvider() { 17 | super.setMapper(commonMapper); 18 | } 19 | } -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/JacksonJsonProvider.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | import com.fasterxml.jackson.databind.ObjectMapper; 4 | import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; 5 | import io.swagger.util.Json; 6 | 7 | import javax.ws.rs.Produces; 8 | import javax.ws.rs.core.MediaType; 9 | import javax.ws.rs.ext.Provider; 10 | 11 | @Provider 12 | @Produces({MediaType.APPLICATION_JSON}) 13 | public class JacksonJsonProvider extends JacksonJaxbJsonProvider { 14 | private static ObjectMapper commonMapper = Json.mapper(); 15 | 16 | public JacksonJsonProvider() { 17 | super.setMapper(commonMapper); 18 | } 19 | } -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/RFC3339DateFormat.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | import com.fasterxml.jackson.databind.util.ISO8601DateFormat; 4 | import com.fasterxml.jackson.databind.util.ISO8601Utils; 5 | 6 | import java.text.FieldPosition; 7 | import java.util.Date; 8 | 9 | public class RFC3339DateFormat extends ISO8601DateFormat { 10 | 11 | // Same as ISO8601DateFormat but serializing milliseconds. 12 | @Override 13 | public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { 14 | String value = ISO8601Utils.format(date, true); 15 | toAppendTo.append(value); 16 | return toAppendTo; 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /.tidelift.yml: -------------------------------------------------------------------------------- 1 | ci: 2 | # don't run removed test on any dependencies 3 | tests: 4 | removed: skip 5 | 6 | # don't run unmaintained test on any dependencies in Gemfile 7 | files: 8 | Gemfile: 9 | tests: 10 | unmaintained: skip 11 | 12 | # don't run deprecated test on any dependencies from Rubygems 13 | platform: 14 | Rubygems: 15 | tests: 16 | deprecated: skip 17 | 18 | # don't run outdated test on any dependencies called rails from Rubygems 19 | platform: 20 | Rubygems: 21 | rails: 22 | tests: 23 | outdated: skip 24 | 25 | # don't run unlicensed test on any development dependencies 26 | type: 27 | development: 28 | tests: 29 | unlicensed: skip 30 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/RunApiService.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | import io.consonance.webservice.core.ConsonanceUser; 4 | import org.glassfish.jersey.media.multipart.FormDataContentDisposition; 5 | 6 | import javax.ws.rs.core.Response; 7 | import javax.ws.rs.core.UriInfo; 8 | import java.io.InputStream; 9 | 10 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 11 | public abstract class RunApiService { 12 | public abstract Response runPost(String wf, InputStream inputStream, FormDataContentDisposition fileDetail, 13 | ConsonanceUser securityContext, UriInfo uriInfo) throws NotFoundException; 14 | } 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | *.iml 11 | .idea 12 | *.log 13 | 14 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 15 | hs_err_pid* 16 | 17 | consonance-daemon/.idea 18 | 19 | .DS_Store 20 | */dependency-reduced-pom.xml 21 | 22 | consonance-arch/arch3_test.log 23 | 24 | # Ignore Eclipse files 25 | *.classpath 26 | *.project 27 | *.settings 28 | /consonance-common/target/ 29 | **/target/ 30 | 31 | # Ignore NetBeans files 32 | nbactions.xml 33 | /consonance-reporting/target/ 34 | /container-admin/config 35 | /container-admin/youxia_config 36 | /container-admin/key.pem 37 | /container-admin/bag_params.json 38 | /container-admin/aws.config 39 | -------------------------------------------------------------------------------- /consonance-server-common/src/test/resources/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "command" : "echo foo", 3 | "rabbitMQHost" : "localhost", 4 | "rabbitMQUser" : "guest", 5 | "rabbitMQPass" : "guest", 6 | "rabbitMQQueueName" : "consonance_arch", 7 | "postgresHost" : "127.0.0.1", 8 | "postgresUser" : "queue_user", 9 | "postgresPass" : "queue", 10 | "postgresDBName" : "queue_status", 11 | "overallRuntimeMaxHours" : 400, 12 | "overallIterationsMax" : 100, 13 | "results" : "consonance_arch.json", 14 | "report" : "consonance_arch.report.log", 15 | "time_until_vm_lost_minutes" : 120, 16 | "time_until_workflow_lost_minutes" : 120, 17 | "max_running_containers" : 5, 18 | "max_random_time" : 10, 19 | "min_random_time" : 2, 20 | "check_previous_job_hash" : "true", 21 | "max_seconds_before_lost" : 10 22 | } 23 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/collab-cwl-job-pre.json: -------------------------------------------------------------------------------- 1 | { 2 | "hello_input": { 3 | "class": "File", 4 | "path": "https://raw.githubusercontent.com/CancerCollaboratory/dockstore-descriptor/develop/launcher/data/hello-input.txt" 5 | }, 6 | "ref_file_1": { 7 | "class": "File", 8 | "path": "https://raw.githubusercontent.com/CancerCollaboratory/dockstore-descriptor/develop/launcher/data/8e888694-9c56-4529-a750-d6bfbd4a74e7.txt" 9 | }, 10 | "ref_file_2": { 11 | "class": "File", 12 | "path": "https://raw.githubusercontent.com/CancerCollaboratory/dockstore-descriptor/develop/launcher/data/b4cdad91-676a-446c-a635-57453f17617a.txt" 13 | }, 14 | "hello_output": { 15 | "class": "File", 16 | "path": "s3://oicr.temp/testing-launcher/hello-output.txt" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /container-admin/bag_params.json.template: -------------------------------------------------------------------------------- 1 | { 2 | "SENSU_SERVER_IP_ADDRESS": "localhost", 3 | "FLEET_NAME": "fleet_name", 4 | "aws_key": "{{ AWS_ACCESS_KEY_ID }}", 5 | "aws_secret_key": "{{ AWS_SECRET_ACCESS_KEY }}", 6 | "seqware_version": "1.1.1", 7 | "workflow_name": "HelloWorld", 8 | "workflows": [ 9 | "Workflow_Bundle_HelloWorld_1.0-SNAPSHOT_SeqWare_1.1.0" 10 | ], 11 | "install_workflow": "false", 12 | "test_workflows": "true", 13 | "queueHost": "{{ LAUNCHER_IP_ADDRESS }}", 14 | "queueName": "consonance_arch", 15 | "queueUser": "guest", 16 | "queuePassword": "guest", 17 | "lvm_device_whitelist": "/dev/xvdb", 18 | "single_node_lvm": true, 19 | "consonance_arch_version": "{{ CONSONANCE_BINARY_VERSION }}", 20 | "seqware_engine": "whitestar", 21 | "seqware_use_custom_settings": false, 22 | "azure": false 23 | } 24 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/Configuration.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 4 | public class Configuration { 5 | private static ApiClient defaultApiClient = new ApiClient(); 6 | 7 | /** 8 | * Get the default API client, which would be used when creating API 9 | * instances without providing an API client. 10 | */ 11 | public static ApiClient getDefaultApiClient() { 12 | return defaultApiClient; 13 | } 14 | 15 | /** 16 | * Set the default API client, which would be used when creating API 17 | * instances without providing an API client. 18 | */ 19 | public static void setDefaultApiClient(ApiClient apiClient) { 20 | defaultApiClient = apiClient; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /consonance-webservice/README.md: -------------------------------------------------------------------------------- 1 | # Consonance-webservice 2 | 3 | This is the prototype web service for consonance. 4 | 5 | ## Usage 6 | 7 | ### WES support updates 8 | 1. postgresql: 9.4-1201-jdbc41 -> 42.1.4 9 | 2. jackson-databind: 2.7.8 -> 2.8.9 10 | 11 | ### Starting Up 12 | 13 | 1. Fill in the template hello-world.yml and stash it somewhere outside the git repo (like ~/.stash) 14 | 2. Start with java -jar target/consonance-webservice-*.jar server ~/.stash/run-fox.yml 15 | 16 | ### View Swagger UI 17 | 18 | 1. Browse to [http://localhost:8080/static/swagger-ui/index.html](http://localhost:8080/static/swagger-ui/index.html) 19 | 20 | ## TODO 21 | 22 | 1. we need to define how this interacts with a single sign-on service 23 | 1. in general, users should be able to list their own information (such as tokens and repos) 24 | 2. only admin users (or our other services) should be able to list all information 25 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/V1ApiService.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api; 2 | import io.consonance.webservice.core.ConsonanceUser; 3 | import io.swagger.task.model.Ga4ghTaskExecTask; 4 | 5 | import javax.ws.rs.core.Response; 6 | 7 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 8 | public abstract class V1ApiService { 9 | public abstract Response cancelJob(String value,ConsonanceUser securityContext) 10 | throws NotFoundException; 11 | public abstract Response getJob(String value,ConsonanceUser securityContext) 12 | throws NotFoundException; 13 | public abstract Response listJobs(ConsonanceUser securityContext) 14 | throws NotFoundException; 15 | public abstract Response runTask(Ga4ghTaskExecTask body,ConsonanceUser securityContext) 16 | throws NotFoundException; 17 | } 18 | -------------------------------------------------------------------------------- /consonance-arch/conf/config.json: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQHost = localhost 3 | rabbitMQUser = guest 4 | rabbitMQPass = guest 5 | rabbitMQQueueName = consonance_arch 6 | 7 | [database] 8 | postgresHost = 127.0.0.1 9 | postgresUser = queue_user 10 | postgresPass = queue 11 | postgresDBName = queue_status 12 | 13 | [generator] 14 | results = consonance_arch.json 15 | 16 | 17 | [provision] 18 | max_running_containers = 5 19 | youxia_deployer_parameters = --max-spot-price 1 --batch-size 1 20 | 21 | 22 | [coordinator] 23 | check_previous_job_hash = true 24 | max_seconds_before_lost = 10 25 | 26 | [generator] 27 | # to configure hashing, you can enable the value below 28 | # the job generator will skip ini files that are already known to the coordinator 29 | # check_previous_job_hash = true 30 | # you can configure a subset of the ini values to use for a hash code rather than all values 31 | # job_filter_hash_keys = project_code, test 32 | 33 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/config.json: -------------------------------------------------------------------------------- 1 | [rabbit] 2 | rabbitMQHost = localhost 3 | rabbitMQUser = guest 4 | rabbitMQPass = guest 5 | rabbitMQQueueName = consonance_arch 6 | 7 | [database] 8 | postgresHost = 127.0.0.1 9 | postgresUser = queue_user 10 | postgresPass = queue 11 | postgresDBName = queue_status 12 | 13 | [generator] 14 | results = consonance_arch.json 15 | 16 | 17 | [provision] 18 | max_running_containers = 5 19 | youxia_deployer_parameters = --max-spot-price 1 --batch-size 1 20 | 21 | 22 | [coordinator] 23 | check_previous_job_hash = true 24 | max_seconds_before_lost = 10 25 | 26 | [generator] 27 | # to configure hashing, you can enable the value below 28 | # the job generator will skip ini files that are already known to the coordinator 29 | # check_previous_job_hash = true 30 | # you can configure a subset of the ini values to use for a hash code rather than all values 31 | # job_filter_hash_keys = project_code, test 32 | 33 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/resources/assets/index.htm: -------------------------------------------------------------------------------- 1 | This is a test 19 | 20 | 21 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/TypeRef.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client; 2 | 3 | import java.lang.reflect.ParameterizedType; 4 | import java.lang.reflect.Type; 5 | 6 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 7 | public class TypeRef { 8 | private final Type type; 9 | 10 | public TypeRef() { 11 | this.type = getGenericType(getClass()); 12 | } 13 | 14 | private static Type getGenericType(Class klass) { 15 | Type superclass = klass.getGenericSuperclass(); 16 | if (superclass instanceof Class) { 17 | throw new RuntimeException("No type parameter provided"); 18 | } 19 | ParameterizedType parameterized = (ParameterizedType) superclass; 20 | return parameterized.getActualTypeArguments()[0]; 21 | } 22 | 23 | public Type getType() { 24 | return type; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /container-admin/config.template: -------------------------------------------------------------------------------- 1 | [webservice] 2 | base_path = http://webservice:8080 3 | token = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 4 | 5 | [rabbit] 6 | rabbitMQHost = rabbitmq 7 | rabbitMQUser = guest 8 | rabbitMQPass = guest 9 | rabbitMQQueueName = consonance_arch 10 | 11 | [database] 12 | postgresHost = postgres 13 | postgresUser = postgres 14 | postgresPass = postgres 15 | postgresDBName = postgres 16 | 17 | [generator] 18 | results = consonance_arch.json 19 | check_previous_job_hash = false 20 | 21 | [provision] 22 | reap_failed_workers = true 23 | max_running_containers = {{ FLEET_SIZE }} 24 | youxia_deployer_parameters = --max-spot-price {{ AWS_MAX_SPOT_PRICE }} --batch-size {{ FLEET_BATCH_SIZE }} --ansible-playbook /container-host-bag/install.yml -e /container-host-bag/example_params.json --server-tag-file /container-host-bag/example_tags.json 25 | youxia_reaper_parameters = 26 | 27 | [coordinator] 28 | max_seconds_before_lost=60 29 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | public interface Authentication { 22 | /** 23 | * Apply authentication settings to header and query params. 24 | * 25 | * @param queryParams List of query parameters 26 | * @param headerParams Map of header parameters 27 | */ 28 | void applyToParams(List queryParams, Map headerParams); 29 | } 30 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * 22 | * @since 1.0 23 | */ 24 | package io.consonance.webservice; 25 | 26 | -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Base classes. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch; 26 | 27 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/core/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * 22 | * @since 1.0 23 | */ 24 | package io.consonance.webservice.core; 25 | 26 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/jdbi/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Data access objects. 22 | * @since 1.0 23 | */ 24 | package io.consonance.webservice.jdbi; 25 | 26 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/resources/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Web resources 22 | * @since 1.0 23 | */ 24 | package io.consonance.webservice.resources; 25 | 26 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/ApiOriginFilter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.*; 6 | import javax.servlet.http.HttpServletResponse; 7 | 8 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 9 | public class ApiOriginFilter implements javax.servlet.Filter { 10 | public void doFilter(ServletRequest request, ServletResponse response, 11 | FilterChain chain) throws IOException, ServletException { 12 | HttpServletResponse res = (HttpServletResponse) response; 13 | res.addHeader("Access-Control-Allow-Origin", "*"); 14 | res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); 15 | res.addHeader("Access-Control-Allow-Headers", "Content-Type"); 16 | chain.doFilter(request, response); 17 | } 18 | 19 | public void destroy() {} 20 | 21 | public void init(FilterConfig filterConfig) throws ServletException {} 22 | } -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/utils/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Provides utility classes. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.utils; 26 | 27 | -------------------------------------------------------------------------------- /consonance-arch/src/main/java/io/consonance/arch/worker/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that mimic creation of workers. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.worker; 26 | 27 | -------------------------------------------------------------------------------- /consonance-client/src/main/java/io/consonance/client/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement the command line utility 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.client; 26 | 27 | -------------------------------------------------------------------------------- /consonance-client/src/main/java/io/consonance/client/mix/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Add some custom behaviour to generated objects. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.client.mix; 26 | 27 | -------------------------------------------------------------------------------- /consonance-common/src/main/java/io/consonance/common/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Provides common utility classes between the client and server. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.common; 26 | 27 | -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/beans/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Provides bean classes that represent messages. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.beans; 26 | 27 | -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/persistence/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Provides persistence to a database. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.persistence; 26 | 27 | -------------------------------------------------------------------------------- /consonance-arch/src/main/java/io/consonance/arch/util/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement tools for interacting with queued jobs. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.util; 26 | 27 | -------------------------------------------------------------------------------- /consonance-reporting/src/main/java/io/consonance/arch/reportcli/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement a simple CLI placeholder. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.reportcli; 26 | 27 | -------------------------------------------------------------------------------- /consonance-client/src/main/java/io/consonance/client/cli/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Glue between the Bash script and the swagger client Java API. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.client.cli; 26 | 27 | -------------------------------------------------------------------------------- /consonance-reporting/src/main/java/io/consonance/arch/reportbot/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement a reporting bot over Slack. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.reportbot; 26 | 27 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/docs/Ga4ghWesServiceInfo.md: -------------------------------------------------------------------------------- 1 | 2 | # Ga4ghWesServiceInfo 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **workflowTypeVersions** | [**Map<String, Ga4ghWesWorkflowTypeVersion>**](Ga4ghWesWorkflowTypeVersion.md) | | [optional] 8 | **supportedWesVersions** | **List<String>** | | [optional] 9 | **supportedFilesystemProtocols** | **List<String>** | The filesystem protocols supported by this service, currently these may include common protocols such as 'http', 'https', 'sftp', 's3', 'gs', 'file', 'synapse', or others as supported by this service. | [optional] 10 | **engineVersions** | **Map<String, String>** | | [optional] 11 | **systemStateCounts** | **Map<String, Long>** | The system statistics, key is the statistic, value is the count of workflows in that state. See the State enum for the possible keys. | [optional] 12 | **keyValues** | **Map<String, String>** | | [optional] 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/JacksonJsonProvider.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | import com.fasterxml.jackson.databind.DeserializationFeature; 4 | import com.fasterxml.jackson.databind.ObjectMapper; 5 | import com.fasterxml.jackson.databind.SerializationFeature; 6 | 7 | import com.fasterxml.jackson.datatype.joda.*; 8 | 9 | import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; 10 | 11 | import javax.ws.rs.Produces; 12 | import javax.ws.rs.core.MediaType; 13 | import javax.ws.rs.ext.Provider; 14 | 15 | @Provider 16 | @Produces({MediaType.APPLICATION_JSON}) 17 | public class JacksonJsonProvider extends JacksonJaxbJsonProvider { 18 | 19 | public JacksonJsonProvider() { 20 | 21 | ObjectMapper objectMapper = new ObjectMapper() 22 | .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) 23 | .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) 24 | .registerModule(new JodaModule()) 25 | .setDateFormat(new RFC3339DateFormat()); 26 | 27 | setMapper(objectMapper); 28 | } 29 | } -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/Pair.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 4 | public class Pair { 5 | private String name = ""; 6 | private String value = ""; 7 | 8 | public Pair (String name, String value) { 9 | setName(name); 10 | setValue(value); 11 | } 12 | 13 | private void setName(String name) { 14 | if (!isValidString(name)) return; 15 | 16 | this.name = name; 17 | } 18 | 19 | private void setValue(String value) { 20 | if (!isValidString(value)) return; 21 | 22 | this.value = value; 23 | } 24 | 25 | public String getName() { 26 | return this.name; 27 | } 28 | 29 | public String getValue() { 30 | return this.value; 31 | } 32 | 33 | private boolean isValidString(String arg) { 34 | if (arg == null) return false; 35 | if (arg.trim().isEmpty()) return false; 36 | 37 | return true; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /consonance-arch/src/main/java/io/consonance/arch/containerProvisioner/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement the creation of containers. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.containerProvisioner; 26 | 27 | -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/beans/JobState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch.beans; 20 | 21 | /** 22 | * 23 | * @author dyuen 24 | */ 25 | public enum JobState { 26 | START, PENDING, RUNNING, SUCCESS, FAILED, LOST 27 | } 28 | -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/beans/ProvisionState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch.beans; 20 | 21 | /** 22 | * 23 | * @author dyuen 24 | */ 25 | public enum ProvisionState { 26 | START, PENDING, RUNNING, SUCCESS, FAILED 27 | } 28 | -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/beans/StatusState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch.beans; 20 | 21 | /** 22 | * 23 | * @author dyuen 24 | */ 25 | public enum StatusState { 26 | SUCCESS, RUNNING, FAILED, PENDING, PROVISIONING 27 | } 28 | -------------------------------------------------------------------------------- /consonance-arch/src/main/java/io/consonance/arch/jobGenerator/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement generation of jobs from ini files from the central decider. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.jobGenerator; 26 | 27 | -------------------------------------------------------------------------------- /consonance-reporting/src/main/java/io/consonance/arch/reporting/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement reporting calls that can be accessed by either a web interface, CLI, or slackbot. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.reporting; 26 | 27 | -------------------------------------------------------------------------------- /consonance-server-common/src/main/java/io/consonance/arch/CloudTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch; 20 | 21 | /** 22 | * Enumerate the types of clouds that we support. 23 | * 24 | * @author dyuen 25 | */ 26 | public enum CloudTypes { 27 | AWS, AZURE, OPENSTACK 28 | 29 | } 30 | -------------------------------------------------------------------------------- /consonance-arch/src/main/java/io/consonance/arch/coordinator/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | /** 21 | * Classes that implement the co-ordinator which takes Orders and translates them into VMs, Jobs, and results. 22 | * 23 | * @since 1.0 24 | */ 25 | package io.consonance.arch.coordinator; 26 | 27 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | notifications: 2 | slack: 3 | on_success: never 4 | on_failure: always 5 | rooms: 6 | - oicr:S9k4EowgQv9AnbCfEZHSzCsg 7 | 8 | sudo: false 9 | language: java 10 | jdk: 11 | - oraclejdk8 12 | 13 | before_script: 14 | - echo ${USER} 15 | - psql -c "create user queue_user with password 'queue' createdb;" -U postgres 16 | - psql -c "ALTER USER queue_user WITH superuser;" -U postgres 17 | - psql -c 'create database queue_status with owner = queue_user;' -U postgres 18 | - export PGPASSWORD='queue'; psql -h 127.0.0.1 -U queue_user queue_status -f consonance-arch/sql/schema.sql 19 | - mkdir ~/.youxia 20 | - mkdir ~/.consonance 21 | - cp .travis/youxia_config ~/.youxia/config 22 | - cp .travis/consonance_config ~/.consonance/config 23 | 24 | script: 25 | - mvn -B clean install -DskipITs=false 26 | # - mvn -B clean -DskipITs=false cobertura:cobertura cobertura:cobertura-integration-test coveralls:report 27 | 28 | addons: 29 | postgresql: "9.4" 30 | 31 | services: 32 | - rabbitmq 33 | 34 | # speed up the build by caching Maven dependencies 35 | cache: 36 | directories: 37 | - $HOME/.m2 38 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/Bootstrap.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | import io.swagger.jaxrs.config.SwaggerContextService; 4 | import io.swagger.models.*; 5 | 6 | import io.swagger.models.auth.*; 7 | 8 | import javax.servlet.http.HttpServlet; 9 | import javax.servlet.ServletContext; 10 | import javax.servlet.ServletConfig; 11 | import javax.servlet.ServletException; 12 | 13 | public class Bootstrap extends HttpServlet { 14 | @Override 15 | public void init(ServletConfig config) throws ServletException { 16 | Info info = new Info() 17 | .title("Swagger Server") 18 | .description("No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)") 19 | .termsOfService("") 20 | .contact(new Contact() 21 | .email("")) 22 | .license(new License() 23 | .name("") 24 | .url("http://unlicense.org")); 25 | 26 | ServletContext context = config.getServletContext(); 27 | Swagger swagger = new Swagger().info(info); 28 | 29 | new SwaggerContextService().withServletConfig(config).updateSwagger(swagger); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/ApiOriginFilter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api; 2 | 3 | import javax.servlet.FilterChain; 4 | import javax.servlet.FilterConfig; 5 | import javax.servlet.ServletException; 6 | import javax.servlet.ServletRequest; 7 | import javax.servlet.ServletResponse; 8 | import javax.servlet.http.HttpServletResponse; 9 | import java.io.IOException; 10 | 11 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 12 | public class ApiOriginFilter implements javax.servlet.Filter { 13 | public void doFilter(ServletRequest request, ServletResponse response, 14 | FilterChain chain) throws IOException, ServletException { 15 | HttpServletResponse res = (HttpServletResponse) response; 16 | res.addHeader("Access-Control-Allow-Origin", "*"); 17 | res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); 18 | res.addHeader("Access-Control-Allow-Headers", "Content-Type"); 19 | chain.doFilter(request, response); 20 | } 21 | 22 | public void destroy() {} 23 | 24 | public void init(FilterConfig filterConfig) throws ServletException {} 25 | } -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/ApiOriginFilter.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | import javax.servlet.FilterChain; 4 | import javax.servlet.FilterConfig; 5 | import javax.servlet.ServletException; 6 | import javax.servlet.ServletRequest; 7 | import javax.servlet.ServletResponse; 8 | import javax.servlet.http.HttpServletResponse; 9 | import java.io.IOException; 10 | 11 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 12 | public class ApiOriginFilter implements javax.servlet.Filter { 13 | public void doFilter(ServletRequest request, ServletResponse response, 14 | FilterChain chain) throws IOException, ServletException { 15 | HttpServletResponse res = (HttpServletResponse) response; 16 | res.addHeader("Access-Control-Allow-Origin", "*"); 17 | res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT"); 18 | res.addHeader("Access-Control-Allow-Headers", "Content-Type"); 19 | chain.doFilter(request, response); 20 | } 21 | 22 | public void destroy() {} 23 | 24 | public void init(FilterConfig filterConfig) throws ServletException {} 25 | } -------------------------------------------------------------------------------- /findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-12-07T15:00:20.150-08:00") 22 | public class OAuth implements Authentication { 23 | private String accessToken; 24 | 25 | public String getAccessToken() { 26 | return accessToken; 27 | } 28 | 29 | public void setAccessToken(String accessToken) { 30 | this.accessToken = accessToken; 31 | } 32 | 33 | @Override 34 | public void applyToParams(List queryParams, Map headerParams) { 35 | if (accessToken != null) { 36 | headerParams.put("Authorization", "Bearer " + accessToken); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /consonance-common/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /consonance-reporting/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /consonance-webservice/findbugs-exclude.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /consonance-webservice/src/test/resources/fixtures/job.json: -------------------------------------------------------------------------------- 1 | { 2 | "create_timestamp":0, 3 | "update_timestamp":0, 4 | "job_id":0, 5 | "state":"START", 6 | "extra_files":{ 7 | "/etc/awesomefile/foo.txt":{ 8 | "contents":"contents", 9 | "keep":false 10 | } 11 | }, 12 | "stdout":"My god", 13 | "stderr":"It's full of stars", 14 | "end_user":"Player1", 15 | "flavour":"m1.funky", 16 | "ini_str":"", 17 | "job_uuid":"42", 18 | "vmuuid":null, 19 | "arguments":{ 20 | 21 | }, 22 | "container_image_descriptor":"{\n\n \"items\": [\n {\n \"index\": 1,\n \"index_start_at\": 56,\n \"integer\": 19,\n \"float\": 15.1507,\n \"name\": \"Ashley\",\n \"surname\": \"Coley\",\n \"fullname\": \"Brenda Raynor\",\n \"email\": \"anita@poole.sy\",\n \"bool\": true\n }\n ]\n\n}", 23 | "container_runtime_descriptor":"{\n\n \"items\": [\n {\n \"index\": 1,\n \"index_start_at\": 56,\n \"integer\": 1,\n \"float\": 18.5884,\n \"name\": \"Lee\",\n \"surname\": \"Summers\",\n \"fullname\": \"Sandra Alexander\",\n \"email\": \"ronnie@byrne.gh\",\n \"bool\": false\n }\n ]\n\n}" 24 | } -------------------------------------------------------------------------------- /.travis/youxia_config: -------------------------------------------------------------------------------- 1 | [youxia] 2 | sensu_username = admin 3 | sensu_password = seqware 4 | sensu_ip_address = 9.9.9.9 5 | sensu_port = 4567 6 | managed_tag = foobar 7 | slack_webhook = 8 | 9 | # aws settings 10 | aws_ssh_key = /home/foobar/.ssh/foobar.pem 11 | aws_key_name = foobar 12 | region = sa-east-1 13 | zone = sa-east-1a,sa-east-1b 14 | # openstack settings 15 | openstack_username = foobar 16 | openstack_password = foobar 17 | openstack_endpoint = http://9.9.9.9:5000/v2.0 18 | openstack_key_name = foobar 19 | openstack_ssh_key = /home/foobar/.ssh/foobar.pem 20 | openstack_zone = RegionOne 21 | 22 | [deployer] 23 | ami_image = ami-2385383e 24 | security_group = iron_head 25 | product = Linux/UNIX 26 | instance_type = m3.large 27 | 28 | [deployer_openstack] 29 | min_cores = 8 30 | min_ram = 32768 31 | #image_id = 5898eefa-0347-40ce-882c-e33f5680e788 32 | image_id = 0d22ce84-59c7-48e4-87d0-31d4c8360689 33 | security_group = foobar 34 | network_id = a10fb42e-621a-4ae3-9090-d760fa356f18 35 | arbitrary_wait = 200000 36 | 37 | [seqware] 38 | rest_user = admin@admin.com 39 | rest_pass = admin 40 | rest_port = 8080 41 | rest_root = SeqWareWebService 42 | 43 | [generator] 44 | max_scheduled_workflows = 1 45 | max_workflows = 1 46 | workflow_accession = 1 47 | workflow_name = HelloWorld 48 | workflow_version = 1.0-SNAPSHOT 49 | 50 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client.auth; 2 | 3 | import io.swagger.client.Pair; 4 | 5 | import java.util.Map; 6 | import java.util.List; 7 | 8 | import java.io.UnsupportedEncodingException; 9 | import javax.xml.bind.DatatypeConverter; 10 | 11 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 12 | public class HttpBasicAuth implements Authentication { 13 | private String username; 14 | private String password; 15 | 16 | public String getUsername() { 17 | return username; 18 | } 19 | 20 | public void setUsername(String username) { 21 | this.username = username; 22 | } 23 | 24 | public String getPassword() { 25 | return password; 26 | } 27 | 28 | public void setPassword(String password) { 29 | this.password = password; 30 | } 31 | 32 | @Override 33 | public void applyToParams(List queryParams, Map headerParams) { 34 | String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); 35 | try { 36 | headerParams.put("Authorization", "Basic " + DatatypeConverter.printBase64Binary(str.getBytes("UTF-8"))); 37 | } catch (UnsupportedEncodingException e) { 38 | throw new RuntimeException(e); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /consonance-reporting/src/main/java/io/consonance/arch/reporting/ReportAPIFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch.reporting; 20 | 21 | import io.consonance.arch.persistence.PostgreSQL; 22 | import org.apache.commons.configuration.HierarchicalINIConfiguration; 23 | 24 | /** 25 | * 26 | * @author dyuen 27 | */ 28 | public class ReportAPIFactory { 29 | 30 | public static ReportAPI makeReportAPI(HierarchicalINIConfiguration config, PostgreSQL postgres) { 31 | return new Arch3ReportImpl(config, postgres); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /container-admin/youxia_config.template: -------------------------------------------------------------------------------- 1 | [youxia] 2 | sensu_username = admin 3 | sensu_password = seqware 4 | sensu_ip_address = 127.0.0.1 5 | sensu_port = 4567 6 | managed_tag = {{ FLEET_NAME }} 7 | slack_webhook = 8 | 9 | # aws settings 10 | aws_ssh_key = /root/.ssh/key.pem 11 | aws_key_name = {{ KEY_NAME }} 12 | region = {{ AWS_REGION }} 13 | zone = {{ AWS_ZONE }} 14 | 15 | # openstack settings 16 | openstack_username = foobar 17 | openstack_password = foobar 18 | openstack_endpoint = http://9.9.9.9:5000/v2.0 19 | openstack_key_name = foobar 20 | openstack_ssh_key = /home/foobar/.ssh/foobar.pem 21 | openstack_zone = RegionOne 22 | 23 | [deployer] 24 | ami_image = {{ AWS_AMI_IMAGE }} 25 | security_group = {{ SECURITY_GROUP }} 26 | product = Linux/UNIX 27 | instance_type = {{ AWS_INSTANCE_TYPE }} 28 | 29 | [deployer_openstack] 30 | min_cores = 8 31 | min_ram = 32768 32 | #image_id = 5898eefa-0347-40ce-882c-e33f5680e788 33 | image_id = 0d22ce84-59c7-48e4-87d0-31d4c8360689 34 | security_group = foobar 35 | network_id = a10fb42e-621a-4ae3-9090-d760fa356f18 36 | arbitrary_wait = 200000 37 | 38 | [seqware] 39 | rest_user = admin@admin.com 40 | rest_pass = admin 41 | rest_port = 8080 42 | rest_root = SeqWareWebService 43 | 44 | [generator] 45 | max_scheduled_workflows = 1 46 | max_workflows = 1 47 | workflow_accession = 1 48 | workflow_name = HelloWorld 49 | workflow_version = 1.0-SNAPSHOT 50 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/Configuration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-12-07T15:00:20.150-08:00") 17 | public class Configuration { 18 | private static ApiClient defaultApiClient = new ApiClient(); 19 | 20 | /** 21 | * Get the default API client, which would be used when creating API 22 | * instances without providing an API client. 23 | * 24 | * @return Default API client 25 | */ 26 | public static ApiClient getDefaultApiClient() { 27 | return defaultApiClient; 28 | } 29 | 30 | /** 31 | * Set the default API client, which would be used when creating API 32 | * instances without providing an API client. 33 | * 34 | * @param apiClient API client 35 | */ 36 | public static void setDefaultApiClient(ApiClient apiClient) { 37 | defaultApiClient = apiClient; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/model/User.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client.model; 2 | 3 | import io.swagger.client.StringUtil; 4 | 5 | 6 | 7 | import io.swagger.annotations.*; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | 11 | @ApiModel(description = "") 12 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-09-24T21:12:39.504Z") 13 | public class User { 14 | 15 | private String name = null; 16 | private Integer id = null; 17 | 18 | 19 | /** 20 | **/ 21 | @ApiModelProperty(value = "") 22 | @JsonProperty("name") 23 | public String getName() { 24 | return name; 25 | } 26 | public void setName(String name) { 27 | this.name = name; 28 | } 29 | 30 | 31 | /** 32 | **/ 33 | @ApiModelProperty(value = "") 34 | @JsonProperty("id") 35 | public Integer getId() { 36 | return id; 37 | } 38 | public void setId(Integer id) { 39 | this.id = id; 40 | } 41 | 42 | 43 | 44 | @Override 45 | public String toString() { 46 | StringBuilder sb = new StringBuilder(); 47 | sb.append("class User {\n"); 48 | 49 | sb.append(" name: ").append(StringUtil.toIndentedString(name)).append("\n"); 50 | sb.append(" id: ").append(StringUtil.toIndentedString(id)).append("\n"); 51 | sb.append("}"); 52 | return sb.toString(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/SimpleAuthorizer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | package io.consonance.webservice; 21 | 22 | import io.consonance.webservice.core.ConsonanceUser; 23 | import io.dropwizard.auth.Authorizer; 24 | 25 | public class SimpleAuthorizer implements Authorizer { 26 | 27 | @Override 28 | public boolean authorize(ConsonanceUser principal, String role) { 29 | if (role.equalsIgnoreCase("admin")){ 30 | return principal.isAdmin(); 31 | } else{ 32 | return true; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /container-admin/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2' 2 | 3 | 4 | services: 5 | postgres: 6 | image: postgres:9.5 7 | 8 | rabbitmq: 9 | image: rabbitmq:3.5.6-management 10 | ports: 11 | - "15672:15672" 12 | - "5672:5672" 13 | 14 | webservice: 15 | build: 16 | context: . 17 | dockerfile: Dockerfile_webservice 18 | ports: 19 | - "8080:8080" 20 | - "8081:8081" 21 | links: 22 | - postgres 23 | - rabbitmq 24 | volumes: 25 | - log_volume:/consonance_logs 26 | 27 | coordinator: 28 | build: 29 | context: . 30 | dockerfile: Dockerfile_coordinator 31 | links: 32 | - webservice 33 | - rabbitmq 34 | volumes: 35 | - log_volume:/consonance_logs 36 | 37 | provisioner: 38 | build: 39 | context: . 40 | dockerfile: Dockerfile_provisioner 41 | links: 42 | - webservice 43 | - rabbitmq 44 | volumes: 45 | - log_volume:/consonance_logs 46 | 47 | client: 48 | build: 49 | context: . 50 | dockerfile: Dockerfile_client 51 | links: 52 | - webservice 53 | - postgres 54 | - coordinator 55 | - provisioner 56 | volumes: 57 | - log_volume:/consonance_logs 58 | environment: 59 | - PGHOST=postgres 60 | - PGUSER=postgres 61 | - PGPASSWORD=postgres 62 | - PGDATABASE=postgres 63 | 64 | volumes: 65 | log_volume: 66 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/model/Ga4ghWesParameterTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.wes.model; 15 | 16 | import java.util.Objects; 17 | import com.fasterxml.jackson.annotation.JsonValue; 18 | import javax.validation.constraints.*; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | 22 | /** 23 | * Gets or Sets ga4gh_wes_parameter_types 24 | */ 25 | public enum Ga4ghWesParameterTypes { 26 | 27 | DIRECTORY("Directory"), 28 | 29 | FILE("File"), 30 | 31 | PARAMETER("Parameter"); 32 | 33 | private String value; 34 | 35 | Ga4ghWesParameterTypes(String value) { 36 | this.value = value; 37 | } 38 | 39 | @Override 40 | public String toString() { 41 | return String.valueOf(value); 42 | } 43 | 44 | @JsonCreator 45 | public static Ga4ghWesParameterTypes fromValue(String text) { 46 | for (Ga4ghWesParameterTypes b : Ga4ghWesParameterTypes.values()) { 47 | if (String.valueOf(b.value).equals(text)) { 48 | return b; 49 | } 50 | } 51 | return null; 52 | } 53 | } 54 | 55 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-12-07T15:00:20.150-08:00") 17 | public class Pair { 18 | private String name = ""; 19 | private String value = ""; 20 | 21 | public Pair (String name, String value) { 22 | setName(name); 23 | setValue(value); 24 | } 25 | 26 | private void setName(String name) { 27 | if (!isValidString(name)) return; 28 | 29 | this.name = name; 30 | } 31 | 32 | private void setValue(String value) { 33 | if (!isValidString(value)) return; 34 | 35 | this.value = value; 36 | } 37 | 38 | public String getName() { 39 | return this.name; 40 | } 41 | 42 | public String getValue() { 43 | return this.value; 44 | } 45 | 46 | private boolean isValidString(String arg) { 47 | if (arg == null) return false; 48 | if (arg.trim().isEmpty()) return false; 49 | 50 | return true; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/jdbi/ProvisionDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.webservice.jdbi; 20 | 21 | import io.consonance.arch.beans.Provision; 22 | import io.dropwizard.hibernate.AbstractDAO; 23 | import org.hibernate.SessionFactory; 24 | 25 | /** 26 | * 27 | * @author dyuen 28 | */ 29 | public class ProvisionDAO extends AbstractDAO { 30 | public ProvisionDAO(SessionFactory factory) { 31 | super(factory); 32 | } 33 | 34 | public Provision findById(int id) { 35 | return get(id); 36 | } 37 | 38 | public int create(Provision provision) { 39 | return persist(provision).getProvisionId(); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /consonance-client/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 27 | 28 | 29 | DEBUG 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 27 | 28 | 29 | DEBUG 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/StringUtil.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 4 | public class StringUtil { 5 | /** 6 | * Check if the given array contains the given value (with case-insensitive comparison). 7 | * 8 | * @param array The array 9 | * @param value The value to search 10 | * @return true if the array contains the value 11 | */ 12 | public static boolean containsIgnoreCase(String[] array, String value) { 13 | for (String str : array) { 14 | if (value == null && str == null) return true; 15 | if (value != null && value.equalsIgnoreCase(str)) return true; 16 | } 17 | return false; 18 | } 19 | 20 | /** 21 | * Join an array of strings with the given separator. 22 | *

23 | * Note: This might be replaced by utility method from commons-lang or guava someday 24 | * if one of those libraries is added as dependency. 25 | *

26 | * 27 | * @param array The array of strings 28 | * @param separator The separator 29 | * @return the resulting string 30 | */ 31 | public static String join(String[] array, String separator) { 32 | int len = array.length; 33 | if (len == 0) return ""; 34 | 35 | StringBuilder out = new StringBuilder(); 36 | out.append(array[0]); 37 | for (int i = 1; i < len; i++) { 38 | out.append(separator).append(array[i]); 39 | } 40 | return out.toString(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/StringUtil.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 4 | public class StringUtil { 5 | /** 6 | * Check if the given array contains the given value (with case-insensitive comparison). 7 | * 8 | * @param array The array 9 | * @param value The value to search 10 | * @return true if the array contains the value 11 | */ 12 | public static boolean containsIgnoreCase(String[] array, String value) { 13 | for (String str : array) { 14 | if (value == null && str == null) return true; 15 | if (value != null && value.equalsIgnoreCase(str)) return true; 16 | } 17 | return false; 18 | } 19 | 20 | /** 21 | * Join an array of strings with the given separator. 22 | *

23 | * Note: This might be replaced by utility method from commons-lang or guava someday 24 | * if one of those libraries is added as dependency. 25 | *

26 | * 27 | * @param array The array of strings 28 | * @param separator The separator 29 | * @return the resulting string 30 | */ 31 | public static String join(String[] array, String separator) { 32 | int len = array.length; 33 | if (len == 0) return ""; 34 | 35 | StringBuilder out = new StringBuilder(); 36 | out.append(array[0]); 37 | for (int i = 1; i < len; i++) { 38 | out.append(separator).append(array[i]); 39 | } 40 | return out.toString(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/StringUtil.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 4 | public class StringUtil { 5 | /** 6 | * Check if the given array contains the given value (with case-insensitive comparison). 7 | * 8 | * @param array The array 9 | * @param value The value to search 10 | * @return true if the array contains the value 11 | */ 12 | public static boolean containsIgnoreCase(String[] array, String value) { 13 | for (String str : array) { 14 | if (value == null && str == null) return true; 15 | if (value != null && value.equalsIgnoreCase(str)) return true; 16 | } 17 | return false; 18 | } 19 | 20 | /** 21 | * Join an array of strings with the given separator. 22 | *

23 | * Note: This might be replaced by utility method from commons-lang or guava someday 24 | * if one of those libraries is added as dependency. 25 | *

26 | * 27 | * @param array The array of strings 28 | * @param separator The separator 29 | * @return the resulting string 30 | */ 31 | public static String join(String[] array, String separator) { 32 | int len = array.length; 33 | if (len == 0) return ""; 34 | 35 | StringBuilder out = new StringBuilder(); 36 | out.append(array[0]); 37 | for (int i = 1; i < len; i++) { 38 | out.append(separator).append(array[i]); 39 | } 40 | return out.toString(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import com.squareup.okhttp.Credentials; 19 | 20 | import java.util.Map; 21 | import java.util.List; 22 | 23 | import java.io.UnsupportedEncodingException; 24 | 25 | public class HttpBasicAuth implements Authentication { 26 | private String username; 27 | private String password; 28 | 29 | public String getUsername() { 30 | return username; 31 | } 32 | 33 | public void setUsername(String username) { 34 | this.username = username; 35 | } 36 | 37 | public String getPassword() { 38 | return password; 39 | } 40 | 41 | public void setPassword(String password) { 42 | this.password = password; 43 | } 44 | 45 | @Override 46 | public void applyToParams(List queryParams, Map headerParams) { 47 | if (username == null && password == null) { 48 | return; 49 | } 50 | headerParams.put("Authorization", Credentials.basic( 51 | username == null ? "" : username, 52 | password == null ? "" : password)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/resources/TemplateHealthCheck.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.webservice.resources; 20 | 21 | import com.codahale.metrics.health.HealthCheck; 22 | 23 | /** 24 | * 25 | * @author dyuen 26 | */ 27 | public class TemplateHealthCheck extends HealthCheck { 28 | private final String template; 29 | 30 | public TemplateHealthCheck(String template) { 31 | this.template = template; 32 | } 33 | 34 | @Override 35 | protected Result check() throws Exception { 36 | final String saying = String.format(template, "TEST"); 37 | if (!saying.contains("TEST")) { 38 | return Result.unhealthy("template doesn't include a name"); 39 | } 40 | return Result.healthy(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/api/ApiResponseMessage.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.api; 2 | 3 | import javax.xml.bind.annotation.XmlTransient; 4 | 5 | @javax.xml.bind.annotation.XmlRootElement 6 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 7 | public class ApiResponseMessage { 8 | public static final int ERROR = 1; 9 | public static final int WARNING = 2; 10 | public static final int INFO = 3; 11 | public static final int OK = 4; 12 | public static final int TOO_BUSY = 5; 13 | 14 | int code; 15 | String type; 16 | String message; 17 | 18 | public ApiResponseMessage(){} 19 | 20 | public ApiResponseMessage(int code, String message){ 21 | this.code = code; 22 | switch(code){ 23 | case ERROR: 24 | setType("error"); 25 | break; 26 | case WARNING: 27 | setType("warning"); 28 | break; 29 | case INFO: 30 | setType("info"); 31 | break; 32 | case OK: 33 | setType("ok"); 34 | break; 35 | case TOO_BUSY: 36 | setType("too busy"); 37 | break; 38 | default: 39 | setType("unknown"); 40 | break; 41 | } 42 | this.message = message; 43 | } 44 | 45 | @XmlTransient 46 | public int getCode() { 47 | return code; 48 | } 49 | 50 | public void setCode(int code) { 51 | this.code = code; 52 | } 53 | 54 | public String getType() { 55 | return type; 56 | } 57 | 58 | public void setType(String type) { 59 | this.type = type; 60 | } 61 | 62 | public String getMessage() { 63 | return message; 64 | } 65 | 66 | public void setMessage(String message) { 67 | this.message = message; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/model/Ga4ghWesState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.wes.model; 15 | 16 | import java.util.Objects; 17 | import com.fasterxml.jackson.annotation.JsonValue; 18 | import javax.validation.constraints.*; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | 22 | /** 23 | * Gets or Sets ga4gh_wes_state 24 | */ 25 | public enum Ga4ghWesState { 26 | 27 | UNKNOWN("Unknown"), 28 | 29 | QUEUED("Queued"), 30 | 31 | RUNNING("Running"), 32 | 33 | PAUSED("Paused"), // TODO: Not available yet. 34 | 35 | COMPLETE("Complete"), 36 | 37 | ERROR("Error"), 38 | 39 | SYSTEMERROR("SystemError"), 40 | 41 | CANCELED("Canceled"), // TODO: Added feature 42 | 43 | INITIALIZING("Initializing"); 44 | 45 | private String value; 46 | 47 | Ga4ghWesState(String value) { 48 | this.value = value; 49 | } 50 | 51 | @Override 52 | public String toString() { 53 | return String.valueOf(value); 54 | } 55 | 56 | @JsonCreator 57 | public static Ga4ghWesState fromValue(String text) { 58 | for (Ga4ghWesState b : Ga4ghWesState.values()) { 59 | if (String.valueOf(b.value).equals(text)) { 60 | return b; 61 | } 62 | } 63 | return null; 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/ApiResponseMessage.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | import javax.xml.bind.annotation.XmlTransient; 4 | 5 | @javax.xml.bind.annotation.XmlRootElement 6 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 7 | public class ApiResponseMessage { 8 | public static final int ERROR = 1; 9 | public static final int WARNING = 2; 10 | public static final int INFO = 3; 11 | public static final int OK = 4; 12 | public static final int TOO_BUSY = 5; 13 | 14 | int code; 15 | String type; 16 | String message; 17 | 18 | public ApiResponseMessage(){} 19 | 20 | public ApiResponseMessage(int code, String message){ 21 | this.code = code; 22 | switch(code){ 23 | case ERROR: 24 | setType("error"); 25 | break; 26 | case WARNING: 27 | setType("warning"); 28 | break; 29 | case INFO: 30 | setType("info"); 31 | break; 32 | case OK: 33 | setType("ok"); 34 | break; 35 | case TOO_BUSY: 36 | setType("too busy"); 37 | break; 38 | default: 39 | setType("unknown"); 40 | break; 41 | } 42 | this.message = message; 43 | } 44 | 45 | @XmlTransient 46 | public int getCode() { 47 | return code; 48 | } 49 | 50 | public void setCode(int code) { 51 | this.code = code; 52 | } 53 | 54 | public String getType() { 55 | return type; 56 | } 57 | 58 | public void setType(String type) { 59 | this.type = type; 60 | } 61 | 62 | public String getMessage() { 63 | return message; 64 | } 65 | 66 | public void setMessage(String message) { 67 | this.message = message; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/auth/ApiKeyAuth.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client.auth; 2 | 3 | import io.swagger.client.Pair; 4 | 5 | import java.util.Map; 6 | import java.util.List; 7 | 8 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 9 | public class ApiKeyAuth implements Authentication { 10 | private final String location; 11 | private final String paramName; 12 | 13 | private String apiKey; 14 | private String apiKeyPrefix; 15 | 16 | public ApiKeyAuth(String location, String paramName) { 17 | this.location = location; 18 | this.paramName = paramName; 19 | } 20 | 21 | public String getLocation() { 22 | return location; 23 | } 24 | 25 | public String getParamName() { 26 | return paramName; 27 | } 28 | 29 | public String getApiKey() { 30 | return apiKey; 31 | } 32 | 33 | public void setApiKey(String apiKey) { 34 | this.apiKey = apiKey; 35 | } 36 | 37 | public String getApiKeyPrefix() { 38 | return apiKeyPrefix; 39 | } 40 | 41 | public void setApiKeyPrefix(String apiKeyPrefix) { 42 | this.apiKeyPrefix = apiKeyPrefix; 43 | } 44 | 45 | @Override 46 | public void applyToParams(List queryParams, Map headerParams) { 47 | String value; 48 | if (apiKeyPrefix != null) { 49 | value = apiKeyPrefix + " " + apiKey; 50 | } else { 51 | value = apiKey; 52 | } 53 | if (location == "query") { 54 | queryParams.add(new Pair(paramName, value)); 55 | } else if (location == "header") { 56 | headerParams.put(paramName, value); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /container-admin/Dockerfile_coordinator.template: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | # Update the APT cache 4 | # prepare for Java download 5 | RUN apt-get update \ 6 | && apt-get upgrade -y \ 7 | && apt-get install -y \ 8 | python-software-properties \ 9 | software-properties-common \ 10 | telnet \ 11 | vim \ 12 | && apt-get clean 13 | 14 | # grab oracle java (auto accept licence) 15 | RUN add-apt-repository -y ppa:webupd8team/java \ 16 | && apt-get update \ 17 | && echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections \ 18 | && apt-get install -y oracle-java8-installer 19 | 20 | # install Consonance services 21 | ENV consonance_version={{ CONSONANCE_BINARY_VERSION }} 22 | 23 | RUN wget --no-verbose https://github.com/Consonance/consonance/releases/download/${consonance_version}/consonance-arch-${consonance_version}.jar 24 | 25 | # install dockerize 26 | ENV DOCKERIZE_VERSION v0.2.0 27 | 28 | RUN wget --no-verbose https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ 29 | && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz 30 | 31 | COPY config . 32 | ADD init_coordinator.sh . 33 | 34 | 35 | RUN chmod u+x init_coordinator.sh 36 | COPY config /root/.consonance/config 37 | RUN mkdir /consonance_logs && chmod a+rx /consonance_logs 38 | 39 | 40 | # TODO: 1) update the above to have my AWS creds in it and 2) create the admin user in postgres db 41 | # Waiting for postgres and rabbitmq services 42 | CMD ["dockerize", "-wait", "tcp://webservice:8080", "-timeout", "60s", "./init_coordinator.sh"] 43 | -------------------------------------------------------------------------------- /container-admin/web.yml.template: -------------------------------------------------------------------------------- 1 | launcherIPAddress: {{ PUBLIC_LAUNCHER_IP_ADDRESS }} 2 | launcherPort: 8080 3 | 4 | template: Funky 5 | 6 | logging: 7 | level: INFO 8 | loggers: 9 | io.consonance.webservice: ALL 10 | appenders: 11 | - type: console 12 | threshold: ALL 13 | 14 | consonanceConfig: /config 15 | 16 | authenticationCachePolicy: maximumSize=10000, expireAfterAccess=10m 17 | 18 | httpClient: 19 | timeout: 5500ms 20 | connectionTimeout: 5500ms 21 | timeToLive: 1h 22 | cookiesEnabled: false 23 | maxConnections: 1024 24 | maxConnectionsPerRoute: 1024 25 | keepAlive: 0ms 26 | retries: 0 27 | 28 | database: 29 | # the name of your JDBC driver 30 | driverClass: org.postgresql.Driver 31 | 32 | # the username 33 | user: postgres 34 | 35 | # the password 36 | password: postgres 37 | 38 | # the JDBC URL 39 | url: jdbc:postgresql://postgres:5432/postgres 40 | 41 | # any properties specific to your JDBC driver: 42 | properties: 43 | charSet: UTF-8 44 | hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect 45 | # create database as needed, disable in production 46 | hibernate.hbm2ddl.auto: update 47 | 48 | # the maximum amount of time to wait on an empty pool before throwing an exception 49 | maxWaitForConnection: 1s 50 | 51 | # the SQL query to run when validating a connection's liveness 52 | validationQuery: "/* MyApplication Health Check */ SELECT 1" 53 | 54 | # the minimum number of connections to keep open 55 | minSize: 8 56 | 57 | # the maximum number of connections to keep open 58 | maxSize: 32 59 | 60 | # whether or not idle connections should be validated 61 | checkConnectionWhileIdle: false 62 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/model/Ga4ghWesServiceInfoRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | 18 | /** 19 | * Ga4ghWesServiceInfoRequest 20 | */ 21 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-12-07T15:00:20.150-08:00") 22 | public class Ga4ghWesServiceInfoRequest { 23 | 24 | @Override 25 | public boolean equals(java.lang.Object o) { 26 | if (this == o) { 27 | return true; 28 | } 29 | if (o == null || getClass() != o.getClass()) { 30 | return false; 31 | } 32 | return true; 33 | } 34 | 35 | @Override 36 | public int hashCode() { 37 | return Objects.hash(); 38 | } 39 | 40 | 41 | @Override 42 | public String toString() { 43 | StringBuilder sb = new StringBuilder(); 44 | sb.append("class Ga4ghWesServiceInfoRequest {\n"); 45 | 46 | sb.append("}"); 47 | return sb.toString(); 48 | } 49 | 50 | /** 51 | * Convert the given object to string with each line indented by 4 spaces 52 | * (except the first line). 53 | */ 54 | private String toIndentedString(java.lang.Object o) { 55 | if (o == null) { 56 | return "null"; 57 | } 58 | return o.toString().replace("\n", "\n "); 59 | } 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/model/ExtraFile.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client.model; 2 | 3 | import io.swagger.client.StringUtil; 4 | 5 | 6 | 7 | import io.swagger.annotations.*; 8 | import com.fasterxml.jackson.annotation.JsonProperty; 9 | 10 | 11 | @ApiModel(description = "") 12 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 13 | public class ExtraFile { 14 | 15 | private String contents = null; 16 | private Boolean keep = null; 17 | 18 | 19 | /** 20 | * contents of the extra files, should not be returned over the webservice 21 | **/ 22 | @ApiModelProperty(value = "contents of the extra files, should not be returned over the webservice") 23 | @JsonProperty("contents") 24 | public String getContents() { 25 | return contents; 26 | } 27 | public void setContents(String contents) { 28 | this.contents = contents; 29 | } 30 | 31 | 32 | /** 33 | * whether to keep this file after workflow execution 34 | **/ 35 | @ApiModelProperty(value = "whether to keep this file after workflow execution") 36 | @JsonProperty("keep") 37 | public Boolean getKeep() { 38 | return keep; 39 | } 40 | public void setKeep(Boolean keep) { 41 | this.keep = keep; 42 | } 43 | 44 | 45 | 46 | @Override 47 | public String toString() { 48 | StringBuilder sb = new StringBuilder(); 49 | sb.append("class ExtraFile {\n"); 50 | 51 | sb.append(" contents: ").append(StringUtil.toIndentedString(contents)).append("\n"); 52 | sb.append(" keep: ").append(StringUtil.toIndentedString(keep)).append("\n"); 53 | sb.append("}"); 54 | return sb.toString(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/collab.cwl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env cwl-runner 2 | 3 | class: CommandLineTool 4 | description: "Markdown description text here" 5 | id: "HelloWorld" 6 | label: "HelloWorld Tool" 7 | 8 | dct:creator: 9 | "@id": "http://orcid.org/0000-0003-3566-7705" 10 | foaf:name: Peter Amstutz 11 | foaf:mbox: "mailto:peter.amstutz@curoverse.com" 12 | 13 | requirements: 14 | - class: DockerRequirement 15 | dockerPull: "quay.io/collaboratory/workflow-helloworld:1.0.0" 16 | - { import: node-engine.cwl } 17 | 18 | hints: 19 | - class: ResourceRequirement 20 | coresMin: 8 21 | ramMin: 8092 22 | outdirMin: 512000 23 | description: "these parameters are used to locate a VM with appropriate resources" 24 | 25 | inputs: 26 | - id: "#ref_file_1" 27 | type: File 28 | description: "this describes a large reference file that does not change between runs" 29 | 30 | - id: "#ref_file_2" 31 | type: File 32 | description: "this describes a large reference file that does not change between runs" 33 | 34 | - id: "#hello_input" 35 | type: File 36 | description: "this describes an input file that should be provided before execution" 37 | 38 | outputs: 39 | - id: "#hello_output" 40 | type: File 41 | outputBinding: 42 | glob: hello-output.txt 43 | description: "this describes an output file that should be saved after execution" 44 | 45 | baseCommand: ["bash", "-c"] 46 | arguments: 47 | - valueFrom: 48 | engine: node-engine.cwl 49 | script: | 50 | "cat " + $job.hello_input.path + " > hello-output.txt &&" 51 | + " ls " + $job.ref_file_1.path + " >> hello-output.txt && " 52 | + " head -20 " + $job.ref_file_2.path + " >> hello-output.txt" 53 | -------------------------------------------------------------------------------- /consonance-webservice/src/test/resources/run-fox.yml: -------------------------------------------------------------------------------- 1 | launcherIPAddress: 127.0.0.1 2 | launcherPort: 8080 3 | 4 | template: Funky 5 | 6 | logging: 7 | level: INFO 8 | loggers: 9 | io.consonance.webservice: ALL 10 | appenders: 11 | - type: console 12 | threshold: ALL 13 | 14 | consonanceConfig: ${HOME}/.consonance/config 15 | 16 | authenticationCachePolicy: maximumSize=10000, expireAfterAccess=10m 17 | 18 | httpClient: 19 | timeout: 5500ms 20 | connectionTimeout: 5500ms 21 | connectionRequestTimeout: 5500ms 22 | timeToLive: 1h 23 | cookiesEnabled: false 24 | maxConnections: 1024 25 | maxConnectionsPerRoute: 1024 26 | keepAlive: 0ms 27 | retries: 0 28 | 29 | database: 30 | # the name of your JDBC driver 31 | driverClass: org.postgresql.Driver 32 | 33 | # the username 34 | user: queue_user 35 | 36 | # the password 37 | password: queue 38 | 39 | # the JDBC URL 40 | url: jdbc:postgresql://localhost:5432/queue_status 41 | 42 | # any properties specific to your JDBC driver: 43 | properties: 44 | charSet: UTF-8 45 | hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect 46 | # create database as needed, disable in production 47 | hibernate.hbm2ddl.auto: create 48 | 49 | # the maximum amount of time to wait on an empty pool before throwing an exception 50 | maxWaitForConnection: 1s 51 | 52 | # the SQL query to run when validating a connection's liveness 53 | validationQuery: "/* MyApplication Health Check */ SELECT 1" 54 | 55 | # the minimum number of connections to keep open 56 | minSize: 8 57 | 58 | # the maximum number of connections to keep open 59 | maxSize: 32 60 | 61 | # whether or not idle connections should be validated 62 | checkConnectionWhileIdle: false 63 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/model/Ga4ghWesServiceInfoRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.wes.model; 15 | 16 | import java.util.Objects; 17 | import javax.validation.constraints.*; 18 | 19 | /** 20 | * Ga4ghWesServiceInfoRequest 21 | */ 22 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 23 | public class Ga4ghWesServiceInfoRequest { 24 | 25 | @Override 26 | public boolean equals(java.lang.Object o) { 27 | if (this == o) { 28 | return true; 29 | } 30 | if (o == null || getClass() != o.getClass()) { 31 | return false; 32 | } 33 | return true; 34 | } 35 | 36 | @Override 37 | public int hashCode() { 38 | return Objects.hash(); 39 | } 40 | 41 | 42 | @Override 43 | public String toString() { 44 | StringBuilder sb = new StringBuilder(); 45 | sb.append("class Ga4ghWesServiceInfoRequest {\n"); 46 | 47 | sb.append("}"); 48 | return sb.toString(); 49 | } 50 | 51 | /** 52 | * Convert the given object to string with each line indented by 4 spaces 53 | * (except the first line). 54 | */ 55 | private String toIndentedString(java.lang.Object o) { 56 | if (o == null) { 57 | return "null"; 58 | } 59 | return o.toString().replace("\n", "\n "); 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /consonance-integration-testing/src/test/resources/run-fox.yml: -------------------------------------------------------------------------------- 1 | launcherIPAddress: 127.0.0.1 2 | launcherPort: 8080 3 | 4 | template: Funky 5 | 6 | logging: 7 | level: INFO 8 | loggers: 9 | io.consonance.webservice: ALL 10 | appenders: 11 | - type: console 12 | threshold: ALL 13 | 14 | consonanceConfig: ${HOME}/.consonance/config 15 | 16 | authenticationCachePolicy: maximumSize=10000, expireAfterAccess=10m 17 | 18 | httpClient: 19 | timeout: 5500ms 20 | connectionTimeout: 5500ms 21 | connectionRequestTimeout: 5500ms 22 | timeToLive: 1h 23 | cookiesEnabled: false 24 | maxConnections: 1024 25 | maxConnectionsPerRoute: 1024 26 | keepAlive: 0ms 27 | retries: 0 28 | 29 | database: 30 | # the name of your JDBC driver 31 | driverClass: org.postgresql.Driver 32 | 33 | # the username 34 | user: queue_user 35 | 36 | # the password 37 | password: queue 38 | 39 | # the JDBC URL 40 | url: jdbc:postgresql://localhost:5432/queue_status 41 | 42 | # any properties specific to your JDBC driver: 43 | properties: 44 | charSet: UTF-8 45 | hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect 46 | # create database as needed, disable in production 47 | hibernate.hbm2ddl.auto: create 48 | 49 | # the maximum amount of time to wait on an empty pool before throwing an exception 50 | maxWaitForConnection: 1s 51 | 52 | # the SQL query to run when validating a connection's liveness 53 | validationQuery: "/* MyApplication Health Check */ SELECT 1" 54 | 55 | # the minimum number of connections to keep open 56 | minSize: 8 57 | 58 | # the maximum number of connections to keep open 59 | maxSize: 32 60 | 61 | # whether or not idle connections should be validated 62 | checkConnectionWhileIdle: false 63 | -------------------------------------------------------------------------------- /consonance-reporting/README.md: -------------------------------------------------------------------------------- 1 | ### Reporting 2 | 3 | There are two methods of reporting, they should not be used concurrently 4 | Note that both require a valid config file (in these examples, at ~/.arch3/config ). 5 | 6 | The parameters needed in that file are as follows: 7 | 8 | [report] 9 | # defines what name the bot will respond to 10 | namespace = 11 | # given by slack's bot integration 12 | slack_token = 13 | 14 | ### Traditional CLI 15 | 16 | A standard CLI utility for Linux is provided 17 | 18 | 19 | $ java -cp target/consonance-reporting-*.jar ReportCLI --config ~/.consonance/config 20 | Available commands are: 21 | `gather` gathers the last message sent by each worker and displays the last line of it 22 | `info` retrieves detailed information on provisioned instances 23 | `jobs` retrieves detailed information on jobs 24 | `provisioned` retrieves detailed information on provisioned instances 25 | `status` retrieves configuration and version information on arch3 26 | $ java -cp target/consonance-reporting-*.jar ReportCLI --config ~/.consonance/config info 27 | database.postgresDBName: queue_status 28 | database.postgresHost: 127.0.0.1 29 | database.postgresUser: queue_user 30 | rabbit.rabbitMQHost: localhost 31 | rabbit.rabbitMQQueueName: consonance_arch 32 | rabbit.rabbitMQUser: queue_user 33 | report.namespace: flying_snow 34 | version: 1.1-alpha.2-SNAPSHOT 35 | 36 | ### SlackBot 37 | 38 | You can also communicate with our reporting tools as a SlackBot. This is our recommended approach. 39 | 40 | java -cp target/consonance-reporting-*.jar SlackReportBot --endless --config ~/.consonance/config 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /consonance-common/src/main/java/io/consonance/common/Utilities.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | package io.consonance.common; 21 | 22 | import org.apache.commons.configuration.ConfigurationException; 23 | import org.apache.commons.configuration.HierarchicalINIConfiguration; 24 | 25 | import java.io.File; 26 | 27 | /** 28 | * @author dyuen 29 | */ 30 | public class Utilities { 31 | 32 | public static HierarchicalINIConfiguration getYouxiaConfig() { 33 | File configFile = new File(System.getProperty("user.home"), ".consonance/config"); 34 | return Utilities.parseConfig(configFile.getAbsolutePath()); 35 | } 36 | 37 | public static HierarchicalINIConfiguration parseConfig(String path) { 38 | try { 39 | return new HierarchicalINIConfiguration(path); 40 | } catch (ConfigurationException ex) { 41 | throw new RuntimeException("Could not read ~/.consonance/config"); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /consonance-arch/src/test/java/io/consonance/arch/worker/WorkerRunnableIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch.worker; 20 | 21 | import org.apache.commons.io.FileUtils; 22 | import org.junit.Assert; 23 | import org.junit.Test; 24 | 25 | import java.io.File; 26 | import java.net.InetAddress; 27 | 28 | /** 29 | * 30 | * @author dyuen 31 | */ 32 | public class WorkerRunnableIT { 33 | 34 | /** 35 | * Test of getFirstNonLoopbackAddress method, of class WorkerRunnable. 36 | * 37 | * @throws java.lang.Exception 38 | */ 39 | @Test 40 | public void testGetFirstNonLoopbackAddress() throws Exception { 41 | File configFile = FileUtils.getFile("src", "test", "resources", "config"); 42 | WorkerRunnable instance = new WorkerRunnable(configFile.getAbsolutePath(), "test", 1); 43 | InetAddress result = instance.getFirstNonLoopbackAddress(); 44 | Assert.assertTrue("ip address was null", result != null); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /container-admin/Dockerfile_webservice.template: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | # Update the APT cache 4 | # prepare for Java download 5 | RUN apt-get update \ 6 | && apt-get upgrade -y \ 7 | && apt-get install -y \ 8 | python-software-properties \ 9 | software-properties-common \ 10 | telnet \ 11 | vim \ 12 | && apt-get clean 13 | 14 | # grab oracle java (auto accept licence) 15 | RUN add-apt-repository -y ppa:webupd8team/java \ 16 | && apt-get update \ 17 | && echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections \ 18 | && apt-get install -y oracle-java8-installer 19 | 20 | # install Consonance services 21 | ENV consonance_version={{ CONSONANCE_BINARY_VERSION }} 22 | 23 | RUN wget --no-verbose https://github.com/Consonance/consonance/releases/download/${consonance_version}/consonance-webservice-${consonance_version}.jar 24 | 25 | # install dockerize 26 | ENV DOCKERIZE_VERSION v0.2.0 27 | 28 | RUN wget --no-verbose https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ 29 | && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz 30 | 31 | # the web and Consonance config 32 | COPY config . 33 | COPY web.yml . 34 | ADD init_webservice.sh . 35 | 36 | RUN chmod u+x init_webservice.sh 37 | # TODO: make sure you create these from the .template files and customize them 38 | COPY config /root/.consonance/config 39 | RUN mkdir /consonance_logs && chmod a+rx /consonance_logs 40 | 41 | # TODO: 1) update the above to have my AWS creds in it and 2) create the admin user in postgres db 42 | # Waiting for postgres and rabbitmq services 43 | CMD ["dockerize", "-wait", "tcp://postgres:5432", "-wait", "tcp://rabbitmq:5672", "-timeout", "60s", "./init_webservice.sh"] 44 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/ApiResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import java.util.List; 17 | import java.util.Map; 18 | 19 | /** 20 | * API response returned by API call. 21 | * 22 | * @param The type of data that is deserialized from response body 23 | */ 24 | public class ApiResponse { 25 | final private int statusCode; 26 | final private Map> headers; 27 | final private T data; 28 | 29 | /** 30 | * @param statusCode The status code of HTTP response 31 | * @param headers The headers of HTTP response 32 | */ 33 | public ApiResponse(int statusCode, Map> headers) { 34 | this(statusCode, headers, null); 35 | } 36 | 37 | /** 38 | * @param statusCode The status code of HTTP response 39 | * @param headers The headers of HTTP response 40 | * @param data The object deserialized from response bod 41 | */ 42 | public ApiResponse(int statusCode, Map> headers, T data) { 43 | this.statusCode = statusCode; 44 | this.headers = headers; 45 | this.data = data; 46 | } 47 | 48 | public int getStatusCode() { 49 | return statusCode; 50 | } 51 | 52 | public Map> getHeaders() { 53 | return headers; 54 | } 55 | 56 | public T getData() { 57 | return data; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /consonance-client/src/main/java/io/consonance/client/WebClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | package io.consonance.client; 21 | 22 | import io.consonance.common.Constants; 23 | import io.swagger.client.ApiClient; 24 | import org.apache.commons.configuration.HierarchicalINIConfiguration; 25 | 26 | import java.io.IOException; 27 | import java.util.concurrent.TimeoutException; 28 | 29 | /** 30 | * This will eventually be our web client for the consonance web service. 31 | */ 32 | public class WebClient extends ApiClient { 33 | public WebClient() { 34 | super(); 35 | } 36 | 37 | public WebClient(HierarchicalINIConfiguration parseConfig) throws IOException, TimeoutException{ 38 | this(parseConfig.getString(Constants.WEBSERVICE_BASE_PATH), parseConfig.getString(Constants.WEBSERVICE_TOKEN)); 39 | } 40 | 41 | public WebClient(String basePath, String token){ 42 | setBasePath(basePath); 43 | addDefaultHeader("Authorization", "Bearer " + token); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/StringUtil.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client; 2 | 3 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 4 | public class StringUtil { 5 | /** 6 | * Check if the given array contains the given value (with case-insensitive comparison). 7 | * 8 | * @param array The array 9 | * @param value The value to search 10 | * @return true if the array contains the value 11 | */ 12 | public static boolean containsIgnoreCase(String[] array, String value) { 13 | for (String str : array) { 14 | if (value == null && str == null) return true; 15 | if (value != null && value.equalsIgnoreCase(str)) return true; 16 | } 17 | return false; 18 | } 19 | 20 | /** 21 | * Join an array of strings with the given separator. 22 | *

23 | * Note: This might be replaced by utility method from commons-lang or guava someday 24 | * if one of those libraries is added as dependency. 25 | *

26 | * 27 | * @param array The array of strings 28 | * @param separator The separator 29 | * @return the resulting string 30 | */ 31 | public static String join(String[] array, String separator) { 32 | int len = array.length; 33 | if (len == 0) return ""; 34 | 35 | StringBuilder out = new StringBuilder(); 36 | out.append(array[0]); 37 | for (int i = 1; i < len; i++) { 38 | out.append(separator).append(array[i]); 39 | } 40 | return out.toString(); 41 | } 42 | 43 | /** 44 | * Convert the given object to string with each line indented by 4 spaces 45 | * (except the first line). 46 | */ 47 | public static String toIndentedString(Object o) { 48 | if (o == null) return "null"; 49 | return o.toString().replace("\n", "\n "); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/JobsApi.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | import io.consonance.webservice.core.ConsonanceUser; 4 | import io.dropwizard.auth.Auth; 5 | import io.dropwizard.hibernate.UnitOfWork; 6 | import io.swagger.annotations.ApiParam; 7 | import io.swagger.workflow.api.factories.JobsApiServiceFactory; 8 | import io.swagger.workflow.model.JobStatus; 9 | 10 | import javax.ws.rs.GET; 11 | import javax.ws.rs.Path; 12 | import javax.ws.rs.PathParam; 13 | import javax.ws.rs.Produces; 14 | import javax.ws.rs.core.Context; 15 | import javax.ws.rs.core.Response; 16 | import javax.ws.rs.core.UriInfo; 17 | 18 | @Path("/jobs") 19 | 20 | @Produces({ "application/json" }) 21 | @io.swagger.annotations.Api(description = "the jobs API") 22 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 23 | public class JobsApi { 24 | private final JobsApiService delegate = JobsApiServiceFactory.getJobsApi(); 25 | 26 | @Context 27 | private UriInfo uriInfo; 28 | 29 | @GET 30 | @Path("/{jobId}") 31 | @UnitOfWork 32 | @Produces({ "application/json" }) 33 | @io.swagger.annotations.ApiOperation(value = "", notes = "Get status for a workflow ", response = JobStatus.class, tags={ "GA4GH-workflow-execution" }) 34 | @io.swagger.annotations.ApiResponses(value = { 35 | @io.swagger.annotations.ApiResponse(code = 200, message = "Description of job including its status", response = JobStatus.class) }) 36 | public Response jobsDescriptorUrlGet( 37 | @ApiParam(value = "URL to descriptor for workflow",required=true) @PathParam("jobId") String jobId, 38 | @Auth ConsonanceUser user) 39 | throws NotFoundException { 40 | return delegate.jobsDescriptorUrlGet(jobId, user, uriInfo); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /consonance-client/src/main/java/io/consonance/client/mix/JobMixIn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | package io.consonance.client.mix; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnore; 23 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 24 | import com.fasterxml.jackson.annotation.JsonProperty; 25 | import io.swagger.client.model.ExtraFile; 26 | import io.swagger.client.model.Job; 27 | 28 | import java.util.Map; 29 | 30 | /** 31 | * @author dyuen 32 | */ 33 | @JsonIgnoreProperties({ "extra_files", "create_timestamp", "update_timestamp" 34 | ,"job_id", "container_image_descriptor", "container_runtime_descriptor", "end_user", "stdout", "stderr"}) 35 | public interface JobMixIn { 36 | 37 | @JsonProperty("job_uuid") 38 | String getJobUuid(); 39 | 40 | @JsonProperty("flavour") 41 | String getFlavour(); 42 | 43 | @JsonProperty("state") 44 | Job.StateEnum getState(); 45 | 46 | @JsonIgnore() 47 | @JsonProperty("extra_files") 48 | Map getExtraFiles(); 49 | } 50 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/Ga4ghApiService.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | import io.swagger.wes.api.*; 4 | import io.swagger.wes.model.*; 5 | 6 | import org.glassfish.jersey.media.multipart.FormDataContentDisposition; 7 | 8 | import io.swagger.wes.model.Ga4ghWesServiceInfo; 9 | import io.swagger.wes.model.Ga4ghWesWorkflowListResponse; 10 | import io.swagger.wes.model.Ga4ghWesWorkflowLog; 11 | import io.swagger.wes.model.Ga4ghWesWorkflowRequest; 12 | import io.swagger.wes.model.Ga4ghWesWorkflowRunId; 13 | import io.swagger.wes.model.Ga4ghWesWorkflowStatus; 14 | 15 | import java.io.IOException; 16 | import java.util.List; 17 | import io.swagger.wes.api.NotFoundException; 18 | 19 | import io.consonance.webservice.core.ConsonanceUser; 20 | 21 | import java.io.InputStream; 22 | import java.util.concurrent.TimeoutException; 23 | 24 | import javax.ws.rs.core.Response; 25 | import javax.ws.rs.core.SecurityContext; 26 | import javax.validation.constraints.*; 27 | 28 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 29 | public abstract class Ga4ghApiService { 30 | public abstract Response cancelJob(String workflowId, ConsonanceUser user) throws NotFoundException; 31 | public abstract Response getServiceInfo(ConsonanceUser user) throws NotFoundException; 32 | public abstract Response getWorkflowLog(String workflowId, ConsonanceUser user) throws NotFoundException; 33 | public abstract Response getWorkflowStatus(String workflowId, ConsonanceUser user) throws NotFoundException; 34 | public abstract Response listWorkflows(Long pageSize, String pageToken, String keyValueSearch, ConsonanceUser user) throws NotFoundException; 35 | public abstract Response runWorkflow(Ga4ghWesWorkflowRequest body, ConsonanceUser user) throws NotFoundException, IOException, TimeoutException; 36 | } 37 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/testFinalHeartbeat.txt: -------------------------------------------------------------------------------- 1 | Performing launch of workflow 'HelloWorld' version '1.0-SNAPSHOT' 2 | [--plugin, net.sourceforge.seqware.pipeline.plugins.BundleManager, --, --install-dir-only, --bundle, /workflow, --out, /tmp/bundle_manager_LONG_NUMERIC_SEQUENCEout] 3 | Installing Bundle (Working Directory Only) 4 | Bundle: /workflow 5 | Added 'HelloWorld' (SWID: 1) 6 | Bundle Has Been Installed to the MetaDB and Provisioned to /workflow! 7 | [--plugin, io.seqware.pipeline.plugins.WorkflowScheduler, --, --workflow-accession, 1, --host, master, --out, /tmp/schedulerLONG_NUMERIC_SEQUENCEout, --i, /ini, --no-meta-db, --] 8 | Created workflow run with SWID: 10 9 | [--plugin, io.seqware.pipeline.plugins.WorkflowLauncher, --, --launch-scheduled, 10] 10 | [0000/00/00 00:00:00] | Number of submitted workflows: 1 11 | Working Run: 10 12 | Valid run by host check: 10 13 | Launching via new launcher: 10 14 | Using working directory: /datastore/JOB_ID 15 | [0000/00/00 00:00:00] | Running command: bash /datastore/JOB_ID/generated-scripts/s10_start_0-runner.sh 16 | [0000/00/00 00:00:00] | Running command: bash /datastore/JOB_ID/generated-scripts/s10_pfi_file_in_0_1-runner.sh 17 | [0000/00/00 00:00:00] | Running command: bash /datastore/JOB_ID/generated-scripts/s10_bash_mkdir_2-runner.sh 18 | [0000/00/00 00:00:00] | Running command: bash /datastore/JOB_ID/generated-scripts/s10_bash_cp_3-runner.sh 19 | [0000/00/00 00:00:00] | Running command: bash /datastore/JOB_ID/generated-scripts/s10_bash_cp_4-runner.sh 20 | [0000/00/00 00:00:00] | Running command: bash /datastore/JOB_ID/generated-scripts/s10_pfo_5-runner.sh 21 | [0000/00/00 00:00:00] | Setting workflow-run status to complete for: 10 22 | [--plugin, io.seqware.pipeline.plugins.WorkflowWatcher, --, --workflow-run-accession, 10] 23 | Workflow run 10 is now completed 24 | [--plugin, net.sourceforge.seqware.pipeline.plugins.WorkflowStatusChecker, --, --workflow-run-accession, 10] -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/wes/api/ApiResponseMessage.java: -------------------------------------------------------------------------------- 1 | package io.swagger.wes.api; 2 | 3 | import javax.xml.bind.annotation.XmlTransient; 4 | 5 | @javax.xml.bind.annotation.XmlRootElement 6 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2017-09-15T17:06:31.319-07:00") 7 | public class ApiResponseMessage { 8 | public static final int ERROR = 1; 9 | public static final int WARNING = 2; 10 | public static final int INFO = 3; 11 | public static final int OK = 4; 12 | public static final int TOO_BUSY = 5; 13 | 14 | int code; 15 | String type; 16 | String message; 17 | 18 | public ApiResponseMessage(){} 19 | 20 | public ApiResponseMessage(int code, String message){ 21 | this.code = code; 22 | switch(code){ 23 | case ERROR: 24 | setType("error"); 25 | break; 26 | case WARNING: 27 | setType("warning"); 28 | break; 29 | case INFO: 30 | setType("info"); 31 | break; 32 | case OK: 33 | setType("ok"); 34 | break; 35 | case TOO_BUSY: 36 | setType("too busy"); 37 | break; 38 | default: 39 | setType("unknown"); 40 | break; 41 | } 42 | this.message = message; 43 | } 44 | 45 | @XmlTransient 46 | public int getCode() { 47 | return code; 48 | } 49 | 50 | public void setCode(int code) { 51 | this.code = code; 52 | } 53 | 54 | public String getType() { 55 | return type; 56 | } 57 | 58 | public void setType(String type) { 59 | this.type = type; 60 | } 61 | 62 | public String getMessage() { 63 | return message; 64 | } 65 | 66 | public void setMessage(String message) { 67 | this.message = message; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/task/model/Ga4ghTaskExecJobId.java: -------------------------------------------------------------------------------- 1 | package io.swagger.task.model; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import io.swagger.annotations.ApiModelProperty; 5 | 6 | import java.util.Objects; 7 | 8 | 9 | 10 | 11 | 12 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-12T15:19:07.784Z") 13 | public class Ga4ghTaskExecJobId { 14 | 15 | private String value = null; 16 | 17 | /** 18 | **/ 19 | public Ga4ghTaskExecJobId value(String value) { 20 | this.value = value; 21 | return this; 22 | } 23 | 24 | 25 | @ApiModelProperty(value = "") 26 | @JsonProperty("value") 27 | public String getValue() { 28 | return value; 29 | } 30 | public void setValue(String value) { 31 | this.value = value; 32 | } 33 | 34 | 35 | @Override 36 | public boolean equals(Object o) { 37 | if (this == o) { 38 | return true; 39 | } 40 | if (o == null || getClass() != o.getClass()) { 41 | return false; 42 | } 43 | Ga4ghTaskExecJobId ga4ghTaskExecJobId = (Ga4ghTaskExecJobId) o; 44 | return Objects.equals(value, ga4ghTaskExecJobId.value); 45 | } 46 | 47 | @Override 48 | public int hashCode() { 49 | return Objects.hash(value); 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | StringBuilder sb = new StringBuilder(); 55 | sb.append("class Ga4ghTaskExecJobId {\n"); 56 | 57 | sb.append(" value: ").append(toIndentedString(value)).append("\n"); 58 | sb.append("}"); 59 | return sb.toString(); 60 | } 61 | 62 | /** 63 | * Convert the given object to string with each line indented by 4 spaces 64 | * (except the first line). 65 | */ 66 | private String toIndentedString(Object o) { 67 | if (o == null) { 68 | return "null"; 69 | } 70 | return o.toString().replace("\n", "\n "); 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/JSON.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client; 2 | 3 | import com.fasterxml.jackson.annotation.*; 4 | import com.fasterxml.jackson.databind.*; 5 | import com.fasterxml.jackson.datatype.joda.*; 6 | 7 | import java.io.IOException; 8 | 9 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 10 | public class JSON { 11 | private ObjectMapper mapper; 12 | 13 | public JSON() { 14 | mapper = new ObjectMapper(); 15 | mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); 16 | mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); 17 | mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); 18 | mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); 19 | mapper.registerModule(new JodaModule()); 20 | } 21 | 22 | /** 23 | * Serialize the given Java object into JSON string. 24 | */ 25 | public String serialize(Object obj) throws ApiException { 26 | try { 27 | if (obj != null) 28 | return mapper.writeValueAsString(obj); 29 | else 30 | return null; 31 | } catch (Exception e) { 32 | throw new ApiException(400, e.getMessage()); 33 | } 34 | } 35 | 36 | /** 37 | * Deserialize the given JSON string to Java object. 38 | * 39 | * @param body The JSON string 40 | * @param returnType The type to deserialize inot 41 | * @return The deserialized Java object 42 | */ 43 | public T deserialize(String body, TypeRef returnType) throws ApiException { 44 | JavaType javaType = mapper.constructType(returnType.getType()); 45 | try { 46 | return mapper.readValue(body, javaType); 47 | } catch (IOException e) { 48 | if (returnType.getType().equals(String.class)) 49 | return (T) body; 50 | else 51 | throw new ApiException(500, e.getMessage(), null, body); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/StringUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-12-07T15:00:20.150-08:00") 17 | public class StringUtil { 18 | /** 19 | * Check if the given array contains the given value (with case-insensitive comparison). 20 | * 21 | * @param array The array 22 | * @param value The value to search 23 | * @return true if the array contains the value 24 | */ 25 | public static boolean containsIgnoreCase(String[] array, String value) { 26 | for (String str : array) { 27 | if (value == null && str == null) return true; 28 | if (value != null && value.equalsIgnoreCase(str)) return true; 29 | } 30 | return false; 31 | } 32 | 33 | /** 34 | * Join an array of strings with the given separator. 35 | *

36 | * Note: This might be replaced by utility method from commons-lang or guava someday 37 | * if one of those libraries is added as dependency. 38 | *

39 | * 40 | * @param array The array of strings 41 | * @param separator The separator 42 | * @return the resulting string 43 | */ 44 | public static String join(String[] array, String separator) { 45 | int len = array.length; 46 | if (len == 0) return ""; 47 | 48 | StringBuilder out = new StringBuilder(); 49 | out.append(array[0]); 50 | for (int i = 1; i < len; i++) { 51 | out.append(separator).append(array[i]); 52 | } 53 | return out.toString(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/jdbi/JobDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.webservice.jdbi; 20 | 21 | import io.consonance.arch.beans.Job; 22 | import io.dropwizard.hibernate.AbstractDAO; 23 | import org.hibernate.SessionFactory; 24 | 25 | import java.util.List; 26 | 27 | /** 28 | * 29 | * @author dyuen 30 | */ 31 | public class JobDAO extends AbstractDAO { 32 | public JobDAO(SessionFactory factory) { 33 | super(factory); 34 | } 35 | 36 | public Job findById(int id) { 37 | return get(id); 38 | } 39 | 40 | public int create(Job job) { 41 | return persist(job).getJobId(); 42 | } 43 | 44 | public List findAll() { 45 | return list(namedQuery("io.consonance.arch.beans.core.Job.findAll")); 46 | } 47 | 48 | public Job findJobByUUID(String uuid){ 49 | return uniqueResult(namedQuery("io.consonance.arch.beans.core.Job.findByJobUUID").setString("jobuuid",uuid)); 50 | } 51 | 52 | public List findAll(String endUser) { 53 | return list(namedQuery("io.consonance.arch.beans.core.Job.findAllByUser").setString("endUser",endUser)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/auth/ApiKeyAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.auth; 15 | 16 | import io.swagger.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-12-07T15:00:20.150-08:00") 22 | public class ApiKeyAuth implements Authentication { 23 | private final String location; 24 | private final String paramName; 25 | 26 | private String apiKey; 27 | private String apiKeyPrefix; 28 | 29 | public ApiKeyAuth(String location, String paramName) { 30 | this.location = location; 31 | this.paramName = paramName; 32 | } 33 | 34 | public String getLocation() { 35 | return location; 36 | } 37 | 38 | public String getParamName() { 39 | return paramName; 40 | } 41 | 42 | public String getApiKey() { 43 | return apiKey; 44 | } 45 | 46 | public void setApiKey(String apiKey) { 47 | this.apiKey = apiKey; 48 | } 49 | 50 | public String getApiKeyPrefix() { 51 | return apiKeyPrefix; 52 | } 53 | 54 | public void setApiKeyPrefix(String apiKeyPrefix) { 55 | this.apiKeyPrefix = apiKeyPrefix; 56 | } 57 | 58 | @Override 59 | public void applyToParams(List queryParams, Map headerParams) { 60 | if (apiKey == null) { 61 | return; 62 | } 63 | String value; 64 | if (apiKeyPrefix != null) { 65 | value = apiKeyPrefix + " " + apiKey; 66 | } else { 67 | value = apiKey; 68 | } 69 | if ("query".equals(location)) { 70 | queryParams.add(new Pair(paramName, value)); 71 | } else if ("header".equals(location)) { 72 | headerParams.put(paramName, value); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/swagger/workflow/api/RunApi.java: -------------------------------------------------------------------------------- 1 | package io.swagger.workflow.api; 2 | 3 | import io.consonance.webservice.core.ConsonanceUser; 4 | import io.dropwizard.auth.Auth; 5 | import io.dropwizard.hibernate.UnitOfWork; 6 | import io.swagger.annotations.ApiParam; 7 | import io.swagger.workflow.api.factories.RunApiServiceFactory; 8 | import org.glassfish.jersey.media.multipart.FormDataContentDisposition; 9 | import org.glassfish.jersey.media.multipart.FormDataParam; 10 | 11 | import javax.ws.rs.Consumes; 12 | import javax.ws.rs.POST; 13 | import javax.ws.rs.Path; 14 | import javax.ws.rs.Produces; 15 | import javax.ws.rs.QueryParam; 16 | import javax.ws.rs.core.Context; 17 | import javax.ws.rs.core.MediaType; 18 | import javax.ws.rs.core.Response; 19 | import javax.ws.rs.core.UriInfo; 20 | import java.io.InputStream; 21 | 22 | @Path("/run") 23 | 24 | @Produces({ "application/json" }) 25 | @io.swagger.annotations.Api(description = "the run API") 26 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaJerseyServerCodegen", date = "2016-07-11T20:20:51.265Z") 27 | public class RunApi { 28 | private final RunApiService delegate = RunApiServiceFactory.getRunApi(); 29 | 30 | @Context 31 | private UriInfo uriInfo; 32 | 33 | @POST 34 | @UnitOfWork 35 | @Consumes({ MediaType.MULTIPART_FORM_DATA }) 36 | @Produces({ "application/json" }) 37 | @io.swagger.annotations.ApiOperation(value = "", notes = "Submit launch of a workflow ", response = void.class, tags={ "GA4GH-workflow-execution" }) 38 | @io.swagger.annotations.ApiResponses(value = { 39 | @io.swagger.annotations.ApiResponse(code = 303, message = "Successful response", response = void.class) }) 40 | public Response runPost( 41 | @ApiParam(value = "URL to descriptor for workflow",required=true) @QueryParam("wf") String wf, 42 | @FormDataParam("file") InputStream inputStream, 43 | @FormDataParam("file") FormDataContentDisposition fileDetail, 44 | @Auth ConsonanceUser user) 45 | throws NotFoundException { 46 | return delegate.runPost(wf,inputStream, fileDetail,user, uriInfo); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/ApiCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client; 15 | 16 | import java.io.IOException; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | /** 22 | * Callback for asynchronous API call. 23 | * 24 | * @param The return type 25 | */ 26 | public interface ApiCallback { 27 | /** 28 | * This is called when the API call fails. 29 | * 30 | * @param e The exception causing the failure 31 | * @param statusCode Status code of the response if available, otherwise it would be 0 32 | * @param responseHeaders Headers of the response if available, otherwise it would be null 33 | */ 34 | void onFailure(ApiException e, int statusCode, Map> responseHeaders); 35 | 36 | /** 37 | * This is called when the API call succeeded. 38 | * 39 | * @param result The result deserialized from response 40 | * @param statusCode Status code of the response 41 | * @param responseHeaders Headers of the response 42 | */ 43 | void onSuccess(T result, int statusCode, Map> responseHeaders); 44 | 45 | /** 46 | * This is called when the API upload processing. 47 | * 48 | * @param bytesWritten bytes Written 49 | * @param contentLength content length of request body 50 | * @param done write end 51 | */ 52 | void onUploadProgress(long bytesWritten, long contentLength, boolean done); 53 | 54 | /** 55 | * This is called when the API downlond processing. 56 | * 57 | * @param bytesRead bytes Read 58 | * @param contentLength content lenngth of the response 59 | * @param done Read end 60 | */ 61 | void onDownloadProgress(long bytesRead, long contentLength, boolean done); 62 | } 63 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/jdbi/ConsonanceUserDAO.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.webservice.jdbi; 20 | 21 | import io.consonance.webservice.core.ConsonanceUser; 22 | import io.dropwizard.hibernate.AbstractDAO; 23 | import org.hibernate.SessionFactory; 24 | 25 | import java.util.List; 26 | 27 | /** 28 | * 29 | * @author dyuen 30 | */ 31 | public class ConsonanceUserDAO extends AbstractDAO { 32 | public ConsonanceUserDAO(SessionFactory factory) { 33 | super(factory); 34 | } 35 | 36 | public ConsonanceUser findById(int id) { 37 | return get(id); 38 | } 39 | 40 | public int create(ConsonanceUser user) { 41 | return persist(user).getUserID(); 42 | } 43 | 44 | public List findAll() { 45 | return list(namedQuery("io.consonance.webservice.core.ConsonanceUser.findAll")); 46 | } 47 | 48 | public ConsonanceUser findUserByName(String name){ 49 | return uniqueResult(namedQuery("io.consonance.webservice.core.ConsonanceUser.findByName").setString("name",name)); 50 | } 51 | 52 | public ConsonanceUser findUserByHashedPassword(String hashedPassword){ 53 | return uniqueResult(namedQuery("io.consonance.webservice.core.ConsonanceUser.findByPassword").setString("hashedPassword",hashedPassword)); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/model/Ga4ghWesParameterTypes.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | 19 | import java.io.IOException; 20 | import com.google.gson.TypeAdapter; 21 | import com.google.gson.annotations.JsonAdapter; 22 | import com.google.gson.stream.JsonReader; 23 | import com.google.gson.stream.JsonWriter; 24 | 25 | /** 26 | * Gets or Sets ga4gh_wes_parameter_types 27 | */ 28 | @JsonAdapter(Ga4ghWesParameterTypes.Adapter.class) 29 | public enum Ga4ghWesParameterTypes { 30 | 31 | DIRECTORY("Directory"), 32 | 33 | FILE("File"), 34 | 35 | PARAMETER("Parameter"); 36 | 37 | private String value; 38 | 39 | Ga4ghWesParameterTypes(String value) { 40 | this.value = value; 41 | } 42 | 43 | public String getValue() { 44 | return value; 45 | } 46 | 47 | @Override 48 | public String toString() { 49 | return String.valueOf(value); 50 | } 51 | 52 | public static Ga4ghWesParameterTypes fromValue(String text) { 53 | for (Ga4ghWesParameterTypes b : Ga4ghWesParameterTypes.values()) { 54 | if (String.valueOf(b.value).equals(text)) { 55 | return b; 56 | } 57 | } 58 | return null; 59 | } 60 | 61 | public static class Adapter extends TypeAdapter { 62 | @Override 63 | public void write(final JsonWriter jsonWriter, final Ga4ghWesParameterTypes enumeration) throws IOException { 64 | jsonWriter.value(enumeration.getValue()); 65 | } 66 | 67 | @Override 68 | public Ga4ghWesParameterTypes read(final JsonReader jsonReader) throws IOException { 69 | String value = jsonReader.nextString(); 70 | return Ga4ghWesParameterTypes.fromValue(String.valueOf(value)); 71 | } 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /consonance-arch/src/main/java/io/consonance/arch/worker/WorkflowResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch.worker; 20 | 21 | /** 22 | * 23 | * @author dyuen 24 | */ 25 | class WorkflowResult { 26 | private String workflowStdout = "no stdout"; 27 | private String workflowStdErr = "no stderr"; 28 | private int exitCode = Integer.MIN_VALUE; 29 | 30 | /** 31 | * @return the workflowStdout 32 | */ 33 | String getWorkflowStdout() { 34 | return workflowStdout; 35 | } 36 | 37 | /** 38 | * @param workflowStdout 39 | * the workflowStdout to set 40 | */ 41 | void setWorkflowStdout(String workflowStdout) { 42 | this.workflowStdout = workflowStdout; 43 | } 44 | 45 | /** 46 | * @return the exitCode 47 | */ 48 | int getExitCode() { 49 | return exitCode; 50 | } 51 | 52 | /** 53 | * @param exitCode 54 | * the exitCode to set 55 | */ 56 | void setExitCode(int exitCode) { 57 | this.exitCode = exitCode; 58 | } 59 | 60 | /** 61 | * @return the workflowStdErr 62 | */ 63 | String getWorkflowStdErr() { 64 | return workflowStdErr; 65 | } 66 | 67 | /** 68 | * @param workflowStdErr the workflowStdErr to set 69 | */ 70 | void setWorkflowStdErr(String workflowStdErr) { 71 | this.workflowStdErr = workflowStdErr; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /consonance-webservice/src/main/java/io/consonance/webservice/SimpleJPAAuthenticator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | package io.consonance.webservice; 21 | 22 | import io.consonance.webservice.core.ConsonanceUser; 23 | import io.consonance.webservice.jdbi.ConsonanceUserDAO; 24 | import io.dropwizard.auth.AuthenticationException; 25 | import io.dropwizard.auth.Authenticator; 26 | import io.dropwizard.hibernate.UnitOfWork; 27 | import org.slf4j.Logger; 28 | import org.slf4j.LoggerFactory; 29 | 30 | import java.util.Optional; 31 | 32 | /** 33 | * @author dyuen 34 | */ 35 | public class SimpleJPAAuthenticator implements Authenticator { 36 | 37 | private final ConsonanceUserDAO dao; 38 | private static final Logger LOG = LoggerFactory.getLogger(SimpleJPAAuthenticator.class); 39 | 40 | public SimpleJPAAuthenticator(ConsonanceUserDAO dao){ 41 | this.dao = dao; 42 | } 43 | 44 | @UnitOfWork 45 | @Override 46 | public Optional authenticate(String credentials) throws AuthenticationException { 47 | LOG.info("SimpleJPAAuthenticator called with " + credentials); 48 | final ConsonanceUser userByName = dao.findUserByHashedPassword(credentials); 49 | if (userByName != null){ 50 | return Optional.of(userByName); 51 | } 52 | return Optional.empty(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/api/ConfigurationApi.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client.api; 2 | 3 | import io.swagger.client.ApiException; 4 | import io.swagger.client.ApiClient; 5 | import io.swagger.client.Configuration; 6 | import io.swagger.client.Pair; 7 | import io.swagger.client.TypeRef; 8 | 9 | import io.swagger.client.model.*; 10 | 11 | import java.util.*; 12 | 13 | 14 | import java.io.File; 15 | import java.util.Map; 16 | import java.util.HashMap; 17 | 18 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 19 | public class ConfigurationApi { 20 | private ApiClient apiClient; 21 | 22 | public ConfigurationApi() { 23 | this(Configuration.getDefaultApiClient()); 24 | } 25 | 26 | public ConfigurationApi(ApiClient apiClient) { 27 | this.apiClient = apiClient; 28 | } 29 | 30 | public ApiClient getApiClient() { 31 | return apiClient; 32 | } 33 | 34 | public void setApiClient(ApiClient apiClient) { 35 | this.apiClient = apiClient; 36 | } 37 | 38 | 39 | /** 40 | * List configuration 41 | * List configuration for debugging 42 | * @return String 43 | */ 44 | public String listConfiguration () throws ApiException { 45 | Object postBody = null; 46 | 47 | // create path and map variables 48 | String path = "/configuration".replaceAll("\\{format\\}","json"); 49 | 50 | // query params 51 | List queryParams = new ArrayList(); 52 | Map headerParams = new HashMap(); 53 | Map formParams = new HashMap(); 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | final String[] accepts = { 62 | "application/json" 63 | }; 64 | final String accept = apiClient.selectHeaderAccept(accepts); 65 | 66 | final String[] contentTypes = { 67 | 68 | }; 69 | final String contentType = apiClient.selectHeaderContentType(contentTypes); 70 | 71 | String[] authNames = new String[] { }; 72 | 73 | 74 | TypeRef returnType = new TypeRef() {}; 75 | return apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType); 76 | 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /consonance-arch/init.d/sample_worker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: genetic-algo-worker 4 | # Required-Start: $local_fs $network $named $time $syslog 5 | # Required-Stop: $local_fs $network $named $time $syslog 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # Description: the genetic-algo-worker daemon 9 | ### END INIT INFO 10 | 11 | SCRIPT="java -cp /usr/local/genetic-algo/1.0.0-genetic-algo/genetic-algo-1.0.0.jar com.nimbusinformatics.genetic.algo.Worker" 12 | RUNAS=root 13 | NAME=genetic-algo-worker 14 | 15 | PIDFILE=/var/run/$NAME.pid 16 | LOGFILE=/var/log/$NAME.log 17 | 18 | start() { 19 | if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then 20 | echo 'Service already running' >&2 21 | return 1 22 | fi 23 | echo 'Starting service…' >&2 24 | local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!" 25 | su -c "$CMD" $RUNAS > "$PIDFILE" 26 | echo 'Service started' >&2 27 | } 28 | 29 | stop() { 30 | if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then 31 | echo 'Service not running' >&2 32 | return 1 33 | fi 34 | echo 'Stopping service…' >&2 35 | kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE" 36 | echo 'Service stopped' >&2 37 | } 38 | 39 | uninstall() { 40 | echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] " 41 | local SURE 42 | read SURE 43 | if [ "$SURE" = "yes" ]; then 44 | stop 45 | rm -f "$PIDFILE" 46 | echo "Notice: log file was not removed: '$LOGFILE'" >&2 47 | update-rc.d -f remove 48 | rm -fv "$0" 49 | fi 50 | } 51 | 52 | status() { 53 | printf "%-50s" "Checking $NAME..." 54 | if [ -f $PIDFILE ]; then 55 | PID=$(cat $PIDFILE) 56 | if [ -z "$(ps axf | grep ${PID} | grep -v grep)" ]; then 57 | printf "%s\n" "The process appears to be dead but pidfile still exists" 58 | else 59 | echo "Running, the PID is $PID" 60 | fi 61 | else 62 | printf "%s\n" "Service not running" 63 | fi 64 | } 65 | 66 | 67 | case "$1" in 68 | start) 69 | start 70 | ;; 71 | stop) 72 | stop 73 | ;; 74 | status) 75 | status 76 | ;; 77 | uninstall) 78 | uninstall 79 | ;; 80 | restart) 81 | stop 82 | start 83 | ;; 84 | *) 85 | echo "Usage: $0 {start|stop|status|restart|uninstall}" 86 | esac 87 | -------------------------------------------------------------------------------- /swagger-java-client/src/main/java/io/swagger/client/ApiException.java: -------------------------------------------------------------------------------- 1 | package io.swagger.client; 2 | 3 | import java.util.Map; 4 | import java.util.List; 5 | 6 | @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2015-10-22T21:18:50.332Z") 7 | public class ApiException extends Exception { 8 | private int code = 0; 9 | private Map> responseHeaders = null; 10 | private String responseBody = null; 11 | 12 | public ApiException() {} 13 | 14 | public ApiException(Throwable throwable) { 15 | super(throwable); 16 | } 17 | 18 | public ApiException(String message) { 19 | super(message); 20 | } 21 | 22 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { 23 | super(message, throwable); 24 | this.code = code; 25 | this.responseHeaders = responseHeaders; 26 | this.responseBody = responseBody; 27 | } 28 | 29 | public ApiException(String message, int code, Map> responseHeaders, String responseBody) { 30 | this(message, (Throwable) null, code, responseHeaders, responseBody); 31 | } 32 | 33 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { 34 | this(message, throwable, code, responseHeaders, null); 35 | } 36 | 37 | public ApiException(int code, Map> responseHeaders, String responseBody) { 38 | this((String) null, (Throwable) null, code, responseHeaders, responseBody); 39 | } 40 | 41 | public ApiException(int code, String message) { 42 | super(message); 43 | this.code = code; 44 | } 45 | 46 | public ApiException(int code, String message, Map> responseHeaders, String responseBody) { 47 | this(code, message); 48 | this.responseHeaders = responseHeaders; 49 | this.responseBody = responseBody; 50 | } 51 | 52 | public int getCode() { 53 | return code; 54 | } 55 | 56 | /** 57 | * Get the HTTP response headers. 58 | */ 59 | public Map> getResponseHeaders() { 60 | return responseHeaders; 61 | } 62 | 63 | /** 64 | * Get the HTTP response body. 65 | */ 66 | public String getResponseBody() { 67 | return responseBody; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /swagger-ga4gh-client/src/main/java/io/swagger/client/model/Ga4ghWesState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * workflow_execution.proto 3 | * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) 4 | * 5 | * OpenAPI spec version: version not set 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package io.swagger.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | 19 | import java.io.IOException; 20 | import com.google.gson.TypeAdapter; 21 | import com.google.gson.annotations.JsonAdapter; 22 | import com.google.gson.stream.JsonReader; 23 | import com.google.gson.stream.JsonWriter; 24 | 25 | /** 26 | * Gets or Sets ga4gh_wes_state 27 | */ 28 | @JsonAdapter(Ga4ghWesState.Adapter.class) 29 | public enum Ga4ghWesState { 30 | 31 | UNKNOWN("Unknown"), 32 | 33 | QUEUED("Queued"), 34 | 35 | RUNNING("Running"), 36 | 37 | PAUSED("Paused"), 38 | 39 | COMPLETE("Complete"), 40 | 41 | ERROR("Error"), 42 | 43 | SYSTEMERROR("SystemError"), 44 | 45 | CANCELED("Canceled"), 46 | 47 | INITIALIZING("Initializing"); 48 | 49 | private String value; 50 | 51 | Ga4ghWesState(String value) { 52 | this.value = value; 53 | } 54 | 55 | public String getValue() { 56 | return value; 57 | } 58 | 59 | @Override 60 | public String toString() { 61 | return String.valueOf(value); 62 | } 63 | 64 | public static Ga4ghWesState fromValue(String text) { 65 | for (Ga4ghWesState b : Ga4ghWesState.values()) { 66 | if (String.valueOf(b.value).equals(text)) { 67 | return b; 68 | } 69 | } 70 | return null; 71 | } 72 | 73 | public static class Adapter extends TypeAdapter { 74 | @Override 75 | public void write(final JsonWriter jsonWriter, final Ga4ghWesState enumeration) throws IOException { 76 | jsonWriter.value(enumeration.getValue()); 77 | } 78 | 79 | @Override 80 | public Ga4ghWesState read(final JsonReader jsonReader) throws IOException { 81 | String value = jsonReader.nextString(); 82 | return Ga4ghWesState.fromValue(String.valueOf(value)); 83 | } 84 | } 85 | } 86 | 87 | -------------------------------------------------------------------------------- /consonance-arch/init.d/sample_master.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ### BEGIN INIT INFO 3 | # Provides: genetic-algo-master 4 | # Required-Start: $local_fs $network $named $time $syslog 5 | # Required-Stop: $local_fs $network $named $time $syslog 6 | # Default-Start: 2 3 4 5 7 | # Default-Stop: 0 1 6 8 | # Description: the genetic-algo-master daemon 9 | ### END INIT INFO 10 | 11 | SCRIPT="java -cp /usr/local/genetic-algo/1.0.0-genetic-algo/genetic-algo-1.0.0.jar com.nimbusinformatics.genetic.algo.Master" 12 | RUNAS=root 13 | NAME=genetic-algo-master 14 | 15 | PIDFILE=/var/run/$NAME.pid 16 | LOGFILE=/var/log/$NAME.log 17 | 18 | start() { 19 | if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then 20 | echo 'Service already running' >&2 21 | return 1 22 | fi 23 | echo 'Starting service…' >&2 24 | local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!" 25 | su -c "$CMD" $RUNAS > "$PIDFILE" 26 | echo 'Service started' >&2 27 | } 28 | 29 | stop() { 30 | if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then 31 | echo 'Service not running' >&2 32 | return 1 33 | fi 34 | echo 'Stopping service…' >&2 35 | kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE" 36 | echo 'Service stopped' >&2 37 | } 38 | 39 | uninstall() { 40 | echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] " 41 | local SURE 42 | read SURE 43 | if [ "$SURE" = "yes" ]; then 44 | stop 45 | rm -f "$PIDFILE" 46 | echo "Notice: log file was not removed: '$LOGFILE'" >&2 47 | update-rc.d -f remove 48 | rm -fv "$0" 49 | fi 50 | } 51 | 52 | status() { 53 | printf "%-50s" "Checking $NAME..." 54 | if [ -f $PIDFILE ]; then 55 | PID=$(cat $PIDFILE) 56 | if [ -z "$(ps axf | grep ${PID} | grep -v grep)" ]; then 57 | printf "%s\n" "The process appears to be dead but pidfile still exists" 58 | else 59 | echo "Running, the PID is $PID" 60 | fi 61 | else 62 | printf "%s\n" "Service not running" 63 | fi 64 | } 65 | 66 | 67 | case "$1" in 68 | start) 69 | start 70 | ;; 71 | stop) 72 | stop 73 | ;; 74 | status) 75 | status 76 | ;; 77 | uninstall) 78 | uninstall 79 | ;; 80 | restart) 81 | stop 82 | start 83 | ;; 84 | *) 85 | echo "Usage: $0 {start|stop|status|restart|uninstall}" 86 | esac 87 | -------------------------------------------------------------------------------- /consonance-arch/src/test/java/io/consonance/arch/containerProvisioner/ContainerProvisionerThreadsIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | package io.consonance.arch.containerProvisioner; 20 | 21 | import io.consonance.common.CommonTestUtilities; 22 | import joptsimple.OptionException; 23 | import org.apache.commons.io.FileUtils; 24 | import org.junit.BeforeClass; 25 | import org.junit.Test; 26 | 27 | import java.io.File; 28 | import java.io.IOException; 29 | import java.util.concurrent.TimeoutException; 30 | 31 | /** 32 | * 33 | * @author dyuen 34 | */ 35 | public class ContainerProvisionerThreadsIT { 36 | 37 | @BeforeClass 38 | public static void setup() throws IOException, TimeoutException { 39 | CommonTestUtilities.clearState(); 40 | } 41 | 42 | /** 43 | * Test of main method, of class ContainerProvisionerThreads. 44 | * 45 | * @throws java.lang.Exception 46 | */ 47 | @Test(expected = OptionException.class) 48 | public void testHelpMessage() throws Exception { 49 | ContainerProvisionerThreads.main(new String[] { "--help" }); 50 | } 51 | 52 | /** 53 | * Test of main method, of class ContainerProvisionerThreads. 54 | * 55 | * @throws java.lang.Exception 56 | */ 57 | @Test 58 | public void testTestModeOperation() throws Exception { 59 | // ideally, we would mock up some orders here 60 | File file = FileUtils.getFile("src", "test", "resources", "config"); 61 | ContainerProvisionerThreads.main(new String[] { "--test", "--config", file.getAbsolutePath() }); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /consonance-arch/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 25 | ./arch3_test.log 26 | 27 | 5 28 | ./arch3_old/arch3_test.%d{YYYY-MM-dd}.%i.log.zip 29 | 30 | 2GB 31 | 32 | 33 | 34 | true 35 | 36 | %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 37 | 38 | 39 | 40 | 41 | 43 | 44 | %-4relative [%thread] %-5level %logger{35} - %msg %n 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /consonance-common/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 25 | ./arch3_test.log 26 | 27 | 5 28 | ./arch3_old/arch3_test.%d{YYYY-MM-dd}.%i.log.zip 29 | 30 | 2GB 31 | 32 | 33 | 34 | true 35 | 36 | %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 37 | 38 | 39 | 40 | 41 | 43 | 44 | %-4relative [%thread] %-5level %logger{35} - %msg %n 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /consonance-reporting/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 25 | ./arch3_test.log 26 | 27 | 5 28 | ./arch3_old/arch3_test.%d{YYYY-MM-dd}.%i.log.zip 29 | 30 | 2GB 31 | 32 | 33 | 34 | true 35 | 36 | %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 37 | 38 | 39 | 40 | 41 | 43 | 44 | %-4relative [%thread] %-5level %logger{35} - %msg %n 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /consonance-server-common/src/test/resources/logback-test.xml: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 23 | 25 | ./arch3_test.log 26 | 27 | 5 28 | ./arch3_old/arch3_test.%d{YYYY-MM-dd}.%i.log.zip 29 | 30 | 2GB 31 | 32 | 33 | 34 | true 35 | 36 | %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 37 | 38 | 39 | 40 | 41 | 43 | 44 | %-4relative [%thread] %-5level %logger{35} - %msg %n 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /consonance-common/src/test/java/BasicPostgresIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Consonance - workflow software for multiple clouds 3 | * Copyright (C) 2016 OICR 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | */ 19 | 20 | import io.consonance.common.BasicPostgreSQL; 21 | import io.consonance.common.CommonTestUtilities; 22 | import org.apache.commons.configuration.HierarchicalINIConfiguration; 23 | import org.apache.commons.io.FileUtils; 24 | import org.junit.After; 25 | import org.junit.AfterClass; 26 | import org.junit.Before; 27 | import org.junit.BeforeClass; 28 | import org.junit.Test; 29 | 30 | import java.io.File; 31 | import java.io.IOException; 32 | import java.util.concurrent.TimeoutException; 33 | 34 | /** 35 | * 36 | * @author dyuen 37 | */ 38 | public class BasicPostgresIT { 39 | private BasicPostgreSQL postgres; 40 | 41 | @BeforeClass 42 | public static void setup() throws IOException, TimeoutException { 43 | CommonTestUtilities.clearState(); 44 | } 45 | 46 | @AfterClass 47 | public static void tearDownClass() throws Exception { 48 | } 49 | 50 | @Before 51 | public void setUp() throws IOException { 52 | File configFile = FileUtils.getFile("src", "test", "resources", "config"); 53 | HierarchicalINIConfiguration parseConfig = CommonTestUtilities.parseConfig(configFile.getAbsolutePath()); 54 | this.postgres = new BasicPostgreSQL(parseConfig); 55 | 56 | // clean up the database 57 | postgres.clearDatabase(); 58 | } 59 | 60 | @After 61 | public void tearDown() throws Exception { 62 | } 63 | 64 | 65 | /** 66 | * Test of clearDatabase method, of class PostgreSQL. 67 | */ 68 | @Test 69 | public void testClearDatabase() { 70 | postgres.clearDatabase(); 71 | } 72 | } 73 | --------------------------------------------------------------------------------