CI: try SSH into the deployed instances
Raise the VM specs and fix the partition image building. Change-Id: I9e687d50b369402d36376e08496281d77afce215
This commit is contained in:
parent
e2085dc026
commit
5cfaf5566d
|
@ -90,8 +90,9 @@
|
|||
IRONIC_RAMDISK_TYPE: tinyipa
|
||||
IRONIC_VM_COUNT: 1
|
||||
IRONIC_VM_LOG_DIR: /opt/stack/logs/ironic-bm-logs
|
||||
IRONIC_VM_SPECS_CPU: 2
|
||||
IRONIC_VM_SPECS_DISK: 10
|
||||
IRONIC_VM_SPECS_RAM: 512
|
||||
IRONIC_VM_SPECS_RAM: 1024
|
||||
|
||||
- job:
|
||||
name: metalsmith-integration-glance
|
||||
|
|
|
@ -64,6 +64,37 @@
|
|||
environment:
|
||||
LIBGUESTFS_DEBUG: 1
|
||||
|
||||
- name: Extract /etc/fstab and /etc/selinux/config
|
||||
command: >
|
||||
tar -f {{ temp_dir.path }}/root.tar
|
||||
-C {{ temp_dir.path }} --extract {{ item }}
|
||||
with_items:
|
||||
- ./etc/fstab
|
||||
- ./etc/selinux/config
|
||||
|
||||
- name: Remove /etc/fstab and /etc/selinux/config from the archive
|
||||
command: tar -f {{ temp_dir.path }}/root.tar --delete {{ item }}
|
||||
with_items:
|
||||
- ./etc/fstab
|
||||
- ./etc/selinux/config
|
||||
|
||||
- name: Edit /etc/fstab to replace UUID with LABEL
|
||||
command: sed -i 's/UUID=[^ ]* /\/dev\/vda2 /' {{ temp_dir.path}}/etc/fstab
|
||||
|
||||
- name: Rewrite /etc/selinux/config to disable selinux
|
||||
copy:
|
||||
dest: "{{ temp_dir.path }}/etc/selinux/config"
|
||||
content: "SELINUX=disabled"
|
||||
|
||||
- name: Add edited /etc/fstab and /etc/selinux/config back
|
||||
command: >
|
||||
tar -f {{ temp_dir.path }}/root.tar
|
||||
-C {{ temp_dir.path }}
|
||||
--append {{ item }} --owner root --group root
|
||||
with_items:
|
||||
- ./etc/fstab
|
||||
- ./etc/selinux/config
|
||||
|
||||
- name: Pack the root file system into a partition image
|
||||
command: virt-make-fs {{ temp_dir.path }}/root.tar {{ centos_partition_file }}
|
||||
environment:
|
||||
|
|
|
@ -42,6 +42,20 @@
|
|||
- name: Show active node information
|
||||
command: openstack baremetal node show {{ instance.node.uuid }}
|
||||
|
||||
- name: Get IP address
|
||||
set_fact:
|
||||
instance_ip: "{{ instance.ip_addresses.values() | list | first | first }}"
|
||||
failed_when: not instance_ip
|
||||
|
||||
- name: SSH into the instance
|
||||
command: >
|
||||
ssh -v -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=10
|
||||
metalsmith@{{ instance_ip }} "cat /etc/hostname"
|
||||
register: ssh_result
|
||||
until: ssh_result | succeeded
|
||||
retries: 30
|
||||
delay: 20
|
||||
|
||||
- name: Undeploy a node
|
||||
command: metalsmith --debug undeploy --wait 900 test
|
||||
|
||||
|
|
Loading…
Reference in New Issue