Added extras folder with OSA configs
This commit is contained in:
parent
01a2ecd92b
commit
c81f1df938
33
extras/env.d/sahara.yml
Normal file
33
extras/env.d/sahara.yml
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
component_skel:
|
||||
sahara_api:
|
||||
belongs_to:
|
||||
- sahara_all
|
||||
sahara_engine:
|
||||
belongs_to:
|
||||
- sahara_all
|
||||
|
||||
container_skel:
|
||||
sahara_container:
|
||||
belongs_to:
|
||||
- infra_containers
|
||||
- os-infra_containers
|
||||
contains:
|
||||
- sahara_api
|
||||
- sahara_engine
|
||||
properties:
|
||||
service_name: sahara
|
||||
container_release: trusty
|
||||
container_fs_size: 12G
|
13
extras/group_vars_sahara.yml
Normal file
13
extras/group_vars_sahara.yml
Normal file
@ -0,0 +1,13 @@
|
||||
## Sahara
|
||||
sahara_service_port: 8386
|
||||
sahara_service_proto: http
|
||||
sahara_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(sahara_service_proto) }}"
|
||||
sahara_service_user_name: sahara
|
||||
sahara_service_project_name: service
|
||||
sahara_service_project_domain_id: default
|
||||
sahara_service_user_domain_id: default
|
||||
sahara_service_adminuri: "{{ sahara_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ sahara_service_port }}"
|
||||
sahara_service_adminurl: "{{ sahara_service_adminuri }}/v1.1/%(tenant_id)s"
|
||||
sahara_service_region: "{{ service_region }}"
|
||||
sahara_rabbitmq_userid: sahara
|
||||
sahara_rabbitmq_vhost: /sahara
|
10
extras/haproxy_sahara.yml
Normal file
10
extras/haproxy_sahara.yml
Normal file
@ -0,0 +1,10 @@
|
||||
haproxy_service_configs:
|
||||
- service:
|
||||
haproxy_service_name: sahara_api
|
||||
haproxy_backend_nodes: "{{ groups['sahara_api'] | default([]) }}"
|
||||
haproxy_port: 8386
|
||||
haproxy_balance_type: http
|
||||
haproxy_backend_options:
|
||||
- "forwardfor"
|
||||
- "httpchk /versions"
|
||||
- "httplog"
|
126
extras/os-sahara-install.yml
Normal file
126
extras/os-sahara-install.yml
Normal file
@ -0,0 +1,126 @@
|
||||
---
|
||||
# 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.
|
||||
|
||||
- name: Install sahara server
|
||||
hosts: sahara_all
|
||||
max_fail_percentage: 20
|
||||
user: root
|
||||
pre_tasks:
|
||||
- name: Use the lxc-openstack aa profile
|
||||
lxc_container:
|
||||
name: "{{ container_name }}"
|
||||
container_config:
|
||||
- "lxc.aa_profile=lxc-openstack"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
when: not is_metal | bool
|
||||
register: container_config
|
||||
tags:
|
||||
- lxc-aa-profile
|
||||
- name: Wait for container ssh
|
||||
wait_for:
|
||||
port: "22"
|
||||
delay: "{{ ssh_delay }}"
|
||||
search_regex: "OpenSSH"
|
||||
host: "{{ ansible_ssh_host }}"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
when: >
|
||||
(container_config is defined and container_config | changed) or
|
||||
(container_extra_config is defined and container_config | changed)
|
||||
register: ssh_wait_check
|
||||
until: ssh_wait_check | success
|
||||
retries: 3
|
||||
tags:
|
||||
- ssh-wait
|
||||
- name: Sort the rabbitmq servers
|
||||
dist_sort:
|
||||
value_to_lookup: "{{ container_name }}"
|
||||
ref_list: "{{ groups['sahara_all'] }}"
|
||||
src_list: "{{ rabbitmq_servers }}"
|
||||
register: servers
|
||||
- name: Set rabbitmq servers
|
||||
set_fact:
|
||||
rabbitmq_servers: "{{ servers.sorted_list }}"
|
||||
- name: Create log dir
|
||||
file:
|
||||
path: "{{ item.path }}"
|
||||
state: directory
|
||||
with_items:
|
||||
- { path: "/openstack/log/{{ inventory_hostname }}-sahara" }
|
||||
when: is_metal | bool
|
||||
tags:
|
||||
- sahara-logs
|
||||
- sahara-log-dirs
|
||||
- name: Create log aggregation links
|
||||
file:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
state: "{{ item.state }}"
|
||||
force: "yes"
|
||||
with_items:
|
||||
- { src: "/openstack/log/{{ inventory_hostname }}-sahara", dest: "/var/log/sahara", state: "link" }
|
||||
when: is_metal | bool
|
||||
tags:
|
||||
- sahara-logs
|
||||
- name: Ensure Rabbitmq vhost
|
||||
rabbitmq_vhost:
|
||||
name: "{{ sahara_rabbitmq_vhost }}"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
|
||||
when:
|
||||
- inventory_hostname == groups['sahara_all'][0]
|
||||
- groups['rabbitmq_all']|length > 0
|
||||
tags:
|
||||
- sahara-rabbitmq
|
||||
- sahara-rabbitmq-vhost
|
||||
- name: Ensure rabbitmq user
|
||||
rabbitmq_user:
|
||||
user: "{{ sahara_rabbitmq_userid }}"
|
||||
password: "{{ sahara_rabbitmq_password }}"
|
||||
vhost: "{{ sahara_rabbitmq_vhost }}"
|
||||
configure_priv: ".*"
|
||||
read_priv: ".*"
|
||||
write_priv: ".*"
|
||||
state: "present"
|
||||
delegate_to: "{{ groups['rabbitmq_all'][0] }}"
|
||||
when:
|
||||
- inventory_hostname == groups['sahara_all'][0]
|
||||
- groups['rabbitmq_all']|length > 0
|
||||
tags:
|
||||
- sahara-rabbitmq
|
||||
- sahara-rabbitmq-user
|
||||
roles:
|
||||
- role: "os_sahara"
|
||||
sahara_galera_address: "{{ galera_address }}"
|
||||
sahara_venv_tag: "{{ openstack_release }}"
|
||||
sahara_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/sahara-{{ openstack_release }}.tgz"
|
||||
tags:
|
||||
- "os-sahara"
|
||||
- { role: "openstack_openrc", tags: [ "openstack-openrc" ] }
|
||||
- role: "rsyslog_client"
|
||||
rsyslog_client_log_rotate_file: sahara_log_rotate
|
||||
rsyslog_client_log_dir: "/var/log/sahara"
|
||||
rsyslog_client_config_name: "99-sahara-rsyslog-client.conf"
|
||||
tags:
|
||||
- "sahara-rsyslog-client"
|
||||
- "rsyslog-client"
|
||||
- role: "system_crontab_coordination"
|
||||
tags:
|
||||
- "system-crontab-coordination"
|
||||
vars:
|
||||
galera_address: "{{ internal_lb_vip_address }}"
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
sahara_rabbitmq_userid: sahara
|
||||
sahara_rabbitmq_vhost: /sahara
|
||||
sahara_rabbitmq_servers: "{{ rabbitmq_servers }}"
|
||||
sahara_rabbitmq_port: "{{ rabbitmq_port }}"
|
||||
sahara_rabbitmq_use_ssl: "{{ rabbitmq_use_ssl }}"
|
4
extras/repo-sahara.yml
Normal file
4
extras/repo-sahara.yml
Normal file
@ -0,0 +1,4 @@
|
||||
## Sahara service
|
||||
sahara_git_repo: https://git.openstack.org/openstack/sahara
|
||||
sahara_git_install_branch: stable/mitaka
|
||||
sahara_git_dest: "/opt/sahara_{{ sahara_git_install_branch | replace('/', '_') }}"
|
3
extras/user_secrets_sahara.yml
Normal file
3
extras/user_secrets_sahara.yml
Normal file
@ -0,0 +1,3 @@
|
||||
sahara_container_mysql_password:
|
||||
sahara_rabbitmq_password:
|
||||
sahara_service_password:
|
Loading…
Reference in New Issue
Block a user