In order to radically simplify how we prepare the service venvs, we use a common role to do the wheel builds and the venv preparation. This makes the process far simpler to understand, because the role does its own building and installing. It also reduces the code maintenance burden, because instead of duplicating the build processes in the repo_build role and the service role - we only have it all done in a single place. We also change the role venv tag var to use the integrated build's common venv tag so that we can remove the role's venv tag in group_vars in the integrated build. This reduces memory consumption and also reduces the duplication. This is by no means the final stop in the simplification process, but it is a step forward. The will be work to follow which: 1. Replaces 'developer mode' with an equivalent mechanism that uses the common role and is simpler to understand. We will also simplify the provisioning of pip install arguments when doing this. 2. Simplifies the installation of optional pip packages. Right now it's more complicated than it needs to be due to us needing to keep the py_pkgs plugin working in the integrated build. Depends-On: https://review.openstack.org/598957 Change-Id: Ife2f3e96f7a56279f68509259c099bfe20ff19d8 Implements: blueprint python-build-install-simplification Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
165 lines
7.3 KiB
YAML
165 lines
7.3 KiB
YAML
---
|
|
# Copyright 2016, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
## 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.
|
|
cloudkitty_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
|
|
|
|
# Set the package install state for distribution and pip packages
|
|
# Options are 'present' and 'latest'
|
|
cloudkitty_package_state: "latest"
|
|
cloudkitty_pip_package_state: "latest"
|
|
|
|
cloudkitty_service_user_name: cloudkitty
|
|
|
|
## Oslo Messaging info
|
|
|
|
# RPC
|
|
cloudkitty_oslomsg_rpc_host_group: "{{ oslomsg_rpc_host_group | default('rabbitmq_all') }}"
|
|
cloudkitty_oslomsg_rpc_setup_host: "{{ (cloudkitty_oslomsg_rpc_host_group in groups) | ternary(groups[cloudkitty_oslomsg_rpc_host_group][0], 'localhost') }}"
|
|
cloudkitty_oslomsg_rpc_transport: "{{ oslomsg_rpc_transport | default('rabbit') }}"
|
|
cloudkitty_oslomsg_rpc_servers: "{{ oslomsg_rpc_servers | default('127.0.0.1') }}"
|
|
cloudkitty_oslomsg_rpc_port: "{{ oslomsg_rpc_port | default('5672') }}"
|
|
cloudkitty_oslomsg_rpc_use_ssl: "{{ oslomsg_rpc_use_ssl | default(False) }}"
|
|
cloudkitty_oslomsg_rpc_userid: cloudkitty
|
|
cloudkitty_oslomsg_rpc_vhost: /cloudkitty
|
|
|
|
# Notify
|
|
cloudkitty_oslomsg_notify_host_group: "{{ oslomsg_notify_host_group | default('rabbitmq_all') }}"
|
|
cloudkitty_oslomsg_notify_setup_host: "{{ (cloudkitty_oslomsg_notify_host_group in groups) | ternary(groups[cloudkitty_oslomsg_notify_host_group][0], 'localhost') }}"
|
|
cloudkitty_oslomsg_notify_transport: "{{ oslomsg_notify_transport | default('rabbit') }}"
|
|
cloudkitty_oslomsg_notify_servers: "{{ oslomsg_notify_servers | default('127.0.0.1') }}"
|
|
cloudkitty_oslomsg_notify_port: "{{ oslomsg_notify_port | default('5672') }}"
|
|
cloudkitty_oslomsg_notify_use_ssl: "{{ oslomsg_notify_use_ssl | default(False) }}"
|
|
cloudkitty_oslomsg_notify_userid: "{{ cloudkitty_oslomsg_rpc_userid }}"
|
|
cloudkitty_oslomsg_notify_password: "{{ cloudkitty_oslomsg_rpc_password }}"
|
|
cloudkitty_oslomsg_notify_vhost: "{{ cloudkitty_oslomsg_rpc_vhost }}"
|
|
|
|
cloudkitty_system_group_name: cloudkitty
|
|
cloudkitty_system_user_name: cloudkitty
|
|
cloudkitty_system_comment: meow
|
|
cloudkitty_system_shell: /bin/false
|
|
cloudkitty_system_home_folder: "/var/lib/{{ cloudkitty_system_user_name }}"
|
|
|
|
# TODO(odyssey4me):
|
|
# This can be simplified once all the roles are using
|
|
# python_venv_build. We can then switch to using a
|
|
# set of constraints in pip.conf inside the venv,
|
|
# perhaps prepared by giving a giving a list of
|
|
# constraints to the role.
|
|
cloudkitty_pip_install_args: >-
|
|
{{ cloudkitty_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
|
|
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''), '') }}
|
|
{{ pip_install_options | default('') }}
|
|
|
|
cloudkitty_venv_tag: "{{ venv_tag | default('untagged') }}"
|
|
cloudkitty_bin: "/openstack/venvs/cloudkitty-{{ cloudkitty_venv_tag }}/bin"
|
|
|
|
# venv_download, even when true, will use the fallback method of building the
|
|
# venv from scratch if the venv download fails.
|
|
cloudkitty_venv_download: "{{ not cloudkitty_developer_mode | bool }}"
|
|
cloudkitty_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/cloudkitty.tgz
|
|
|
|
cloudkitty_git_repo: https://git.openstack.org/openstack/cloudkitty
|
|
cloudkitty_git_install_branch: master
|
|
|
|
cloudkitty_developer_constraints:
|
|
- "git+{{ cloudkitty_git_repo }}@{{ cloudkitty_git_install_branch }}#egg=cloudkitty"
|
|
|
|
cloudkitty_developer_mode: false
|
|
cloudkitty_notification_topics: notifications
|
|
cloudkitty_collected_services: compute
|
|
cloudkitty_collector: gnocchi
|
|
cloudkitty_service_project_domain_id: default
|
|
cloudkitty_service_project_name: "service"
|
|
cloudkitty_service_user_domain_id: default
|
|
|
|
cloudkitty_keystone_auth_plugin: password
|
|
cloudkitty_output_backend: cloudkitty.backend.file.FileBackend
|
|
cloudkitty_output_pipeline: osrf
|
|
cloudkitty_output_basepath: /var/cloudkitty/reports
|
|
|
|
cloudkitty_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}"
|
|
cloudkitty_galera_address: "{{ galera_address | default('127.0.0.1') }}"
|
|
cloudkitty_galera_database: cloudkitty
|
|
cloudkitty_galera_user: cloudkitty
|
|
cloudkitty_database_connection: >-
|
|
mysql+pymysql://{{ cloudkitty_galera_user }}:{{ cloudkitty_container_mysql_password }}@{{ cloudkitty_galera_address }}/{{ cloudkitty_galera_database }}?charset=utf8
|
|
|
|
## Service Type and Data
|
|
cloudkitty_service_region: RegionOne
|
|
cloudkitty_service_name: cloudkitty
|
|
cloudkitty_service_port: 8089
|
|
cloudkitty_service_proto: http
|
|
cloudkitty_service_publicuri_proto: "{{ openstack_service_publicuri_proto | default(cloudkitty_service_proto) }}"
|
|
cloudkitty_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(cloudkitty_service_proto) }}"
|
|
cloudkitty_service_internaluri_proto: "{{ openstack_service_internaluri_proto | default(cloudkitty_service_proto) }}"
|
|
cloudkitty_service_publicuri: "{{ cloudkitty_service_publicuri_proto }}://{{ external_lb_vip_address }}:{{ cloudkitty_service_port }}"
|
|
cloudkitty_service_publicurl: "{{ cloudkitty_service_publicuri }}/"
|
|
cloudkitty_service_adminuri: "{{ cloudkitty_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ cloudkitty_service_port }}"
|
|
cloudkitty_service_adminurl: "{{ cloudkitty_service_adminuri }}/"
|
|
cloudkitty_service_internaluri: "{{ cloudkitty_service_internaluri_proto }}://{{ internal_lb_vip_address }}:{{ cloudkitty_service_port }}"
|
|
cloudkitty_service_internalurl: "{{ cloudkitty_service_internaluri }}/"
|
|
|
|
cloudkitty_cloudkitty_conf_overrides: {}
|
|
cloudkitty_policy_overrides: {}
|
|
cloudkitty_api_paste_ini_overrides: {}
|
|
|
|
cloudkitty_api_init_overrides: {}
|
|
cloudkitty_processor_init_overrides: {}
|
|
|
|
## Service Name-Group Mapping
|
|
cloudkitty_services:
|
|
cloudkitty-api:
|
|
group: cloudkitty_all
|
|
service_name: cloudkitty-api
|
|
init_config_overrides: "{{ cloudkitty_api_init_overrides }}"
|
|
execstarts: "{{ cloudkitty_bin }}/cloudkitty-api"
|
|
start_order: 1
|
|
cloudkitty-processor:
|
|
group: cloudkitty_all
|
|
service_name: cloudkitty-processor
|
|
init_config_overrides: "{{ cloudkitty_processor_init_overrides }}"
|
|
execstarts: "{{ cloudkitty_bin }}/cloudkitty-processor"
|
|
start_order: 2
|
|
|
|
cloudkitty_pip_packages:
|
|
- cloudkitty
|
|
- cryptography
|
|
- msgpack-python
|
|
- osprofiler
|
|
- PyMySQL
|
|
- python-memcached
|
|
- SQLAlchemy>=1.0.10
|
|
- systemd-python
|
|
- tooz
|
|
|
|
## (Qdrouterd) integration
|
|
# TODO(ansmith): Change structure when more backends will be supported
|
|
cloudkitty_oslomsg_amqp1_enabled: "{{ cloudkitty_oslomsg_rpc_transport == 'amqp' }}"
|
|
|
|
cloudkitty_optional_oslomsg_amqp1_pip_packages:
|
|
- oslo.messaging[amqp1]
|
|
|
|
# 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.
|
|
cloudkitty_role_project_group: cloudkitty_all
|