This role deploys instances using metalsmith CLI.
The only required variable is:
metalsmith_instances
The following optional variables provide the defaults for Instance attributes:
metalsmith_candidates
candidates
.metalsmith_capabilities
capabilities
.metalsmith_conductor_group
conductor_group
.metalsmith_extra_args
extra_args
.metalsmith_image
image
.metalsmith_image_checksum
image_checksum
.metalsmith_image_kernel
image_kernel
.metalsmith_image_ramdisk
image_ramdisk
.metalsmith_netboot
netboot
metalsmith_nics
nics
.metalsmith_resource_class
resource_class
.metalsmith_root_size
root_size
.metalsmith_ssh_public_keys
ssh_public_keys
.metalsmith_swap_size
swap_size
.metalsmith_traits
traits
.metalsmith_user_name
user_name
, the default value is metalsmith
.Each instances has the following attributes:
candidates
(defaults to metalsmith_candidates
)capabilities
(defaults to metalsmith_capabilities
)conductor_group
(defaults to metalsmith_conductor_group
)conductor group to pick nodes from.
Note
Currently it’s not possible to specify the default group.
extra_args
(defaults to metalsmith_extra_args
)metalsmith
CLI on all calls.image
(defaults to metalsmith_image
)image_checksum
(defaults to metalsmith_image_checksum
)image_kernel
(defaults to metalsmith_image_kernel
)image
is a URL of
a partition image.image_ramdisk
(defaults to metalsmith_image_ramdisk
)image
is a URL of
a partition image.netboot
nics
(defaults to metalsmith_nics
)list of virtual NICs to attach to node’s physical NICs. Each is an object with exactly one attribute:
network
creates a port on the given network, for example:
nics:
- network: private
- network: ctlplane
can optionally take a fixed IP to assign:
nics:
- network: private
fixed_ip: 10.0.0.2
- network: ctlplane
fixed_ip: 192.168.42.30
port
uses the provided pre-created port:
nics:
- port: b2254316-7867-4615-9fb7-911b3f38ca2a
subnet
creates a port on the given subnet, for example:
nics:
- subnet: private-subnet1
resource_class
(defaults to metalsmith_resource_class
)root_size
(defaults to metalsmith_root_size
)size of the root partition (in GiB), if partition images are used.
Note
Also required for whole-disk images due to how the Bare Metal service currently works.
ssh_public_keys
(defaults to metalsmith_ssh_public_keys
)swap_size
(defaults to metalsmith_swap_size
)traits
user_name
(defaults to metalsmith_user_name
)---
- hosts: all
tasks:
- include_role:
name: metalsmith_deployment
vars:
metalsmith_image: centos7
metalsmith_nics:
- network: ctlplane
metalsmith_ssh_public_keys:
- /home/user/.ssh/id_rsa.pub
metalsmith_instances:
- hostname: compute-0
resource_class: compute
root_size: 100
swap_size: 4096
capabilities:
boot_mode: uefi
traits:
- CUSTOM_GPU
- hostname: compute-1
resource_class: compute
root_size: 100
swap_size: 4096
capabilities:
boot_mode: uefi
user_name: heat-admin
- hostname: compute-2
resource_class: compute
candidates:
- e63650f2-4e7d-40b2-8932-f5b0e54698c7
- f19d00dd-60e1-46c8-b83c-782b4d291d9e
- hostname: control-0
resource_class: control
capabilities:
boot_mode: uefi
nics:
- network: ctlplane
- port: 1899af15-149d-47dc-b0dc-a68614eeb5c4
- hostname: custom-partition-image
resource_class: custom
image: https://example.com/images/custom-1.0.root.img
image_kernel: https://example.com/images/custom-1.0.vmlinuz
image_ramdisk: https://example.com/images/custom-1.0.initrd
image_checksum: https://example.com/images/MD5SUMS
- hostname: custom-whole-disk-image
resource_class: custom
image: https://example.com/images/custom-1.0.qcow2
image_checksum: https://example.com/images/MD5SUMS
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.