Creating a PACC Image Using mapr-setup.sh

This section describes how to download and run the mapr-setup.sh script to create a Persistent Application Container Client (PACC) image.

To create a PACC image using mapr-setup.sh:

  1. Before using mapr-setup.sh, review these topics to understand important prerequisites and security considerations:
  2. Use the following steps to download the mapr-setup.sh script to a Linux or Mac OS X platform where Docker 1.12.5 or later is installed.
    NOTE
    Running mapr-setup.sh on Windows is not supported.
    1. Change the file permissions so that you can run the script:
      chmod +x /tmp/mapr-setup.sh
  3. Run the mapr-setup.sh script with the docker client command to create the Docker image:
    /tmp/mapr-setup.sh -R https://<email>:<token>@package.ezmeral.hpe.com/releases/ docker client
  4. Answer the command-line prompts to provide the information needed to configure the image. The following table describes each prompt. If you press Enter without specifying a value, mapr-setup.sh uses the default value shown in the square brackets ([]):
    Parameter Notes
    Build MapR client image? (y/n) [y] Press y to continue or n to exit the script.
    Image OS class (centos8, ubuntu18) [<local OS>]: Specify the base operating system on which to build the image.
    NOTE
    SLES is not currently supported.
    Docker FROM base image name:tag [centos:centos8]: Specify the starting image used to create the new image. If necessary, you can enter your own tag and image name to choose a base image already created for your installation.
    MapR core version [6.x.x]: Specify the core version that matches the version of the data-fabric cluster you want to access using the PACC. For the supported core values, see Table 1 in Extending a PACC. If you want to install the Hadoop Client with YARN, you must select 5.2.1 or later.
    MapR EEP version [x.x.x]: Specify the EEP version that matches the EEP version of the data-fabric cluster you want to access using the PACC. Supported values are 2.0 or later. If you want to install the Hadoop Client with YARN, you must select EEP 3.0 or later. For more information about EEPs, see EEP Components and OS Support.
    Install Hadoop YARN client (y/n) [n]: Choose whether to install the Hadoop Client with YARN. Note that the Hadoop Client with YARN requires core version 5.2.1 and EEP 3.0 or later. If you choose No, the script installs the POSIX (FUSE), HPE Ezmeral Data Fabric Database, and data-fabric streams clients. The script does not install the Hadoop Client with YARN and does not ask if you want to install the Hive, Pig, and streams clients.
    Add POSIX (FUSE) client to container? (y/n) [y]: Choose whether to install the POSIX (FUSE) client.
    Add HBase client to container? (y/n) [n]: Choose whether to install the HBase client.
    Add Hive client to container? (y/n) [n]: Choose whether to install the Hive client.
    Add Pig client to container? (y/n) [n]: Choose whether to install the Pig client.
    Add Spark client to container? (y/n) [n]: Choose whether to install the Spark client.
    Add MapR Streams clients to container? (y/n) [y]: Choose whether to install the streams clients.
    Install additional packages? (y/n) [n]:

    List of packages to be installed [python3 nano]: <space-separated-list-of-packages>

    Specify a space-separated list of custom packages that will be installed during the build of the image. For example, if you answer yes and accept the default, the python3 and nano packages are included in the container. The custom packages must be present in the default OS repository for the script to install them.
    MapR client image tag name [<name>]: Accept the software-provided name for the image, or provide your own name. This is the name you will use to run the image to create the PACC. The script automatically provides a name. For example:
    maprtech/pacc:6.0.0_4.0.0_centos7_yarn_fuse_hbase_hive_pig_streams
    Container network mode (bridge|host) [bridge]: Select the Docker network mode. For more information, see the Docker documentation.
    Container memory: specify host XX[kmg] or 0 for no limit [0]: Specify the maximum amount of memory (in kilobytes, megabytes, or gigabytes) that Docker allows the container to access. For example:
    • 2g
    • 4096m
    • 0
    Accepting the default (0), means there is no restriction on memory, and the container can use as much memory as the platform makes available.
  5. Press Enter after the last prompt. The script creates the image and notifies you of successful creation. For example:
    	Complete!
    	
    	...Success
    	
    	Stopped service mapr-posix-client-container
    	
    	...Success
    	
    	 ---> 170362a5a82d
    	Removing intermediate container 8f100b9d6d9b
    	Step 7/8 : ENTRYPOINT /opt/mapr/installer/docker/mapr-setup.sh container
    	 ---> Running in f98e5cde91ed
    	 ---> 7099a990a422
    	Removing intermediate container f98e5cde91ed
    	Step 8/8 : CMD start
    	 ---> Running in f6ae4139ab41
    	 ---> 01ca2ab6d0d3
    	Removing intermediate container f6ae4139ab41
    	Successfully built 01ca2ab6d0d3
    	
    	Edit '/root/thinclient/docker_images/client/mapr-docker-client.sh' to set
           MAPR_CLUSTER and MAPR_CLDB_HOSTS and then execute it to start the container

    mapr-setup.sh creates the mapr-docker-client.sh sample-run file and displays the location of the file:

    Edit '/root/thinclient/docker_images/client/mapr-docker-client.sh' to set
    MAPR_CLUSTER and MAPR_CLDB_HOSTS and then execute it to start the container

    mapr-docker-client.sh contains environment variables for the image and makes it easy for you to start the container.

  6. Edit the mapr-docker-client.sh script file. At a minimum, you must provide the MAPR_CLUSTER name and the MAPR_CLDB_HOSTS information. For example:
    MAPR_CLUSTER=my.cluster.com
    MAPR_CLDB_HOSTS=perfnode13[4-9].perf.lab
    NOTE
    To specify multiple entries, you can use a comma-separated list of CLDB hosts or an expression like the expressions described in "What expressions can I use to specify multiple nodes?" in the Installer FAQ.
    You may wish to provide other values. You can:
    • Specify a list of packages from the Docker hub to be installed inside the container during start-up by specifying MAPR_ADDITIONAL_PACKAGES=<space-separated-list-of-packages>.
      For example:
      MAPR_ADDITIONAL_PACKAGES=python3 nano
      Note the following considerations for this option:
      • The custom packages must be present on the Docker hub for the script to install them.
      • This option requires an Internet connection.
      • This option increases the startup time for the container.
    • Start the FUSE client by specifying the MAPR_MOUNT_PATH.
    • For a secure cluster, use a ticket by specifying a MAPR_TICKETFILE_LOCATION. For more information about security parameters, see Running the PACC Using Docker.
    • For secure and non-secure clusters, follow security best practices by specifying these parameters:
      • MAPR_CONTAINER_USER
      • MAPR_CONTAINER_GROUP
      • MAPR_CONTAINER_UID
      • MAPR_CONTAINER_GID
    • Set environment variables, such as MAPR_CLASSPATH, MAPR_HOME, PATH, and others.
    • Set the container time zone by specifying MAPR_TZ. The default is UTC.
    • Add the POSIX mount by uncommenting the MAPR_MOUNT_PATH parameter and specifying a mount path value. The MAPR_MOUNT_PATH parameter is commented out for Mac builds but not for Linux builds. If you uncomment the parameter, you can ignore the following error message:
      Started service mapr-posix-client-container [FAILED]
  7. Run the mapr-docker-client.sh file to start the container:
    ./docker_images/client/mapr-docker-client.sh

    The script uses the current user name to create a user for cluster access. This user is created so that you can run your application as a data-fabric client user:

    Testing for cluster user account...
    
    Enter MapR cluster user name: robertjones
    
    User 'robertjones' does not exist. Creating new cluster user account...
    
    Enter 'robertjones' uid: 502
     Enter 'robertjones' group name: users
     Enter 'robertjones' password: <password>
    ...Success
    
    Configuring MapR client ( -c -C perfnode134.perf.lab -N my.cluster.com)...
    
    create /opt/mapr/conf/conf.old
    Configuring Hadoop-2.7.0 at /opt/mapr/hadoop/hadoop-2.7.0
    Done configuring Hadoop
    CLDB node list: perfnode134.perf.lab:7222
    Zookeeper node list:
    Node setup configuration: hbinternal
    Log can be found at: /opt/mapr/logs/configure.log
    
    ...Success

    The successful completion of this step results in a user prompt that is inside the newly running container. Take care not to exit this prompt inadvertently, as doing so terminates the container.

  8. Open a new session to the Docker host, and use the docker ps and docker inspect commands to inspect the container. Do not try to run the docker ps and docker inspect commands from the user prompt created in Step 7. You must open a new session to the Docker host to avoid terminating the container:
    docker ps
    docker inspect <container-run-ID>