Skip to content

Commit 76c4e52

Browse files
authored
Merge pull request #83 from stackhpc/upstream/master-2025-08-25
Synchronise master with upstream
2 parents 05ad0b2 + 86366ec commit 76c4e52

File tree

2 files changed

+132
-8
lines changed

2 files changed

+132
-8
lines changed

doc/source/contributor/testenv.rst

Lines changed: 92 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,43 @@ Testing Environment
55
Quick start with bifrost-cli
66
============================
77

8+
This section provides a structured process to set up and deploy nodes using
9+
the Bifrost test environment. It is ideal for users who want a quick
10+
and guided approach without diving into detailed configurations upfront.
11+
12+
Clone Bifrost repository:
13+
14+
.. code-block:: bash
15+
16+
git clone https://opendev.org/openstack/bifrost
17+
18+
cd bifrost
19+
20+
.. note::
21+
This example uses the development branch ``master``. If you prefer to use
22+
a stable release, switch to the corresponding stable branch. For example:
23+
24+
.. code-block:: bash
25+
26+
git checkout stable/2025.1
27+
28+
Set up SSH key pairs:
29+
30+
Bifrost requires that the user who executes bifrost has an SSH key in their
31+
user home, or that the user defines a variable to tell bifrost
32+
where to identify this file.
33+
34+
.. code-block:: bash
35+
36+
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa
37+
38+
.. note::
39+
The above example uses an RSA key, but other key types such as ``ed25519``
40+
are also supported. Choose the key type that
41+
best suits your security and compatibility needs.
42+
43+
Set up and configure a test environment:
44+
845
If you want to try Bifrost on virtual machines instead of real hardware, you
946
need to prepare a testing environment. The easiest way is via ``bifrost-cli``,
1047
available since the Victoria release series:
@@ -13,6 +50,18 @@ available since the Victoria release series:
1350
1451
./bifrost-cli testenv
1552
53+
See the built-in documentation for more details:
54+
55+
.. code-block:: bash
56+
57+
./bifrost-cli testenv --help
58+
59+
To install Bifrost services inside the testenv:
60+
61+
.. code-block:: bash
62+
63+
./bifrost-cli --testenv
64+
1665
Additionally, the following parameters can be useful:
1766

1867
``--develop``
@@ -36,22 +85,57 @@ Additionally, the following parameters can be useful:
3685
``--uefi``
3786
Makes the testing VMs boot with UEFI.
3887

39-
See the built-in documentation for more details:
88+
Activate the testenv and utilize the baremetal CLI in no-auth
89+
mode with clouds.yaml:
90+
91+
.. code-block:: bash
92+
93+
source /opt/stack/bifrost/bin/activate
94+
95+
export OS_CLOUD=bifrost
96+
97+
Verify that Ironic and its drivers are installed and operational:
4098

4199
.. code-block:: bash
42100
43-
./bifrost-cli testenv --help
101+
baremetal node list
102+
103+
baremetal driver list
104+
105+
Enroll nodes using the pre-existing inventory:
44106

45-
The command generates two files with node inventory in the current directory:
107+
The command `./bifrost-cli testenv` generates two files with node inventory
108+
in the current directory:
46109

47110
* ``baremetal-inventory.json`` can be used with the provided playbooks, see
48-
:doc:`/user/howto` for details.
111+
:doc:`/user/howto` for details. Use the command:
112+
113+
.. code-block:: bash
114+
115+
./bifrost-cli enroll baremetal-inventory.json
116+
49117
* ``baremetal-nodes.json`` can be used with the Ironic enrollment command:
50118

51-
.. code-block:: shell
119+
.. code-block:: bash
120+
121+
export OS_CLOUD=bifrost
122+
123+
baremetal create baremetal-nodes.json
124+
125+
Deploy the Enrolled Nodes:
126+
127+
.. code-block:: bash
128+
129+
./bifrost-cli deploy baremetal-inventory.json
130+
131+
Verify Deployment:
132+
133+
The following command should show the node in an `active` provision state
134+
after a successful deployment.
135+
136+
.. code-block:: bash
52137
53-
export OS_CLOUD=bifrost
54-
baremetal create baremetal-nodes.json
138+
baremetal node list
55139
56140
Reproduce CI testing locally
57141
============================
@@ -66,7 +150,7 @@ testing and saves out a baremetal.json file which is used by
66150
``playbooks/test-bifrost.yaml`` to execute the remaining roles. Two
67151
additional roles are invoked by this playbook which enables Ansible to
68152
connect to the new nodes by adding them to the inventory, and then
69-
logging into the remote machine via the user's ssh host key. Once
153+
logging into the remote machine via the user\'s ssh host key. Once
70154
that has successfully occurred, additional roles will unprovision the
71155
host(s) and delete them from ironic.
72156

doc/source/user/troubleshooting.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,43 @@ DIB-based or any other IPA image, you will need to take the following steps:
165165
then they will not be replaced. Alternatively, the files can just be
166166
directly replaced on disk. The default where the kernel and ramdisk are
167167
located is in ``/httboot/``.
168+
169+
***********************************************************
170+
Node Enrollment and Provisioning in a Testing Environment
171+
***********************************************************
172+
173+
Here are a few steps to troubleshoot node enrollment and provisioning in
174+
testing environment.
175+
176+
Node Power and Provision State
177+
================================
178+
179+
If the nodes enrollment fails, ensure the
180+
power state of the nodes is 'On'. By default, the power state might be 'None'.
181+
You can use the following commands to power on the nodes
182+
and make them available:
183+
184+
.. code-block:: bash
185+
186+
baremetal node power on <NODE>
187+
baremetal node manage <NODE>
188+
baremetal node provide <NODE>
189+
190+
Once the nodes are powered on and provision state is ``available``
191+
re-run the enrollment process:
192+
193+
.. code-block:: bash
194+
195+
./bifrost-cli enroll baremetal-inventory.json
196+
197+
After successful enrollment, proceed with the deployment:
198+
199+
.. code-block:: bash
200+
201+
./bifrost-cli deploy baremetal-inventory.json
202+
203+
For documentation on the testing environment,
204+
see the `Bifrost test environment guide <https://docs.openstack.org/bifrost/latest/contributor/testenv.html>`_.
205+
206+
For more on using the Baremetal CLI,
207+
refer to the `Bifrost user HOWTO <https://docs.openstack.org/bifrost/latest/user/howto.html#baremetal-cli>`_.

0 commit comments

Comments
 (0)