Vert.x - Shell

Java Conceptuel Diagram

About

A Vert.x Shell provides a remotely accessible shell available via Telnet, SSH that provides a variety of commands for interacting live with Vert.x services

A Vert.x Shell can be provided via the deployment of:

Management

Service

Vert.x Shell can be started programmatically via:

The configuration occurs in the ShellServiceOptions object.

when Vert.x Shell is already on your classpath you can use service:io.vertx.ext.shell instead or maven:io.vertx:vertx-shell:3.8.4

Telnet

With the vertx command line:

vertx run -conf '{"telnetOptions":{"port":5000}}' maven:io.vertx:vertx-shell:3.8.4

Ssh

keytool -genkey -keyalg RSA -keystore ssh.jks -keysize 2048 -validity 1095 -dname CN=localhost -keypass secret -storepass secret
  • create the auth config properties file
echo user.admin=password > auth.properties
  • Create the configuration file
{
    "sshOptions": {
        "port": 4000,
        "keyPairOptions": {
            "path": "ssh.jks",
            "password": "secret"
        },
        "authOptions": {
            "provider": "shiro",
            "config": {
                "properties_path": "file:auth.properties"
            }
        }
    }
}

  • Start the shell with the vertx command line
vertx run -conf '$(cat conf.json)' maven:io.vertx:vertx-shell:3.8.4

Http

  • create a certificate for the HTTP server
keytool -genkey -keyalg RSA -keystore keystore.jks -keysize 2048 -validity 1095 -dname CN=localhost -keypass secret -storepass secret
  • create the auth config
echo user.admin=password > auth.properties
  • create the http conf file
{
    "httpOptions": {
        "port": 8080,
        "ssl": true,
        "keyStoreOptions": {
            "path": "keystore.jks",
            "password": "secret"
        },
        "authOptions": {
            "provider": "" shiro,
            "config": {
                "properties_path": "file:auth.properties"
            }
        }
    }
}

  • Run
vertx run -conf '$(cat conf.json)' maven:io.vertx:vertx-shell:3.8.4

Command

https://vertx.io/docs/vertx-shell/java/#_base_commands

Command Extension

Vert.x Shell can be extended with custom commands in any language supported by Vert.x







Share this page:
Follow us:
Task Runner