|
29 | 29 | HELP_DIRECTORY = "Directory containing the configuration files for Pulsar."
|
30 | 30 | HELP_MQ = ("Write configuration files for message queue server deployment "
|
31 | 31 | "instead of more traditional RESTful web based pulsar.")
|
| 32 | +HELP_AUTO_CONDA = ("Auto initialize Conda for tool resolution and auto install " |
| 33 | + "dependencies on demand.") |
32 | 34 | HELP_NO_LOGGING = ("Do not write Pulsar's default logging configuration to server.ini "
|
33 | 35 | "and if uwsgi is configured do not configure its logging either.")
|
34 | 36 | HELP_SUPERVISOR = ("Write a supervisord configuration file for "
|
@@ -145,6 +147,10 @@ def main(argv=None):
|
145 | 147 | arg_parser.add_argument("--directory",
|
146 | 148 | default=".",
|
147 | 149 | help=HELP_DIRECTORY)
|
| 150 | + arg_parser.add_argument("--auto_conda", |
| 151 | + action="store_true", |
| 152 | + default=False, |
| 153 | + help=HELP_AUTO_CONDA) |
148 | 154 | arg_parser.add_argument("--mq",
|
149 | 155 | action="store_true",
|
150 | 156 | default=False,
|
@@ -198,6 +204,10 @@ def main(argv=None):
|
198 | 204 | if not os.path.exists(directory):
|
199 | 205 | os.makedirs(directory)
|
200 | 206 |
|
| 207 | + default_dependencies_dir = os.path.join(directory, "dependencies") |
| 208 | + if not os.path.exists(default_dependencies_dir): |
| 209 | + os.makedirs(default_dependencies_dir) |
| 210 | + |
201 | 211 | print("Bootstrapping pulsar configuration into directory %s" % relative_directory)
|
202 | 212 | _handle_app_yaml(args, directory)
|
203 | 213 | _handle_server_ini(args, directory)
|
@@ -298,6 +308,9 @@ def _handle_app_yaml(args, directory):
|
298 | 308 | contents += 'private_token: %s\n' % args.private_token
|
299 | 309 | if args.mq:
|
300 | 310 | contents += 'message_queue_url: "amqp://guest:guest@localhost:5672//"\n'
|
| 311 | + if args.auto_conda: |
| 312 | + contents += 'conda_auto_init: true\n' |
| 313 | + contents += 'conda_auto_install: true\n' |
301 | 314 | else:
|
302 | 315 | if not IS_WINDOWS and args.libdrmaa_path:
|
303 | 316 | contents += 'manager:\n type: queued_drmaa\n'
|
|
0 commit comments