-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathglobals.inc.php.sample
More file actions
214 lines (180 loc) · 10.5 KB
/
Copy pathglobals.inc.php.sample
File metadata and controls
214 lines (180 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<?php
/************************
// Settings
************************/
// Main config
$GLOBALS['SERVER'] = "http://localhost:8088"; // domain
$GLOBALS['BASEURL'] = "/"; // prefix url path. Set "/" for no prefix
$GLOBALS['AppPrefix'] = "PROJECT"; // project url acronym
$GLOBALS['NAME'] = "PROJECT_NAME"; // project name
$GLOBALS['SITETITLE'] = "PROJECT_TITLE | Virtual Research Environment"; // site title
$GLOBALS['TIMEOUT'] = 3600; // session and cookies timeout
$GLOBALS['host_volumes_path'] = "/your_system_path/dockerized_vre/volumes";
$GLOBALS['vre_network_name'] = "open-vre"; //Docker vnet name - make sure consistent with Docker Compose file
// Email
$GLOBALS['mail_credentials'] = __DIR__."/mail.conf"; // SMTP credentials
$GLOBALS['FROMNAME'] = "VRE"; // 'From' for VRE tickets and notifications
$GLOBALS['ADMINMAIL'] = "admin@mail.es"; // BBC address for VRE ticket emails
// SGE
$GLOBALS['queueTask'] = "local.q"; //default queue
// Mongo databases
$GLOBALS['db_credentials'] = __DIR__."/mongo.conf"; // Mongo access
$GLOBALS['dbname_VRE'] = "openVRE"; // Database name
//VRE installation paths
$GLOBALS['root'] = dirname(__DIR__); // VRE root directory
$GLOBALS['shared'] = "/shared_data/"; // VRE data directory
$GLOBALS['logFile'] = $GLOBALS['root']."/logs/application.log"; // Log file path
$GLOBALS['dataDir'] = $GLOBALS['shared']."userdata/"; // User data directory
$GLOBALS['pubDir'] = $GLOBALS['shared']."public/"; // Public data directory
$GLOBALS['sampleDataPath'] = "/var/www/html/openVRE/data/sampleData/"; // Sample data directory
$GLOBALS['sampleData_default'] = "basic"; // Default workspace's dataset entry
// File manager config
$GLOBALS['DISKLIMIT'] = 10*1024*1024*1024; // Default user disk quote (GB)
$GLOBALS['DISKLIMIT_ANON'] = 5*1024*1024*1024; // Default not-registerd disk quote (GB)
$GLOBALS['MAXSIZEUPLOAD'] = 4000; // Maximum upload file size (MB)
$GLOBALS['caduca'] = "182"; // Expiration date for user files (days)
$GLOBALS['project_default'] = "MyFirstProject"; // Default name for user project
$GLOBALS['tmpUser_dir'] = ".tmp/"; // Default name for user temporal forder
// Time zone
$GLOBALS['timezone'] = "UTC";
$GLOBALS['datetime'] = "Y.M.dd HH:mm"; // https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table
$GLOBALS['logs_datetime'] = "dd.M.Y HH:mm:ss";
// Interactive tools
$GLOBALS['NETWORK_IP'] = "172.17.0.1"; # default host ip for docker
$GLOBALS['interactive_range_start_port'] = 9001;
$GLOBALS['max_parallel_independent_tools'] = 10;
// Tool integration models and templates
$GLOBALS['tool_json_schema'] = $GLOBALS['root']."/install/data/tool_schemas/tool_specification/tool_schema.json"; // data model for tool registration
$GLOBALS['tool_io_json_schema'] = $GLOBALS['root']."/install/data/tool_schemas/tool_specification/tool_schema_io.json"; // data model for tool registration - only I/O definition
$GLOBALS['tool_dev_sample'] = $GLOBALS['root']."/install/data/tool_schemas/tool_specification/examples/example.json"; // template for tool registration - step 3
$GLOBALS['tool_io_dev_sample'] = $GLOBALS['root']."/install/data/tool_schemas/tool_specification/examples/example_io.json"; // template for tool registration - step 1 I/O
// Oauth2 authentification
$GLOBALS['auth_required'] = False; // Forces login
$GLOBALS['auth_credentials'] = __DIR__."/oauth2.conf"; // oauth2 client credentials
$GLOBALS['authAdmin_credentials'] = __DIR__."/oauth2_admin.conf"; // oauth2 client credentials with admin privileges
$GLOBALS['authServer'] = 'http://172.21.0.12:8080/auth'; // internal oauth2 server
$GLOBALS['authRealm'] = 'open-vre'; // keycloak realm
$GLOBALS['urlAuthorize' ] = $GLOBALS['authServer'].'/realms/'.$GLOBALS['authRealm'].'/protocol/openid-connect/auth'; //get autorization_code
$GLOBALS['urlAccessToken'] = $GLOBALS['authServer'].'/realms/'.$GLOBALS['authRealm'].'/protocol/openid-connect/token'; //get token
$GLOBALS['urlResourceOwnerDetails']= $GLOBALS['authServer'].'/realms/'.$GLOBALS['authRealm'].'/protocol/openid-connect/userinfo'; //get user details
$GLOBALS['urlLogout'] = $GLOBALS['authServer'].'/realms/'.$GLOBALS['authRealm'].'/protocol/openid-connect/logout'; //close keyclok session
$GLOBALS['adminToken'] = $GLOBALS['authServer']."/realms/master/protocol/openid-connect/token"; // get Admin token
$GLOBALS['adminRealm'] = $GLOBALS['authServer']."/admin/realms/".$GLOBALS['authRealm']; // admin keycloak users
// Vault integration and roles
$GLOBALS['vaultUrl'] = 'http://localhost:8200';
$GLOBALS['vaultToken'] = 'root';
//$jwtToken = $_SESSION['User']['JWT'];
$GLOBALS['vaultRolename'] = 'demo';
$GLOBALS['secretPath'] = 'secret/mysecret/data/';
// EGA
$GLOBALS['EGA_METADATA_TOKEN_ENDPOINT'] = 'https://idp.ega-archive.org/realms/EGA/protocol/openid-connect/token';
$GLOBALS['EGA_METADATA_API'] = 'https://metadata.ega-archive.org';
// Google Analytics
#$GLOBALS['GA_TAG']; // if used, set the id for: https://www.googletagmanager.com/gtag/js?id=
/************************
// Definitions
************************/
// Default names and local path for VRE
$GLOBALS['URL'] = $GLOBALS['SERVER'].$GLOBALS['BASEURL']; // full VRE URL
$GLOBALS['URL_login'] = $GLOBALS['URL']."login.php"; // Default for auth server login
$GLOBALS['htmlPath'] = $GLOBALS['root']. "/public/"; // Default path for public folder
$GLOBALS['htmlib'] = $GLOBALS['htmlPath']."htmlib"; // Default path for html templates
$GLOBALS['appsDir'] = $GLOBALS['shared']."apps/soft/"; // Default path for 3rd party soft in validation
$GLOBALS['internalTools'] = $GLOBALS['shared']."apps/internalTools/"; // Default path for internal tool's code
$GLOBALS['tool_submission_file'] = ".submit"; // Default name for runtime job submission file
$GLOBALS['tool_config_file'] = ".config.json"; // Default name for runtime config file
$GLOBALS['tool_log_file'] = ".tool.log"; //Default name for runtime execution log file
$GLOBALS['tool_stageout_file'] = ".results.json"; // Default name for runtime results file
$GLOBALS['tool_metadata_file'] = ".input_metadata.json"; // Default name for runtime metadata file
// Tool and visualizer status
$GLOBALS['tool_status'] = Array(
0 => "Coming soon",
1 => "Active",
2 => "Disabled",
3 => "Testing"
);
// Accepted values for 'compression' attribute
$GLOBALS['compressions'] = Array(
"zip" => "ZIP",
"bz2" => "BZIP2",
"gz" => "GZIP",
"tgz" => "TAR,GZIP",
"tar.gz"=> "TAR,GZIP",
"tbz2" => "TAR,BZIP2",
"tar.bz2" => "TAR,BZIP2",
"tar.Z" => "TAR,ZIP",
"rar" => "RAR",
"tar" => "TAR"
);
// User Roles
$GLOBALS['ROLES'] = array(
"0"=>"Admin",
"1"=>"Tool Dev.",
"2"=>"Common",
"3" =>"Anonymous"
);
$GLOBALS['NO_GUEST'] = array(0,1,2,100,101); // 100, 101?
$GLOBALS['PREMIUM'] = array(0,1);
$GLOBALS['ADMIN'] = array(0);
$GLOBALS['TOOLDEV'] = array(1);
// Styling
$GLOBALS['ROLES_COLOR'] = array("0"=>"blue", "1"=>"grey-cascade", "2"=>"", 100=>"red-haze", 101=>"yellow-haze");
$GLOBALS['STATES_COLOR'] = array("0"=>"font-red", "1"=>"font-green-meadow", "2"=>"font-blue-steel", 3=>"font-green-meadow", 4=>"font-yellow-mint");
$GLOBALS['FILE_MSG_COLOR'] = array("0"=>"note-danger", "1"=>"note-info", "2"=>"note-success", 3=>"note-info");
$GLOBALS['placeholder_input'] = "Click right button to select file"; // text default
$GLOBALS['placeholder_textarea'] = "Click right button to select file(s)"; // text default
/*******************************
// Project specific definitions
********************************/
// Cloud infrastructures
$GLOBALS['cloud'] = "my_on_premises_cloud"; // VRE central cloud. Options are any of $GLOBALS['clouds']
$GLOBALS['clouds'] = Array(
'local' => array(
"http_host" => "www.mydomain.com", // used in getCurrentCloud
"dataDir_fs" => "/NFS/export/path/userdata/", // export path for NFS server
"pubDir_fs" => "/NFS/export/path/public/", // export path for NFS server
"dataDir_virtual" => $GLOBALS['dataDir'],
"pubDir_virtual" => $GLOBALS['pubDir'],
"dataDir_host" => $GLOBALS["host_volumes_path"].$GLOBALS['dataDir'],
"pubDir_host" => $GLOBALS["host_volumes_path"].$GLOBALS['pubDir'],
"PMESserver_domain" => "pmes.mydomain.com",
"PMESserver_port" => "80",
"PMESserver_address"=> "/",
"imageTypes" => array(), // list of cloud OCCI templates indexed by RAM (GB)
"auth" => array("required" => False)
),
'my_remote_2' => array(
"http_host" => "www.mydomain2.com", // used in getCurrentCloud
"dataDir_fs" => "/NFS/export/path2/userdata/", // export path for NFS server
"pubDir_fs" => "/NFS/export/path2/public/", // export path for NFS server
"dataDir_virtual" => "/shared/path/for/userdata",
"pubDir_virtual" => "/shared/path/for/public",
"PMESserver_domain" => "pmes.mydomain2.com",
"PMESserver_port" => "8080",
"PMESserver_address"=> "/",
"imageTypes" => array( // list of cloud OCCI templates indexed by RAM (GB)
"2" => array(
"1" => array("id" => "small", "disk" => null, "name" => "small"),
"8" => array("id" => "large-small", "disk" => null, "name" => "large-small"),
"16" => array("id" => "extra_large-small", "disk" => null, "name" => "large-small")
),
"4" => array(
"2" => array("id" => "medium", "disk" => null, "name" => "medium"),
"4" => array("id" => "medium-medium", "disk" => null, "name" => "medium-medium"),
"8" => array("id" => "large-medium", "disk" => null, "name" => "large-medium"),
"16" => array("id" => "extra_large-medium", "disk" => null, "name" => "extra_large-medium")
)
),
"auth" => array(
"required" => True,
"OS_NO_CACHE" => "True",
"OS_CLOUDNAME" => "overcloud",
"OS_AUTH_URL" => "https://extcloud05.ebi.ac.uk:13000/v2.0",
"NOVA_VERSION" => "1.2",
"COMPUTE_API_VERSION" => "1.2",
"OS_USERNAME" => "username@mail.es",
"OS_PASSWORD" => "s3cr3t",
"OS_TENANT_NAME" => "tenancy_name"
)
)
);