Пример #1
0
def _setup_xvfb(env):
    _setup_conf_file(env, "/etc/init.d/xvfb", "xvfb_init", default_source="xvfb_init")
    _setup_conf_file(env, "/etc/default/xvfb", "xvfb_default", default_source="xvfb_default")
    _setup_simple_service("xvfb")
    env.safe_sudo("mkdir /var/lib/xvfb; chown root:root /var/lib/xvfb; chmod 0755 /var/lib/xvfb")
    display_export = "-v DIPSLAY=:42"
    _add_to_profiles(display_export, profiles=["/home/%s/.sge_request" % env.get("galaxy_user", "galaxy")])
Пример #2
0
def _setup_xvfb(env):
    _setup_conf_file(env, "/etc/init.d/xvfb", "xvfb_init", default_source="xvfb_init")
    _setup_conf_file(env, "/etc/default/xvfb", "xvfb_default", default_source="xvfb_default")
    _setup_simple_service("xvfb")
    env.safe_sudo("mkdir /var/lib/xvfb; chown root:root /var/lib/xvfb; chmod 0755 /var/lib/xvfb")
    display_export = "-v DIPSLAY=:42"
    _add_to_profiles(display_export, profiles=["/home/%s/.sge_request" % env.get("galaxy_user", "galaxy")])
Пример #3
0
def _setup_service(env):
    _setup_conf_file(env,
                     "/etc/init.d/galaxy",
                     "galaxy_init",
                     default_source="galaxy_init")
    _setup_conf_file(env, "/etc/default/galaxy", "galaxy_default")
    _setup_simple_service("galaxy")
Пример #4
0
def _configure_novnc(env):
    if not _read_boolean(env, "configure_novnc", False):
        # Longer term would like this enabled by default. -John
        return
    if not "novnc_install_dir" in env:
        env.novnc_install_dir = "/opt/novnc"
    if not "vnc_password" in env:
        env.vnc_password = "******"
    if not "vnc_user" in env:
        env.vnc_user = env.user
    if not "vnc_display" in env:
        env.vnc_display = "1"
    if not "vnc_depth" in env:
        env.vnc_depth = "16"
    if not "vnc_geometry" in env:
        env.vnc_geometry = "1024x768"

    _configure_vncpasswd(env)

    novnc_dir = env.novnc_install_dir
    env.safe_sudo("mkdir -p '%s'" % novnc_dir)
    env.safe_sudo("chown %s '%s'" % (env.user, novnc_dir))
    clone_cmd = "NOVNC_DIR='%s'; rm -rf $NOVNC_DIR; git clone https://github.com/kanaka/noVNC.git $NOVNC_DIR" % novnc_dir
    run(clone_cmd)
    ## Move vnc_auto.html which takes vnc_password as query argument
    ## to index.html and rewrite it so that password is autoset, no
    ## need to specify via query parameter.
    run("sed s/password\\ =\\ /password\\ =\\ \\\'%s\\\'\\;\\\\\\\\/\\\\\\\\// '%s/vnc_auto.html' > '%s/index.html'" % (env.vnc_password, novnc_dir, novnc_dir))

    _setup_conf_file(env, "/etc/init.d/novnc", "novnc_init", default_source="novnc_init")
    _setup_conf_file(env, "/etc/default/novnc", "novnc_default", default_source="novnc_default.template")
    _setup_conf_file(env, "/etc/init.d/vncserver", "vncserver_init", default_source="vncserver_init")
    _setup_conf_file(env, "/etc/default/vncserver", "vncserver_default", default_source="vncserver_default.template")
    _setup_simple_service("novnc")
    _setup_simple_service("vncserver")
