General cleanup, incl. copyright headers
This commit is contained in:
parent
c578f230a0
commit
b40dd35bdc
@ -1,5 +1,19 @@
|
||||
---
|
||||
# defaults file for os_ironic
|
||||
# Copyright 2015, 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.
|
||||
|
||||
# Defaults file for openstack-ansible-ironic
|
||||
|
||||
# Verbosity Options
|
||||
debug: False
|
||||
@ -23,16 +37,12 @@ ironic_system_log_folder: "/var/log/{{ ironic_system_user_name }}"
|
||||
# Ironic API
|
||||
ironic_api_program_name: ironic-api
|
||||
|
||||
|
||||
# Ironic Conductor
|
||||
ironic_conductor_program_name: ironic-conductor
|
||||
|
||||
|
||||
|
||||
# Python Ironic Client
|
||||
python_ironic_client_program_name: ironic
|
||||
|
||||
|
||||
ironic_service_names:
|
||||
- "{{ ironic_api_program_name }}"
|
||||
- "{{ ironic_conductor_program_name }}"
|
||||
@ -47,8 +57,9 @@ ironic_database_password: gu1d0
|
||||
database_root_user: root
|
||||
database_root_password: sp4m3ggs
|
||||
|
||||
# If you want to regenerate the ironic users SSH keys, on each run, set this var to True
|
||||
# Otherwise keys will be generated on the first run and not regenerated each run.
|
||||
# If you want to regenerate the ironic users SSH keys, on each run, set this
|
||||
# var to True. Otherwise keys will be generated on the first run and not
|
||||
# regenerated each run.
|
||||
ironic_recreate_keys: False
|
||||
|
||||
ironic_bin: "{{ ironic_venv_bin }}"
|
||||
@ -60,6 +71,9 @@ ironic_common_apt_packages:
|
||||
- python-pip
|
||||
- git
|
||||
|
||||
ironic_common_pip_packages:
|
||||
- virtualenvwrapper
|
||||
|
||||
ironic_conductor_apt_packages:
|
||||
- libmysqlclient-dev
|
||||
- libxml2-dev
|
||||
@ -76,17 +90,10 @@ ironic_conductor_apt_packages:
|
||||
- open-iscsi
|
||||
- ipmitool
|
||||
|
||||
ironic_pip_packages:
|
||||
- virtualenvwrapper
|
||||
- six
|
||||
- tox
|
||||
ironic_conductor_pip_packages:
|
||||
- mysql-python
|
||||
- python_ironicclient
|
||||
|
||||
ironicclient_pip_packages:
|
||||
- python_ironicclient
|
||||
|
||||
## Ironic service
|
||||
## ironic service
|
||||
ironic_git_repo: https://git.openstack.org/openstack/ironic
|
||||
ironic_git_install_branch: c6e8e2a33c65b6269a0b1b4f5e63620c68bdc3fb # HEAD sha as of 13 Nov 2015
|
||||
ironic_git_dest: "/opt/ironic_{{ ironic_git_install_branch | replace('/', '_') }}"
|
||||
|
@ -21,3 +21,8 @@
|
||||
with_items: ironic_service_names
|
||||
failed_when: false
|
||||
|
||||
- name: Restart tftpd-hpa
|
||||
service:
|
||||
name: "tftpd-hpa"
|
||||
state: restarted
|
||||
failed_when: false
|
||||
|
@ -15,6 +15,10 @@
|
||||
|
||||
ROLE_NAME=$(basename $(pwd))
|
||||
|
||||
# Note(mrda): In testing we often cycle machines, so this just helps our
|
||||
# testing efforts. Don't do this in production.
|
||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||
|
||||
pushd tests
|
||||
ansible-playbook -i inventory local_install.yml -e rolename=${ROLE_NAME}
|
||||
popd
|
||||
|
@ -1,4 +1,17 @@
|
||||
---
|
||||
# Copyright 2015, 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.
|
||||
galaxy_info:
|
||||
author: OpenStack
|
||||
description: Baremetal provisioning for Openstack
|
||||
|
@ -13,19 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Install apt packages
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: latest
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: ironic_conductor_apt_packages
|
||||
tags:
|
||||
- ironic-install
|
||||
- ironic-apt-packages
|
||||
|
||||
- name: Create /tftpboot
|
||||
file:
|
||||
path: "/tftpboot"
|
||||
@ -84,6 +71,3 @@
|
||||
when: not chain32_exists and chain32_stat.stat.exists
|
||||
tags:
|
||||
- tftpd-hpa
|
||||
|
||||
|
||||
|
||||
|
43
tasks/ironic_conductor_pre_install.yml
Normal file
43
tasks/ironic_conductor_pre_install.yml
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
# Copyright 2015, 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.
|
||||
|
||||
- name: Install ironic-conductor specific apt packages
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: latest
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: ironic_conductor_apt_packages
|
||||
tags:
|
||||
- ironic-install
|
||||
- ironic-conductor
|
||||
- ironic-apt-packages
|
||||
|
||||
- name: Install ironic-conductor specific pip dependencies
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
extra_args: "{{ pip_install_options|default('') }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: ironic_conductor_pip_packages
|
||||
tags:
|
||||
- ironic-install
|
||||
- ironic-conductor
|
||||
- ironic-pip-packages
|
@ -44,9 +44,8 @@
|
||||
sudo: yes
|
||||
sudo_user: "{{ ironic_system_user_name }}"
|
||||
notify:
|
||||
- restart ironic-conductor
|
||||
- Restart ironic services
|
||||
when: ironic_checkout.changed
|
||||
tags:
|
||||
- ironic-db-setup
|
||||
- ironic-conductor
|
||||
|
||||
|
@ -15,15 +15,17 @@
|
||||
|
||||
- name: Install Ironic (python system library)
|
||||
when: ironic_checkout.changed and not ironic_venv_enabled
|
||||
pip: name="file://{{ ironic_git_dest }}"
|
||||
pip:
|
||||
name: "file://{{ ironic_git_dest }}"
|
||||
tags:
|
||||
- ironic-api
|
||||
- ironic-conductor
|
||||
|
||||
- name: Install Ironic (openstack venv)
|
||||
when: ironic_checkout.changed and ironic_venv_enabled
|
||||
pip: name="file://{{ ironic_git_dest }}" virtualenv="/openstack/venvs/ironic-{{ ironic_venv_tag }}"
|
||||
pip:
|
||||
name: "file://{{ ironic_git_dest }}"
|
||||
virtualenv: "/openstack/venvs/ironic-{{ ironic_venv_tag }}"
|
||||
tags:
|
||||
- ironic-api
|
||||
- ironic-conductor
|
||||
|
||||
|
@ -123,3 +123,30 @@
|
||||
tags:
|
||||
- ironic-api
|
||||
- ironic-conductor
|
||||
|
||||
- name: Install common dependencies via apt
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: latest
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: ironic_common_apt_packages
|
||||
tags:
|
||||
- ironic-install
|
||||
- ironic-apt-packages
|
||||
|
||||
- name: Install common dependencies via pip
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
extra_args: "{{ pip_install_options|default('') }}"
|
||||
register: install_packages
|
||||
until: install_packages|success
|
||||
retries: 5
|
||||
delay: 2
|
||||
with_items: ironic_common_pip_packages
|
||||
tags:
|
||||
- ironic-install
|
||||
- ironic-pip-packages
|
||||
|
@ -21,7 +21,7 @@
|
||||
system_group: "{{ ironic_system_group_name }}"
|
||||
service_home: "{{ ironic_system_home_folder }}"
|
||||
# TODO(mrda): define groups
|
||||
# when: inventory_hostname in groups['ironic_api_metadata']
|
||||
# when: inventory_hostname in groups['tbd']
|
||||
|
||||
- include: ironic_upstart_common_init.yml
|
||||
vars:
|
||||
@ -31,5 +31,5 @@
|
||||
system_group: "{{ ironic_system_group_name }}"
|
||||
service_home: "{{ ironic_system_home_folder }}"
|
||||
# TODO(mrda): define groups
|
||||
# when: inventory_hostname in groups['ironic_cert']
|
||||
# when: inventory_hostname in groups['tbd']
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
- include: ironic_pre_install.yml
|
||||
- include: ironic_get_source.yml
|
||||
- include: ironic_conductor_pre_install.yml
|
||||
- include: ironic_install.yml
|
||||
- include: python_ironicclient_install.yml
|
||||
- include: ironic_conductor_post_install.yml
|
||||
|
@ -15,12 +15,15 @@
|
||||
|
||||
- name: Install Python-Ironicclient (python system library)
|
||||
when: python_ironicclient_checkout.changed and not ironic_venv_enabled
|
||||
pip: name="file://{{ python_ironicclient_git_dest }}"
|
||||
pip:
|
||||
name: "file://{{ python_ironicclient_git_dest }}"
|
||||
tags:
|
||||
- ironic-client
|
||||
|
||||
- name: Install Python-Ironicclient (openstack venv)
|
||||
when: python_ironicclient_checkout.changed and ironic_venv_enabled
|
||||
pip: name="file://{{ python_ironicclient_git_dest }}" virtualenv="/openstack/venvs/ironic-{{ ironic_venv_tag }}"
|
||||
pip:
|
||||
name: "file://{{ python_ironicclient_git_dest }}"
|
||||
virtualenv: "/openstack/venvs/ironic-{{ ironic_venv_tag }}"
|
||||
tags:
|
||||
- ironic-client
|
||||
|
@ -1,2 +1,3 @@
|
||||
[defaults]
|
||||
roles_path = ../..
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
[all]
|
||||
localhost ansible_connection=local ansible_user=root
|
||||
|
||||
# Note(mrda): 'ironicinstallhost' will need to externally resolve to where
|
||||
# you want to do an 'allinone' install, and the root account will need to have
|
||||
# your ssh public_key in it's /root/.ssh/authorized_keys file
|
||||
[installhost]
|
||||
installhost ansible_user=root ansible_ssh_port=22 ansible_ssh_host=192.168.1.21
|
||||
installhost ansible_user=root ansible_ssh_port=22 ansible_ssh_host=ironicinstallhost
|
||||
|
@ -1,4 +1,19 @@
|
||||
- name: Do things with the openstack-ironic-role role
|
||||
---
|
||||
# Copyright 2015, 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.
|
||||
|
||||
- name: Perform an all-in-one install using the openstack-ansible-ironic role
|
||||
remote_user: root
|
||||
hosts: installhost
|
||||
roles:
|
||||
|
Loading…
Reference in New Issue
Block a user