MapR 5.0 Documentation : maprinstall

The maprinstall script is deprecated as of version 2.1 of the MapR software, November 2012. Please see the Advanced Installation Topics for the latest recommendations for installation.

The maprinstall script automates the process of installing and starting MapR services on a single node or multiple nodes. The maprinstall script can take command-line arguments or interactive input about how to proceed with the installation. The maprinstall script is available in the MapR distribution version 2.0 and higher, and can be downloaded from /" class="external-link" rel="nofollow">http://package.mapr.com/releases/v3.1.0/.

The maprinstall script follows the same sequence and uses the same suite of scripts and tools that would otherwise be used for Installing MapR Software, such as configure.sh and disksetup. The maprinstall script performs the following steps when setting up a node. When running maprinstall to set up multiple nodes, these steps are performed on each node.

  1. Ensures the node meets basic prerequisites for running MapR software. See Requirements for Installation.
  2. Installs MapR and Hadoop ecosystem packages, downloaded from mapr.com or from local storage
  3. Configures the node to be part of the MapR cluster using the configure.sh command
  4. Formats storage for use with MapR-FS using the disksetup command
  5. Brings the MapR cluster services online using the mapr-warden and mapr-zookeeper init scripts

This page contains the following sections:

Syntax

./maprinstall
    [ -R <path to a roles file> | -P <list of packages> ]
    [ -C <comma-separated list of CLDBs for this cluster> ]
    [ -Z <comma-separated list of Zookeeper for this cluster> ]
    [ -D <path to a valid disks file> ]
    [ -F ]
    [ -N <cluster name> ]
    [ -f ]
    [ -p <directory containing MapR packages> | -r <MapR repository URL> ]
    [ -s ]
    [ -runuser <mapr user> ]
    [ -rungroup <mapr group> ]
    [ -sshuser <ssh user> ]
    [ --isvm ]
    [ -h | --help ]

Parameters

Parameter

Description

-R <roles file>

Path to a roles file file that lists the packages and disks for each node. Do not use in combination with -P.

-P <packages>

Comma-separated list of packages to install on this node. Do not use in combination with -R.

-C <CLDB nodes>

Comma-separated list of the CLDB nodes for this cluster

-Z <ZooKeeper nodes>

Comma-separated list of ZooKeeper nodes for this cluster

-D <disks file>

Path to a disks file. Required when installing the mapr-fileserver package without a roles file.

-F

Format the disks specified in the roles file or by the -D option.

-N <name>

The name of the cluster. Default is my.cluster.com.

-f

"Force" install. Skip checks for system requirements. The software might not run reliably if installed on a node that does not meet prerequisites.

-r <repo URL>

URL for MapR repository. Overrides local repository manager settings on the node. Do not use in combination with -p.

-p <package path>

Path to a directory containing MapR packages. Do not use in combination with -r.

-s

Don't start MapR services on node.

-runuser <mapr user>

The user name that MapR services will run as. Default is mapr.

-rungroup <mapr group>

The group name that MapR services will run as. Default is to match the -runuser option.

-sshuser <ssh user>

The user name that will be used to log in to each node via ssh. Default is the currently logged-in user, typically root.

--isvm

Use when installing on virtual machine(s) to relax certain system requirements.

-h, --help

Display help.

Output

The maprinstall script outputs status messages as it proceeds and generates log files in /opt/mapr/logs/ on each node it executes on. Two files are of interest:

  • maprinstall.log.summary - A human-readable summary of the installation process
  • maprinstall.log - A detailed report of all script actions performed

Multi-Node Install

The maprinstall script greatly simplifies the process of installing MapR services on multiple nodes. Adminstrators create a text file called a roles file, which specifies the hostnames or IP addresses of the nodes to be installed, the specific services to setup on each of those nodes, and the disks for use with MapR-FS. The maprinstall script takes the roles file and coordinates the installation process on each node, reporting any errors or exceptions, and brings up the cluster.

Once started, the maprinstall script continues executing even if some nodes do not complete installation, so you must check the summary log or the MapR Control System to verify all nodes launched as expected. The cluster will come up with the nodes that succeeded installation, and you can troubleshoot later to bring the failed nodes online. If all nodes fail installation and the cluster does not come up, you can address the issue(s) on all nodes and re-run the maprinstall script.

The maprinstall script uses keyless SSH as root (or the user specified by -sshuser) to log into each node and perform installation steps. On all nodes, the maprinstall script assigns the same MapR user, as specified by -runuser. If the MapR user does not exist on a node, the maprinstall script creates one. However, MapR recommends that the system administrator create the MapR user uniformly on all nodes before beginning installation, because the MapR user's name, UID, and GID must match on all nodes. See Requirements for Installation for details on root access, creating the MapR user, and setting up keyless SSH.

The multi-node install process copies the maprinstall script to each node in the directory /opt/install-mapr, and then performs a single-node install by executing the script locally. Section Single-Node Install below provides further detail on how the maprinstall script proceeds on each node.

Examples: Using the maprinstall script to install a cluster based on input from a roles file

/opt/install-mapr/maprinstall -R /root/100nodes.roles -N americas -p /packagedepot/mapr/ -F

This example creates a cluster named americas by taking node specifications from a file 100nodes.roles and installing packages from the /packagedepot/mapr directory on each node. The -F option formats all disks specified in the roles file.

Single-Node Install

When applied to a single node, the maprinstall script manages the process of downloading and installing packages, and starting services.

The maprinstall script can get package files from either a repository or a user-specified path.

  • If no path is specified, the maprinstall script relies on the node's package manager to identify appropriate repositories and install dependencies. The repository can be on a private network or the Internet. The maprinstall script relies on the package manager to resolve dependencies.
  • If a path to package files is specified, then all dependencies must be pre-installed on the node.

See Preparing Packages and Repositories for further details.

The maprinstall script aborts installation on a node under any of the following conditions:

  • The MapR warden or ZooKeeper services are already running on the node. See Decommissioning a Node for details on stopping the warden or ZooKeeper.
  • A package to install is already installed on the node. See Decommissioning a Node for details on uninstalling.
  • The node does not meet hardware requirements. You can ignore hardware requirements and force install with the (-f) option, although system performance will be compromised.

Example: Using the maprinstall script to install on a single node

In this example, all cluster services will run on a single node with IP address 10.10.100.1.

/opt/install-mapr/maprinstall -P mapr-nfs,mapr-fileserver,mapr-metrics,mapr-jobtracker -D nodedisks -C 10.10.100.1 -Z 10.10.100.1

This example installs the services mapr-nfs, mapr-fileserver, mapr-metrics and mapr-jobtracker from the MapR repository onto a single node. The command provides the list of local disks for the MapR cluster in file nodedisks, and specifies the hosts IP addresses for two CLDB nodes and three ZooKeeper nodes in the cluster.