-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add possibility to use puppet-librarian-simple in library - add fuel main repo - add disk configuration for osd - add osds - add mons - change node names to solar-dev
- Loading branch information
Showing
16 changed files
with
236 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
- hosts: [{{ host }}] | ||
sudo: yes | ||
tasks: | ||
- name: remove nbd-server | ||
apt: name=nbd-server state=absent | ||
- name: remove nbd-client | ||
apt: name=nbd-client state=absent | ||
- name: find loop device | ||
shell: losetup -a|grep "{{path}}"|awk -F':' '{print $1}' | ||
register: loop_device | ||
- name: if loop device exists, delete it | ||
command: sudo losetup -d {% raw %}{{item}}{% endraw %} | ||
when: loop_device|success | ||
with_items: loop_device.stdout_lines | ||
- name: remove file | ||
file: path={{path}} state=absent | ||
- name: kill all nbd processes | ||
shell: "killall nbd-client; killall nbd-server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
- hosts: [{{ host }}] | ||
sudo: yes | ||
tasks: | ||
- name: check if disk has gpt | ||
shell: "parted {{disk_name}} print | grep 'Partition Table: gpt'" | ||
register: gpt_created | ||
ignore_errors: True | ||
- name: set gpt label | ||
shell: "echo yes | parted {{disk_name}} mklabel gpt" | ||
ignore_errors: True | ||
when: gpt_created|failed | ||
- name: check if guid set | ||
shell: "sgdisk -i1 {{disk_name}} | grep 'Partition GUID code: 4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D'" | ||
register: guid_set | ||
ignore_errors: True | ||
- name: set guid | ||
shell: "sgdisk -n 1:0:9G -t 1:4FBD7E29-9D25-41B8-AFD0-062C0CEFF05D -p {{disk_name}}" | ||
ignore_errors: True | ||
when: guid_set|failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
id: ceph_disk | ||
handler: ansible | ||
version: 1.0.0 | ||
input: | ||
disk_name: | ||
schema: str | ||
value: '/dev/vdb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
notice('MODULAR: ceph-osd.pp') | ||
|
||
# Pulling hiera | ||
$storage_hash = hiera('storage', {}) | ||
$public_vip = hiera('public_vip') | ||
$management_vip = hiera('management_vip') | ||
$use_neutron = hiera('use_neutron', false) | ||
#$mp_hash = hiera('mp') | ||
$verbose = pick($storage_hash['verbose'], true) | ||
$debug = pick($storage_hash['debug'], hiera('debug', true)) | ||
$use_monit = false | ||
$auto_assign_floating_ip = hiera('auto_assign_floating_ip', false) | ||
$keystone_hash = hiera('keystone', {}) | ||
$access_hash = hiera('access', {}) | ||
$network_scheme = hiera_hash('network_scheme') | ||
$neutron_mellanox = hiera('neutron_mellanox', false) | ||
$syslog_hash = hiera('syslog', {}) | ||
$use_syslog = hiera('use_syslog', true) | ||
$mon_address_map = get_node_to_ipaddr_map_by_network_role(hiera_hash('ceph_monitor_nodes'), 'ceph/public') | ||
$ceph_primary_monitor_node = hiera('ceph_primary_monitor_node') | ||
$primary_mons = keys($ceph_primary_monitor_node) | ||
$primary_mon = $ceph_primary_monitor_node[$primary_mons[0]]['name'] | ||
prepare_network_config($network_scheme) | ||
$ceph_cluster_network = get_network_role_property('ceph/replication', 'network') | ||
$ceph_public_network = get_network_role_property('ceph/public', 'network') | ||
|
||
class {'firewall': } -> | ||
|
||
class {'ceph': | ||
primary_mon => $primary_mon, | ||
mon_hosts => keys($mon_address_map), | ||
mon_ip_addresses => values($mon_address_map), | ||
cluster_node_address => $public_vip, | ||
osd_pool_default_size => $storage_hash['osd_pool_size'], | ||
osd_pool_default_pg_num => $storage_hash['pg_num'], | ||
osd_pool_default_pgp_num => $storage_hash['pg_num'], | ||
use_rgw => $storage_hash['objects_ceph'], | ||
glance_backend => $glance_backend, | ||
rgw_pub_ip => $public_vip, | ||
rgw_adm_ip => $management_vip, | ||
rgw_int_ip => $management_vip, | ||
cluster_network => $ceph_cluster_network, | ||
public_network => $ceph_public_network, | ||
use_syslog => $use_syslog, | ||
syslog_log_level => hiera('syslog_log_level_ceph', 'info'), | ||
syslog_log_facility => hiera('syslog_log_facility_ceph','LOG_LOCAL0'), | ||
rgw_keystone_admin_token => $keystone_hash['admin_token'], | ||
ephemeral_ceph => $storage_hash['ephemeral_ceph'], | ||
} | ||
|
||
$osd_devices = split($::osd_devices_list, ' ') | ||
#Class Ceph is already defined so it will do it's thing. | ||
notify {"ceph_osd: ${osd_devices}": } | ||
notify {"osd_devices: ${::osd_devices_list}": } | ||
# TODO(bogdando) add monit ceph-osd services monitoring, if required | ||
|
||
################################################################# | ||
|
||
# vim: set ts=2 sw=2 et : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
id: ceph_osd | ||
handler: puppetv2 | ||
version: 1.0.0 | ||
input: | ||
ip: | ||
schema: str! | ||
value: | ||
public_vip: | ||
schema: str! | ||
value: | ||
management_vip: | ||
schema: str! | ||
value: | ||
use_syslog: | ||
schema: bool | ||
value: true | ||
keystone: | ||
schema: {'admin_token': 'str'} | ||
value: {} | ||
ceph_monitor_nodes: | ||
schema: [] | ||
value: [] | ||
ceph_primary_monitor_node: | ||
schema: [] | ||
value: [] | ||
storage: | ||
schema: {} | ||
value: {} | ||
network_scheme: | ||
schema: {} | ||
value: {} | ||
role: | ||
schema: str! | ||
value: | ||
puppet_modules: | ||
schema: str! | ||
value: | ||
tags: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,7 @@ input: | |
ensure_other_removed: | ||
schema: bool | ||
value: true | ||
gpg_key: | ||
schema: [str!] | ||
value: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.