converted utility to use repo_packages
converted rpc_support to use repo_packages
This commit is contained in:
parent
b41fc58920
commit
d083e7b535
@ -22,18 +22,3 @@ service_name: utility
|
||||
# Only used when the lxc vg is present on the target
|
||||
container_lvm_fstype: ext4
|
||||
container_lvm_fssize: 5GB
|
||||
|
||||
service_pip_dependencies:
|
||||
- python-openstackclient
|
||||
- python-cinderclient
|
||||
- python-glanceclient
|
||||
- python-heatclient
|
||||
- python-keystoneclient
|
||||
- python-neutronclient
|
||||
- python-novaclient
|
||||
- python-swiftclient
|
||||
- python-memcached
|
||||
- pycrypto
|
||||
|
||||
container_packages:
|
||||
- ruby1.9.1
|
||||
|
@ -21,6 +21,6 @@
|
||||
- include: neutron-all.yml
|
||||
- include: cinder-all.yml
|
||||
- include: horizon-all.yml
|
||||
- include: utility.yml
|
||||
- include: rpc-support.yml
|
||||
- include: utility-all.yml
|
||||
- include: rpc-support-all.yml
|
||||
- include: ../infrastructure/rsyslog-config.yml
|
||||
|
@ -13,22 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Ensure rpc support packages are installed
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
cache_valid_time: 600
|
||||
with_items:
|
||||
- vim
|
||||
- linux-crashdump
|
||||
- iotop
|
||||
- dstat
|
||||
- tcpdump
|
||||
- lsof
|
||||
- htop
|
||||
register: rpc_support_packages
|
||||
until: rpc_support_packages|success
|
||||
retries: 3
|
||||
tags:
|
||||
- support_packages
|
||||
- include: rpc-support-common.yml
|
||||
- include: rpc-support-api.yml
|
||||
- include: rpc-support-holland.yml
|
@ -13,12 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Add all support options to all hosts
|
||||
- hosts: hosts:all_containers
|
||||
user: root
|
||||
roles:
|
||||
- rpc_support_common
|
||||
|
||||
# Ensure security groups and keys are within the openstack api
|
||||
- hosts: utility[0]
|
||||
user: root
|
||||
@ -40,7 +34,7 @@
|
||||
- { src: "/root/.ssh/rpc_support", name: "rpc_support" }
|
||||
- { src: "/root/.ssh/rpc_support.pub", name: "rpc_support_pub" }
|
||||
|
||||
- hosts: utility:utility[0]
|
||||
- hosts: utility:neutron_all:!utility[0]
|
||||
user: root
|
||||
gather_facts: false
|
||||
tasks:
|
||||
@ -56,11 +50,3 @@
|
||||
with_items:
|
||||
- { src: "/root/.ssh/rpc_support", name: "rpc_support", file_mode: "0600", dir_mode: "0755" }
|
||||
- { src: "/root/.ssh/rpc_support.pub", name: "rpc_support_pub", file_mode: "0640", dir_mode: "0755" }
|
||||
|
||||
# Setup holland backup
|
||||
- hosts: galera
|
||||
user: root
|
||||
roles:
|
||||
- rpc_support_holland
|
||||
vars:
|
||||
holland_release: "{{ rpc_support_holland_branch|default('v1.0.10') }}"
|
24
rpc_deployment/playbooks/openstack/rpc-support-common.yml
Normal file
24
rpc_deployment/playbooks/openstack/rpc-support-common.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
# Copyright 2014, 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.
|
||||
|
||||
# Add all support options to all hosts
|
||||
- hosts: hosts:all_containers
|
||||
user: root
|
||||
roles:
|
||||
- common
|
||||
- container_common
|
||||
- rpc_support_common
|
||||
vars_files:
|
||||
- vars/repo_packages/rpc_support.yml
|
25
rpc_deployment/playbooks/openstack/rpc-support-holland.yml
Normal file
25
rpc_deployment/playbooks/openstack/rpc-support-holland.yml
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
# Copyright 2014, 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.
|
||||
|
||||
# Setup holland backup
|
||||
- hosts: galera
|
||||
user: root
|
||||
roles:
|
||||
- common
|
||||
- container_common
|
||||
- openstack_common
|
||||
- rpc_support_holland
|
||||
vars_files:
|
||||
- vars/repo_packages/holland.yml
|
17
rpc_deployment/playbooks/openstack/utility-all.yml
Normal file
17
rpc_deployment/playbooks/openstack/utility-all.yml
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
# Copyright 2014, 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.
|
||||
|
||||
- include: utility-common.yml
|
||||
- include: utility-serverspec.yml
|
26
rpc_deployment/playbooks/openstack/utility-common.yml
Normal file
26
rpc_deployment/playbooks/openstack/utility-common.yml
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
# Copyright 2014, 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.
|
||||
|
||||
- hosts: utility_all
|
||||
user: root
|
||||
roles:
|
||||
- common
|
||||
- container_common
|
||||
- utility_common
|
||||
- openstack_openrc
|
||||
- galera_client_cnf
|
||||
vars_files:
|
||||
- vars/config_vars/utility_config.yml
|
||||
- vars/repo_packages/utility.yml
|
@ -13,17 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- hosts: utility_all
|
||||
user: root
|
||||
roles:
|
||||
- common
|
||||
- container_common
|
||||
- utility_common
|
||||
- openstack_openrc
|
||||
- galera_client_cnf
|
||||
vars_files:
|
||||
- vars/config_vars/utility_config.yml
|
||||
|
||||
- hosts: all_containers:!utility_all
|
||||
user: root
|
||||
roles:
|
@ -14,20 +14,20 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Get package from git
|
||||
git: >
|
||||
repo={{ git_repo }}
|
||||
dest="/opt/{{ service_name }}_{{ git_install_branch | replace('/', '_') }}"
|
||||
version={{ git_install_branch }}
|
||||
git:
|
||||
repo: "{{ git_repo }}"
|
||||
dest: "{{ git_dest }}"
|
||||
version: "{{ git_install_branch }}"
|
||||
register: git_clone
|
||||
ignore_errors: yes
|
||||
until: git_clone|success
|
||||
retries: 5
|
||||
|
||||
- name: Get package from fallback git repo
|
||||
git: >
|
||||
repo={{ git_fallback_repo }}
|
||||
dest="/opt/{{ service_name }}_{{ git_install_branch | replace('/', '_') }}"
|
||||
version={{ git_install_branch }}
|
||||
git:
|
||||
repo: "{{ git_fallback_repo }}"
|
||||
dest: "{{ git_dest }}"
|
||||
version: "{{ git_install_branch }}"
|
||||
register: git_fallback_clone
|
||||
when: git_clone|failed
|
||||
until: git_fallback_clone|success
|
||||
|
@ -14,12 +14,23 @@
|
||||
# limitations under the License.
|
||||
|
||||
- name: Install service source
|
||||
pip: >
|
||||
name="/opt/{{ service_name }}_{{ git_install_branch | replace('/', '_') }}"
|
||||
extra_args="{{ pip_install_options|default('') }} --allow-all-external"
|
||||
pip:
|
||||
name: "/opt/{{ service_name }}_{{ git_install_branch | replace('/', '_') }}"
|
||||
extra_args: "{{ pip_install_options|default('') }} --allow-all-external"
|
||||
register: pip_install
|
||||
until: pip_install|success
|
||||
retries: 5
|
||||
async: 1800
|
||||
delay: 5
|
||||
poll: 5
|
||||
|
||||
- name: Install pip repo plugins
|
||||
pip:
|
||||
name: "{{ git_dest }}/{{ item.path }}/{{ item.package }}"
|
||||
extra_args: "{{ pip_install_options|default('') }} --allow-all-external"
|
||||
when: git_dest is defined and git_repo_plugins is defined
|
||||
with_items: git_repo_plugins
|
||||
register: pip_install
|
||||
until: pip_install|success
|
||||
retries: 5
|
||||
delay: 10
|
||||
|
@ -13,7 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- include: support_packages.yml
|
||||
- include: bashrc.yml
|
||||
- include: histformat.yml
|
||||
- include: motd.yml
|
||||
|
@ -13,22 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Ensure supporting holland packages are installed
|
||||
apt:
|
||||
pkg: "{{ item }}"
|
||||
state: present
|
||||
update_cache: yes
|
||||
cache_valid_time: 600
|
||||
with_items:
|
||||
- mariadb-client
|
||||
- xtrabackup
|
||||
register: rpc_support_packages
|
||||
until: rpc_support_packages|success
|
||||
retries: 3
|
||||
tags:
|
||||
- holland_supporting_packages
|
||||
- holland_all
|
||||
|
||||
- name: Create rpc_support backup user
|
||||
mysql_user:
|
||||
name: "{{ item.name }}"
|
||||
@ -51,31 +35,6 @@
|
||||
- holland_sql_user
|
||||
- holland_all
|
||||
|
||||
- name: Get holland from git
|
||||
git:
|
||||
repo: https://github.com/holland-backup/holland
|
||||
dest: "/opt/holland_{{ holland_release }}"
|
||||
version: "{{ holland_release }}"
|
||||
register: holland_clone
|
||||
until: holland_clone|success
|
||||
retries: 5
|
||||
tags:
|
||||
- holland_source
|
||||
- holland_all
|
||||
|
||||
- name: Install holland source
|
||||
pip:
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- "mysql-python"
|
||||
- "/opt/holland_{{ holland_release }}"
|
||||
- "/opt/holland_{{ holland_release }}/plugins/holland.lib.common"
|
||||
- "/opt/holland_{{ holland_release }}/plugins/holland.lib.mysql"
|
||||
- "/opt/holland_{{ holland_release }}/plugins/holland.backup.xtrabackup"
|
||||
tags:
|
||||
- holland_source
|
||||
- holland_all
|
||||
|
||||
- name: Create supporting holland directories
|
||||
file:
|
||||
state: directory
|
||||
@ -93,8 +52,8 @@
|
||||
dest: "{{ item.dest }}"
|
||||
state: link
|
||||
with_items:
|
||||
- { src: "/opt/holland_{{ holland_release }}/config/providers", dest: "/etc/holland/providers" }
|
||||
- { src: "/opt/holland_{{ holland_release }}/config/backupsets", dest: "/etc/holland/backupsets" }
|
||||
- { src: "{{ git_dest }}/config/providers", dest: "/etc/holland/providers" }
|
||||
- { src: "{{ git_dest }}/config/backupsets", dest: "/etc/holland/backupsets" }
|
||||
tags:
|
||||
- holland_conf
|
||||
- holland_all
|
||||
|
@ -17,6 +17,7 @@ repo_path: "{{ pip_wheel_name }}_{{ git_install_branch | replace('/', '_') }}"
|
||||
|
||||
## Git Source
|
||||
git_repo: "https://github.com/rcbops/ansible-lxc-rpc"
|
||||
git_dest: "/opt/{{ repo_path }}"
|
||||
git_install_branch: master
|
||||
|
||||
pip_wheel_name: ansible-lxc-rpc
|
||||
|
@ -14,6 +14,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
repo_package_name: holland
|
||||
service_name: holland
|
||||
|
||||
repo_path: "holland_{{ git_install_branch | replace('/', '_') }}"
|
||||
|
||||
|
@ -28,3 +28,5 @@ service_pip_dependencies:
|
||||
- python-neutronclient
|
||||
- python-novaclient
|
||||
- python-swiftclient
|
||||
- python-memcached
|
||||
- pycrypto
|
||||
|
Loading…
x
Reference in New Issue
Block a user