Пример #1
0
 def __init__(self, name, function, server_subcommand, **kwargs):
     JavaVerb.__init__(self, name, function, 'org.voltdb.VoltDB', **kwargs)
     self.server_subcommand = server_subcommand
     # Add common server-ish options.
     self.add_options(
         cli.StringOption('-d',
                          '--deployment',
                          'deployment',
                          'the deployment configuration file path',
                          default='deployment.xml'),
         cli.HostOption('-H',
                        '--host',
                        'host',
                        'the host',
                        default='localhost'),
         cli.StringOption('-l', '--license', 'license',
                          'the license file path'))
     self.add_arguments(
         cli.StringArgument('catalog',
                            'the application catalog jar file path'))
     # Add appropriate server-ish Java options.
     self.merge_java_options('java_opts_override', '-server',
                             '-XX:+HeapDumpOnOutOfMemoryError',
                             '-XX:HeapDumpPath=/tmp',
                             '-XX:-ReduceInitialCardMarks')
Пример #2
0
 def initialize(self, verb):
     JavaBundle.initialize(self, verb)
     verb.add_options(
         cli.StringOption('-d', '--deployment', 'deployment',
                          'specify the location of the deployment file',
                          default = None))
     if self.default_host:
         verb.add_options(cli.StringOption('-H', '--host', 'host',
             'HOST[:PORT] (default HOST=localhost, PORT=3021)',
             default='localhost:3021'))
     else:
         verb.add_options(cli.StringOption('-H', '--host', 'host',
             'HOST[:PORT] host must be specified (default HOST=localhost, PORT=3021)'))
     if self.supports_live:
        verb.add_options(cli.BooleanOption('-b', '--blocking', 'block', 'perform a blocking rejoin'))
     if self.needs_catalog:
         verb.add_arguments(cli.PathArgument('catalog',
                            'the application catalog jar file path',
                            min_count=0, max_count=1))
     # --safemode only used by recover server action.
     if self.safemode_available:
         verb.add_options(cli.BooleanOption(None, '--safemode', 'safemode', None))
     if self.supports_daemon:
         verb.add_options(
             cli.BooleanOption('-B', '--background', 'daemon',
                               'run the VoltDB server in the background (as a daemon process)'))
Пример #3
0
 def initialize(self, verb):
     JavaBundle.initialize(self, verb)
     verb.add_options(
         cli.StringOption('-d',
                          '--deployment',
                          'deployment',
                          'specify the location of the deployment file',
                          default=None))
     if self.default_host:
         verb.add_options(
             cli.StringOption(
                 '-H',
                 '--host',
                 'host',
                 'HOST[:PORT] (default HOST=localhost, PORT=3021)',
                 default='localhost:3021'))
     else:
         verb.add_options(
             cli.StringOption(
                 '-H', '--host', 'host',
                 'HOST[:PORT] host must be specified (default HOST=localhost, PORT=3021)'
             ))
     if self.supports_live:
         verb.add_options(
             cli.BooleanOption('-b', '--blocking', 'block',
                               'perform a blocking rejoin'))
     if self.needs_catalog:
         verb.add_arguments(
             cli.PathArgument('catalog',
                              'the application catalog jar file path'))
Пример #4
0
 def initialize(self, verb):
     verb.add_options(
         cli.HostOption('-H', '--host', 'host', 'connection',
                        default      = 'localhost',
                        min_count    = self.min_count,
                        max_count    = self.max_count,
                        default_port = self.default_port),
         cli.StringOption('-p', '--password', 'password', "the connection password"),
         cli.StringOption('-u', '--user', 'username', 'the connection user name'))
Пример #5
0
 def initialize(self, verb):
     verb.add_options(
         cli.StringOption('-l', '--license', 'license',
                          'specify the location of the license file'),
         cli.StringOption(
             None, '--client', 'clientport',
             'specify the client port as [ipaddress:]port-number'),
         cli.StringOption(
             None, '--internal', 'internalport',
             'specify the internal port as [ipaddress:]port-number used to communicate between cluster nodes'
         ),
         cli.StringOption(
             None, '--zookeeper', 'zkport',
             'specify the zookeeper port as [ipaddress:]port-number'),
         cli.StringOption(
             None, '--replication', 'replicationport',
             'specify the replication port as [ipaddress:]port-number (1st of 3 sequential ports)'
         ),
         cli.StringOption(
             None, '--admin', 'adminport',
             'specify the admin port as [ipaddress:]port-number'),
         cli.StringOption(
             None, '--http', 'httpport',
             'specify the http port as [ipaddress:]port-number'),
         cli.StringOption(
             None, '--internalinterface', 'internalinterface',
             'specify the network interface to use for internal communication, such as the internal and zookeeper ports'
         ),
         cli.StringOption(
             None, '--externalinterface', 'externalinterface',
             'specify the network interface to use for external ports, such as the admin and client ports'
         ))
