Cloud Secure Agent Installation Edit on GitHub Request doc changes

Contributors dgracenetapp netapp-alavoie

Cloud Secure collects user activity data using one or more agents. Agents connect to devices in your environment and collect data that is sent to the Cloud Secure SaaS layer for analysis. See Agent Requirements to configure an agent.

Before You Begin

  • The sudo privilege is required for installation, running scripts, and uninstall.

  • The Docker CE package must be installed on the VM hosting the agent.

    To determine if the Docker CE package is installed, use the following command:
    sudo rpm -qa |grep -i docker-ce
    If the package is installed, the command returns the package name, for example:
    docker-ce-18.03.1.ce-1.el7.centos.x86_64

  • The Docker-client-xx or Docker-common-xx native RHEL Docker packages are not supported. These packages do not support the docker run cli format that Cloud Secure supports.

    Use the following commands to determine if these packages are installed:
    sudo rpm -qa | grep -i docker-client
    sudo rpm -qa |grep -i docker-common

Steps to Install Docker

  1. Install the required dependencies:
    sudo yum install yum-utils device-mapper-persistent-data lvm2

  2. Add docker stable repository to your system:
    sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

  3. To use the latest version of Docker CE, enable repositories that are disabled by default:
    sudo yum-config-manager --enable docker-ce-edge

  4. Install the latest version of Docker CE using the following command:
    sudo yum install docker-ce
    (Version must be higher than 17.06)

  5. Start Docker
    sudo systemctl start docker

  6. Use the following command to automatically start Docker on system reboot:
    sudo systemctl enable docker

Docker Installation Reference

Steps to Install Docker on a VM Without Full Access to the Internet

Steps
  1. Uninstall existing docker installation:

    sudo rpm -qa | grep docker
    sudo rpm -e <rpms>

  2. Install Docker-ce

Java Requirement

OpenJDK Java is required. Use the following command to determine if OpenJDK Java is installed:
sudo rpm -qa|grep -i openjdk

Install OpenJDK Java using the following command:
sudo yum install -y java-1.8.0-openjdk

The IBM Java package, found in some RHEL versions, must be uninstalled. Use the following command to verify the Java version:
sudo java - (or) sudo rpm -qa | grep -I java
If the command returns information similar to 'IBM J9 VM (build 2.9.x)' you need to remove the package:
sudo update-alternatives --remove java /usr/lib/jvm/jdk[version]/bin/java

Steps to Install an Agent from a Non-Root Account

You can perform an installation from a non-Root user account using the following steps:

  1. Add a local user and set the password: (where username is the name you choose)
    sudo useradd username
    sudo passwd username password (enter the password for the local user)

  2. Uncomment the following lines in /etc/sudoers

    • %wheel ALL=(ALL) ALL

    • %wheel ALL=(ALL) NOPASSWD: ALL

  3. Add the local user you created to the wheel group:
    sudo usermod -aG wheel username

  4. Create an installation folder in the local user’s home directory and install the Cloud Secure Agent from within the folder:
    sudo cd /home/username/
    sudo mkdir install; cd install/

  5. Install the Cloud Secure Agent using the Curl command taken from the Web UI.

    Provide a -k in the Curl command if your RHEL platform performs a strict certificate check. For CentOS systems, the -k option is not required.

Steps to Install Agent

  1. Log in as Administrator or Account Owner to your Cloud Secure environment.

  2. Click Admin > Data Collectors > Agents > +Agent

    The system displays the Add an Agent page:

    Add agent 1
  3. Select the operating system on which you are installing the agent.

  4. Verify that the agent server meets the minimum system requirements.

  5. To verify that the agent server is running a supported version of Linux, click Versions Supported (i).

    add agent 2
  6. Click the Copy to Clipboard icon to copy the installation command.

  7. Run the installation command in a terminal window.

  8. The system displays the following message when the installation completes successfully:

    new agent detect
After You Finish
  1. Verify that the agent is installed using the following command:
    sudo grep -irn register agent.log

  2. You need to configure a User Directory Collector.

  3. You need to configure one or more Data Collectors.

Files Created During Installation

  • Installation directory:

    /opt/netapp/cloudsecure/agent

  • Installation logs:

    /var/log/netapp/cloudsecure/install
    /opt/netapp/cloud-secure/logs

  • Agent Logs:

  • You can use the following command to verify the agent installed correctly:
    sudo grep -irn register /opt/netapp/cloudsecure/agent/logs/agent.log

  • Use the following script to control the Cloud Secure service:
    sudo cloud-secure-agent-service.sh --help

  • Use the following script to uninstall the agent:
    sudo cloud-secure-agent-uninstall.sh

Network Configuration

Use the following commands to open ports to be used by Cloud Secure.

Steps
  1. sudo firewall-cmd --permanent --zone=public --add-port=35001-35100/tcp

  2. sudo firewall-cmd --reload

  3. sudo iptables-save | grep 35001

    sample output:

  4. -A IN_public_allow -p tcp -m tcp --dport 35001 -m conntrack -ctstate NEW -j ACCEPT

Troubleshooting Agent Installation Errors

Known problems and their resolutions are described in the following table.

Problem: Resolution:

Agent installation fails with "File name too long" errror

To correct this error use the sh shell to run the command.

Agent installation fails to create the ~/agent/logs folder and the install.log file provides no relevant information.

This error occurs during bootstrapping of the agent. The error is not logged in log files because it occurs before logger is initialized.
The error is redirected to standard output, and is visible in the service log using the journalctl -u cloudsecure-agent.service command. This command can be used for troubleshooting the issue further.

Agent installation fails with ‘This linux distribution is not supported. Exiting the installation’.

The supported platforms for Cloud Secure 1.0.0 are RHEL 7.x / CentOS 7.x. Ensure that you are not installing the agent on a RHEL 6.x or CentOS 6.x system.