Revolution R Enterprise DeployR 7.1 Installation Guide for Linux

Revolution R Enterprise  DeployR™ 7.1   Installation Guide for Linux  The correct bibliographic citation for this manual is as follows: Revolution A...
Author: Alban Scott May
3 downloads 2 Views 433KB Size
Revolution R Enterprise  DeployR™ 7.1   Installation Guide for Linux 

The correct bibliographic citation for this manual is as follows: Revolution Analytics, Inc. 2014. Revolution R Enterprise DeployR Installation Guide for Linux. Revolution Analytics, Inc., Mountain View, CA. Revolution R Enterprise DeployR Installation Guide for Linux Copyright © 2014 Revolution Analytics, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Revolution Analytics. U.S. Government Restricted Rights Notice: Use, duplication, or disclosure of this software and related documentation by the Government is subject to restrictions as set forth in subdivision (c) (1) (ii) of The Rights in Technical Data and Computer Software clause at 52.227-7013. Revolution R, Revolution R Enterprise, RPE, RevoScaleR, DeployR, RevoTreeView, and Revolution Analytics are trademarks of Revolution Analytics. Other product names mentioned herein are used for identification purposes only and may be trademarks of their respective owners. Revolution Analytics 2570 West El Camino Real Suite 222 Mountain View, CA, 94040 USA

We want our documentation to be useful, and we want it to address your needs. If you have comments on this or any Revolution document, write to [email protected].

Contents  Chapter 1:

Before You Begin ..................................................................................................1  System Requirements .............................................................................................1  Migrating Data to DeployR 7.1 ..............................................................................1  Setting Up DeployR on Amazon Web Services .....................................................2  Package and Software Dependencies .....................................................................2  What’s New in Revolution R Enterprise DeployR ................................................3  DeployR Configurations.........................................................................................5 

Chapter 2:

Installing DeployR ................................................................................................7  Automated Installation ...........................................................................................8  Preparing to Install .............................................................................................. 8  Option 1: Installing a DeployR Main Server with a Local Database .................. 9  Option 2: Installing a Remote Database for DeployR ....................................... 10  Option 3: Installing DeployR Main Server for a Remote Database .................. 10  Option 4: Installing a DeployR Grid Node........................................................ 11 

Manual Installation ...............................................................................................12  Chapter 3:

Post Installation Configuration .........................................................................13  Updating IPTABLES Firewall .............................................................................13  Customizing Settings in the Administration Console ..........................................14  Configuring the DeployR Grid .............................................................................15  Configuring External Directories for Big Data ....................................................16  Installing and Configuring NFS for External Directory Support ...................... 16  DeployR’s External Directory Structure ........................................................... 18  Getting Files into the External Directory Share ................................................ 19 

[i]

Contents

How to Reference Files in External Directories ................................................ 19  How to Write Data Files to External Directories .............................................. 20 

Updating Cairo Library ........................................................................................20  Configuring SSL for Tomcat ................................................................................20  Configuring SELinux ...........................................................................................22  Configuring Enterprise Security ...........................................................................22  Chapter 4:

Getting Started with DeployR ...........................................................................23  Accessing DeployR Home to Test the Install ......................................................23  Exploring the API .................................................................................................23  Exploring JavaScript Samples ..............................................................................24 

Chapter 5:

Stopping and Starting DeployR ........................................................................25  Stopping the Server ..............................................................................................25  Starting the Server ................................................................................................25 

Chapter 6:

Uninstalling DeployR .........................................................................................27  Uninstalling DeployR Main Server ......................................................................27  Uninstalling DeployR Grid Nodes .......................................................................28 

Chapter 7:

Troubleshooting Tips .........................................................................................29 

[ii]

1 Revolution R Enterprise DeployR Installation Guide for Linux

Before You Begin 

1

System Requirements   Before you start the Revolution R Enterprise DeployR installation, make sure the computer meets the minimum hardware and software requirements. 

Operating system. Red Hat® Enterprise Linux® 5.4, 5.5, 5.6, 5.7, 6.0, 6.1, 6.2, 6.3, 6.4 (64-bit processors), SUSE® Linux Enterprise Server 11 SP2



Hardware. Intel Pentium®-class processor; 3.0 GHz recommended



Free disk space. 250 GB or more recommended



RAM. 4 GB or more is recommended



Java JVM Heap Size. 1 GB or more in production



Swap space. 8 GB or more for larger data sets is recommended



Internet access and browser. To download DeployR and its software dependencies and also to interact with the Administration Console, API Explorer Tools, and samples.

Important! We recommend installing DeployR on a dedicated server machine.

