mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
(merge dev)
This commit is contained in:
@@ -531,9 +531,7 @@ var ToolLinkView = BaseView.extend({
|
||||
Galaxy.upload.show();
|
||||
});
|
||||
}
|
||||
|
||||
// regular tools
|
||||
if ( this.model.id !== 'upload1' && this.model.get( 'model_class' ) === 'Tool' ) {
|
||||
else if ( this.model.get( 'model_class' ) === 'Tool' ) { // regular tools
|
||||
var self = this;
|
||||
$link.find('a').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -3259,7 +3259,7 @@ extend(LabelTrack.prototype, Track.prototype, {
|
||||
new_div = $("<div/>").addClass('label-container');
|
||||
while ( position < view.high ) {
|
||||
var screenPosition = Math.floor( ( position - view.low ) / range * width );
|
||||
new_div.append( $("<div/>").addClass('label').text(util.commatize( position )).css( {
|
||||
new_div.append( $("<div/>").addClass('pos-label').text(commatize( position )).css( {
|
||||
left: screenPosition
|
||||
}));
|
||||
position += tickDistance;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/* Used to push nav into title bar: */
|
||||
height: 0;
|
||||
}
|
||||
|
||||
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
padding: 0px 2px;
|
||||
text-align: left;
|
||||
margin: 2px;
|
||||
|
||||
|
||||
/* Make header opaque when focused on. */
|
||||
&:hover {
|
||||
background-color: #DDDDDD;
|
||||
@@ -232,7 +232,7 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
.overlay {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
@@ -241,7 +241,7 @@
|
||||
.track-tile {
|
||||
position: absolute;
|
||||
background: white;
|
||||
|
||||
|
||||
canvas {
|
||||
position: relative;
|
||||
z-index: @base-index;
|
||||
@@ -292,7 +292,7 @@
|
||||
}
|
||||
|
||||
.label-track {
|
||||
font-size: 10px;
|
||||
font-size: 10px;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
@@ -300,11 +300,11 @@
|
||||
overflow: hidden;
|
||||
|
||||
.label-container {
|
||||
position: relative;
|
||||
position: relative;
|
||||
height: 1.3em;
|
||||
}
|
||||
|
||||
.label {
|
||||
.pos-label {
|
||||
position: absolute;
|
||||
border-left: solid #999 1px;
|
||||
padding: 1px;
|
||||
@@ -344,7 +344,7 @@
|
||||
.nav-labeltrack {
|
||||
border-top: solid #999 1px;
|
||||
border-bottom: solid #333 1px;
|
||||
}
|
||||
}
|
||||
|
||||
// Styles for tools and filters.
|
||||
input {
|
||||
@@ -544,7 +544,7 @@ input {
|
||||
top: 0px;
|
||||
background-color: #ccf;
|
||||
opacity: 0.5;
|
||||
z-index: @overlay-index;
|
||||
z-index: @overlay-index;
|
||||
}
|
||||
|
||||
.mouse-pos {
|
||||
@@ -565,7 +565,7 @@ input {
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
// Highlight for element(s) being dragged. This definition must be after definition of draggable
|
||||
// Highlight for element(s) being dragged. This definition must be after definition of draggable
|
||||
// elements (e.g. track, group) in order to take precedence.
|
||||
.dragging {
|
||||
border: 1px solid blue;
|
||||
|
||||
@@ -104,7 +104,7 @@ def main():
|
||||
f.write('<div>%s\n<ol>' % (s))
|
||||
for i, data in enumerate( flist ):
|
||||
f.write('<li><a href="%s">%s</a></li>\n' % (os.path.split(data)[-1], os.path.split(data)[-1]))
|
||||
f.write("</div></body></html>")
|
||||
f.write("</ol></div></div></body></html>")
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ def main():
|
||||
f.write('<div>%s\n<ol>' % (s))
|
||||
for i, data in enumerate( flist ):
|
||||
f.write('<li><a href="%s">%s</a></li>\n' % (os.path.split(data)[-1], os.path.split(data)[-1]))
|
||||
f.write("</div></body></html>")
|
||||
f.write("</ol></div></div></body></html>")
|
||||
f.close()
|
||||
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ DATABASE = {
|
||||
'repo': 'lib/galaxy/model/migrate',
|
||||
'old_config_file': 'universe_wsgi.ini',
|
||||
'default_sqlite_file': './database/universe.sqlite',
|
||||
'config_override': 'GALAXY_CONFIG_',
|
||||
},
|
||||
"tool_shed":
|
||||
{
|
||||
@@ -26,6 +27,7 @@ DATABASE = {
|
||||
'config_file': 'config/tool_shed.ini',
|
||||
'old_config_file': 'tool_shed_wsgi.ini',
|
||||
'default_sqlite_file': './database/community.sqlite',
|
||||
'config_override': 'TOOL_SHED_CONFIG_',
|
||||
},
|
||||
"install":
|
||||
{
|
||||
@@ -33,6 +35,7 @@ DATABASE = {
|
||||
'old_config_file': 'universe_wsgi.ini',
|
||||
'config_prefix': 'install_',
|
||||
'default_sqlite_file': './database/install.sqlite',
|
||||
'config_override': 'GALAXY_INSTALL_CONFIG_',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -92,11 +95,12 @@ def get_config( argv, cwd=None ):
|
||||
config_file = read_config_file_arg( argv, default, old_default )
|
||||
repo = database_defaults[ 'repo' ]
|
||||
config_prefix = database_defaults.get( 'config_prefix', DEFAULT_CONFIG_PREFIX )
|
||||
config_override = database_defaults.get( 'config_override', 'GALAXY_CONFIG_' )
|
||||
default_sqlite_file = database_defaults[ 'default_sqlite_file' ]
|
||||
if cwd:
|
||||
config_file = os.path.join( cwd, config_file )
|
||||
|
||||
properties = load_app_properties( ini_file=config_file )
|
||||
properties = load_app_properties( ini_file=config_file, config_prefix=config_override )
|
||||
|
||||
if ("%sdatabase_connection" % config_prefix) in properties:
|
||||
db_url = properties[ "%sdatabase_connection" % config_prefix ]
|
||||
|
||||
@@ -918,9 +918,9 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ):
|
||||
# _tools_by_id and _tool_versions_by_id
|
||||
self.register_tool( new_tool )
|
||||
message = "Reloaded the tool:<br/>"
|
||||
message += "<b>name:</b> %s<br/>" % old_tool.name
|
||||
message += "<b>id:</b> %s<br/>" % old_tool.id
|
||||
message += "<b>version:</b> %s" % old_tool.version
|
||||
message += "<b>name:</b> %s<br/>" % escape( old_tool.name )
|
||||
message += "<b>id:</b> %s<br/>" % escape( old_tool.id )
|
||||
message += "<b>version:</b> %s" % escape( old_tool.version )
|
||||
status = 'done'
|
||||
return message, status
|
||||
|
||||
@@ -952,9 +952,9 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ):
|
||||
del self.data_manager_tools[ tool_id ]
|
||||
# TODO: do we need to manually remove from the integrated panel here?
|
||||
message = "Removed the tool:<br/>"
|
||||
message += "<b>name:</b> %s<br/>" % tool.name
|
||||
message += "<b>id:</b> %s<br/>" % tool.id
|
||||
message += "<b>version:</b> %s" % tool.version
|
||||
message += "<b>name:</b> %s<br/>" % escape( tool.name )
|
||||
message += "<b>id:</b> %s<br/>" % escape( tool.id )
|
||||
message += "<b>version:</b> %s" % escape( tool.version )
|
||||
status = 'done'
|
||||
return message, status
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ class Admin( object ):
|
||||
toolbox = self.app.toolbox
|
||||
tool_id = None
|
||||
if params.get( 'reload_tool_button', False ):
|
||||
tool_id = params.get('tool_id', None)
|
||||
tool_id = kwd.get( 'tool_id', None )
|
||||
galaxy.queue_worker.send_control_task(trans.app, 'reload_tool', noop_self=True, kwargs={'tool_id': tool_id} )
|
||||
message, status = trans.app.toolbox.reload_tool_by_id( tool_id)
|
||||
return trans.fill_template( '/admin/reload_tool.mako',
|
||||
|
||||
@@ -250,8 +250,10 @@ class ToolShedRepositoriesController( BaseAPIController ):
|
||||
action='show',
|
||||
id=trans.security.encode_id( tool_shed_repository.id ) )
|
||||
return tool_shed_repository_dict
|
||||
|
||||
return map( to_dict, installed_tool_shed_repositories )
|
||||
if installed_tool_shed_repositories:
|
||||
return map( to_dict, installed_tool_shed_repositories )
|
||||
message = "No repositories were installed, possibly because the selected repository has already been installed."
|
||||
return dict( status="ok", message=message )
|
||||
|
||||
@expose_api
|
||||
def install_repository_revisions( self, trans, payload, **kwd ):
|
||||
|
||||
@@ -216,7 +216,8 @@ class RepositoriesController( BaseAPIController ):
|
||||
repository_metadata_dict[ 'url' ] = web.url_for( controller='repository_revisions',
|
||||
action='show',
|
||||
id=encoded_repository_metadata_id )
|
||||
repository_metadata_dict[ 'valid_tools' ] = repository_metadata.metadata[ 'tools' ]
|
||||
if 'tools' in repository_metadata.metadata:
|
||||
repository_metadata_dict[ 'valid_tools' ] = repository_metadata.metadata[ 'tools' ]
|
||||
# Get the repo_info_dict for installing the repository.
|
||||
repo_info_dict, \
|
||||
includes_tools, \
|
||||
|
||||
@@ -16,6 +16,7 @@ from galaxy.webapps.util import build_template_error_formatters
|
||||
from galaxy.webapps.tool_shed.framework.middleware import hg
|
||||
from galaxy import util
|
||||
from galaxy.config import process_is_uwsgi
|
||||
from galaxy.util.properties import load_app_properties
|
||||
|
||||
log = logging.getLogger( __name__ )
|
||||
|
||||
@@ -49,6 +50,10 @@ def add_ui_controllers( webapp, app ):
|
||||
def app_factory( global_conf, **kwargs ):
|
||||
"""Return a wsgi application serving the root object"""
|
||||
# Create the Galaxy tool shed application unless passed in
|
||||
kwargs = load_app_properties(
|
||||
kwds=kwargs,
|
||||
config_prefix='TOOL_SHED_CONFIG_'
|
||||
)
|
||||
if 'app' in kwargs:
|
||||
app = kwargs.pop( 'app' )
|
||||
else:
|
||||
|
||||
@@ -5,6 +5,7 @@ import os
|
||||
import sqlalchemy
|
||||
import sys
|
||||
import tempfile
|
||||
import urlparse
|
||||
from paste.auth.basic import AuthBasicAuthenticator
|
||||
from paste.httpheaders import AUTH_TYPE
|
||||
from paste.httpheaders import REMOTE_USER
|
||||
@@ -49,11 +50,11 @@ class Hg( object ):
|
||||
# a clone or a pull. However, we do not want to increment the times_downloaded count if we're only setting repository
|
||||
# metadata.
|
||||
if cmd == 'getbundle' and not self.setting_repository_metadata:
|
||||
common, _ = environ[ 'HTTP_X_HGARG_1' ].split( '&' )
|
||||
hg_args = urlparse.parse_qs( environ[ 'HTTP_X_HGARG_1' ] )
|
||||
# The 'common' parameter indicates the full sha-1 hash of the changeset the client currently has checked out. If
|
||||
# this is 0000000000000000000000000000000000000000, then the client is performing a fresh checkout. If it has any
|
||||
# other value, the client is getting updates to an existing checkout.
|
||||
if common == 'common=0000000000000000000000000000000000000000':
|
||||
if 'common' in hg_args and hg_args[ 'common' ][-1] == '0000000000000000000000000000000000000000':
|
||||
# Increment the value of the times_downloaded column in the repository table for the cloned repository.
|
||||
if 'PATH_INFO' in environ:
|
||||
# Instantiate a database connection
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -31,7 +31,7 @@ $().ready(function() {
|
||||
<select name="tool_id">
|
||||
%for val in toolbox.tool_panel_contents( trans ):
|
||||
%if isinstance( val, Tool ):
|
||||
<option value="${val.id}">${val.name|h}</option>
|
||||
<option value="${val.id|h}">${val.name|h}</option>
|
||||
%elif isinstance( val, ToolSection ):
|
||||
<optgroup label="${val.name|h}">
|
||||
<% section = val %>
|
||||
@@ -41,7 +41,7 @@ $().ready(function() {
|
||||
%if section_val.id == tool_id:
|
||||
<% selected_str = " selected=\"selected\"" %>
|
||||
%endif
|
||||
<option value="${section_val.id}"${selected_str}>${section_val.name|h}</option>
|
||||
<option value="${section_val.id|h}"${selected_str}>${section_val.name|h}</option>
|
||||
%endif
|
||||
%endfor
|
||||
%endif
|
||||
|
||||
@@ -132,8 +132,11 @@
|
||||
%if job:
|
||||
<tr><td>Tool Exit Code:</td><td>${ job.exit_code | h }</td></tr>
|
||||
%endif
|
||||
<tr><td>API ID:</td><td>${encoded_hda_id}</td></tr>
|
||||
<tr><td>History ID:</td><td>${encoded_history_id}</td></tr>
|
||||
<tr><td>History Content API ID:</td><td>${encoded_hda_id}</td></tr>
|
||||
%if job:
|
||||
<tr><td>Job API ID:</td><td>${trans.security.encode_id( job.id )}</td></tr>
|
||||
%endif
|
||||
<tr><td>History API ID:</td><td>${encoded_history_id}</td></tr>
|
||||
%if hda.dataset.uuid:
|
||||
<tr><td>UUID:</td><td>${hda.dataset.uuid}</td></tr>
|
||||
%endif
|
||||
|
||||
+29
-11
@@ -18,9 +18,15 @@ RUN apt-get update -y && apt-get install -y software-properties-common curl && \
|
||||
} | debconf-set-selections && \
|
||||
apt-get update -y && \
|
||||
apt-get install -y libpq-dev postgresql postgresql-client postgresql-plpython-9.3 \
|
||||
ansible postgresql-server-dev-9.3 wget mysql-server="${MYSQL_MAJOR}"* \
|
||||
slurm-llnl libmunge-dev slurm-drmaa-dev \
|
||||
nodejs && \
|
||||
ansible postgresql-server-dev-9.3 wget mysql-server="${MYSQL_MAJOR}"* \
|
||||
slurm-llnl libmunge-dev slurm-drmaa-dev ant atop axel bioperl cmake curl \
|
||||
g++ gcc gfortran git-core htop iftop iotop ipython libffi-dev liblapack-dev \
|
||||
libncurses5-dev libopenblas-dev libpam0g-dev libpq-dev libsparsehash-dev make \
|
||||
mercurial nginx-extras nmon patch postgresql postgresql \
|
||||
postgresql-client postgresql-plpython-9.3 python-boto python-dev \
|
||||
python-prettytable python-psycopg2 python-virtualenv python-pip \
|
||||
postgresql-server-dev-9.3 rsync slurm-drmaa-dev supervisor swig sysstat unzip \
|
||||
wget zlib1g-dev nodejs && \
|
||||
npm install -g grunt-contrib-qunit grunt grunt-cli casperjs phantomjs && \
|
||||
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
@@ -35,20 +41,21 @@ ADD provision.yml /tmp/ansible/provision.yml
|
||||
|
||||
ENV GALAXY_ROOT=/galaxy
|
||||
|
||||
RUN mkdir /etc/galaxy && \
|
||||
cd /tmp/ansible && \
|
||||
mkdir roles && \
|
||||
RUN mkdir /etc/galaxy && cd /tmp/ansible && mkdir roles && \
|
||||
mkdir roles/galaxyprojectdotorg.galaxy-os && \
|
||||
wget -qO- https://github.com/galaxyproject/ansible-galaxy-os/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-os && \
|
||||
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy-os/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-os && \
|
||||
mkdir roles/galaxyprojectdotorg.cloudman-database && \
|
||||
wget -qO- https://github.com/galaxyproject/ansible-cloudman-database/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.cloudman-database && \
|
||||
wget --quiet -O- https://github.com/galaxyproject/ansible-cloudman-database/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.cloudman-database && \
|
||||
mkdir roles/galaxyprojectdotorg.galaxy && \
|
||||
wget -qO- https://github.com/galaxyproject/ansible-galaxy/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy && \
|
||||
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy && \
|
||||
mkdir roles/galaxyprojectdotorg.galaxy-extras && \
|
||||
wget -qO- https://github.com/galaxyproject/ansible-galaxy-extras/archive/dynamic_uwsgi_config.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-extras && \
|
||||
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy-extras/archive/dynamic_uwsgi_config.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-extras && \
|
||||
mkdir roles/galaxyprojectdotorg.galaxy-toolshed && \
|
||||
wget --quiet -O- https://github.com/galaxyproject/ansible-galaxy-toolshed/archive/master.tar.gz | tar -xzf- --strip-components=1 -C roles/galaxyprojectdotorg.galaxy-toolshed && \
|
||||
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=image -c local -e "@ansible_vars.yml" && \
|
||||
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=database -c local -e "@ansible_vars.yml" && \
|
||||
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=galaxy -c local -e "@ansible_vars.yml" && \
|
||||
ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 ansible-playbook /tmp/ansible/provision.yml --tags=toolshed -c local -e "@ansible_vars.yml" && \
|
||||
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN cd $GALAXY_ROOT && \
|
||||
@@ -59,7 +66,16 @@ RUN cd $GALAXY_ROOT && \
|
||||
echo "Prepopuating sqlite database" && \
|
||||
GALAXY_CONFIG_DATABASE_CONNECTION="sqlite:////opt/galaxy/galaxy.sqlite" sh create_db.sh && \
|
||||
sh /opt/galaxy/start_mysql.sh && \
|
||||
GALAXY_CONFIG_DATABASE_CONNECTION="mysql://galaxy:galaxy@localhost/galaxy?unix_socket=/var/run/mysqld/mysqld.sock" sh create_db.sh
|
||||
echo "Prepopuating mysql database" && \
|
||||
GALAXY_CONFIG_DATABASE_CONNECTION="mysql://galaxy:galaxy@localhost/galaxy?unix_socket=/var/run/mysqld/mysqld.sock" sh create_db.sh && \
|
||||
echo "Prepopulating toolshed postgres database" && \
|
||||
su -c '/usr/lib/postgresql/9.3/bin/pg_ctl -o "-F" start -D /opt/galaxy/db' postgres && \
|
||||
GALAXY_CONFIG_DATABASE_CONNECTION="postgresql://root@localhost:5930/toolshed" sh create_db.sh tool_shed && \
|
||||
echo "Prepopuating toolshed sqlite database" && \
|
||||
GALAXY_CONFIG_DATABASE_CONNECTION="sqlite:////opt/galaxy/toolshed.sqlite" sh create_db.sh tool_shed && \
|
||||
sh /opt/galaxy/start_mysql.sh && \
|
||||
echo "Prepopuating toolshed mysql database" && \
|
||||
GALAXY_CONFIG_DATABASE_CONNECTION="mysql://galaxy:galaxy@localhost/toolshed?unix_socket=/var/run/mysqld/mysqld.sock" sh create_db.sh tool_shed
|
||||
|
||||
# bcftools for Galaxy.
|
||||
RUN mkdir -p /tmp/install && \
|
||||
@@ -72,6 +88,8 @@ RUN mkdir -p /tmp/install && \
|
||||
cd && rm -rf /tmp/install
|
||||
|
||||
ADD run_test_wrapper.sh /usr/local/bin/run_test_wrapper.sh
|
||||
|
||||
EXPOSE :9009
|
||||
EXPOSE :8080
|
||||
EXPOSE :80
|
||||
ENTRYPOINT ["/bin/bash", "/usr/local/bin/run_test_wrapper.sh"]
|
||||
|
||||
@@ -21,7 +21,6 @@ galaxy_manage_database: no
|
||||
galaxy_user_name: "root"
|
||||
galaxy_extras_install_packages: true
|
||||
galaxy_job_conf_path: "/etc/galaxy/job_conf.xml"
|
||||
galxy_config_file: "/galaxy/config/galaxy.ini.sample"
|
||||
|
||||
galaxy_web_processes: 1
|
||||
galaxy_handler_processes: 2
|
||||
@@ -37,3 +36,13 @@ galaxy_extras_config_supervisor: true
|
||||
galaxy_extras_config_galaxy_root: false
|
||||
galaxy_extras_config_galaxy_job_metrics: false
|
||||
galaxy_extras_config_uwsgi: true
|
||||
|
||||
manage_shed_db: yes
|
||||
galaxy_toolshed_manage_static_setup: yes
|
||||
galaxy_toolshed_manage_database: no
|
||||
galaxy_toolshed_server_dir: "/galaxy"
|
||||
galaxy_toolshed_venv_dir: "{{ galaxy_venv_dir }}"
|
||||
|
||||
galaxy_toolshed_config_file: "{{ galaxy_toolshed_server_dir }}/config/tool_shed.ini"
|
||||
galaxy_toolshed_config_templates:
|
||||
- {dest: '{{ galaxy_toolshed_config_file }}', src: tool_shed.ini.j2}
|
||||
|
||||
@@ -11,5 +11,6 @@
|
||||
- role: galaxyprojectdotorg.galaxy
|
||||
sudo: yes
|
||||
tags: galaxy
|
||||
|
||||
|
||||
- role: galaxyprojectdotorg.galaxy-toolshed
|
||||
sudo: yes
|
||||
tags: toolshed
|
||||
@@ -6,19 +6,27 @@ if [ "$GALAXY_TEST_DATABASE_TYPE" = "postgres" ];
|
||||
then
|
||||
su -c '/usr/lib/postgresql/9.3/bin/pg_ctl -o "-F" start -D /opt/galaxy/db' postgres
|
||||
sleep 3
|
||||
GALAXY_TEST_INSTALL_DB_MERGED="true"
|
||||
GALAXY_TEST_DBURI="postgres://root@localhost:5930/galaxy?client_encoding=utf8"
|
||||
TOOL_SHED_TEST_DBURI="postgres://root@localhost:5930/toolshed"
|
||||
elif [ "$GALAXY_TEST_DATABASE_TYPE" = "mysql" ];
|
||||
then
|
||||
sh /opt/galaxy/start_mysql.sh
|
||||
GALAXY_TEST_INSTALL_DB_MERGED="true"
|
||||
GALAXY_TEST_DBURI="mysql://galaxy:galaxy@localhost/galaxy?unix_socket=/var/run/mysqld/mysqld.sock"
|
||||
TOOL_SHED_TEST_DBURI="mysql://galaxy:galaxy@localhost/toolshed?unix_socket=/var/run/mysqld/mysqld.sock"
|
||||
elif [ "$GALAXY_TEST_DATABASE_TYPE" = "sqlite" ];
|
||||
then
|
||||
GALAXY_TEST_INSTALL_DB_MERGED="true"
|
||||
GALAXY_TEST_DBURI="sqlite:////opt/galaxy/galaxy.sqlite"
|
||||
TOOL_SHED_TEST_DBURI="sqlite:////opt/galaxy/toolshed.sqlite"
|
||||
else
|
||||
echo "Unknown database type"
|
||||
exit 1
|
||||
fi
|
||||
export GALAXY_TEST_DBURI
|
||||
export TOOL_SHED_TEST_DBURI
|
||||
export GALAXY_TEST_INSTALL_DB_MERGED
|
||||
|
||||
cd /galaxy
|
||||
GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION="$GALAXY_TEST_DBURI";
|
||||
@@ -37,6 +45,7 @@ then
|
||||
else
|
||||
GALAXY_CONFIG_MASTER_API_KEY=${GALAXY_CONFIG_MASTER_API_KEY:-"testmasterapikey"}
|
||||
GALAXY_CONFIG_FILE=${GALAXY_CONFIG_FILE:-config/galaxy.ini.sample}
|
||||
TOOL_SHED_CONFIG_FILE=${GALAXY_CONFIG_FILE:-config/tool_shed.ini.sample}
|
||||
GALAXY_CONFIG_CHECK_MIGRATE_TOOLS=false
|
||||
if [ -z "$GALAXY_MULTI_PROCESS" ];
|
||||
then
|
||||
@@ -49,6 +58,7 @@ else
|
||||
|
||||
export GALAXY_CONFIG_MASTER_API_KEY
|
||||
export GALAXY_CONFIG_FILE
|
||||
export TOOL_SHED_CONFIG_FILE
|
||||
export GALAXY_CONFIG_CHECK_MIGRATE_TOOLS
|
||||
export GALAXY_CONFIG_JOB_CONFIG_FILE
|
||||
export GALAXY_CONFIG_FILE_PATH
|
||||
|
||||
@@ -4,6 +4,7 @@ set -e
|
||||
MYSQL_USER=galaxy
|
||||
MYSQL_PASSWORD=galaxy
|
||||
MYSQL_DATABASE=galaxy
|
||||
SHED_MYSQL_DATABASE=toolshed
|
||||
|
||||
mkdir -p /var/lib/mysql
|
||||
chown -R mysql:mysql /var/lib/mysql
|
||||
@@ -22,15 +23,22 @@ cat > "$tempSqlFile" <<-EOSQL
|
||||
EOSQL
|
||||
|
||||
if [ "$MYSQL_DATABASE" ]; then
|
||||
echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` ;" >> "$tempSqlFile"
|
||||
echo "CREATE DATABASE IF NOT EXISTS \`$MYSQL_DATABASE\` ;" >> "$tempSqlFile"
|
||||
fi
|
||||
|
||||
if [ "$SHED_MYSQL_DATABASE" ]; then
|
||||
echo "CREATE DATABASE IF NOT EXISTS \`$SHED_MYSQL_DATABASE\` ;" >> "$tempSqlFile"
|
||||
fi
|
||||
|
||||
if [ "$MYSQL_USER" -a "$MYSQL_PASSWORD" ]; then
|
||||
echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD' ;" >> "$tempSqlFile"
|
||||
echo "CREATE USER '$MYSQL_USER'@'%' IDENTIFIED BY '$MYSQL_PASSWORD' ;" >> "$tempSqlFile"
|
||||
|
||||
if [ "$MYSQL_DATABASE" ]; then
|
||||
echo "GRANT ALL ON \`$MYSQL_DATABASE\`.* TO '$MYSQL_USER'@'%' ;" >> "$tempSqlFile"
|
||||
fi
|
||||
if [ "$MYSQL_DATABASE" ]; then
|
||||
echo "GRANT ALL ON \`$MYSQL_DATABASE\`.* TO '$MYSQL_USER'@'%' ;" >> "$tempSqlFile"
|
||||
fi
|
||||
if [ "$SHED_MYSQL_DATABASE" ]; then
|
||||
echo "GRANT ALL ON \`$SHED_MYSQL_DATABASE\`.* TO '$MYSQL_USER'@'%' ;" >> "$tempSqlFile"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'FLUSH PRIVILEGES ;' >> "$tempSqlFile"
|
||||
|
||||
@@ -348,7 +348,7 @@ def add_file( dataset, registry, json_file, output_path ):
|
||||
datatype.groom_dataset_content( output_path )
|
||||
|
||||
|
||||
def add_composite_file( dataset, registry, json_file, output_path, files_path ):
|
||||
def add_composite_file( dataset, json_file, output_path, files_path ):
|
||||
if dataset.composite_files:
|
||||
os.mkdir( files_path )
|
||||
for name, value in dataset.composite_files.iteritems():
|
||||
@@ -414,7 +414,7 @@ def __main__():
|
||||
sys.exit( 1 )
|
||||
if dataset.type == 'composite':
|
||||
files_path = output_paths[int( dataset.dataset_id )][1]
|
||||
add_composite_file( dataset, registry, json_file, output_path, files_path )
|
||||
add_composite_file( dataset, json_file, output_path, files_path )
|
||||
else:
|
||||
add_file( dataset, registry, json_file, output_path )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user