diff --git a/ansible-role-requirements.yml b/ansible-role-requirements.yml index 8d2505416f..df1d0d65c1 100644 --- a/ansible-role-requirements.yml +++ b/ansible-role-requirements.yml @@ -189,4 +189,8 @@ - name: os_octavia scm: git src: https://git.openstack.org/openstack/openstack-ansible-os_octavia - version: master \ No newline at end of file + version: master +- name: os_molteniron + scm: git + src: https://git.openstack.org/openstack/openstack-ansible-os_molteniron + version: master diff --git a/etc/openstack_deploy/conf.d/molteniron.yml.aio b/etc/openstack_deploy/conf.d/molteniron.yml.aio new file mode 100644 index 0000000000..76397900f6 --- /dev/null +++ b/etc/openstack_deploy/conf.d/molteniron.yml.aio @@ -0,0 +1,4 @@ +--- +molteniron-server_hosts: + aio1: + ip: 172.29.236.100 diff --git a/etc/openstack_deploy/user_secrets.yml b/etc/openstack_deploy/user_secrets.yml index c2b048aa22..d03464aa60 100644 --- a/etc/openstack_deploy/user_secrets.yml +++ b/etc/openstack_deploy/user_secrets.yml @@ -152,3 +152,6 @@ barbican_service_password: designate_galera_password: designate_rabbitmq_password: designate_service_password: + +## Molteniron Options: +molteniron_container_mysql_password: diff --git a/playbooks/defaults/repo_packages/openstack_services.yml b/playbooks/defaults/repo_packages/openstack_services.yml index bdd191e06b..c1a8ebd31c 100644 --- a/playbooks/defaults/repo_packages/openstack_services.yml +++ b/playbooks/defaults/repo_packages/openstack_services.yml @@ -202,3 +202,8 @@ trove_dashboard_git_project_group: horizon_all octavia_git_repo: https://git.openstack.org/openstack/octavia octavia_git_install_branch: f7426dcf96874b6e3ce15009d251866f6de01116 # HEAD of "master" as of `28.2.2017 octavia_git_project_group: octavia_all + +## Molteniron service +molteniron_git_repo: https://git.openstack.org/openstack/molteniron +molteniron_git_install_branch: 7402de62eb4497e53d633e0dff9a1150b7acf175 +molteniron_git_project_group: molteniron_all diff --git a/playbooks/inventory/env.d/molteniron.yml b/playbooks/inventory/env.d/molteniron.yml new file mode 100644 index 0000000000..7b920d306b --- /dev/null +++ b/playbooks/inventory/env.d/molteniron.yml @@ -0,0 +1,37 @@ +--- +# Copyright (c) 2017 IBM Corporation. +# +# 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: + molteniron: + belongs_to: + - molteniron_all + +container_skel: + molteniron-server_container: + belongs_to: + - molteniron-server_containers + contains: + - molteniron + properties: + service_name: molteniron + +physical_skel: + molteniron-server_containers: + belongs_to: + - all_containers + molteniron-server_hosts: + belongs_to: + - hosts diff --git a/playbooks/os-molteniron-install.yml b/playbooks/os-molteniron-install.yml new file mode 100644 index 0000000000..69fba401c9 --- /dev/null +++ b/playbooks/os-molteniron-install.yml @@ -0,0 +1,51 @@ +--- +# Copyright (c) 2017 IBM Corporation. +# +# 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 molteniron + hosts: molteniron_all + gather_facts: "{{ gather_facts | default(True) }}" + user: root + pre_tasks: + - include: common-tasks/os-lxc-container-setup.yml + vars: + extra_container_config_no_restart: + - "lxc.start.order=79" + - include: common-tasks/os-log-dir-setup.yml + vars: + log_dirs: + - src: "/openstack/log/{{ inventory_hostname }}-molteniron" + dest: "/var/log/molteniron" + owner: "syslog" + group: "syslog" + roles: + - role: "os_molteniron" + molteniron_venv_tag: "{{ openstack_release }}" + molteniron_venv_download_url: "{{ openstack_repo_url }}/venvs/{{ openstack_release }}/{{ ansible_distribution | lower }}/molteniron-{{ openstack_release }}-{{ ansible_architecture | lower }}.tgz" + - role: "openstack_openrc" + tags: + - openrc + - role: "rsyslog_client" + rsyslog_client_log_rotate_file: ironic_log_rotate + rsyslog_client_log_dir: "/var/log/ironic" + rsyslog_client_config_name: "99-ironic-rsyslog-client.conf" + tags: + - rsyslog + - role: "system_crontab_coordination" + tags: + - crontab + vars: + is_metal: "{{ properties.is_metal|default(false) }}" + tags: + - molteniron diff --git a/playbooks/setup-openstack.yml b/playbooks/setup-openstack.yml index 83545c0c2b..176c82835f 100644 --- a/playbooks/setup-openstack.yml +++ b/playbooks/setup-openstack.yml @@ -37,6 +37,7 @@ - include: os-magnum-install.yml - include: os-trove-install.yml - include: os-sahara-install.yml +- include: os-molteniron-install.yml - include: os-tempest-install.yml when: (tempest_install | default(False)) | bool or (tempest_run | default(False)) | bool diff --git a/tests/test_inventory.py b/tests/test_inventory.py index a14bdf7dd5..4281d5b4f2 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -293,6 +293,12 @@ class TestAnsibleInventoryFormatConstraints(unittest.TestCase): 'metrics_all', 'metrics_containers', 'metrics_hosts', + 'molteniron', + 'molteniron-server_all', + 'molteniron-server_containers', + 'molteniron-server_container', + 'molteniron-server_hosts', + 'molteniron_all', 'mq_containers', 'mq_hosts', 'network_all',