OpenStack-Ansible Searchlight

OpenStack-Ansible Searchlight

Ansible role which installs and configures OpenStack Searchlight.

Default Variables

## Verbosity Options
debug: False

# Set the host which will execute the shade modules
# for the service setup. The host must already have
# clouds.yaml properly configured.
searchlight_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"

# Set the package install state for distribution and pip packages
# Options are 'present' and 'latest'
searchlight_package_state: "latest"
searchlight_pip_package_state: "latest"

# These variables are used in 'developer mode' in order to allow the role
# to build an environment directly from a git source without the presence
# of an OpenStack-Ansible repo_server.
searchlight_git_repo: https://git.openstack.org/openstack/searchlight
# searchlight_git_install_branch: 43e734917378f7eb990cc85533982abbb51d6d63 # Pin this for ocata - when back to pike remove
searchlight_git_install_branch: master
searchlight_developer_mode: false
searchlight_developer_constraints:
  - "git+{{ searchlight_git_repo }}@{{ searchlight_git_install_branch }}#egg=searchlight"

#: Name of the virtual env to deploy into
searchlight_venv_tag: untagged
searchlight_bin: "/openstack/venvs/searchlight-{{ searchlight_venv_tag }}/bin"
# searchlight_venv_pkgs: "/openstack/venvs/searchlight-{{ searchlight_venv_tag }}/lib/python2.7/site-packages"

# venv_download, even when true, will use the fallback method of building the
# venv from scratch if the venv download fails.
searchlight_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/searchlight.tgz
searchlight_venv_download: "{{ not searchlight_developer_mode | bool }}"

#: Use of deprecated config options will cause a fatal application error
searchlight_fatal_deprecations: false

#: External SSL forwarding proto, assumes TLS termination at load balancer
searchlight_ssl_external: true
searchlight_secure_proxy_ssl_header: HTTP_X_FORWARDED_PROTO

#: Set this to false to disable API service through Apache + mod_wsgi
searchlight_use_mod_wsgi: true

#: System info
searchlight_system_user_name: searchlight
searchlight_system_group_name: searchlight

searchlight_system_shell: /bin/false
searchlight_system_comment: searchlight system user
searchlight_system_user_home: "/var/lib/{{ searchlight_system_user_name }}"

#: Common pip packages
searchlight_pip_packages:
  - cryptography
  - keystonemiddleware
  - python-memcached
  - searchlight

# This variable is used by the repo_build process to determine
# which host group to check for members of before building the
# pip packages required by this role. The value is picked up
# by the py_pkgs lookup.
searchlight_role_project_group: searchlight_all

#: Tunable overrides
searchlight_conf_overrides: {}
searchlight_api_paste_ini_overrides: {}
searchlight_policy_overrides: {}

elasticsearch_apt_java_package: openjdk-8-jre
searchlight_keystone_auth_plugin: password
searchlight_service_project_domain_id: default
searchlight_service_project_description: "OpenStack Services"
searchlight_service_user_domain_id: default
searchlight_service_name: "searchlight"
searchlight_service_type: "search"
searchlight_service_project_name: "service"
searchlight_service_user_name: "searchlight"
searchlight_service_description: "Searchlight service"
searchlight_api_program_name: "searchlight-api"
searchlight_manage_program_name: "searchlight-manage"
searchlight_manage_index_command: "index sync --force"
searchlight_listener_program_name: "searchlight-listener"
searchlight_role_name: "admin"

searchlight_service_address: 0.0.0.0
searchlight_service_port: 9393
searchlight_service_proto: http
searchlight_service_registry_proto: "{{ searchlight_service_proto }}"
searchlight_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(searchlight_service_proto) }}"
searchlight_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(searchlight_service_proto) }}"
searchlight_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(searchlight_service_proto) }}"
searchlight_service_publicurl: "{{ searchlight_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ searchlight_service_port }}"
searchlight_service_internalurl: "{{ searchlight_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ searchlight_service_port }}"
searchlight_service_adminurl: "{{ searchlight_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ searchlight_service_port }}"

# It would be better to make this discoverable - discuss with searchlight team
searchlight_nova_compute_api_version: "2.26"

# Resource Plugins
# TODO: base these on group length where possible
#
searchlight_include_region_name: False
# If resource_plugin.include_region_name is set to True, then this value
# will be the default value for the 'region_name' field on all documents
searchlight_default_os_region_name: ""
searchlight_resource_plugin_os_nova_server_enabled: True
searchlight_resource_plugin_os_nova_server_admin_only_fields: "OS-EXT-SRV*,OS-EXT-STS:vm_state"
searchlight_resource_plugin_os_nova_hypervisor: True
searchlight_resource_plugin_os_nova_flavor_enabled: True
searchlight_resource_plugin_os_nova_servergroup_enabled: False
searchlight_resource_plugin_os_glance_image_enabled: True
searchlight_resource_plugin_os_glance_metadef_enabled: True
searchlight_resource_plugin_os_cinder_volume_enabled: True
searchlight_resource_plugin_os_cinder_snapshot_enabled: True
searchlight_resource_plugin_os_neutron_net_enabled: True
searchlight_resource_plugin_os_neutron_net_admin_only_fields: "admin_state_up,status"
searchlight_resource_plugin_os_neutron_port_enabled: True
searchlight_resource_plugin_os_neutron_security_group_enabled: True
searchlight_resource_plugin_os_designate_zone_enabled: False
searchlight_resource_plugin_os_designate_recordset_enabled: False
searchlight_resource_plugin_os_swift_account_enabled: False
searchlight_resource_plugin_os_swift_container_enabled: False
searchlight_resource_plugin_os_swift_object_enabled: False

horizon_enable_searchlight_ui: True

Required Variables

This list is not considered exhaustive at present. See role internals for further details.

elasticsearch_apt_java_package: "openjdk-8-jre"
searchlight_rabbitmq_userid: searchlight
searchlight_rabbitmq_vhost: /searchlight
searchlight_rabbitmq_servers: "{{ rabbitmq_servers }}"
searchlight_rabbitmq_port: "{{ rabbitmq_port }}"
searchlight_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"

Example Playbook

- name: Installation and setup of Searchlight
  hosts: keystone_all
  user: root
  roles:
    - role: elasticsearch
    - role: "os_searchlight"
      searchlight_venv_tag: "{{ openstack_release }}"
      searchlight_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/searchlight-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
      pip_lock_to_internal_repo: "{{ (pip_links | length) >= 1 }}"
      tags:
        - "os-searchlight"
      vars:
        elasticsearch_apt_java_package: "openjdk-8-jre"
        searchlight_rabbitmq_userid: searchlight
        searchlight_rabbitmq_vhost: /searchlight
        searchlight_rabbitmq_servers: "{{ rabbitmq_servers }}"
        searchlight_rabbitmq_port: "{{ rabbitmq_port }}"
        searchlight_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"

Tags

This role supports two tags: searchlight-install and searchlight-config

The searchlight-install tag can be used to install and upgrade.

The searchlight-config tag can be used to maintain configuration of the service.

OpenStack-Ansible Searchlight

Ansible role to install OpenStack Searchlight.

Documentation for the project can be found at:
https://docs.openstack.org/openstack-ansible-os_searchlight/latest/
Release notes for the project can be found at:
https://docs.openstack.org/releasenotes/openstack-ansible-os_searchlight
The project source code repository is located at:
https://git.openstack.org/cgit/openstack/openstack-ansible-os_searchlight
The project home is at:
https://launchpad.net/openstack-ansible

Dependencies

This role needs pip >= 7.1 installed on the target host.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.