Skip to content

Commit c7caeb3

Browse files
committed
Merge branch 'azure-blob-objectstore' into dev
2 parents c4841b3 + b4896bc commit c7caeb3

File tree

6 files changed

+581
-10
lines changed

6 files changed

+581
-10
lines changed

config/object_store_conf.xml.sample

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,26 @@
3232
-->
3333

3434
<!-- Sample Swift Object Store
35-
<object_store type="swift">
36-
<auth access_key="...." secret_key="....." />
37-
<bucket name="unique_bucket_name" use_reduced_redundancy="False" max_chunk_size="250"/>
38-
<connection host="" port="" is_secure="" conn_path="" multipart="True"/>
39-
<cache path="database/object_store_cache" size="1000" />
40-
<extra_dir type="job_work" path="database/job_working_directory_swift"/>
41-
<extra_dir type="temp" path="database/tmp_swift"/>
42-
</object_store>
43-
-->
35+
<object_store type="swift">
36+
<auth access_key="...." secret_key="....." />
37+
<bucket name="unique_bucket_name" use_reduced_redundancy="False" max_chunk_size="250"/>
38+
<connection host="" port="" is_secure="" conn_path="" multipart="True"/>
39+
<cache path="database/object_store_cache" size="1000" />
40+
<extra_dir type="job_work" path="database/job_working_directory_swift"/>
41+
<extra_dir type="temp" path="database/tmp_swift"/>
42+
</object_store>
43+
-->
44+
45+
<!-- Sample Azure Object Store
46+
<object_store type="azure_blob">
47+
<auth account_name="..." account_key="...." />
48+
<container name="unique_container_name" max_chunk_size="250"/>
49+
<cache path="database/object_store_cache" size="100" />
50+
<extra_dir type="job_work" path="database/job_working_directory_azure"/>
51+
<extra_dir type="temp" path="database/tmp_azure"/>
52+
</object_store>
53+
-->
54+
4455

4556
</backends>
4657
</object_store>
47-

doc/source/lib/galaxy.objectstore.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,12 @@ galaxy.objectstore.s3_multipart_upload module
4141
:undoc-members:
4242
:show-inheritance:
4343

44+
galaxy.objectstore.azure_blob module
45+
---------------------------------------------
46+
47+
.. automodule:: galaxy.objectstore.azure_blob
48+
:members:
49+
:undoc-members:
50+
:show-inheritance:
51+
4452

lib/galaxy/dependencies/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def __init__( self, config_file ):
1616
self.config = None
1717
self.job_runners = []
1818
self.authenticators = []
19+
self.object_stores = []
1920
self.conditional_reqs = []
2021
self.parse_configs()
2122
self.get_conditional_requirements()
@@ -31,6 +32,15 @@ def parse_configs( self ):
3132
self.job_runners.append( plugin.attrib['load'] )
3233
except (OSError, IOError):
3334
pass
35+
object_store_conf_xml = self.config.get(
36+
"object_store_config_file",
37+
join( dirname( self.config_file ), 'object_store_conf.xml' ) )
38+
try:
39+
for store in ElementTree.parse( object_store_conf_xml ).iter( 'object_store' ):
40+
if 'type' in store.attrib:
41+
self.object_stores.append( store.attrib['type'] )
42+
except (OSError, IOError):
43+
pass
3444

3545
# Parse auth conf
3646
auth_conf_xml = self.config.get(
@@ -93,6 +103,9 @@ def check_python_ldap( self ):
93103
return ('ldap' in self.authenticators or
94104
'activedirectory' in self.authenticators)
95105

106+
def check_azure_storage( self ):
107+
return 'azure_blob' in self.object_stores
108+
96109

97110
def optional( config_file ):
98111
rval = []

lib/galaxy/dependencies/conditional-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ raven
99
pbs_python
1010
drmaa
1111
statsd
12+
azure-storage==0.32.0
1213
# PyRods not in PyPI
1314
python-ldap==2.4.25

lib/galaxy/objectstore/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,9 @@ def build_object_store_from_config(config, fsmon=False, config_xml=None):
721721
elif store == 'irods':
722722
from .rods import IRODSObjectStore
723723
return IRODSObjectStore(config=config, config_xml=config_xml)
724+
elif store == 'azure_blob':
725+
from .azure_blob import AzureBlobObjectStore
726+
return AzureBlobObjectStore(config=config, config_xml=config_xml)
724727
# Disable the Pulsar object store for now until it receives some attention
725728
# elif store == 'pulsar':
726729
# from .pulsar import PulsarObjectStore

0 commit comments

Comments
 (0)