Browse Source

Add Ironic doc

Change-Id: Ic3225e6b7422ca96fa9c906501e7243e91d11a80
Andrey Shestakov 2 years ago
parent
commit
b86b110e19
2 changed files with 249 additions and 0 deletions
  1. 1
    0
      doc/source/index.rst
  2. 248
    0
      doc/source/ironic.rst

+ 1
- 0
doc/source/index.rst View File

@@ -28,6 +28,7 @@ Advanced topics
28 28
    ceph
29 29
    ceph_cluster
30 30
    using_calico_instead_of_ovs
31
+   ironic
31 32
 
32 33
 Service plugins docs
33 34
 --------------------

+ 248
- 0
doc/source/ironic.rst View File

@@ -0,0 +1,248 @@
1
+.. _ironic:
2
+
3
+============
4
+Ironic guide
5
+============
6
+
7
+This guide provides an instruction for adding Ironic support for
8
+CCP deployment.
9
+
10
+Underlay
11
+~~~~~~~~
12
+
13
+.. NOTE:: That it's not the CCP responsibility to manage networking for baremetal servers.
14
+   Ironic assumes that networking is properly configured in underlay.
15
+
16
+Prerequirements
17
+---------------
18
+
19
+* Ironic conductor has access to IPMI of baremetal servers
20
+  or to hypervisor when baremetal server is simulated by VM.
21
+* Baremetal servers are attached to physical baremetal network.
22
+* Swift, Ironic API endpoints, neutron-dhcp-agent, PXE/iPXE services
23
+  are accessible from baremetal network.
24
+* Swift and Ironic API endpoints has valid SSL certificate
25
+  or Ironic deploy driver allows unverified connections.
26
+* Baremetal network is accessible from Ironic conductor.
27
+
28
+Neutron
29
+~~~~~~~
30
+
31
+Prerequirements
32
+---------------
33
+
34
+Ironic requires single flat network in Neutron which has L2 connectivity to physical baremetal network
35
+and appropriate L3 settings.
36
+
37
+Example case when required access to Ironic services provided via Neutron external network:
38
+
39
+::
40
+
41
+    # Create external network
42
+    neutron net-create ext --router:external true --shared --provider:network_type flat --provider:physical_network physnet1
43
+
44
+    # Create subnet in external network, here 10.200.1.1 - is provider gateway
45
+    neutron subnet-create --name ext --gateway 10.200.1.1 --allocation-pool start=10.200.1.10,end=10.200.1.200 ext 10.200.1.0/24
46
+
47
+    # Create internal network, here physnet2 is mapped to physical baremetal network
48
+    neutron net-create --shared --provider:network_type flat --provider:physical_network physnet2 baremetal
49
+
50
+    # Create subnet in internal network, here 10.200.2.1 - is address of Neutron router, 10.11.0.174 - is address of DNS server which can resolve external endpoints
51
+    neutron subnet-create --name baremetal --gateway 10.200.2.1 --allocation-pool start=10.200.2.10,end=10.200.2.200 --dns-nameserver 10.11.0.174 baremetal 10.200.2.0/24
52
+
53
+    # Create router and connect networks
54
+    neutron router-create r1
55
+    neutron router-gateway-set r1 ext
56
+    neutron router-interface-add r1 baremetal
57
+
58
+Example case when required access to Ironic services provided directly from baremetal network:
59
+
60
+::
61
+
62
+    # Create internal network, here physnet2 is mapped to physical baremetal network
63
+    neutron net-create --shared --provider:network_type flat --provider:physical_network physnet2 baremetal
64
+
65
+    # Create subnet in internal network, here 10.200.2.1 - is address Underlay router, which provides required connectivity
66
+    neutron subnet-create --name baremetal --gateway 10.200.2.1 --allocation-pool start=10.200.2.10,end=10.200.2.200 --dns-nameserver 10.11.0.174 baremetal 10.200.2.0/24
67
+
68
+Swift
69
+~~~~~
70
+
71
+Prerequirements
72
+---------------
73
+
74
+Make sure that Radosgw is deployed, available and configured in Glance as default Swift storage backend.
75
+Refer to :doc:`ceph` guide for deploy Radosgw and configure Glance.
76
+
77
+Ironic
78
+~~~~~~
79
+
80
+Prerequirements
81
+---------------
82
+
83
+* Underlay networking
84
+* Neutron networking
85
+* Glance/Swift configuration
86
+
87
+Deploy CCP with Ironic
88
+======================
89
+
90
+In order to deploy CCP with Ironic you have to deploy following components:
91
+* ironic-api
92
+* ironic-conductor
93
+* nova-compute-ironic
94
+
95
+.. NOTE:: nova-compute-ironic is same as regular nova-compute service,
96
+   but with special compute_driver required for integration Nova with Ironic.
97
+   It requires neutron-openvswitch-agent running on same host.
98
+   Is not possible to deploy nova-compute-ironic and regular nova-compute on same host.
99
+   nova-compute-ironic has no significant load and can be deployed on controller node.
100
+
101
+Ironic requires single endpoints for Swift and API accessible from remote baremetal network,
102
+Ingress should be configured.
103
+
104
+Example of ccp.yaml:
105
+
106
+::
107
+
108
+    roles:
109
+      controller:
110
+        [all default controller services]
111
+        - ironic-api
112
+        - ironic-conductor
113
+        - nova-compute-ironic
114
+    configs:
115
+      neutron:
116
+        physnets:
117
+          - name: "physnet1"
118
+            bridge_name: "br-ex"
119
+            interface: "ens8"
120
+            flat: true
121
+            vlan_range: "1001:1030"
122
+          - name: "physnet2"
123
+            bridge_name: "br-bm"
124
+            interface: "ens9"
125
+            flat: true
126
+            vlan_range: "1001:1030"
127
+      ceph:
128
+        fsid: "a1adbec9-98cb-4d75-a236-2c595b73a8de"
129
+        mon_host: "10.11.0.214"
130
+      radosgw:
131
+        key: "AQCDIStYGty1ERAALFeBif/6Y49s9S/hyVFXyw=="
132
+      glance:
133
+        swift:
134
+          enable: true
135
+      ingress:
136
+        enabled: true
137
+
138
+Now you’re ready to deploy Ironic to existing CCP cluster.
139
+
140
+::
141
+
142
+    ccp deploy -c ironic-api ironic-conductor nova-compute-ironic
143
+
144
+
145
+Provision baremetal instance
146
+============================
147
+
148
+Depends on selected deploy driver, provision procedure may differ.
149
+Basically provision require following steps:
150
+* Upload service and user's images to Glance
151
+* Create baremetal node in Ironic
152
+* Create node port in Ironic
153
+* Create appropriate flavor in Nova
154
+* Boot instance
155
+
156
+Example with agent_ssh driver:
157
+
158
+.. NOTE:: Agent drivers will download images from Swift endpoint,
159
+   in case you using self-signed certificates, make sure that agent allows unverified SSL connections.
160
+
161
+Upload service kernel/ramdisk images, required for driver:
162
+
163
+::
164
+
165
+    wget https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-stable-newton.vmlinuz
166
+    wget https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-stable-newton.gz
167
+
168
+    glance image-create --name kernel \
169
+    --visibility public \
170
+    --disk-format aki --container-format aki \
171
+    --file tinyipa-stable-newton.vmlinuz
172
+
173
+    glance image-create --name ramdisk \
174
+    --visibility public \
175
+    --disk-format ari --container-format ari \
176
+    --file tinyipa-stable-newton.gz
177
+
178
+Upload user's image, which should be provisioned on baremetal node:
179
+
180
+::
181
+
182
+    wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
183
+
184
+    glance image-create --name cirros \
185
+    --visibility public \
186
+    --disk-format qcow2 \
187
+    --container-format bare \
188
+    --file cirros-0.3.4-x86_64-disk.img \
189
+    --property hypervisor_type='baremetal' \
190
+    --property cpu_arch='x86_64'
191
+
192
+Create baremetal node with port in Ironic:
193
+
194
+::
195
+
196
+    ironic node-create \
197
+    -n vm_node1 \
198
+    -d agent_ssh \
199
+    -i deploy_kernel=2fe932bf-a961-4d09-b0b0-72806edf05a4 \  # UUID of uploaded kernel image
200
+    -i deploy_ramdisk=5546dead-e8a4-4ebd-93cf-a118580c33d5 \ # UUID of uploaded ramdisk image
201
+    -i ssh_address=10.11.0.1 \ # address of hypervisor with VM (simulated baremetal server)
202
+    -i ssh_username=user \ # credentials for ssh access to hypervisor
203
+    -i ssh_password=password \
204
+    -i ssh_virt_type=virsh \
205
+    -p cpus=1 \
206
+    -p memory_mb=3072 \
207
+    -p local_gb=150 \
208
+    -p cpu_arch=x86_64
209
+
210
+    ironic port-create -n vm_node1 -a 52:54:00:a4:eb:d5 # MAC address of baremetal server
211
+
212
+Verify that node is available as Nova hypervisor:
213
+
214
+::
215
+
216
+    ironic node-validate vm_node1 # Should has no errors in management, power interfaces
217
+    nova hypervisor-show 1 # Should output correct information about resources (cpu, mem, disk)
218
+
219
+Create nova flavor:
220
+
221
+::
222
+
223
+    nova flavor-create bm_flavor auto 3072 150 1
224
+    nova flavor-key bm_flavor set cpu_arch=x86_64
225
+
226
+Boot baremetal instance:
227
+
228
+::
229
+
230
+    nova boot --flavor bm_flavor \
231
+    --image 11991c4e-95fd-4ad1-87a3-c67ec31c46f3 \ # Uploaded Cirros image
232
+    --nic net-id=0824d199-5c2a-4c25-be2c-14b5ab5a2838 \ # UUID of Neutron baremetal network
233
+    bm_inst1
234
+
235
+Troubleshooting
236
+---------------
237
+
238
+If something goes wrong, please ensure first:
239
+* You understand how Ironic works
240
+* Underlay networking is configured properly
241
+
242
+For more information about issues, you may enable ironic.logging_debug
243
+and check logs of following pods:
244
+- nova-scheduler
245
+- nova-compute-ironic
246
+- ironic-api
247
+- ironic-conductor
248
+- neutron-server

Loading…
Cancel
Save