Пример #5
0
def _configure_novnc(env):
    if not _read_boolean(env, "configure_novnc", False):
        # Longer term would like this enabled by default. -John
        return
    if not "novnc_install_dir" in env:
        env.novnc_install_dir = "/opt/novnc"
    if not "vnc_password" in env:
        env.vnc_password = "******"
    if not "vnc_user" in env:
        env.vnc_user = env.user
    if not "vnc_display" in env:
        env.vnc_display = "1"
    if not "vnc_depth" in env:
        env.vnc_depth = "16"
    if not "vnc_geometry" in env:
        env.vnc_geometry = "1024x768"

    _configure_vncpasswd(env)

    novnc_dir = env.novnc_install_dir
    env.safe_sudo("mkdir -p '%s'" % novnc_dir)
    env.safe_sudo("chown %s '%s'" % (env.user, novnc_dir))
    clone_cmd = "NOVNC_DIR='%s'; rm -rf $NOVNC_DIR; git clone https://github.com/kanaka/noVNC.git $NOVNC_DIR" % novnc_dir
    run(clone_cmd)
    ## Move vnc_auto.html which takes vnc_password as query argument
    ## to index.html and rewrite it so that password is autoset, no
    ## need to specify via query parameter.
    run("sed s/password\\ =\\ /password\\ =\\ \\\'%s\\\'\\;\\\\\\\\/\\\\\\\\// '%s/vnc_auto.html' > '%s/index.html'" % (env.vnc_password, novnc_dir, novnc_dir))

    _setup_conf_file(env, "/etc/init.d/novnc", "novnc_init", default_source="novnc_init")
    _setup_conf_file(env, "/etc/default/novnc", "novnc_default", default_source="novnc_default.template")
    _setup_conf_file(env, "/etc/init.d/vncserver", "vncserver_init", default_source="vncserver_init")
    _setup_conf_file(env, "/etc/default/vncserver", "vncserver_default", default_source="vncserver_default.template")
    _setup_simple_service("novnc")
    _setup_simple_service("vncserver")
Пример #6
0
def _setup_protvis_service(env):
    _setup_conf_file(env,
                     os.path.join("/etc/init.d/protvis"),
                     "protvis_init",
                     default_source="protvis_init")
    _setup_conf_file(env, os.path.join("/etc/default/protvis"),
                     "protvis_default")
    _setup_simple_service("protvis")
Пример #7
0
def _setup_nginx_service(env):
    # Setup system service for nginx, not needed for CloudMan but it is
    # useful if CloudMan is not being used (such as galaxy-vm-launcher work).
    _setup_conf_file(env,
                     "/etc/init.d/nginx",
                     "nginx_init",
                     default_source="nginx_init")
    _setup_simple_service("nginx")
Пример #8
0
def _setup_protvis_service(env):
    _setup_conf_file(env, os.path.join("/etc/init.d/protvis"), "protvis_init", default_source="protvis_init")
    _setup_conf_file(env, os.path.join("/etc/default/protvis"), "protvis_default")
    _setup_simple_service("protvis")
Пример #9
0
def _setup_nginx_service(env):
    # Setup system service for nginx, not needed for CloudMan but it is
    # useful if CloudMan is not being used (such as galaxy-vm-launcher work).
    _setup_conf_file(env, "/etc/init.d/nginx", "nginx_init", default_source="nginx_init")
    _setup_simple_service("nginx")
Пример #10
0
def _setup_service(env):
    _setup_conf_file(env, "/etc/init.d/galaxy", "galaxy_init", default_source="galaxy_init")
    _setup_conf_file(env, "/etc/default/galaxy", "galaxy_default")
    _setup_simple_service("galaxy")
Пример #11
0
def _setup_xvfb(env):
    _setup_conf_file(env, "/etc/init.d/xvfb", "xvfb_init", default_source="xvfb_init")
    _setup_conf_file(env, "/etc/default/xvfb", "xvfb_default", default_source="xvfb_default")
    _setup_simple_service("xvfb")
    env.safe_sudo("mkdir /var/lib/xvfb; chown root:root /var/lib/xvfb; chmod 0755 /var/lib/xvfb")
Пример #12
0
def _setup_xvfb(env):
    _setup_conf_file(env, "/etc/init.d/xvfb", "xvfb_init", default_source="xvfb_init")
    _setup_conf_file(env, "/etc/default/xvfb", "xvfb_default", default_source="xvfb_default")
    _setup_simple_service("xvfb")
    env.safe_sudo("mkdir /var/lib/xvfb; chown root:root /var/lib/xvfb; chmod 0755 /var/lib/xvfb")