Merge "Add Kolla Ceph filestore CI jobs"

This commit is contained in:
Zuul 2019-01-07 11:35:54 +00:00 committed by Gerrit Code Review
commit e9fda8664e
4 changed files with 55 additions and 19 deletions

View File

@ -4,8 +4,8 @@
kolla_ansible_src_dir: "src/{{ zuul.project.canonical_hostname }}/openstack/kolla-ansible"
kolla_ansible_full_src_dir: "{{ zuul.executor.work_root }}/{{ kolla_ansible_src_dir }}"
tasks:
- name: Prepare ceph disks
script: "{{ kolla_ansible_full_src_dir }}/tests/setup_ceph_disks.sh"
- name: Prepare ceph disks for bluestore and filestore OSD
script: "{{ kolla_ansible_full_src_dir }}/tests/setup_ceph_disks.sh {{ hostvars[inventory_hostname]['ceph_osd_storetype'] }}"
when: scenario == "ceph"
become: true

View File

@ -1,23 +1,38 @@
mkdir -p /opt/data/kolla
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0.img bs=5M count=128
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD1 1 -1
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0-b.img bs=5M count=2048
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0-b.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD1_B 1 -1
if [ $1 = 'filestore' ]; then
#setup devices for Kolla Ceph filestore OSD
dd if=/dev/zero of=/opt/data/kolla/ceph-osd1.img bs=5M count=1000
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd1.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_OSD1 1 -1
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0-w.img bs=5M count=256
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0-w.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD1_W 1 -1
dd if=/dev/zero of=/opt/data/kolla/ceph-journal1.img bs=5M count=512
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-journal1.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_OSD1_J 1 -1
else
# Setup devices for Kolla Ceph bluestore OSD
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0.img bs=5M count=100
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD0 1 -1
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0-d.img bs=5M count=256
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0-d.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD1_D 1 -1
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0-b.img bs=5M count=1000
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0-b.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD0_B 1 -1
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0-w.img bs=5M count=200
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0-w.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD0_W 1 -1
dd if=/dev/zero of=/opt/data/kolla/ceph-osd0-d.img bs=5M count=200
LOOP=$(losetup -f)
losetup $LOOP /opt/data/kolla/ceph-osd0-d.img
parted $LOOP -s -- mklabel gpt mkpart KOLLA_CEPH_OSD_BOOTSTRAP_BS_OSD0_D 1 -1
fi
partprobe

View File

@ -17,7 +17,7 @@
[storage]
{% for host in hostvars %}
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }}
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }} ansible_user=kolla ansible_ssh_private_key_file={{ ansible_env.HOME ~ '/.ssh/id_rsa_kolla' }} ceph_osd_store_type={{ 'filestore' if host == 'primary' else 'bluestore' }}
{% endfor %}
[monitoring]

View File

@ -60,6 +60,13 @@
base_distro: ubuntu
install_type: source
scenario: ceph
host-vars:
primary:
ceph_osd_storetype: filestore
secondary1:
ceph_osd_storetype: bluestore
secondary2:
ceph_osd_storetype: bluestore
- job:
name: kolla-ansible-centos-source-ceph
@ -70,6 +77,13 @@
base_distro: centos
install_type: source
scenario: ceph
host-vars:
primary:
ceph_osd_storetype: filestore
secondary1:
ceph_osd_storetype: bluestore
secondary2:
ceph_osd_storetype: bluestore
- job:
name: kolla-ansible-oraclelinux-source-ceph
@ -80,6 +94,13 @@
base_distro: oraclelinux
install_type: source
scenario: ceph
host-vars:
primary:
ceph_osd_storetype: filestore
secondary1:
ceph_osd_storetype: bluestore
secondary2:
ceph_osd_storetype: bluestore
- job:
name: kolla-ansible-bifrost-centos-source