Skip to content

Commit

Permalink
Added openstack ironic inspector env files and playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
urosorozel committed Feb 23, 2018
1 parent 148bc8a commit 6710ecc
Show file tree
Hide file tree
Showing 7 changed files with 176 additions and 0 deletions.
5 changes: 5 additions & 0 deletions etc/openstack_deploy/user_secrets.yml
Expand Up @@ -81,6 +81,11 @@ ironic_container_mysql_password:
ironic_service_password:
ironic_swift_temp_url_secret_key:

## Ironic inspector options
ironic_inspector_swift_password:
ironic_inspector_container_mysql_password:
ironic_inspector_service_password:

## Horizon Options
horizon_container_mysql_password:
horizon_secret_key:
Expand Down
10 changes: 10 additions & 0 deletions group_vars/all/haproxy.yml
Expand Up @@ -221,6 +221,16 @@ haproxy_default_services:
haproxy_balance_type: http
haproxy_backend_options:
- "httpchk GET /"
- service:
haproxy_service_name: ironic_inspector
haproxy_backend_nodes: "{{ groups['ironic_inspector'] | default([]) }}"
haproxy_ssl: "{{ haproxy_ssl }}"
haproxy_port: 5050
haproxy_balance_type: http
haproxy_backend_options:
- "httpchk GET /"
haproxy_backend_arguments:
- "http-check expect rstring .*"
- service:
haproxy_service_name: rabbitmq_mgmt
haproxy_backend_nodes: "{{ groups['rabbitmq'] | default([]) }}"
Expand Down
23 changes: 23 additions & 0 deletions group_vars/all/ironic_inspector.yml
@@ -0,0 +1,23 @@
---
# Copyright 2017, 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.

ironic_inspector_keystone_auth_plugin: password
ironic_inspector_service_name: ironic-inspector
ironic_inspector_service_user_name: ironic-inspector
ironic_inspector_service_proto: http
ironic_inspector_service_port: 5050
ironic_inspector_service_project_name: service
ironic_inspector_service_adminuri_proto: "{{ openstack_service_adminuri_proto | default(ironic_inspector_service_proto) }}"
ironic_inspector_service_adminurl: "{{ ironic_inspector_service_adminuri_proto }}://{{ internal_lb_vip_address }}:{{ ironic_inspector_service_port }}"
25 changes: 25 additions & 0 deletions group_vars/ironic_inspector_all.yml
@@ -0,0 +1,25 @@
---
# 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.

ironic_inspector_galera_database: ironic_inspector
ironic_inspector_galera_user: ironic-inspector
ironic_inspector_service_adminurl: "{{ ironic_inspector_service_adminuri }}/v1"

# Ensure that the package state matches the global setting
ironic_inspector_package_state: "{{ package_state }}"

# venv fetch configuration
ironic_inspector_venv_tag: "{{ venv_tag }}"
ironic_inspector_venv_download_url: "{{ venv_base_download_url }}/ironic_inspector-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz"
5 changes: 5 additions & 0 deletions playbooks/defaults/repo_packages/openstack_services.yml
Expand Up @@ -186,6 +186,11 @@ ironic_git_repo: https://git.openstack.org/openstack/ironic
ironic_git_install_branch: a26082ac195cb3d4a9f5f6f7638d1357c58d3e03 # HEAD of "stable/pike" as of 19.01.2018
ironic_git_project_group: ironic_all

## Ironic inspector
ironic_inspector_git_repo: https://git.openstack.org/openstack/ironic-inspector
ironic_inspector_git_install_branch: 3b9e4c065655550ff6c5076d1f7c9129bdf413ee #35828784d5124dfc66842a790282f9f7d03251fe
ironic_inspector_git_project_group: ironic_inspector_all

## Magnum service
magnum_git_repo: https://git.openstack.org/openstack/magnum
magnum_git_install_branch: 1594d552c4027e5ede501ba83e06f89a0c8e3849 # HEAD of "stable/pike" as of 19.01.2018
Expand Down
53 changes: 53 additions & 0 deletions playbooks/inventory/env.d/ironic-inspector.yml
@@ -0,0 +1,53 @@
---
# 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.


component_skel:
ironic_inspector:
belongs_to:
- ironic_inspector_all
ironic_inspector_server:
belongs_to:
- ironic_inspector_servers


container_skel:
ironic_inspector_container:
belongs_to:
- ironic-inspector-infra_containers
contains:
- ironic_inspector
ironic_inspector_server_container:
belongs_to:
- ironic-inspector-server_containers
contains:
- ironic_inspector_server
properties:
is_metal: true


physical_skel:
ironic-inspector-infra_containers:
belongs_to:
- all_containers
ironic-inspector-infra_hosts:
belongs_to:
- hosts
ironic-inspector-server_containers:
belongs_to:
- all_containers
ironic-inspector-server_hosts:
belongs_to:
- hosts
55 changes: 55 additions & 0 deletions playbooks/os-ironic-inspector-install.yml
@@ -0,0 +1,55 @@
---
# Copyright 2016, Rackspace, 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.

- name: Installation and setup of Ironic
hosts: ironic_inspector_all
gather_facts: "{{ osa_gather_facts | default(True) }}"
user: root
pre_tasks:
- include: common-tasks/os-lxc-container-setup.yml
static: no
when:
- inventory_hostname == groups['ironic_inspector_all'][0]
- include: common-tasks/mysql-db-user.yml
static: no
vars:
user_name: "{{ ironic_inspector_galera_user }}"
password: "{{ ironic_inspector_container_mysql_password }}"
login_host: "{{ ironic_inspector_galera_address }}"
db_name: "{{ ironic_inspector_galera_database }}"
when: inventory_hostname == groups['ironic_inspector_all'][0]
- include: common-tasks/package-cache-proxy.yml
roles:
- role: "os_ironic_inspector"
- role: "openstack_openrc"
tags:
- openrc
- role: "rsyslog_client"
rsyslog_client_log_rotate_file: ironic_inspector_log_rotate
rsyslog_client_log_dir: "/var/log/ironic-inspector"
rsyslog_client_config_name: "99-ironic-inspector-rsyslog-client.conf"
tags:
- rsyslog
- role: "system_crontab_coordination"
tags:
- crontab
vars:
is_metal: "{{ properties.is_metal|default(false) }}"
ironic_inspector_galera_user: ironic_inspector
ironic_inspector_galera_database: ironic_inspector
ironic_inspector_galera_address: "{{ galera_address }}"
environment: "{{ deployment_environment_variables | default({}) }}"
tags:
- ironic_inspector

0 comments on commit 6710ecc

Please sign in to comment.