aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/Documentation/testsystem/README.multi-compute
blob: f7e6b4e346faca310f3eefb83189f72a7d686e48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
0. configure configuration files with auto_destroy enabled and auto_assign_ip disabled and specify the
   IP addresses of the controller and the compute node as configured during the build

e.g. if the DHCP is supported

[main]
network: 192.168.7.1
emulator: /usr/bin/qemu-system-x86_64
auto_destroy: True
auto_assign_ip: True

[controller]
kernel: $HOME/images/bzImage
disk: $HOME/images/controller.ext3

[computeA]
kernel: $HOME/images/bzImage
disk: $HOME/images/compute.ext3

[computeB]
kernel: $HOME/images/bzImage
disk: $HOME/images/computeB.ext3

Start instances:
<launch.py> <config file> start

e.g. if the IP address are specified in build time IP

For the controller:

The build time IP in layers/meta-cloud-services -
layers//meta-cloud-services/meta-openstack-controller-deploy/classes/hosts.bbclass
layers//meta-cloud-services/meta-openstack-compute-deploy/classes/hosts.bbclass
CONTROLLER_IP ?= "128.224.149.121"

Use the controller's ip in the test system's configuration file:

[controller]
ip: 128.224.149.121

For each compute, use the controller's IP in the bitbake build's build time IP and
use the compute node's ip accordingly

computeA
The build time IP in layers/meta-cloud-services -
layers//meta-cloud-services/meta-openstack-controller-deploy/classes/hosts.bbclass
layers//meta-cloud-services/meta-openstack-compute-deploy/classes/hosts.bbclass
CONTROLLER_IP ?= "128.224.149.121"
COMPUTE_IP ?= "128.224.149.122"

computeB
The build time IP in layers/meta-cloud-services -
layers//meta-cloud-services/meta-openstack-controller-deploy/classes/hosts.bbclass
layers//meta-cloud-services/meta-openstack-compute-deploy/classes/hosts.bbclass
CONTROLLER_IP ?= "128.224.149.121"
COMPUTE_IP ?= "128.224.149.123"

And in the test system's configuration file:

[controller]
ip: 128.224.149.121

[computeA]
ip: 128.224.149.122

[computeB]
ip: 128.224.149.123

Start instances:
<launch.py> <config file> start


1./etc/hosts - adjust for hostnames

On controller/compute nodes, configure your DNS or /etc/hosts and ensure
it is consistent across all hosts. Make sure that the three hosts can
perform name resolution with each other. As a test, use the ping command
to ping each host from one another.

$ ping HostA
$ ping HostB
$ ping HostC

e.g.  /etc/hosts
127.0.0.1       localhost.localdomain           localhost

192.168.7.2 controller
192.168.7.4 computeA
192.168.7.6 computeB

2. Configure NFS host on controller

/etc/nova/instances needs to be a shared directory for migration to work.

Configure the controller to export this as an NFS export.

cat >> /etc/exports << 'EOF'
/etc/nova/instances *(rw,no_subtree_check,insecure,no_root_squash)
EOF
exportfs -a

On compute nodes:
mount controller:/etc/nova/instances /etc/nova/instances/


3. Make sure the controller can see the compute nodes

nova service-list

root@controller:/etc/nova/instances# nova service-list
+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| Binary           | Host       | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+------------------+------------+----------+---------+-------+----------------------------+-----------------+
| nova-compute     | computeA   | nova     | enabled | up    | 2014-05-16T17:14:24.617143 | -               |
| nova-compute     | computeB   | nova     | enabled | up    | 2014-05-16T17:14:25.228089 | -               |
| nova-conductor   | controller | internal | enabled | up    | 2014-05-16T17:14:26.932751 | -               |
| nova-scheduler   | controller | internal | enabled | up    | 2014-05-16T17:14:26.984656 | -               |
| nova-consoleauth | controller | internal | enabled | up    | 2014-05-16T17:14:27.007947 | -               |
| nova-cert        | controller | internal | enabled | up    | 2014-05-16T17:14:27.030701 | -               |
| nova-network     | controller | internal | enabled | up    | 2014-05-16T17:14:27.031366 | -               |
+------------------+------------+----------+---------+-------+----------------------------+-----------------+

root@controller:~# nova hypervisor-list
+----+---------------------+
| ID | Hypervisor hostname |
+----+---------------------+
| 1  | computeA            |
| 2  | computeB            |
+----+---------------------+

Login to horizon, and select hypervisors, both nodes will be seen


4. Bootup a guest from the controller:

On controller:
glance image-create --name myFirstImage --is-public true --container-format bare --disk-format qcow2 --file images/cirros-0.3.0-x86_64-disk.img
neutron  net-create mynetwork
nova boot --image myFirstImage --flavor 1 myinstance

5. Do migration from horizon

From horizon, goto instances, myinstance should be running
wait til myinstance is in running state

In Actions, select: Migrate Instance
Select: Confirm migrate/resize when promted

myinstance is now running from the other compute node (computeB in this case)