Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
Contrail Feature Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Installing AppFormix for OpenStack

date_range 16-Oct-23

AppFormix provides resource control and visibility for hosts and virtual machines in an OpenStack environment. This topic explains how to install AppFormix for OpenStack.

Architecture

AppFormix provides resource control and visibility for hosts, containers, and virtual machines in your cloud infrastructure. Figure 1 shows the AppFormix architecture with OpenStack.

Figure 1: AppFormix Architecture with OpenStackAppFormix Architecture with OpenStack
  • Agent monitors resource usage on the compute nodes.

  • Controller offers REST APIs to configure the system.

  • DataManager stores data from multiple Agents.

  • Dashboard provides a Web-based user interface.

  • An adapter discovers platform-specific resources and configures the AppFormix Controller.

  • Adapters exist for OpenStack, Kubernetes, and Amazon EC2.

Installing AppFormix

To install AppFormix:

  1. Install Ansible on the AppFormix Controller node. Ansible will install docker and docker-py on the controller.

    content_copy zoom_out_map
    apt-get install python-pip python-dev      #Installs Pip
    
    pip install ansible==2.3                   #Installs Ansible 2.3
    
    sudo apt-get install build-essential libssl-dev libffi-dev    #Dependencies
    
    pip install markupsafe httplib2            #Dependencies
    
  2. On the vRouter compute nodes where AppFormix Agent runs verify that python virtualenv is installed.

    content_copy zoom_out_map
     apt-get install -y python-pip
    
     pip install virtualenv
    
  3. Enable passwordless login to facilitate AppFormix Controller node with Ansible to install agents on the nodes. Run the same command on the AppFormix Controller node also.

    content_copy zoom_out_map
     ssh-keygen -t rsa   #Creates Keys
    
     ssh-copy-id -i ~/.ssh/id_rsa.pub <target_host>    #Copies key from the node to other hosts
  4. Use the Sample_Inventory file as a template to create a host file.

    content_copy zoom_out_map
    # Example naming schemes are as below:
     #   hostname ansible_ssh_user='username' ansible_sudo_pass='password'
    
     # List all Compute Nodes
     [compute]
    203.0.113.5
     203.0.113.17
    
     # AppFormix controller host
     #
     # Host variables can be defined to control AppFormix configuration parameters
     # for particular host.  For example, to specify the directory in which MongoDB
     # data is stored on hostname1 (the default is /opt/appformix/mongo/data):
     #
     #   hostname1 appformix_mongo_data_dir=/var/lib/appformix/mongo
     #
     # For variables with same value for all AppFormix controller hosts, set group
     # variables below.
     #
     [appformix_controller]
     203.0.113.119
    
  5. Verify that all the hosts listed in the inventory file are reachable from the AppFormix Controller.

    content_copy zoom_out_map
     export ANSIBLE_HOST_KEY_CHECKING=False   # Eliminates interactive experience prompting for Known_Hosts
    
     ansible -i inventory -m ping all         # Pings all the hosts in the inventory file
    
  6. At the top-level of the distribution, create a directory named group_vars.

    content_copy zoom_out_map
    mkdir group_vars
  7. Every installation requires an authorized license file and Docker images. In group_vars directory, create a file named all. Add the following:

    content_copy zoom_out_map
    openstack_platform_enabled: true
    
    appformix_version: <version>
    appformix_manager_version: <version>
    appformix_license: path/to/appformix-license-file.sig           # Location of License Provided
    
    appformix_docker_images:
        - /path/to/appformix-platform-images-<version>.tar.gz
        - /path/to/appformix-dependencies-images-<version>.tar.gz
        - /path/to/appformix-openstack-images-<version>.tar.gz
  8. Enable the Appformix Certified_Plugins in the file named all in the group_vars directory and add the following:

    content_copy zoom_out_map
    appformix_plugins: '{{ appformix_contrail_factory_plugins }} + {{ appformix_network_device_factory_plugins }} + {{ appformix_openstack_factory_plugins }} + {{ appformix_application_factory_plugins }} + {{ appformix_remote_host_factory_plugins }} + {{appformix_network_device_factory_juniper_plugins }}'
    
    appformix_network_device_monitoring_enabled: true
    appformix_remote_host_monitoring_enabled: true
    appformix_jti_network_device_monitoring_enabled: true
    
  9. Source the openrc file from the OpenStack controller node (/etc/contrail/openstackrc) to the AppFormix Controller to authenticate the adapter to access admin privileges over the controller services.

    content_copy zoom_out_map
    export OS_USERNAME=<admin user>
    export OS_PASSWORD=<password>
    export OS_AUTH_URL=http://<openstack-auth-URL>/v2.0/
    export OS_NO_CACHE=1
    export OS_PROJECT_DOMAIN_NAME=Default
    export OS_USER_DOMAIN_NAME=Default
    export OS_PROJECT_NAME=admin
    export OS_IDENTITY_API_VERSION=3
    export OS_IMAGE_API_VERSION=2
    
  10. Add the username and password for credentials-based login.

    content_copy zoom_out_map
    Constraints for creating Username:
      - Should not be more than 30 characters
      - Can have anything mentioned below:
         1. alphanumeric character
         2. '_' or '.'
    
    Constraints for creating Password:
      - 8 characters length or more
      - 1 digit or more
      - 1 uppercase letter or more
      - 1 lowercase letter or more
    
    export APPFORMIX_USERNAME=<username>
    export APPFORMIX_PASSWORD=<password> 
    
  11. Run Ansible with the created inventory file.

    content_copy zoom_out_map
     ansible-playbook -i inventory appformix_openstack.yml

Removing a Node from AppFormix

To remove a node from AppFormix:

  1. Edit the inventory file and add appformix_state=absent to each node that you want to remove from AppFormix.

    content_copy zoom_out_map
     # Example naming schemes are as below:
     #   hostname ansible_ssh_user='username' ansible_sudo_pass='password'
    
     # List all Compute Nodes
     [compute]
     203.0.113.5 appformix_state=absent
    203.0.113.17
    
  2. Run Ansible with the edited inventory file. This will remove the node and all its resources from AppFormix.

    content_copy zoom_out_map
    ansible-playbook -i inventory appformix_openstack.yml
footer-navigation