Migrating Data to DeployR 7.1  If you are an existing customer, please carefully consult the Revolution R Enterprise DeployR Data Migration Guide before you install DeployR 7.1. This guide will explain how to migrate users, scripts, projects, and other data. Additionally, you can learn about troubleshooting as well as preserving and updating JavaScript application files.

2 Chapter 1: Before You Begin

Setting Up DeployR on Amazon Web Services  For each Amazon EC-2 instance, make sure you have: 

Have the minimum required disk space or more for the DeployR software and database



Set the appropriate security permissions on the external and internal ports used by DeployR by performing the following: a. Disable iptables (Linux only) b. Open the DeployR external ports, 7100 by default, through the AWS console



Change the passwords to the default DeployR user accounts immediately after installing DeployR, especially the admin account.

Package and Software Dependencies  DeployR depends on the installation and configuration of these software dependencies.

Important! If an internet connection is available, the installation of these dependencies is handled for you automatically. However, if you do not have an internet connection or if you install DeployR manually, install these dependencies yourself. Dependency and Version  

Java™ Runtime Environment 1.7.0_13

DeployR Main Server 

DeployR Grid Node 

Yes

No

Yes. If needed, also install on the remote database machine.

No

Revolution R Enterprise 7.1 (and all of its dependencies)

Yes

Yes

Rserve 0.6-3.1

Yes

Yes

Apache Tomcat™ 7.0.34

Yes

No

Yes (Redhat only)

Yes

MongoDB® version 2.4.5

make* library nfs-utils and nfs-utils-lib*

Yes, when using for external directories

* Use the RHEL repository corresponding to your Linux version. For more information on installing packages, see your operating system documentation.

3 Revolution R Enterprise DeployR Installation Guide for Linux

What’s New in Revolution R Enterprise DeployR  Revolution R Enterprise DeployR 7.1 

With this release, RevoDeployR is now called Revolution R Enterprise DeployR, or DeployR for short.



We’ve also introduced the DeployR Repository Manager, which is a tool that simplifies the task of managing repository files. Authenticated DeployR users can use the Repository Manager to manage repository files (R scripts, data files, and so on) as well as interact with their R scripts in a live debugging environment. Note that the script management functionality formerly found in the RevoDeployR Management Console is now contained in the Repository Manager. This tool can be accessed through the DeployR landing page.



The Management Console has been renamed to the Administration Console. Other changes to that console include: o The Administration Console can only be accessed by the admin user. o All R script management functionality, other than import and export of R scripts, has been moved to the Repository Manager. o The user testmanager and the role SCRIPT_MANAGER were obsoleted and removed when script management functionality was moved to the DeployR Repository Manager.



There is new and updated API support, including new directory support on the Repository APIs. Refer to the 7.1 Change History section in the API Reference Guide for details.



The default installation port numbers have changed for this version.

RevoDeployR 7.0 This release contains new features and improvements, including: 

New and updated API support including: o Support for user blackbox projects, which are a new type of secure temporary project for authenticated users o Support for HTTP blackbox projects, which are a new type of secure, stateful project for anonymous users o Support for creating pools of temporary projects on the /r/project/pool API o New standardized set of parameters across all execution APIs

4 Chapter 1: Before You Begin

