diff options
| author | Amy Fong <amy.fong@windriver.com> | 2014-05-21 14:35:15 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-05-23 23:42:55 -0400 |
| commit | fb1d6f23fa01c0217ed3f6778d8033dd0030db2a (patch) | |
| tree | 36dc89d6b66050a56cbca2f2f7c90229ebcb8854 /meta-openstack/Documentation/testsystem/README.multi-compute | |
| parent | 6350b155270f7f086624db36ecc6e6008ebcd378 (diff) | |
| download | meta-cloud-services-fb1d6f23fa01c0217ed3f6778d8033dd0030db2a.tar.gz | |
Testing documentation
Add documentation for testing swift, ceph, heat.
Create a script and instructions on a script that launches a controller
and a specified number of compute nodes.
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Diffstat (limited to 'meta-openstack/Documentation/testsystem/README.multi-compute')
| -rw-r--r-- | meta-openstack/Documentation/testsystem/README.multi-compute | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/meta-openstack/Documentation/testsystem/README.multi-compute b/meta-openstack/Documentation/testsystem/README.multi-compute new file mode 100644 index 0000000..f7e6b4e --- /dev/null +++ b/meta-openstack/Documentation/testsystem/README.multi-compute | |||
| @@ -0,0 +1,150 @@ | |||
| 1 | 0. configure configuration files with auto_destroy enabled and auto_assign_ip disabled and specify the | ||
| 2 | IP addresses of the controller and the compute node as configured during the build | ||
| 3 | |||
| 4 | e.g. if the DHCP is supported | ||
| 5 | |||
| 6 | [main] | ||
| 7 | network: 192.168.7.1 | ||
| 8 | emulator: /usr/bin/qemu-system-x86_64 | ||
| 9 | auto_destroy: True | ||
| 10 | auto_assign_ip: True | ||
| 11 | |||
| 12 | [controller] | ||
| 13 | kernel: $HOME/images/bzImage | ||
| 14 | disk: $HOME/images/controller.ext3 | ||
| 15 | |||
| 16 | [computeA] | ||
| 17 | kernel: $HOME/images/bzImage | ||
| 18 | disk: $HOME/images/compute.ext3 | ||
| 19 | |||
| 20 | [computeB] | ||
| 21 | kernel: $HOME/images/bzImage | ||
| 22 | disk: $HOME/images/computeB.ext3 | ||
| 23 | |||
| 24 | Start instances: | ||
| 25 | <launch.py> <config file> start | ||
| 26 | |||
| 27 | e.g. if the IP address are specified in build time IP | ||
| 28 | |||
| 29 | For the controller: | ||
| 30 | |||
| 31 | The build time IP in layers/meta-cloud-services - | ||
| 32 | layers//meta-cloud-services/meta-openstack-controller-deploy/classes/hosts.bbclass | ||
| 33 | layers//meta-cloud-services/meta-openstack-compute-deploy/classes/hosts.bbclass | ||
| 34 | CONTROLLER_IP ?= "128.224.149.121" | ||
| 35 | |||
| 36 | Use the controller's ip in the test system's configuration file: | ||
| 37 | |||
| 38 | [controller] | ||
| 39 | ip: 128.224.149.121 | ||
| 40 | |||
| 41 | For each compute, use the controller's IP in the bitbake build's build time IP and | ||
| 42 | use the compute node's ip accordingly | ||
| 43 | |||
| 44 | computeA | ||
| 45 | The build time IP in layers/meta-cloud-services - | ||
| 46 | layers//meta-cloud-services/meta-openstack-controller-deploy/classes/hosts.bbclass | ||
| 47 | layers//meta-cloud-services/meta-openstack-compute-deploy/classes/hosts.bbclass | ||
| 48 | CONTROLLER_IP ?= "128.224.149.121" | ||
| 49 | COMPUTE_IP ?= "128.224.149.122" | ||
| 50 | |||
| 51 | computeB | ||
| 52 | The build time IP in layers/meta-cloud-services - | ||
| 53 | layers//meta-cloud-services/meta-openstack-controller-deploy/classes/hosts.bbclass | ||
| 54 | layers//meta-cloud-services/meta-openstack-compute-deploy/classes/hosts.bbclass | ||
| 55 | CONTROLLER_IP ?= "128.224.149.121" | ||
| 56 | COMPUTE_IP ?= "128.224.149.123" | ||
| 57 | |||
| 58 | And in the test system's configuration file: | ||
| 59 | |||
| 60 | [controller] | ||
| 61 | ip: 128.224.149.121 | ||
| 62 | |||
| 63 | [computeA] | ||
| 64 | ip: 128.224.149.122 | ||
| 65 | |||
| 66 | [computeB] | ||
| 67 | ip: 128.224.149.123 | ||
| 68 | |||
| 69 | Start instances: | ||
| 70 | <launch.py> <config file> start | ||
| 71 | |||
| 72 | |||
| 73 | 1./etc/hosts - adjust for hostnames | ||
| 74 | |||
| 75 | On controller/compute nodes, configure your DNS or /etc/hosts and ensure | ||
| 76 | it is consistent across all hosts. Make sure that the three hosts can | ||
| 77 | perform name resolution with each other. As a test, use the ping command | ||
| 78 | to ping each host from one another. | ||
| 79 | |||
| 80 | $ ping HostA | ||
| 81 | $ ping HostB | ||
| 82 | $ ping HostC | ||
| 83 | |||
| 84 | e.g. /etc/hosts | ||
| 85 | 127.0.0.1 localhost.localdomain localhost | ||
| 86 | |||
| 87 | 192.168.7.2 controller | ||
| 88 | 192.168.7.4 computeA | ||
| 89 | 192.168.7.6 computeB | ||
| 90 | |||
| 91 | 2. Configure NFS host on controller | ||
| 92 | |||
| 93 | /etc/nova/instances needs to be a shared directory for migration to work. | ||
| 94 | |||
| 95 | Configure the controller to export this as an NFS export. | ||
| 96 | |||
| 97 | cat >> /etc/exports << 'EOF' | ||
| 98 | /etc/nova/instances *(rw,no_subtree_check,insecure,no_root_squash) | ||
| 99 | EOF | ||
| 100 | exportfs -a | ||
| 101 | |||
| 102 | On compute nodes: | ||
| 103 | mount controller:/etc/nova/instances /etc/nova/instances/ | ||
| 104 | |||
| 105 | |||
| 106 | 3. Make sure the controller can see the compute nodes | ||
| 107 | |||
| 108 | nova service-list | ||
| 109 | |||
| 110 | root@controller:/etc/nova/instances# nova service-list | ||
| 111 | +------------------+------------+----------+---------+-------+----------------------------+-----------------+ | ||
| 112 | | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | | ||
| 113 | +------------------+------------+----------+---------+-------+----------------------------+-----------------+ | ||
| 114 | | nova-compute | computeA | nova | enabled | up | 2014-05-16T17:14:24.617143 | - | | ||
| 115 | | nova-compute | computeB | nova | enabled | up | 2014-05-16T17:14:25.228089 | - | | ||
| 116 | | nova-conductor | controller | internal | enabled | up | 2014-05-16T17:14:26.932751 | - | | ||
| 117 | | nova-scheduler | controller | internal | enabled | up | 2014-05-16T17:14:26.984656 | - | | ||
| 118 | | nova-consoleauth | controller | internal | enabled | up | 2014-05-16T17:14:27.007947 | - | | ||
| 119 | | nova-cert | controller | internal | enabled | up | 2014-05-16T17:14:27.030701 | - | | ||
| 120 | | nova-network | controller | internal | enabled | up | 2014-05-16T17:14:27.031366 | - | | ||
| 121 | +------------------+------------+----------+---------+-------+----------------------------+-----------------+ | ||
| 122 | |||
| 123 | root@controller:~# nova hypervisor-list | ||
| 124 | +----+---------------------+ | ||
| 125 | | ID | Hypervisor hostname | | ||
| 126 | +----+---------------------+ | ||
| 127 | | 1 | computeA | | ||
| 128 | | 2 | computeB | | ||
| 129 | +----+---------------------+ | ||
| 130 | |||
| 131 | Login to horizon, and select hypervisors, both nodes will be seen | ||
| 132 | |||
| 133 | |||
| 134 | 4. Bootup a guest from the controller: | ||
| 135 | |||
| 136 | On controller: | ||
| 137 | glance image-create --name myFirstImage --is-public true --container-format bare --disk-format qcow2 --file images/cirros-0.3.0-x86_64-disk.img | ||
| 138 | neutron net-create mynetwork | ||
| 139 | nova boot --image myFirstImage --flavor 1 myinstance | ||
| 140 | |||
| 141 | 5. Do migration from horizon | ||
| 142 | |||
| 143 | From horizon, goto instances, myinstance should be running | ||
| 144 | wait til myinstance is in running state | ||
| 145 | |||
| 146 | In Actions, select: Migrate Instance | ||
| 147 | Select: Confirm migrate/resize when promted | ||
| 148 | |||
| 149 | myinstance is now running from the other compute node (computeB in this case) | ||
| 150 | |||
