Clean up vars, tests and overrides

1. It would appear that searchlight does not make use of rabbitmq,
   so we remove the vhost/user setup and vars.
2. The searchlight_requirements_git_repo repo was cloned, but not
   used anywhere. This is a relic of the past and has now been
   removed.
3. The service URI defaults use the load balancer addresses, so
   so instead of overriding all the URI's we simply set the load
   balancer addresses.
4. The 'functional test' installed curl, but didn't use it. It
   used a var to refer to the correct port. This requires the
   duplicating of the var in overrides which is a bit over the top.

Change-Id: Ibd4fd8564ae5f858a2a2676d35de417e673c483c
This commit is contained in:
Jesse Pretorius 2018-07-27 13:56:59 +01:00
parent c51053f2e9
commit 76421ccb31
5 changed files with 7 additions and 55 deletions

View File

@ -32,8 +32,6 @@ searchlight_pip_package_state: "latest"
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_requirements_git_repo: https://git.openstack.org/openstack/requirements
searchlight_requirements_git_install_branch: master
searchlight_developer_mode: false
searchlight_developer_constraints:
- "git+{{ searchlight_git_repo }}@{{ searchlight_git_install_branch }}#egg=searchlight"

View File

@ -27,16 +27,6 @@
when:
- searchlight_developer_mode | bool
- name: Clone requirements git repository
git:
repo: "{{ searchlight_requirements_git_repo }}"
dest: "/opt/requirements"
clone: yes
update: yes
version: "{{ searchlight_requirements_git_install_branch }}"
when:
- searchlight_developer_mode | bool
- name: Attempt venv download
get_url:
url: "{{ searchlight_venv_download_url }}"

View File

@ -2,28 +2,8 @@
searchlight_developer_mode: true
searchlight_container_mysql_password: "secrete"
searchlight_service_password: "secrete"
searchlight_service_publicurl: "http://{{ hostvars[groups['searchlight_all'][0]]['ansible_host'] }}:9393"
searchlight_service_internalurl: "http://{{ hostvars[groups['searchlight_all'][0]]['ansible_host'] }}:9393"
searchlight_service_adminurl: "http://{{ hostvars[groups['searchlight_all'][0]]['ansible_host'] }}:9393"
searchlight_rabbitmq_userid: searchlight
searchlight_rabbitmq_vhost: /searchlight
searchlight_rabbitmq_password: "{{ rabbitmq_password }}"
searchlight_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
searchlight_rabbitmq_host_group: "{{ rabbitmq_host_group }}"
searchlight_rabbitmq_userid: "{{ searchlight_service_user_name }}"
searchlight_rabbitmq_servers: "{{ rabbitmq_servers }}"
searchlight_rabbitmq_port: "{{ rabbitmq_port }}"
searchlight_service_port: 9393
searchlight_service_proto: http
searchlight_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(searchlight_service_proto) }}"
searchlight_service_internalurl: "{{ searchlight_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ searchlight_service_port }}"
searchlight_ssl_external: False
searchlight_service_region: "RegionOne"
# Ensure that the package state matches the global setting
searchlight_package_state: "latest"
internal_lb_vip_address: "{{ hostvars[groups['searchlight_all'][0]]['ansible_host'] }}"
external_lb_vip_address: "{{ internal_lb_vip_address }}"
# Ensure that keystone authentication is enabled for gnocchi
searchlight_keystone_auth: "{{ (groups['keystone_all'] is defined) and (groups['keystone_all'] | length > 0) }}"

View File

@ -21,11 +21,5 @@
- common/test-vars.yml
vars:
elasticsearch_apt_java_package: openjdk-8-jre
pre_tasks:
- include: common/ensure-rabbitmq.yml
vhost_name: "{{ searchlight_rabbitmq_vhost }}"
user_name: "{{ searchlight_rabbitmq_userid }}"
user_password: "{{ searchlight_rabbitmq_password }}"
when: groups['rabbitmq_all'] is defined
roles:
- role: "os_searchlight"

View File

@ -13,24 +13,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO: (neillc) These tests are copied from the gnocchi role. replace with tests for searchlight
- name: Playbook for functional testing of searchlight
hosts: searchlight_all
user: root
gather_facts: false
tasks:
- name: Install curl
package:
name: "curl"
state: "{{ searchlight_package_state }}"
register: install_packages
until: install_packages is success
retries: 5
delay: 2
- name: Check the searchlight-api
uri:
url: "http://localhost:{{ searchlight_service_port }}"
status_code: 200,300
vars_files:
- common/test-vars.yml
tasks:
- name: Check the searchlight-api
uri:
url: "http://localhost:9393"
status_code: 200,300