# build exhibitor mkdir exhibitor cd exhibitor/ wget https://github.com/soabase/exhibitor/archive/exhibitor-1.7.1.zip unzip exhibitor-1.7.1.zip cd exhibitor-exhibitor-1.7.1/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven mvn clean package
[INFO] Replacing original artifact with shaded artifact. [INFO] Replacing /root/exhibitor/exhibitor-exhibitor-1.7.1/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/target/exhibitor-1.6.0.jar with /root/exhibitor/exhibitor-exhibitor-1.7.1/exhibitor-standalone/src/main/resources/buildscripts/standalone/maven/target/exhibitor-1.6.0-shaded.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 44.624s [INFO] Finished at: Tue Jan 08 11:28:59 SGT 2019 [INFO] Final Memory: 15M/94M [INFO] ------------------------------------------------------------------------
cp target/exhibitor-1.6.0.jar /tmp
# Once built, Exhibitor is completely self-contained and can be run from the command line: java -jar <path>/exhibitor-xxx.jar -c file
[root@localhost ~]# java -jar exhibitor-1.6.0.jar -c file v1.6.0 INFO com.netflix.exhibitor.core.activity.ActivityLog Exhibitor started [main] Jan 08, 2019 11:32:38 AM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. INFO org.mortbay.log Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog [main] INFO org.mortbay.log jetty-1.6.0 [main] Jan 08, 2019 11:32:38 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate INFO: Initiating Jersey application, version 'Jersey: 1.18.3 12/01/2014 08:23 AM' INFO org.mortbay.log Started SocketConnector@0.0.0.0:8080 [main] Jan 08, 2019 11:33:00 AM java.util.prefs.FileSystemPreferences$6 run WARNING: Prefs file removed in background /root/.java/.userPrefs/prefs.xml INFO com.netflix.exhibitor.core.activity.ActivityLog State: latent [ActivityQueue-0]
# You can test that it’s running correctly by going to this URL in a browser: http://localhost:8080/exhibitor/v1/ui/index.html http://192.168.56.103:8080/exhibitor/v1/ui/index.html
The above describes running with the default configuration, however you’ll likely need to customize some of the defaults. Exhibitor accepts several command line options (the complete list is shown when run with –help).
-?,--help Print this help -c,--configtype <arg> Defines which configuration type you want to use. Choices are: "file", "s3", "zookeeper" or "none". Additional config will be required depending on whichtype you are using. --configcheckms <arg> Period (ms) to check for shared config updates. Default is: 30000 --defaultconfig <arg> Full path to a file that contains initial/default values for Exhibitor/ZooKeeper config values. The file is a standard property file. The property names are listed below. The file can specify some or all of the properties. --headingtext <arg> Extra text to display in UI header --hostname <arg> Hostname to use for this JVM. Default is: aldh009.aldc.att.com --jquerystyle <arg> Styling used for the JQuery-based UI. Currently available options: red, black, custom --loglines <arg> Max lines of logging to keep in memory for display. Default is 1000. --nodemodification <arg> If true, the Explorer UI will allow nodes to be modified (use with caution). Default is true. --port <arg> Port for the HTTP Server. Default is: 8080 --prefspath <arg> Certain values (such as Control Panel values) are stored in a preferences file. By default, Preferences.userRoot() is used. Use this option to specify a different file path. --servo <arg> true/false (default is false). If enabled, ZooKeeper will be queried once a minute for its state via the 'mntr' four letter word (this requires ZooKeeper 3.4.x+). Servo will be used to publish this data via JMX. --timeout <arg> Connection timeout (ms) for ZK connections. Default is 30000.
== S3 Options == --s3credentials <arg> Optional credentials to use for s3backup or s3config. Argument is the path to an AWS credential properties file with two properties: com.netflix.exhibitor.s3.access-key-id and com.netflix.exhibitor.s3.access-secret-key --s3region <arg> Optional region for S3 calls (e.g. "eu-west-1"). Will be used to set the S3 client's endpoint. == Configuration Options for Type "s3" == --s3config <arg> The bucket name and key to store the config (s3credentials may be provided as well). Argument is [bucket name]:[key]. --s3configprefix <arg> When using AWS S3 shared config files, the prefix to use for values such as locks. Default is exhibitor- == Configuration Options for Type "zookeeper" == --zkconfigconnect <arg> The initial connection string for ZooKeeper shared config storage. E.g: "host1:2181,host2:2181..." --zkconfigexhibitorpath <arg> Used if the ZooKeeper shared config is also running Exhibitor. This is the URI path for the REST call. The default is: / --zkconfigexhibitorport <arg> Used if the ZooKeeper shared config is also running Exhibitor. This is the port that Exhibitor is listening on. IMPORTANT: if this value is not set it implies that Exhibitor is not being used on the ZooKeeper shared config. --zkconfigpollms <arg> The period in ms to check for changes in the config ensemble. The default is: 10000 --zkconfigretry <arg> The retry values to use in the form sleep-ms:retry-qty. The default is: 1000:3 --zkconfigzpath <arg> The base ZPath that Exhibitor should use. E.g: "/exhibitor/config" == Configuration Options for Type "file" == --fsconfigdir <arg> Directory to store Exhibitor properties (cannot be used with s3config). Exhibitor uses file system locks so you can specify a shared location so as to enable complete ensemble management. Default location is /opt/app/grid/products/exhibitor2/bin --fsconfiglockprefix <arg> A prefix for a locking mechanism. Used in conjunction with fsconfigdir. Default is exhibitor-lock- --fsconfigname <arg> The name of the file to store config in. Used in conjunction with fsconfigdir. Default is exhibitor.properties == Configuration Options for Type "none" == --noneconfigdir <arg> Directory to store the local configuration file. Config type "none" is a special purpose type that should only be used when running a second ZooKeeper ensemble that is used for storing config. DO NOT USE THIS MODE for a normal ZooKeeper ensemble. == Backup Options == --filesystembackup <arg> If true, enables file system backup of ZooKeeper log files. --s3backup <arg> If true, enables AWS S3 backup of ZooKeeper log files (s3credentials may be provided as well). == Authorization Options == --realm <arg> Specifies the realm as [realm name]:[path/url]. The path/url must point to a realm properties file as described here (see HashUserRealm): http://docs.codehaus.org/display/JETTY/Realms --remoteauth <arg> Exhibitor uses the Jersey Client to remotely connect to each Exhibitor instance in the ensemble. If you have security enabled for Exhibitor you also need to specify authorization for the remote client. The argument for remoteauth is: <type>:<realm-user>. "type" must be either "basic" or "digest". "realm-user" is the user to use from the realm file. --security <arg> Path to a web.xml file with security information (all other tags are ignored). See http://docs.oracle.com/javaee/6/tutorial/doc/gkba a.html. == Deprecated Authorization Options == --basicauthrealm <arg> Basic Auth Realm to Protect the Exhibitor UI (DEPRECATED - use --security/--realm instead) --consolepassword <arg> Basic Auth Password to Protect the Exhibitor UI (DEPRECATED - use --security/--realm instead) --consoleuser <arg> Basic Auth Username to Protect the Exhibitor UI (DEPRECATED - use --security/--realm instead) --curatorpassword <arg> Basic Auth Password to Protect cluster list api (DEPRECATED - use --security/--realm instead) --curatoruser <arg> Basic Auth Password to Protect the cluster list api (DEPRECATED - use --security/--realm instead) == ACL Options == --aclid <arg> Enable ACL for Exhibitor's internal ZooKeeper connection. This sets the ACL's ID. --aclperms <arg> Enable ACL for Exhibitor's internal ZooKeeper connection. This sets the ACL's Permissions - a comma list of possible permissions. If this isn't specified the permission is set to ALL. Values: read, write, create, delete, admin --aclscheme <arg> Enable ACL for Exhibitor's internal ZooKeeper connection. This sets the ACL's Scheme.
Note that exhibitors in an ensemble communicate with each other on the port specified by —port (default to 8080), so make sure this port is open between exhibitor processes in an ensemble.