2014-05-08 16:59:35 +00:00
|
|
|
from os import path
|
|
|
|
|
2023-11-17 12:25:13 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
2015-05-10 17:33:36 +00:00
|
|
|
|
2015-05-04 19:52:53 +00:00
|
|
|
from orchestra.contrib.settings import Setting
|
2014-05-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
ORCHESTRATION_OS_CHOICES = Setting('ORCHESTRATION_OS_CHOICES',
|
|
|
|
(
|
2015-04-27 12:24:17 +00:00
|
|
|
('LINUX', "Linux"),
|
|
|
|
),
|
|
|
|
validators=[Setting.validate_choices]
|
|
|
|
)
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2014-10-10 17:17:20 +00:00
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
ORCHESTRATION_DEFAULT_OS = Setting('ORCHESTRATION_DEFAULT_OS',
|
|
|
|
'LINUX',
|
|
|
|
choices=ORCHESTRATION_OS_CHOICES
|
|
|
|
)
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2014-10-10 17:17:20 +00:00
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
ORCHESTRATION_SSH_KEY_PATH = Setting('ORCHESTRATION_SSH_KEY_PATH',
|
|
|
|
path.join(path.expanduser('~'), '.ssh/id_rsa')
|
|
|
|
)
|
2014-05-08 16:59:35 +00:00
|
|
|
|
2014-10-10 17:17:20 +00:00
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
ORCHESTRATION_ROUTER = Setting('ORCHESTRATION_ROUTER',
|
|
|
|
'orchestra.contrib.orchestration.models.Route',
|
2015-04-27 12:24:17 +00:00
|
|
|
validators=[Setting.validate_import_class]
|
2014-05-08 16:59:35 +00:00
|
|
|
)
|
|
|
|
|
2014-10-10 17:17:20 +00:00
|
|
|
|
2015-04-07 15:14:49 +00:00
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
ORCHESTRATION_DISABLE_EXECUTION = Setting('ORCHESTRATION_DISABLE_EXECUTION',
|
|
|
|
False
|
|
|
|
)
|
2015-04-20 14:23:10 +00:00
|
|
|
|
|
|
|
|
2015-04-27 14:54:17 +00:00
|
|
|
ORCHESTRATION_BACKEND_CLEANUP_DAYS = Setting('ORCHESTRATION_BACKEND_CLEANUP_DAYS',
|
2016-07-15 08:41:38 +00:00
|
|
|
20
|
2015-04-20 14:23:10 +00:00
|
|
|
)
|
2015-05-10 17:33:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
ORCHESTRATION_SSH_METHOD_BACKEND = Setting('ORCHESTRATION_SSH_METHOD_BACKEND',
|
|
|
|
'orchestra.contrib.orchestration.methods.OpenSSH',
|
2015-05-11 14:05:39 +00:00
|
|
|
help_text=_("Two methods are provided:<br>"
|
|
|
|
"1) <tt>orchestra.contrib.orchestration.methods.OpenSSH</tt> with ControlPersist.<br>"
|
|
|
|
"2) <tt>orchestra.contrib.orchestration.methods.Paramiko</tt> with connection pool.<br>"
|
|
|
|
"Both perform similarly, but OpenSSH has the advantage that the connections are shared between workers. "
|
2015-05-10 17:33:36 +00:00
|
|
|
"Paramiko, in contrast, has a per worker connection pool.")
|
|
|
|
)
|