Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Installing AppFormix for a VMware Environment

    Getting Started with VMware

    AppFormix provides resource control and visibility for ESXi hosts and virtual machines managed by a VMware vCenter server.

    This topic explains how to install AppFormix for a VMware environment. See the AppFormix General Requirements before reading this section.

    Supported Features

    • Charts and Alarms support Level 1 and Level 2 metrics. Both static and dynamic alarms can be configured.
    • Heat Map displays ESXi hosts and instances.
    • Health Monitor provides SLA support for ESXi hosts and instances.
    • Reports generate reports for ESXi hosts and projects.

    Requirements

    • Supported vCenter versions: 5.0, 5.1, 5.5, 6.0.
    • An administrator account for vCenter Server.

    Workflow in Three Steps

    Installation consists of the following steps:

    1. Configure Configure VMware.
    2. Create Ansible inventory.
    3. Install AppFormix.

    Configuring VMware

    AppFormix reads information about different objects such as all ESXi hosts and instances managed by vCenter Server. AppFormix software requires administrator privilege. We recommend you create a new administrator account for AppFormix. If you do not create a new administrator account, then you must provide the username and password of an existing administrator account during configuration of AppFormix.

    For more information, refer to creating vCenter administrator user.

    Creating Ansible Directory

    Ansible is used to deploy the software to the AppFormix platform host. An Ansible inventory file describes groups of hosts in your cluster. Define the inventory in a separate location from the release files, so that the inventory may be reused in an upgrade.

    In a vCenter environment, the appformix_controller group must be defined in the host inventory file. AppFormix platform services and AppFormix Agent will be installed on the hosts in the appformix_controller group.

    Create a directory inventory (or name of your choice) that contains a hosts file and a group_vars/all file. For example:

    inventory/
        hosts           # inventory file
        group_vars/
            all         # configuration variables

    The inventory/hosts file contains the list of hosts in each group. For example:

    [appformix_controller]
    appformix01
    

    See the Ansible inventory documentation about Splitting Out Host and Group Specific Data.

    Ansible Configuration Variables

    The AppFormix software includes a number of Ansible roles to perform the configuration of AppFormix settings. Define the values of variables in the inventory/group_vars/all file, so you can use the settings and inventory in future upgrades.

    In the inventory/group_vars/all file, configure the following variables for installation of AppFormix for vCenter.

    appformix_license: /path/to/license_file
    appformix_docker_images: 
        - /path/to/appformix-platform-images-<version>.tar.gz
        - /path/to/appformix-dependencies-images-<version>.tar.gz
        - /path/to/appformix-vcenter-images-<version>.tar.gz
    openstack_platform_enabled: False
    vcenter_platform_enabled: True

    In addition, AppFormix must be configured with credentials to communicate with the vCenter Server. Add the following variables to inventory/group_vars/all.

    appformix_vcenter_adapter_vcenter_ip: <vCenter Server IP (e.g., 10.10.10.1)>
    appformix_vcenter_adapter_vcenter_port: <vCenter Server Port (optional, defaults to 443)>
    appformix_vcenter_adapter_vcenter_name: <vCenter Server Name (e.g., vCenter_1)>
    appformix_vcenter_adapter_vcenter_user: <vCenter Server admin User Name (e.g., administrator@vsphere.local)>
    appformix_vcenter_adapter_vcenter_password: <vCenter Server admin password>

    See Platform Dependencies for steps to install dependencies on a platform host that cannot fetch files from the Internet.

    Configuring an HTTP Proxy for Fetching Prerequisites

    The Ansible playbook will fetch files from the Internet to install prerequisites on the platform host. If the platform host requires an HTTP proxy to access the Internet, configure the following variables in inventory/group_vars/all:

    http_proxy_url: 'http://proxy.example.com:1234'
        prerequisites_env:
            http_proxy: '{{ http_proxy_url }}'
            https_proxy: '{{ http_proxy_url }}'

    The prerequisites_env is a dictionary that defines environment variables that will be used when invoking commands to install prerequisites. In the previous example, the same proxy URL (http://proxy.example.com:1234) is used for both the http_proxy and https_proxy environment variables because the single proxy can be used to access HTTP and HTTPS URLs. As a convenience, the proxy URL is defined once in the http_proxy_url variable. Adjust prerequisites_env as necessary for the proxy requirements of your network.

    Installing AppFormix

    The following commands should be executed on the host from which Ansible will be run. This may be the platform host, or any host with Ansible and SSH access to the platform host.

    1. Copy the following files to the host on which Ansible playbooks will be executed. The path of the images files should match the configuration setting made in the Ansible inventory. See Ansible configuration variables.
      appformix-<version>.tar.gz
      appformix-platform-images-<version>.tar.gz
      appformix-dependencies-images-<version>.tar.gz
      appformix-openstack-images-<version>.tar.gz
    2. Unpack the tarball, and change to the created directory:
      tar xzf appformix-<version>.tar.gz
      cd appformix-<version>
    3. Deploy and configure AppFormix by executing the appformix_vcenter.yml playbook. Specify the path to the inventory directory created in Step 1:
      ansible-playbook -i /path/to/inventory appformix_vcenter.yml
      
    4. Open the AppFormix Dashboard in a Web browser. For example:
      http://appformix01:9000/appformix

      Select Skip Installation because the initial configuration was performed by Ansible using the previous steps. Log in to AppFormix Dashboard using vCenter administrator credentials that were provided to Ansible.

    vCenter Server Configuration

    AppFormix periodically queries vCenter Server for Level 1 and Level 2 metrics. vCenter Server should be configured to collect Level 2 metrics. If Level 2 metrics collection is disabled on vCenter server, then only Level 1 metrics will be monitored by AppFormix.

    By default, vCenter Server uses a metric sampling period of 300 seconds for 1-day historical data. For a better response time of metric analysis by AppFormix, the sampling period may be reduced to 60 seconds.

    The following PowerShell script can be used to set the sampling period. This script can be executed from any host (Windows, Mac, Linux) that can communicate with vCenter Server and has PowerCLI interface available for PowerShell.

    # import PowerCLI module in PowerShell for vCenter server configuration
    Get-Module -ListAvailable PowerCLI* | Import-Module
    Connect-VIServer -Server <ip_addr> -User <admin_user> -Password <pwd>
    $getview = Get-View ServiceInstance
    $perfcounter = Get-View ($getview).Content.PerfManager
    # Update only 1-day performance interval samplingPeriod
    $perfcounter.HistoricalInterval[0] | % {
        # Create a new Performance Interval Variable
        $newinterval = new-object VMware.Vim.PerfInterval
        $newinterval.key = $_.Key
        $newinterval.Name = $_.Name
        # Reconfigure Frequency of polling in seconds
        $newinterval.SamplingPeriod = 60
        $newinterval.Length = $_.Length    #Length of time to store metrics
        $newinterval.Enabled = $true       #Enable/Disable a statistic
        $newinterval.Level = $_.Level;
        $perfcounter.UpdatePerfInterval($newinterval)
    }

    Note: Reducing the sampling period will provide historical data with higher granularity, but this will increase storage requirement on vCenter Server for 1-day historical data. With a default 300-seconds sampling period, 12 datapoints are stored per hour. With a sampling period of 60-seconds, 60 datapoints will be stored per hour for each metric.

    Upgrading AppFormix for VMware

    AppFormix can be easily upgraded by running the appformix_vcenter.yml playbook of the new release. Follow the same procedure as for the installation.

    Uninstalling AppFormix from VMware

    If you want to uninstall AppFormix and destroy all data, execute the following command:

    ansible-playbook -i <inventory_file> clean_appformix_vcenter.yml

    Modified: 2017-11-12