Add service entry for shellinabox console proxy
Change-Id: I358bb501e772a10281e35825b7f048abd9b73797 Partially-Implements: bp console-support
This commit is contained in:
parent
7e27639fdb
commit
9eba5f599a
|
@ -0,0 +1,34 @@
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from mogan.common import service as mogan_service
|
||||||
|
from mogan.conf import CONF
|
||||||
|
from mogan.conf import shellinabox
|
||||||
|
from mogan.console import shellinabox as shellinabox_console
|
||||||
|
|
||||||
|
shellinabox.register_cli_opts(CONF)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
mogan_service.prepare_service(sys.argv)
|
||||||
|
|
||||||
|
server_address = (CONF.shellinabox_console.shellinaboxproxy_host,
|
||||||
|
CONF.shellinabox_console.shellinaboxproxy_port)
|
||||||
|
|
||||||
|
httpd = shellinabox_console.ThreadingHTTPServer(
|
||||||
|
server_address,
|
||||||
|
shellinabox_console.ProxyHandler)
|
||||||
|
httpd.service_start()
|
|
@ -22,6 +22,54 @@ The shellinabox console feature allows you to connect to a guest in case a
|
||||||
graphical console like VNC, RDP or SPICE is not available. This is only
|
graphical console like VNC, RDP or SPICE is not available. This is only
|
||||||
currently supported for the Ironic driver.""")
|
currently supported for the Ironic driver.""")
|
||||||
|
|
||||||
|
shellinaboxproxy_host_opt = cfg.IPOpt('shellinaboxproxy_host',
|
||||||
|
default='0.0.0.0',
|
||||||
|
help="""
|
||||||
|
The IP address which is used by the ``mogan-shellinaboxproxy`` service to
|
||||||
|
listen for incoming requests.
|
||||||
|
|
||||||
|
The ``mogan-shellinaboxproxy`` service listens on this IP address for incoming
|
||||||
|
connection requests to instances which expose shellinabox serial console.
|
||||||
|
|
||||||
|
Possible values:
|
||||||
|
|
||||||
|
* An IP address
|
||||||
|
|
||||||
|
Services which consume this:
|
||||||
|
|
||||||
|
* ``mogan-shellinaboxproxy``
|
||||||
|
|
||||||
|
Interdependencies to other options:
|
||||||
|
|
||||||
|
* Ensure that this is the same IP address which is defined in the option
|
||||||
|
``shellinabox_base_url`` of this section or use ``0.0.0.0`` to listen on
|
||||||
|
all addresses.
|
||||||
|
""")
|
||||||
|
|
||||||
|
shellinaboxproxy_port_opt = cfg.PortOpt('shellinaboxproxy_port',
|
||||||
|
default=8866,
|
||||||
|
min=1,
|
||||||
|
max=65535,
|
||||||
|
help="""
|
||||||
|
The port number which is used by the ``mogan-shellinaboxproxy`` service to
|
||||||
|
listen for incoming requests.
|
||||||
|
|
||||||
|
The ``mogan-shellinaboxproxy`` service listens on this port number for incoming
|
||||||
|
connection requests to instances which expose shellinabox serial console.
|
||||||
|
|
||||||
|
Possible values:
|
||||||
|
|
||||||
|
* A port number
|
||||||
|
|
||||||
|
Services which consume this:
|
||||||
|
|
||||||
|
* ``mogan-shellinaboxproxy``
|
||||||
|
|
||||||
|
Interdependencies to other options:
|
||||||
|
|
||||||
|
* Ensure that this is the same port number which is defined in the option
|
||||||
|
``shellinabox_base_url`` of this section.
|
||||||
|
""")
|
||||||
|
|
||||||
shellinabox_base_url_opt = cfg.URIOpt('shellinabox_base_url',
|
shellinabox_base_url_opt = cfg.URIOpt('shellinabox_base_url',
|
||||||
default='http://127.0.0.1:8866/',
|
default='http://127.0.0.1:8866/',
|
||||||
|
|
|
@ -45,6 +45,7 @@ console_scripts =
|
||||||
mogan-engine = mogan.cmd.engine:main
|
mogan-engine = mogan.cmd.engine:main
|
||||||
mogan-scheduler = mogan.cmd.scheduler:main
|
mogan-scheduler = mogan.cmd.scheduler:main
|
||||||
mogan-consoleauth = mogan.cmd.consoleauth:main
|
mogan-consoleauth = mogan.cmd.consoleauth:main
|
||||||
|
mogan-shellinaboxproxy = mogan.cmd.shellinaboxproxy:main
|
||||||
|
|
||||||
mogan.database.migration_backend =
|
mogan.database.migration_backend =
|
||||||
sqlalchemy = mogan.db.sqlalchemy.migration
|
sqlalchemy = mogan.db.sqlalchemy.migration
|
||||||
|
|
Loading…
Reference in New Issue