Пример #6
0
 def initialize(self, verb):
     verb.add_options(
         cli.HostOption('-H', '--host', 'host', 'connection',
                        default      = 'localhost',
                        min_count    = self.min_count,
                        max_count    = self.max_count,
                        default_port = self.default_port),
         cli.StringOption('-p', '--password', 'password', "the connection password"),
         cli.StringOption('-u', '--user', 'username', 'the connection user name'),
         cli.StringOption(None, '--credentials', 'credentials', 'the credentials file which contains user name and password'),
         cli.StringOption(None, '--ssl', 'ssl_config','''enable and config ssl''', default=None),
         cli.BooleanOption(None, '--kerberos', 'kerberos', '''enable kerberos'''))
Пример #7
0
 def initialize(self, verb):
     verb.add_options(
        cli.StringOption('-l', '--license', 'license', 'specify the location of the license file'),
        cli.StringOption(None, '--client', 'clientport', 'specify the client port as [ipaddress:]port-number'),
        cli.StringOption(None, '--internal', 'internalport', 'specify the internal port as [ipaddress:]port-number used to communicate between cluster nodes'),
        cli.StringOption(None, '--zookeeper', 'zkport', 'specify the zookeeper port as [ipaddress:]port-number'),
        cli.StringOption(None, '--replication', 'replicationport', 'specify the replication port as [ipaddress:]port-number (1st of 3 sequential ports)'),
        cli.StringOption(None, '--admin', 'adminport', 'specify the admin port as [ipaddress:]port-number'),
        cli.StringOption(None, '--http', 'httpport', 'specify the http port as [ipaddress:]port-number'),
        cli.StringOption(None, '--internalinterface', 'internalinterface', 'specify the network interface to use for internal communication, such as the internal and zookeeper ports'),
        cli.StringOption(None, '--externalinterface', 'externalinterface', 'specify the network interface to use for external ports, such as the admin and client ports'),
        cli.StringOption(None, '--publicinterface', 'publicinterface', 'For hosted or cloud environments with non-public interfaces, this argument specifies a publicly-accessible alias for reaching the server. Particularly useful for remote access to the VoltDB Management Center.'))
Пример #8
0
    def initialize(self, verb):
        JavaBundle.initialize(self, verb)
        verb.add_options(
            cli.StringListOption(None, '--ignore', 'skip_requirements',
                             '''requirements to skip when start voltdb:
                 thp - Checking for Transparent Huge Pages (THP) has been disabled.  Use of THP can cause VoltDB to run out of memory. Do not disable this check on production systems.''',
                             default = None))
        if self.is_legacy_verb:
            verb.add_options(
                cli.StringOption('-d', '--deployment', 'deployment',
                                 'specify the location of the deployment file',
                                 default = None))
        verb.add_options(
            cli.StringOption('-g', '--placement-group', 'placementgroup',
                             'placement group',
                             default = '0'))
        if self.is_legacy_verb and self.default_host:
            verb.add_options(cli.StringOption('-H', '--host', 'host',
                'HOST[:PORT] (default HOST=localhost, PORT=3021)',
                default='localhost:3021'))
        elif self.is_legacy_verb:
            verb.add_options(cli.StringOption('-H', '--host', 'host',
                'HOST[:PORT] host must be specified (default HOST=localhost, PORT=3021)'))
        if self.supports_live:
           verb.add_options(cli.BooleanOption('-b', '--blocking', 'block', 'perform a blocking rejoin'))
        if self.needs_catalog:
            verb.add_arguments(cli.PathArgument('catalog',
                               'the application catalog jar file path',
                               min_count=0, max_count=1))
        # --safemode only used by recover server action.
        if self.safemode_available:
            verb.add_options(cli.BooleanOption(None, '--safemode', 'safemode', None))
        if self.supports_daemon:
            verb.add_options(
                cli.BooleanOption('-B', '--background', 'daemon',
                                  'run the VoltDB server in the background (as a daemon process)'))
            if self.supports_multiple_daemons:
                # Keep the -I/--instance option hidden for now.
                verb.add_options(
                    cli.IntegerOption('-I', '--instance', 'instance',
                                  #'specify an instance number for multiple servers on the same host'))
                                  None))
        if self.supports_paused:
            verb.add_options(
                cli.BooleanOption('-p', '--pause', 'paused',
                                  'Start Database in paused mode.'))

        if self.force_voltdb_create:
            verb.add_options(
                cli.BooleanOption('-f', '--force', 'force',
                                  'Start a new, empty database even if the VoltDB managed directories contain files from a previous session that may be overwritten.'))
