*****************************************************
* INSTALLATION INSTRUCTIONS FOR VSA CLUSTER SERVICE *
*****************************************************

Installation Instructions for Linux
-------------------------------------
NOTE 1: Please see section "Network Ports" at the end of the document to avoid potential network port conflicts.
NOTE 2: Do not install more than one VSA Cluster Service on the same host.
NOTE 3: Do not install VSA Cluster Service on a virtual machine running on a VSA datastore.

PREREQUISITES
Obtain the root privileges before starting the procedure. You have to run the installation script as root or using the sudo command.

PROCEDURE
1. Download and unzip VMware-VSAClusterService-5.1.0.0-build#-linux.zip into a $TEMP temporary location.

2. Run "$TEMP/setup/install.sh -h" to see available installation options.

3. Run "sudo $TEMP/setup/install.sh". This command will use default installation options. It will create a new vmwarevcsadmin user
   and install the product into its home directory of that user. At the end of the execution, the cluster service should start
   automatically.

4. Modify the firewall rules to allow incoming TCP/IP connections on port range 4330-4339 if during the installation process you
   have seen a corresponding warning message. If you haven't seen the message, the installer was able to modify the firewall rules
   and no further firewall changes are required.

5. If the installation was successful, you may delete the $TEMP directory.

INSTALLER OPTIONS
Usage: install.sh [options]
-h              | --help                        Print this help.
-p password     | --pass password               Password for vmwarevcsadmin account. If this parameter is not specified, then the
                                                password will not be set for the account. As the result, login to this account
                                                will be disabled. Set the password if login (e.g., su, ssh) is desired.
                                                As a best practice, we recommended disabling login to account vmwarevcsadmin.
                                                The parameter is optional.
-d install-dir  | --dir <install-dir>           Path to a directory where VCS should be installed. Default value is ~vmwarevcsadmin.
                                                The parameter is optional.
-v              | --verbose                     Print verbose information.
-D              | --debug                       Print all commands and their arguments as they are executed (set -x).

Example A:
"setup/install.sh" - default installation to the vmwarevcsadmin user home directory. The user will be created if required.

Example B:
"setup/install.sh -d /work/vcs-5.1 -p secret" - installs VCS to directory "/work/vcs-5.1" and changes the user account
                                                password to "secret"

Uninstall Instructions
-------------------------------------
You can uninstall the VSA cluster service from a Linux machine by following the procedure described below. The procedure assumes
that the cluster service was installed in some $INSTALL_HOME directory. By default, $INSTALL_HOME directory is
"~vmwarevcsadmin/VSAClusterService-5.1" if "-d" command option was not specified during the install; otherwise, it is equal to
the directory specified by "-d" option (see "Install VSA Cluster Service on Linux" section).

PREREQUISITES
Obtain the root privileges before starting the procedure. You have to run the uninstall script as root or using the sudo command.

PROCEDURE
1. Run "$INSTALL_HOME/setup/uninstall.sh -h" to see available uninstall options.

2. Run "$INSTALL_HOME/setup/uninstall.sh" to start the default uninstall process. By default, you will be asked whether you want
   to delete the $INSTALL_HOME directory, vmwarevcsadmin user and the user home directory.

3. If you manually changed the firewall rules during the service installation, you may want to change them back.

UNINSTALL OPTIONS
Usage: uninstall.sh [options]
-h | --help                        Print this help.
-k | --keepuser                    If specified the uninstall script will not remove the user account. By default the user
                                   account is removed.
-s | --silent                      If specified the uninstall script will not ask the user to confirm the deletion of the directories
                                   and the user account. This option is useful for scripted uninstall that does not require user
                                   interaction.
-v | --verbose                     Print verbose information.
-D | --debug                       Print all commands and their arguments as they are executed (set -x).

Example A:
"$INSTALL_HOME/setup/uninstall.sh" - uninstalls the product. Will prompt the user to confirm the directory and user account deletion.

Example B:
"$INSTALL_HOME/setup/uninstall.sh -s -k" - uninstalls the product. Will NOT prompt the user to confirm the directory deletion but will
                                           keep the user account intact.

Commands Supported by vmvcs Script
-------------------------------------
The list of all supported commands is given below. In order to run a command, execute "$INSTALL_HOME/bin/vmvcs <command>",
where <command> is one of the commands listed below.

1. start - starts the cluster service as a system service.

2. stop - stops the cluster service.

3. restart - restarts the cluster service.

4. console - starts the cluster service in a console mode as a foreground process. Use CTRL+C to stop it.

5. status - gives status of the cluster service process (running/not running)

6. cleanup - cleans the state of this cluster node. Run this command if you want to use this node as a part of another cluster or want to rebuild the cluster.

7. condrestart (Linux only) - restarts the cluster service but only if it is currently running.

8. dump (Linux only) - dumps Java thread stack traces. Useful for debugging to understand the Java process thread states.

Log Files
-------------------------------------
All cluster service logs can be found inside $INSTALL_HOME/logs folder.

Network Ports
-------------------------------------
VSA Cluster Service uses the following network port range for communication: 4330-4339.
Before starting VSA Cluster Service, make sure that these ports are not occupied by any other process.
