mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Added setup script to configure RabbitMQ
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#
|
||||
# Configuration script for RabbitMQ in Galaxy
|
||||
#
|
||||
# Requirements:
|
||||
# - set the rabbitmqctl_path variable in the 'galaxy_amqp' section in Galaxy config file
|
||||
#
|
||||
# Usage:
|
||||
# $ python setup_rabbitmq.py <Galaxy config file>
|
||||
#
|
||||
|
||||
import os, sys, csv, ConfigParser
|
||||
|
||||
def main( config_file ):
|
||||
config = ConfigParser.ConfigParser()
|
||||
config.read( config_file )
|
||||
rabbitmqctl_path = config.get( 'galaxy_amqp', 'rabbitmqctl_path' )
|
||||
username = config.get( 'galaxy_amqp', 'userid' )
|
||||
password = config.get( 'galaxy_amqp', 'password' )
|
||||
virtual_host = config.get( 'galaxy_amqp', 'virtual_host' )
|
||||
|
||||
cmd_list = [
|
||||
'add_user %s %s' % ( username, password ),
|
||||
'add_vhost %s' % config.get( 'galaxy_amqp', 'virtual_host' ),
|
||||
'set_permissions -p %s %s "%s.*" ".*" ".*"' % ( virtual_host, username, username )
|
||||
]
|
||||
|
||||
for cmd in cmd_list:
|
||||
retval = os.system( rabbitmqctl_path + ' ' + cmd )
|
||||
if retval:
|
||||
print "Failed command: %s" % cmd
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main( sys.argv[1] )
|
||||
@@ -3,13 +3,8 @@
|
||||
[data_transfer_user_login_info]
|
||||
#email = datatx@bx.psu.edu
|
||||
#password = datatx
|
||||
|
||||
# The following section contains 4 config variables neede for the data transfer.
|
||||
# Please copy the exact values for each of these variables from the universe_wsgi.ini
|
||||
# configuration file for this installation
|
||||
#api_key = Generate it from the User menu in Galaxy
|
||||
|
||||
[universe_wsgi_config]
|
||||
#host = 127.0.0.1
|
||||
#port =
|
||||
#database_connection =
|
||||
#library_import_dir =
|
||||
# The http server section name in the Galaxy config file (universe_wsgi.ini)
|
||||
#http_server_section = server:main
|
||||
|
||||
@@ -420,4 +420,4 @@ upload1 = local:///
|
||||
#queue = galaxy_queue
|
||||
#exchange = galaxy_exchange
|
||||
#routing_key = bar_code_scanner
|
||||
|
||||
#rabbitmqctl_path = /path/to/rabbitmqctl
|
||||
|
||||
Reference in New Issue
Block a user