o New R script execution chaining support on all script execution APIs o New role-based restricted access control for files on the Repository APIs o For JavaScript developers, server-side events pushed on new /r/event/stream API o For an overview of additions and updates to the API for this release please refer to the section API Change History on the documentation landing page (http://SERVER:PORT/revolution/docs/documentation/). 

New Event Stream Console, which is a browser-based console window for viewing /r/event/stream events. This console is integrated into the Management Console, the API Explorer tool, and the JavaScript sample applications delivered with RevoDeployR.



The Management Console was updated to include: o The creation and use of custom roles to restrict access to R scripts and event streams o Private, Restricted, Shared and Public access controls for R Scripts o Validation of grid node configurations upon creation, update, and import o New event stream access policies under Server Policies

RevoDeployR 6.2 This release contains new features and improvements, including: 

New API support for: o Priority scheduling for asynchronous jobs o Executing scripts found on external URLs or file paths including scripts in GIT and SVN repositories o The lifecycle management of repository-managed files, including scripts o Enhanced file versioning for repository-managed files, including scripts



New pre-authentication support for the users that have been reliably authenticated by an external system such as CA Siteminder®



A new high-performance, scalable persistence infrastructure that is built on top of the MongoDB NoSQL database to manage the reliable persistence of all user, project and repository data



Updated documentation and accompanying sample applications



Updated Javascript, Java, .NET client libraries



A new RevoDeployR Deployment Planning guide is now available to help administrators plan the provisioning of server and grid capacity



Removed dependency on Apache HTTP Server

5 Revolution R Enterprise DeployR Installation Guide for Linux

DeployR Configurations  Revolution R Enterprise DeployR can be configured in several ways based on your organization’s needs.

Figure 1. DeployR Configurations

Single Host Configuration The first configuration consists of a single host machine. To use this configuration, install the following components on one machine using the information in this guide: 1. Install all dependencies listed earlier in this guide.

Note: If you perform an automated DeployR installation, the dependencies are installed for you. 2. Install MongoDB before DeployR.

Note: If you perform an automated DeployR installation, the database is installed for you. 3. Install Revolution R Enterprise and RRE DeployR.

6 Chapter 1: Before You Begin

Multiple Host Configuration The second configuration for DeployR server supports multiple hosts on which the components needed for DeployR are installed and configured. This configuration allows you to use a remote database and/or a network of cooperating grid nodes configured on multiple hosts. This network of grid nodes supports the dynamic scaling of R processing resources in the server back-end. To use this configuration, install the following components in order using the information in this guide: 1. On Host 1, install the dependencies listed earlier in this guide for the DeployR main

server. 2. Install the database on Host 1 before DeployR.

Note: If you use the automated DeployR installation, the database is installed for you. 3. If you want to use a remote MongoDB database install the database again on the remote

machine before you install DeployR. See Host 2 in Figure 1. 4. On Host 1, install Revolution R Enterprise and RRE DeployR. The installation process

includes the configuration of some of the prerequisites for DeployR. 5. On a separate host, perform the following steps for each grid node:

a. Install the dependencies listed in this guide for a DeployR grid node. b. Install the DeployR grid node using the installation instructions presented later in this guide. Notes: o You can configure these nodes later in the Administration Console after you have completed the installation. o Learn how to manage and configure grid nodes in the Revolution R Enterprise DeployR Administration Console Guide.

7 Revolution R Enterprise DeployR Installation Guide for Linux

Installing DeployR 

2

The fastest and easiest way to install and configure for Revolution R Enterprise DeployR is to use the automated script, which installs each of the software dependencies listed earlier in this guide for you – provided you have internet access. If the server already has a supported version of one or more of the dependencies installed in their default location, the automated script will skip the installation of those dependencies and proceed to the their configuration for DeployR. However, if the server has a dependency installed in an unexpected location or an unsupported dependency version, then a side-by-side installation of the required dependencies will take place during automated installation. In some cases, having two versions of a dependency can cause undesirable behavior. For this reason, we strongly recommend using the automated installation on a server where none of the dependencies are currently installed.

Install with the Automated Script 



 

Whenever you are installing on a new, clean server. We strongly recommend installing DeployR on a machine where no dependencies are preinstalled. In this case, you can use the automated script to quickly and easily install and configure DeployR and its dependencies. Whenever you are reinstalling the same version of DeployR. Whenever none of the software dependencies are installed on the server.

Install Manually 



 

Whenever you are installing on a server where the dependencies are already installed but in a non-default location. You can use the manual instructions as a guide to completing the installation and configuration of all necessary files. Whenever you want to learn more about each step or prefer to perform the installation manually. Whenever you do not have access to the Internet and need to get the dependencies and the DeployR install files onto this machine over your network. Once you have manually installed the dependencies, you can run the automated installation script.

8 Chapter 2: Installing DeployR

Automated Installation  Important! If you do not have access to the Internet and if you are missing any of dependencies listed in this guide, you must manually install those missing dependencies before proceeding with the DeployR installation. When you use the automated install, we recommend that you begin by logging into the machine on which you will install the main DeployR server. If you choose to create the grid for load distribution, run through the following steps again – once for each grid node.

Before You Proceed! DO NOT uninstall a previous version of DeployR until you have backed up, exported the data you want to keep, and completed the data migration process. For more information, refer to the Revolution R Enterprise DeployR Data Migration Guide.

Preparing to Install 1. During the installation process, Revolution R Enterprise will also be installed. If you

plan to install DeployR as a non-root user, make sure that you have installed the package prerequisites covered in the separate Revolution R Enterprise Installation Guide for Red Hat Enterprise Linux prior to running the DeployR installation script. 2. For Redhat machines, manually install the make package prior to installing DeployR.

Note: These packages must be installed by root or a user with sudo permissions. If they are not already installed, execute the following command: 

yum -y install make

3. Log into the operating system as a root or non-root user. In the examples, we will use the user, deployr-user, to install the software. 4. If you will be keeping an older version of DeployR on this same machine for the

purposes of migrating data, for example. Be sure to install this version in its own directory. 5. Create and go to the /deployrdownload directory into which the tar file will be

downloaded. At the prompt, type:  

mkdir /home/deployr-user/deployrdownload cd /home/deployr-user/deployrdownload

9 Revolution R Enterprise DeployR Installation Guide for Linux

6. Use the link(s) in your Revolution Analytics welcome letter to download the following

installation files. o

DeployR Installation tar: DeployR-Linux-7.1.0.tar.gz

o

Revolution R Enterprise Installation tar: -

On Redhat: Revo-Ent-7.1.0-RHEL5.tar.gz or Revo-Ent-7.1.0RHEL6.tar.gz

-

On SLES: Revo-Ent-7.1.0-SLES11.tar.gz

7. Unzip the contents of the tar file. At the prompt, type: 

tar -xzf DeployR-Linux-7.1.0.tar.gz

8. Change directories. At the prompt, type: 

cd installFiles

Option 1: Installing a DeployR Main Server with a Local Database This option will install the DeployR main server and configure a local MongoDB database. 1. Launch the automated installation script. At the prompt, type: 

./installDeployR.sh

2. When the script launches, you are prompted to choose an installation option. Choose

option 1 to install the main DeployR server along with a database. 3. Enter directory path in which to install DeployR or accept the default. If you will be

keeping an older version of DeployR on this same machine, for the purposes of migrating data for example, be sure to install this version in its own unique directory. 4. Enter the port number for Tomcat or accept the default. 5. If the installation fails:

o Remove the directories local and deployr before attempting to install DeployR. o Refer to Step 1 in section Preparing to Install regarding any missing dependencies. 6. After installing DeployR and any grid nodes:

10 Chapter 2: Installing DeployR

a. Perform the necessary configurations as outlined in Chapter 4, Configuring Post Installation. We recommend that you follow the steps in that chapter in the order in which the information is presented. b. After configuration is complete, get started using the information in Chapter 5, Getting Started with DeployR. c. For troubleshooting hints, see the Appendix.

Option 2: Installing a Remote Database for DeployR 1. Launch the automated installation script. At the prompt, type: 

./installDeployR.sh

2. When the script launches, you are prompted to choose an installation option. Choose

option 2 to install the database that will be used remotely by DeployR main server. This option assumes that you will install Option 2 after Option 2. 3. Enter directory path in which to install. If you will be keeping an older version of

DeployR on this same machine for the purposes of migrating data, for example. Be sure to install this version in its own directory. 4. If using IPTABLES firewall, add port 7103 to the firewall settings to allow

communications from the DeployR main server.

Option 3: Installing DeployR Main Server for a Remote Database Important! While this option installs a local database, the installation process will require the address of the remote database installed in Option 2. 1. Launch the automated installation script. At the prompt, type: 

./installDeployR.sh

2. When the script launches, you are prompted to choose an installation option. Choose

option 3 to install the main DeployR server. This option assumes that you have already installed Option 2. 3. Enter directory path in which to install. If you will be keeping an older version of

DeployR on this same machine for the purposes of migrating data, for example. Be sure to install this version in its own directory.

11 Revolution R Enterprise DeployR Installation Guide for Linux

4. Enter and confirm IP address or hostname for the remote MongoDB database server and

follow the prompts. 5. Enter the port number for Tomcat or accept the default. 6. If the installation fails:

o Remove the directories local and deployr before attempting to install DeployR. o Refer to Step 1 in section Preparing to Install regarding any missing dependencies. 7. After installing DeployR and any grid nodes:

a. Perform the necessary configurations as outlined in Chapter 4, Configuring Post Installation. We recommend that you follow the steps in that chapter in the order in which the information is presented. b. After configuration is complete, get started using the information in Chapter 5, Getting Started with DeployR. c. For troubleshooting hints, see the Appendix.

Option 4: Installing a DeployR Grid Node This option also assumes that you have already installed DeployR main server using Option 1 or Option 3. Install each grid node on a separate host machine. Tip: Once you have installed and configured one grid node, you can copy the files over from the server that has already been set up over to the next one. 1. Launch the automated installation script. At the prompt, type: 

./installDeployR.sh

2. When the script launches, you are prompted to choose an installation option. Choose

option 4 to install a DeployR grid node. 3. Enter directory path in which to install the grid node. 4. If the installation fails:

o Remove the directories local and deployr before attempting to install DeployR. o Refer to Step 1 in section Preparing to Install regarding any missing dependencies. 5. After installing DeployR and any grid nodes:

12 Chapter 2: Installing DeployR

a. Perform the necessary configurations as outlined in Chapter 4, Configuring Post Installation. We recommend that you follow the steps in that chapter in the order in which the information is presented. b. After configuration is complete, get started using the information in Chapter 5, Getting Started with DeployR. c. For troubleshooting hints, see the Appendix.

Manual Installation  When installing manually, begin by installing the DeployR main server followed by any grid nodes. To facilitate the copy and paste of commands, the manual installation commands are detailed in DeployR_Manual_Installation_for_Linux.txt.

Before You Proceed! DO NOT uninstall a previous version of DeployR until you have backed up, exported the data you want to keep, and completed the data migration process. For more information, refer to the Revolution R Enterprise DeployR Data Migration Guide.

13 Revolution R Enterprise DeployR Installation Guide for Linux

3

Post Installation  Configuration  

Important! For the best results, respect the order in which information is presented in this chapter when configuring DeployR.

Updating IPTABLES Firewall  If you are using the IPTABLES firewall, use the iptables command to add the following ports. Refer to the IPTABLES ports printed at the end of the installation for your actual ports. The default port numbers are as follows: DeployR Ports

NFS Ports*

7100

111

7101

2049

7104

10000

7105

10001

7106

10002:10005

Notes: 

If you are using a remote database, update the IPTABLES firewall on that machine as well to add port 7103 to allow communications from the DeployR main server.



If you have made any changes to the port numbers designated for communications between DeployR and any of its dependencies, add those port numbers instead.

* These ports should be added only if configuring NFS for external directory support.

14 Chapter 3: Post Installation Configuration

Customizing Settings in the Administration Console  The DeployR Administration Console is used to manage the integration of Web or desktop client applications with the DeployR Web services API. 1. If you want the DeployR server to be publicly accessible outside the firewall, make the

appropriate changes to your firewall. 2. Go to the DeployR Administration Console at: http://:/deployr/administration where is the IP address of the DeployR machine and where is the port number used during installation. The default port is 7100. 3. Log in as the default administrator using the following: username: admin password: secret 4. In the Users tab, change the default password for the admin account to a password of

your choosing. We also recommend that you change the passwords to the other default user accounts. 5. Verify that the appropriate server IP address and port number are present in the Server

web context setting in the Server Policies tab. Note: In some cases, the wrong IP address may be automatically assigned during installation or when the machine is rebooted, and that address may not be the only IP address for this machine or may not be publicly accessible. If this case, you must update the address here. a. In the Server Policies page, click Edit. b. Make sure the IP address and port number are correct in the Server web context setting. For example, http://:7100/deployr. c. Set the Disable IP auto-detection to true. 6. For each grid node you install as well as the DeployR Default Node that was installed

for you, use the instructions in Configuring the DeployR Grid to define and configure each node.

15 Revolution R Enterprise DeployR Installation Guide for Linux

Configuring the DeployR Grid  You can expand the Grid framework for load distribution by configuring each node you installed earlier in the DeployR Administration Console. Note: Each new release of DeployR relies on an updated version of R; therefore, grid node configurations are not forward compatible. You must redefine your grid nodes in the Administration Console. For detailed instructions on grid node configurations, refer to Revolution R Enterprise DeployR Administration Console Guide. 1. Go to the landing page at http://:/revolution where is the IP address of the DeployR machine and where is the port number used during installation. The default port is 7100. 2. Click the Administration Console link. 3. Login using the administrator account: admin username: default password: secret 4. Click The Grid in the main menu. 5. If any other grid nodes were installed, besides the DeployR Default Node, click New

Grid Node and configure the following settings for each node. For more information on these settings, refer to the Revolution R Enterprise DeployR Administration Console Guide. In particular, a. Select the Enabled checkbox to activate the node on the grid. b. Enter a name in the Name field. c. Enter the IP address or hostname for the machine on which the node is configured in the Host field. d. Specify the Operating Type. The operating mode you define for a grid node has an impact on the operations you can perform on that node. Under External directory configuration, set the Storage Context to reflect the full path to the external data directory on that node’s machine. For example, if the node was installed by: -

The non-root user, deployr-user, then the full path would be: /home/deployr-user/deployr/7.1.0/deployr/external/data

16 Chapter 3: Post Installation Configuration

-

root, then the full path would be: /opt/deployr/7.1.0/deployr/external/data

Configuring External Directories for Big Data  Whenever data is too big to be stored out on the Web or on a user’s machine, those files can be stored in 'big data' external directories on the DeployR main server that are set up and managed by an administrator. These ‘big data’ directories can then be referenced by projects without the overhead of replicating the big data itself for each individual project.

Installing and Configuring NFS for External Directory Support To benefit from external directory support in DeployR, you must install and configure a Network File System (NFS) share directory on the DeployR main server and any grid node from which they want to access to this big data. The ‘big data’ directories can then be referenced by projects without the overhead of replicating the big data itself for each individual project.

Important! If you do not have access to the Internet, you’ll have to copy the install files to this machine using another method. 1. Log into the operating system as root. 2. Install the NFS.

o On Redhat 5 or 6, type the following at the prompt: 

yum install -y nfs-utils nfs-utils-lib

o On SLES, type the following at the prompt: 

zypper install -y nfs-kernel-server

3. Open the file /etc/sysconfig/nfs and add these lines to the end of the file: RQUOTAD_PORT=10005 LOCKD_TCPPORT=32803 LOCKD_UDPPORT=32769 MOUNTD_PORT=10004 STATD_OUTGOING_PORT=10003

4. Set up the automatic start of NFS and portmap/rpcbind at boot time. At the prompt, type:

o For both the DeployR main server and any grid machines on Redhat 5, type the following at the prompt:

17 Revolution R Enterprise DeployR Installation Guide for Linux

  

/sbin/chkconfig nfs on /etc/init.d/portmap start /etc/init.d/nfs start

o For both the main server and any grid machines on Redhat 6, type the following at the prompt:   

/sbin/chkconfig nfs on /etc/init.d/rpcbind start /etc/init.d/nfs start

o For the main server on SLES, type the following at the prompt:   

/sbin/chkconfig nfsserver on /etc/init.d/rpcbind start /etc/init.d/nfsserver start

o For a grid machine on SLES, type the following at the prompt:   

/sbin/chkconfig nfs on /etc/init.d/rpcbind start /etc/init.d/nfs start

5. To create a new NFS directory share, run the following commands. To update an

existing NFS share, see the next step instead. On the DeployR main server, o Add a line to the file /etc/exports. /home/deployr-user/deployr/7.1.0/deployr/external/data *(rw,sync,insecure,all_squash,anonuid=48,anongid=48)

o Broadcast the new directory. At the prompt, type: 

exportfs -r

On the DeployR grid node machine, o Add a line to the end of the fstab file, where is the IP or hostname of the machine on which you installed DeployR, 

:/home/deploy-user/deployinstall/deployr/external/data /home/deploy-user/deployinstall/deployr/external/data nfs rw 0 0"

o Attempt to mount the contents of the file and verify the NFS points to the correct address. At the prompt, type:

18 Chapter 3: Post Installation Configuration

 

mount -a df -k

6. To use an existing NFS directory share, do the following for the main server and each

grid node. o Add the following line to /etc/fstab, where and is the IP or hostname and directory of the machine where the NFS share site exists: :/ rw 0 0

/deployr/external/data

nfs

o Attempt to mount the contents of the file and verify the NFS points to the correct address. At the prompt, type:  

mount -a df -k

DeployR’s External Directory Structure The external directory structure is really a tree of public and private directories hanging off a common base directory. For example, if the base directory is /home/deployr-user/deployr/7.1.0/deployr/external/data, then the base external

directory structure might look: 

/home/deployr-user/deployr/7.1.0/deployr/external/data/public



/home/deployr-user/deployr/7.1.0/deployr/external/data/testuser



/home/deployr-user/deployr/7.1.0/deployr/external/data/user1

Two directories are automatically created by the server the first time the corresponding user logs into the system. The first directory is called /public and contains the files that can be read by any authenticated users on the server. The second directory is the user’s private directory. Each private external directory can be found at: /home/deployr-user/deployr/7.1.0/deployr/external/data/{DeployR_username}. Files in each private directory are available only to that authenticated user during a live session. The administrator can also manually create these subdirectories in advance. The names of the directories are case-sensitive.

19 Revolution R Enterprise DeployR Installation Guide for Linux

For example, the user testuser will have access to both the files under the private external directory, /home/deployr-user/deployr/7.1.0/deployr/external/data/testuser, as well as the files under the public directory, /home/deployruser/deployr/7.1.0/deployr/external/data/public. It is up to the administrator to inform each user of which files are available in the /public directory and which files are in their private directory. When referencing a file that is stored in the /public directory, the user must explicitly declare its public location in the call as described later in this section.

Getting Files into the External Directory Share Files can be added to the external directories in one of two ways. Users can request that files be placed in their private external directories or the public directory by the administrator. Alternatively, users can execute code that will write files directly into their own directories. Ultimately, the administrator is responsible for moving and managing files in the external directories as well as informing users that the files exist and their whereabouts. To reference one of these files in the code, a user must declare and, therefore, know if the given file is stored in the public subdirectory or the user's private subdirectory. Note: Currently there is no user interface to display the names of the files in this directory. Additionally, due to the potentially large size of the data, we do not expose any API or other facility for moving data into the external directories.

How to Reference Files in External Directories Whenever a user references a file in an external directory, that user must wrap the filename on a standard R call with the custom R function deployrExternal(). By default, it is assumed that the file is in the user’s private directory. Here is an example of such a call: sampleData 5. Restart Tomcat for the change to take effect. 

/home/deployr-user/deployr/7.1.0/tomcat/tomcat7.sh restart

22 Chapter 3: Post Installation Configuration

6. Test these changes by visiting DeployR Administration Console at http://:/deployr/administration where is the IP address of the DeployR machine and where is the port number for tomcat. The default port for Tomcat is 7101.

Configuring SELinux  Configure SELinux to permit access to DeployR using one of these options: 

To benefit from the protection of SELinux, enable SELinux and configure the appropriate SELinux exception policies as described here: http://wiki.centos.org/HowTos/SELinux



Disable SELinux so that access to DeployR is allowed as follows: a. In /etc/selinux/config, set SELINUX to disabled (SELINUX=disabled). b. Save the changes. c. Reboot the machine.

Configuring Enterprise Security  DeployR is a server framework that exposes the R platform as a service to allow the integration of R statistics, analytics, and visualizations inside Web, desktop, and mobile applications. In addition to providing a simple yet powerful Web services API, the framework also supports a highly-flexible, enterprise security model. Learn more about this model by reading the Revolution R Enterprise DeployR Enterprise Security Guide.

23 Revolution R Enterprise DeployR Installation Guide for Linux

Getting Started with  DeployR 

4

Accessing DeployR Home to Test the Install  After installing and configuring DeployR, verify that DeployR is accessible. 1. Make sure you can access the DeployR home page located here: http://:/revolution where is the IP address of the DeployR machine and where is the port number used during installation. The default port is 7100. 2. In this page, you can explore product documentation, the DeployR Administration

Console, the API Explorer tool and some JavaScript examples.

Exploring the API  You can familiarize yourself with API using the API Explorer, which is a development tool to help the application developer test the APIs that make up DeployR. This tool is not intended as a sample application or an end-user application. For more information on the API Explorer tool, refer to API Explorer - Reference Documentation. Note: Adobe Flash Player is required on the machine accessing the API Explorer tool. 1. Before launching the API Explorer, we recommend that you clear your browser’s cache.

This is particularly useful after upgrading. 2. Make sure you can access the DeployR home page located here: http://:/revolution where is the IP address of the DeployR machine and where is the port number used during installation. The default port is 7100. 3. Click API Explorer. 4. Log into using the admin account.

24 Chapter 4: Getting Started with DeployR

Exploring JavaScript Samples  Learn more about creating your own applications and using the client libraries from the JavaScript samples installed with DeployR. 1. Make sure you can access the DeployR home page located here: http://:/revolution where is the IP address of the DeployR machine and where is the port number used during installation. The default port is 7100. 2. Click Examples. 3. Click the link to the sample you want to explore.

25 Revolution R Enterprise DeployR Installation Guide for Linux

Stopping and Starting  DeployR  This section applies only to the main server and not to any node installations.

Stopping the Server  To stop all services at once, type the following command: 

/home/deployr-user/deployr/7.1.0/stopAll.sh

To stop the services individually, type the following commands:   

/home/deployr-user/deployr/7.1.0/tomcat/tomcat7/bin/shutdown.sh /home/deployr-user/deployr/7.1.0/rserve/rserve.sh stop /home/deployr-user/deployr/7.1.0/mongo/mongod.sh stop

Starting the Server  To start all services at once, type the following command: 

/home/deployr-user/deployr/7.1.0/startAll.sh

To start the services individually, type the following commands:   

/home/deployr-user/deployr/7.1.0/tomcat/tomcat7.sh start /home/deployr-user/deployr/7.1.0/rserve/rserve.sh start /home/deployr-user/deployr/7.1.0/mongo/mongod.sh start

5

26 Chapter 5: Stopping and Starting DeployR

27 Revolution R Enterprise DeployR Installation Guide for Linux

Uninstalling DeployR 

6

Uninstalling DeployR Main Server  1. Stop the Tomcat, RServe and MongoDB services. At the prompt, type:   

/home/deployr-user/deployr/7.1.0/tomcat/tomcat7.sh stop /home/deployr-user/deployr/7.1.0/rserve/rserve.sh stop /home/deployr-user/deployr/7.1.0/mongo/mongod.sh stop

2. Uninstall Revolution R Enterprise. At the prompt, type: 

/home/deployr-user/deployr/7.1.0/Revo/lib64/Revo-7.1/uninstall.sh

3. Remove DeployR, Tomcat, RServe, and MongoDB directories. At the prompt, type: 

rm -rf /home/deployr-user/deployr/7.1.0

4. Remove extraneous files. At the prompt, type: 

rm -rf /home/deployr-user/deployrdownload

5. If MongoDB is on a remote machine, then stop the process and remove the associated

directories. At the prompt, type:   

/home/deployr-user/deployr/7.1.0/mongo/mongod.sh stop rm -rf /home/deployr-user/deployr/7.1.0 rm -rf /home/deployr-user/deployrdownload

6. If a non-default data directory (db_path) for the MongoDB database was used, remove

that directory as well. For example, if you configure MongoDB to use the following data directory, /home/deployr-user/mongo/deployr-database, you would need to remove that directory as well. For this example, you would type: 

rm -rf /home/deployr-user/mongo/deployr-database

28 Chapter 6: Uninstalling DeployR

Uninstalling DeployR Grid Nodes  Repeat these steps on each grid node machine. 1. Stop the RServe service. At the prompt, type: 

/home/deployr-user/deployr/7.1.0/rserve/rserve.sh stop

2. Uninstall Revolution R Enterprise. At the prompt, type: 

/home/deployr-user/deployr/7.1.0/Revo/lib64/Revo-7.1/uninstall.sh

3. Remove DeployR and RServe directories. At the prompt, type: 

rm -rf /home/deployr-user/deployr/7.1.0

4. Remove the extraneous files and directory. At the prompt, type: 

rm -rf /home/deployr-user/deployrdownload

29 Revolution R Enterprise DeployR Installation Guide for Linux

Troubleshooting Tips 

7

Multiple User Sign-ins You cannot log into DeployR from two different accounts within the same brand of browser program. To use two or more different accounts, you'll need to log into each one in a separate brand of browser. For example, to log into the DeployR Administration Console with admin account and into the API explorer tool with another user account, open one in Google Chrome™ and the other in Mozilla® Firefox®.

Cannot See Latest API Explorer Interface 1. Ensure Adobe Flash Player is installed and configured to work with your browser. 2. Clear your browser’s cache before launching the API Explorer tool. This is particularly

important if you are upgrading from a previous version of DeployR.

Finding Log Files If you encounter a Web server error while using DeployR and want to learn more, check the following log files: 

/logs/catalina.out



/bin/plogs/production.log

Unable to Run Example Applications If you installed grid nodes for DeployR and you cannot run all of the examples delivered with the product, then the operating type of the grid node(s) might be incorrectly defined. The operating mode you define for a grid node has an impact on the operations you can perform on that node. To be able to run all samples delivered with this product or to run anonymous or asynchronous jobs, make sure you have one node configured for each required operating type or

30 Chapter 7: Troubleshooting Tips

at least one grid node set to the “Mixed mode” operating type. For more information, please read the Revolution R Enterprise DeployR Administration Console Guide.

No Plot Displayed for Code Execution Sample If you ran the Code Execution sample but no plot was returned, then the wrong IP address may be defined for DeployR. While, by default, an IP address is automatically detected during installation or any time the server is booted, there are cases where the IP that was automatically detected is not the correct for DeployR. This may be due to the fact that there are multiple IP addresses for the machine and the auto-detected IP is not publicly accessible or the IP address of the server has changed. To fix this issue, you can impose an IP temporarily or permanently in the Server Web Context in the Server Policies tab of the Administration Console.

Changing Port Numbers for Tomcat If you run into conflicts with other applications, consider changing the port numbers. You only need to change the port numbers of those applications that are actively conflicting. Consequently, not all of the following steps may apply to your situation. 1. Edit the file /tomcat/tomcat7/conf/server.xml and make

two changes: a. Find the port=”7100” in the lines:

b. Change to a new port number, such as port=”8000”. c. Save and exit the file. 2. Restart Tomcat for the changes to take effect. At the prompt, type:  

/home/deployr-user/deployr/7.1.0/tomcat/tomcat7.sh stop /home/deployr-user/deployr/7.1.0/tomcat/tomcat7.sh start

3. Verify that the port changes are working as expected. At the prompt, type: 

netstat -p --listening --numeric-ports --numeric-hosts | grep -i java

Suggest Documents