Menu Close
8.3.17. Creating the bootstrap machine
Create a bootstrap machine and give it the network access it needs to run on Red Hat OpenStack Platform (RHOSP). Red Hat provides an Ansible playbook that you run to simplify this process.
Prerequisites
The
inventory.yaml
andcommon.yaml
Ansible playbooks in a common directory- If you need these files, copy them from Creating network resources
-
The
metadata.json
file that the installation program created is in the same directory as the Ansible playbooks
Procedure
-
On a command line, change the working directory to the location of the
inventory.yaml
andcommon.yaml
files. Insert the following content into a local file that is called
bootstrap.yaml
:例8.5
bootstrap.yaml
# Required Python packages: # # ansible # openstackclient # openstacksdk # netaddr - import_playbook: common.yaml - hosts: all gather_facts: no tasks: - name: 'Create the bootstrap server port' os_port: name: "{{ os_port_bootstrap }}" network: "{{ os_network }}" security_groups: - "{{ os_sg_master }}" allowed_address_pairs: - ip_address: "{{ os_subnet_range | next_nth_usable(5) }}" - ip_address: "{{ os_subnet_range | next_nth_usable(6) }}" - name: 'Set bootstrap port tag' command: cmd: "openstack port set --tag {{ cluster_id_tag }} {{ os_port_bootstrap }}" - name: 'Create the bootstrap server' os_server: name: "{{ os_bootstrap_server_name }}" image: "{{ os_image_rhcos }}" flavor: "{{ os_flavor_master }}" userdata: "{{ lookup('file', os_bootstrap_ignition) | string }}" auto_ip: no nics: - port-name: "{{ os_port_bootstrap }}" - name: 'Create the bootstrap floating IP' os_floating_ip: state: present network: "{{ os_external_network }}" server: "{{ os_bootstrap_server_name }}"
On a command line, run the playbook:
$ ansible-playbook -i inventory.yaml bootstrap.yaml
After the bootstrap server is active, view the logs to verify that the Ignition files were received:
$ openstack console log show "$INFRA_ID-bootstrap"