@@ -5,6 +5,43 @@ Testing Environment
5
5
Quick start with bifrost-cli
6
6
============================
7
7
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
+
8
45
If you want to try Bifrost on virtual machines instead of real hardware, you
9
46
need to prepare a testing environment. The easiest way is via ``bifrost-cli ``,
10
47
available since the Victoria release series:
@@ -13,6 +50,18 @@ available since the Victoria release series:
13
50
14
51
./bifrost-cli testenv
15
52
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
+
16
65
Additionally, the following parameters can be useful:
17
66
18
67
``--develop ``
@@ -36,22 +85,57 @@ Additionally, the following parameters can be useful:
36
85
``--uefi ``
37
86
Makes the testing VMs boot with UEFI.
38
87
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:
40
98
41
99
.. code-block :: bash
42
100
43
- ./bifrost-cli testenv --help
101
+ baremetal node list
102
+
103
+ baremetal driver list
104
+
105
+ Enroll nodes using the pre-existing inventory:
44
106
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:
46
109
47
110
* ``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
+
49
117
* ``baremetal-nodes.json `` can be used with the Ironic enrollment command:
50
118
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
52
137
53
- export OS_CLOUD=bifrost
54
- baremetal create baremetal-nodes.json
138
+ baremetal node list
55
139
56
140
Reproduce CI testing locally
57
141
============================
@@ -66,7 +150,7 @@ testing and saves out a baremetal.json file which is used by
66
150
``playbooks/test-bifrost.yaml `` to execute the remaining roles. Two
67
151
additional roles are invoked by this playbook which enables Ansible to
68
152
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
70
154
that has successfully occurred, additional roles will unprovision the
71
155
host(s) and delete them from ironic.
72
156
0 commit comments