Пример #9
0
    def __init__(self, name, function, **kwargs):
        CommandVerb.__init__(self, name, function, **kwargs)
        self.set_defaults(
            description='Create a runnable Python program package.',
            baseverb=True,
            hideverb=True,
            description2='''
The optional NAME argument(s) allow package generation for base commands other
than the current one. If no NAME is provided the current base command is
packaged.''')
        self.add_options(
            cli.BooleanOption('-f',
                              '--force',
                              'force',
                              'overwrite existing file without asking',
                              default=False),
            cli.StringOption(
                '-o', '--output_dir', 'output_dir',
                'specify the output directory (defaults to the working directory)'
            ))
        self.add_arguments(
            cli.StringArgument('name',
                               'base command name',
                               min_count=0,
                               max_count=None))
Пример #10
0
 def initialize(self, verb):
     JavaBundle.initialize(self, verb)
     verb.add_options(
         cli.StringListOption(None, '--ignore', 'skip_requirements',
                          '''requirements to skip when start voltdb:
              thp - Checking for Transparent Huge Pages (THP) has been disabled.  Use of THP can cause VoltDB to run out of memory. Do not disable this check on production systems.''',
                          default = None))
     verb.add_options(
         cli.StringOption('-g', '--placement-group', 'placementgroup',
                          'placement group',
                          default = '0'))
     # --safemode only used by recover server action (on start)
     if self.safemode_available:
         verb.add_options(cli.BooleanOption(None, '--safemode', 'safemode', None))
     if self.supports_daemon:
         verb.add_options(
             cli.BooleanOption('-B', '--background', 'daemon',
                               'run the VoltDB server in the background (as a daemon process)'))
         if self.supports_multiple_daemons:
             # Keep the -I/--instance option hidden for now.
             verb.add_options(
                 cli.IntegerOption('-I', '--instance', 'instance',
                               #'specify an instance number for multiple servers on the same host'))
                               None))
     if self.supports_paused:
         verb.add_options(
             cli.BooleanOption('-p', '--pause', 'paused',
                               'Start Database in paused mode.'))
Пример #11
0
 def start(self, verb, runner):
     verb.add_options(cli.StringOption(None, '--credentials', "credentials", "contains username and password information"))
     pass
Пример #12
0
 def initialize(self, verb):
     verb.add_options(
        cli.StringOption('-l', '--license', 'license', 'specify a license file to replace the existing staged copy of the license'),
        cli.StringOption(None, '--client', 'clientport', 'specify the client port as [ipaddress:]port-number'),
        cli.StringOption(None, '--internal', 'internalport', 'specify the internal port as [ipaddress:]port-number used to communicate between cluster nodes'),
        cli.StringOption(None, '--zookeeper', 'zkport', 'specify the zookeeper port as [ipaddress:]port-number'),
        cli.StringOption(None, '--drpublic', 'drpublic', 'Specifies the interface (ipaddress[:port-number]) advertised to consumer clusters as the DR interface, used in hosted environments where internal interfaces are not reachable'),
        cli.StringOption(None, '--replication', 'replicationport', 'specify the replication port as [ipaddress:]port-number (1st of 3 sequential ports)'),
        cli.StringOption(None, '--admin', 'adminport', 'specify the admin port as [ipaddress:]port-number'),
        cli.StringOption(None, '--http', 'httpport', 'specify the http port as [ipaddress:]port-number'),
        cli.StringOption(None, '--status', 'statusport', None), # hidden: 'specify the port used for status monitoring via http, as [ipaddress:]port-number'
        cli.StringOption(None, '--internalinterface', 'internalinterface', 'specify the network interface to use for internal communication, such as the internal and zookeeper ports'),
        cli.StringOption(None, '--externalinterface', 'externalinterface', 'specify the network interface to use for external ports, such as the admin and client ports'),
        cli.StringOption(None, '--publicinterface', 'publicinterface', 'For hosted or cloud environments with non-public interfaces, this argument specifies a publicly-accessible alias for reaching the server. Particularly useful for remote access to the VoltDB Management Center.'),
        cli.StringOption(None, '--topicspublic', 'topicspublic', 'Specifies the interface (ipaddress[:port-number]) advertised to subscribers as the Topics interface, used in hosted environments where internal interfaces are not reachable'),
        cli.StringOption(None, '--topicsport', 'topicsport', 'specify the topics port as [ipaddress:]port-number'))