Getting Started on VMware

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

This guide explains how to install AppFormix for an VMware environment. See the Overview for general requirements before reading this guide.

Supported Features:

Requirements

Easy Installation

Installation consists of the following steps:

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

1. Configure 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

2. Create Ansible inventory

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 other than the release files, so that the inventory may be re-used for an upgrade.

In a vCenter environment, the "appformix_controller" group must be defined in the host inventory file. AppFormix platform services and 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 and group_vars/all files. 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

For more information, refer to Ansible inventory documentation.

Ansible configuration variables

AppFormix includes a number of Ansible roles to perform configuration of AppFormix settings. To provide adjust configuration, define values of variables in a group_vars/all file, in order to be able to use the settings for future upgrades.

A mandatory setting is the archive file that contains the Docker images for AppFormix services. Copy the appformix-docker-images-<version>.tar.gz file to the host on which Ansible will be executed. In the inventory/group_vars/all file, configure the following variables:

appformix_docker_images_file: /path/to/appformix-docker-images-<version>.tar.gz
appformix_license: /path/to/license_file
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?

Please refer to 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 above 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.

3. Install 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. Unpack the tarball, and change to the created directory:

    tar xzf appformix-<version>.tar.gz
    cd appformix-<version>
    
  2. Deploy and configure AppFormix by executing the appformix_vcenter.yml playbook. Specify the path to the inventory directory created above:

    ansible-playbook -i /path/to/inventory appformix_vcenter.yml
    
  3. Open the AppFormix Dashboard in a web browser (e.g., http://appformix01:9000/appformix).

    Select "Skip Installation" because the initial configuration has been performed by Ansible in the above steps. Login 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 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 sampling period will provide historical data with higher granularity, but this will increase storage requirement on vCenter Server for 1-day historical data. With 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.

Upgrade

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

Uninstall

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

ansible-playbook -i <inventory_file> clean_appformix_vcenter.yml