OpenStack-Ansible skyline role

Default variables

skyline_debug: false

# Set installation method
skyline_venv_python_executable: "{{ openstack_venv_python_executable | default('python3') }}"

# Set the package install state for distribution packages
# Options are 'present' and 'latest'
skyline_package_state: "{{ package_state | default('latest') }}"
# Centos EPEL repository options
skyline_yarn_epel_mirror: "{{ centos_epel_mirror | default('http://download.fedoraproject.org/pub/epel') }}"
skyline_yarn_epel_key: >-
  {{ centos_epel_key | default('http://download.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-' ~ ansible_facts['distribution_major_version']) }}

# Set the host which will execute the shade modules
# for the service setup. The host must already have
# clouds.yaml properly configured.
skyline_service_setup_host: "{{ openstack_service_setup_host | default('localhost') }}"
skyline_service_setup_host_python_interpreter: >-
  {{
     openstack_service_setup_host_python_interpreter | default(
       (skyline_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
  }}

# In order to get relevant skylinie-console content, you'd need to build static files
# through yarn. Otherwise only tagged releases from PyPi can be used for
# `skyline_console_git_install_branch`
skyline_console_yarn_build: "{{ skyline_console_git_install_branch is not regex(skyline_console_pypi_version_regex) }}"
# You can set this variable to true during runtime if need to explicitly re-build skyline-console
skyline_console_yarn_rebuild: "{{ venv_wheels_rebuild | default(False) }}"
skyline_console_yarn_build_path: /openstack/src/skyline-console
# If wheel build is disabled and yarn build is enabled, we'd need to build on each skyline host independently
skyline_console_yarn_setup_host: "{{ skyline_console_wheel_build_enable | ternary(groups['repo_all'][0], inventory_hostname) }}"
skyline_console_wheel_build_enable: "{{ venv_wheel_build_enable | default(True) and groups['repo_all'] | length > 0 }}"

skyline_git_repo: https://opendev.org/openstack/skyline-apiserver
skyline_git_install_branch: master

skyline_console_git_repo: https://opendev.org/openstack/skyline-console
skyline_console_git_install_branch: master

# We will not build yarn when version matches a regex for valid Python versions, then
# it's assumed, that version in topic should be available from PyPi and build is not needed.
skyline_console_pypi_version_regex: '^(\d*!)?(\d*)(\.(\d*))*((a|b|rc)(\d*))?(\.post(\d*))?(\.dev(\d*))?$'

skyline_upper_constraints_url: >-
  {{ requirements_git_url | default('https://releases.openstack.org/constraints/upper/' ~ requirements_git_install_branch | default('master')) }}
skyline_git_constraints: []
#  - "--constraint {{ skyline_upper_constraints_url }}"

skyline_pip_install_args: "{{ pip_install_options | default('') }}"

# Name of the virtual env to deploy into
skyline_venv_tag: "{{ venv_tag | default('untagged') }}"
skyline_bin: "/openstack/venvs/skyline-{{ skyline_venv_tag }}/bin"
skyline_lib_static_files: "{{ skyline_lib_dir }}/skyline_console/static"

## Database info
skyline_db_setup_host: "{{ openstack_db_setup_host | default('localhost') }}"
skyline_db_setup_python_interpreter: >-
  {{
     openstack_db_setup_python_interpreter | default(
       (skyline_db_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_facts['python']['executable']))
  }}
skyline_galera_address: "{{ galera_address | default('127.0.0.1') }}"
skyline_galera_database: skyline
skyline_galera_user: skyline
# skyline_galera_password:
skyline_galera_use_ssl: "{{ galera_use_ssl | default(False) }}"
skyline_galera_ssl_ca_cert: "{{ galera_ssl_ca_cert | default('') }}"
skyline_galera_port: "{{ galera_port | default('3306') }}"
skyline_db_max_overflow: "{{ openstack_db_max_overflow | default('50') }}"
skyline_db_max_pool_size: "{{ openstack_db_max_pool_size | default('5') }}"
skyline_db_pool_timeout: "{{ openstack_db_pool_timeout | default('30') }}"
skyline_db_connection_recycle_time: "{{ openstack_db_connection_recycle_time | default('600') }}"

## System User / Group
skyline_system_user_name: skyline
skyline_system_group_name: skyline
skyline_system_comment: skyline system user
skyline_system_shell: /bin/false
skyline_system_user_home: "/var/lib/{{ skyline_system_user_name }}"

## Service user
skyline_service_user_name: skyline
# skyline_service_password:
skyline_service_project_name: service
skyline_service_project_domain_id: default
skyline_service_user_domain_id: default
skyline_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
skyline_role_name: admin

# API
skyline_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
skyline_service_port: 9999
# skyline_prometheus_basic_auth_password:
skyline_prometheus_basic_auth_user: 'skyline'
# skyline_secret_key:
skyline_interface: internal
## Cap the maximum number of threads / workers when a user value is unspecified.
skyline_api_workers_max: 16
skyline_api_workers: >-
  {{ [[(ansible_facts['processor_vcpus'] // ansible_facts['processor_threads_per_core']) | default(1), 1] | max, skyline_api_workers_max] | min }}

# Common pip packages
# If yarn build is enabled, we need to install skyline-console from local path rather
# then from git.
# If yarn build is disabled, ``skyline_console_git_install_branch`` must be valid tag
# on pypi.
skyline_pip_packages:
  - "git+{{ skyline_git_repo }}@{{ skyline_git_install_branch }}#egg=skyline-apiserver"
  - "{{
      skyline_console_yarn_build | ternary(
        skyline_console_yarn_build_path,
        'skyline-console==' ~ skyline_console_git_install_branch
      )
    }}"

## Service Name-Group Mapping
skyline_services:
  skyline-api:
    group: skyline_all
    service_name: skyline-apiserver
    init_config_overrides: "{{ skyline_apiserver_init_overrides }}"
    start_order: 1
    execstarts: "{{ skyline_bin }}/gunicorn -c /etc/skyline/gunicorn.py skyline_apiserver.main:app"

## Tunable overrides
skyline_apiserver_init_overrides: {}
skyline_skyline_yaml_overrides: {}

# Set override for image upload size
skyline_client_max_body_size: 1100M

Dependencies

Example playbook

---
- name: Install skyline components
  hosts: skyline_all
  gather_facts: "{{ osa_gather_facts | default(True) }}"
  environment: "{{ deployment_environment_variables | default({}) }}"
  user: root
  tags:
    - skyline
  roles:
    - role: "os_skyline"
    - role: "openstack.osa.system_crontab_coordination"
      tags:
        - crontab