Commit Graph

5 Commits

Author SHA1 Message Date
Pavlo Shchelokovskyy 725b85484f Remove Ansible-deploy interface
it is now part of ironic itself, and version in ironic-staging-drivers
conflicts with version in ironic, blocking ironic-conductor from
starting when ironic-staging-drivers is installed.

Change-Id: I917b7399b3249143ba6cf75f61d96a1c64f94e7d
2017-12-18 14:55:35 +02:00
Pavlo Shchelokovskyy 0cdc53948f [ansible] configure SSL validation
This patch adds a number of configration options and playbook variables
that govern SSL validation and authentication when accessing the image
store to download the image and configdrive from the deploy ramdisk.

Most of them are not yet used in the default set of playbooks provided
with the driver
(for example some of them require yet unreleased Ansible 2.4),
however they can be used by custom playbooks, for example to upload
and enable those custom CA bundle and cert files to the ramdisk at
deploy time.

This patch also sets DevStack to disable validation of image store SSL
certificate by ansible deploy interface (similar to how IPA is currently
confugured).

This patch also caps Anisble < 2.4, since our custom callback plugin
has troubles with the newest Ansible 2.4 version (to be fixed later).

Change-Id: Id40f1067361cc32e98973c70fc5cd3d4242308d0
Closes-Bug: #1717858
2017-09-25 10:48:24 +00:00
Pavlo Shchelokovskyy b963a18c63 [ansible] Major changes in playbooks "API"
Possibly existing out-of-tree playbooks will be imcompatible
with this version and must be rewritten!

Changes include:

- all info passed into ansible playbooks from ironic is now available in
  the playbooks as elements of 'ironic' dictionary to better differentiate
  those from other vars possibly created/set inside playbooks.

- any field of node's instance_info having a form of "image_<field>"
  is now available in playbooks as "ironic.image.<field>" var.

- 'parted' tag in playbooks is removed and instead differentiation
  between partition and whole-disk imaged is being done based on
  ironic.image.type var value.

- 'shutdown' tag is removed, and soft power-off is moved to a separate
  playbook, defined by new driver_info field 'ansible_shutdown_playbook'
  ('shutdown.yaml' by default)

- default 'deploy' role is split into smaller roles,
  each targeting a separate stage of deployment process
  to faciliate customiation and re-use

    - discover - e.g. set root device and image target
    - prepare - if needed, prepare system, e.g. create partitions
    - deploy - download/convert/write user image and configdrive
    - configure - post-deployment steps, e.g. installing the bootloader

Documentation is updated.

Change-Id: I158a96d26dc9a114b6b607267c13e3ee1939cac9
2017-06-12 13:47:18 +00:00
Andrey Shestakov cba800da55 Remove duplicated 'md5'
Hash algorithm should be specified by user in image_checkusm parameter.
If not specified, 'md5' sets by default in deploy.py. Additional 'md5:'
is duplicated in playbook, which causes fail with error:
"md5:md5 checksums are not supported"

Change-Id: I693023cd8e226a5e8ba84c3672dfe6f5a65b9f8a
2017-01-05 13:37:20 +02:00
Pavlo Shchelokovskyy ffd006e098 Add Ansible-deploy driver
Requires Ironic API >= 1.22 when using heartbeats to Ironic API.

For better logging and proper deployment failure handling,
Ironic should be > '6.1.1.dev147' version.

Tested with and targets Ansible >= 2.1

Experimental DIB element: I3f6c3baf0197d27f2d423f52611666ca186cd0a4
Experimental TinyCore-based bootstrap:
Ie39ce67dc93e7d53bf75937c7defacafad5fbfcf

Tested with DevStack, Bifrost and Mirantis OpenStack,
with both VMs and real IPMI hardware.
Tempest's baremetal_server_basic_ops test reliably passes on DevStack
with `pxe_ssh_ansible` driver.

More elaborate documentation will be proposed in next changes.

Change-Id: Ib9317d365d7bc39aa00a9d9e1eadddd2f9b2947f
Related-bug: #1526308
Co-Authored-By: Yuriy Zveryanskyy <yzveryanskyy@mirantis.com>
2016-09-16 21:54:24 +03:00