~freyes/+junk/lp1346935

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
OpenStack-Charm-Testing

about
=====

This openstack-charm-testing (aka o-c-t) project contains reference
juju deployer bundles, post-deployment configuration scripts, and 
other templates for Ubuntu OpenStack charm testing.

For automated testing, the Ubuntu OpenStack CI engine (aka osci / uosci)
consumes the bundles and other templates provided herein.

OpenStack package and charm developers also perform manual testing
based on this collection of bundles and templates, as well as using
the next.yaml and default.yaml bundles as a baseline for edge cases and
special testing.

Generally, these configurations are tuned for virtual deployments,
ie. testing short-lived OpenStack overclouds on top of an OpenStack
undercloud.  Some pieces may be specific to Canonical Server Team's
internal dev cloud ('serverstack'), but can be easily modified for
bare metal or other environments.


deploy
======

juju-deployer --bootstrap -c default.yaml -d trusty-juno

targets exist for most combinations, e.g.:

   trusty-icehouse
   trusty-juno-proposed
   vivid-kilo


configure
=========

To configure serverstack run:
	./configure

To configure profiles 'dellstack, stsstack, ppc64el, kernelstack', run:
	./configure <profile>

These "configure" scripts:

a) Add an extra port to the neutron-gateway service for
   OpenStack-on-OpenStack deployments (ie. serverstack, stsstack).

b) Configure appropriate external networking

c) Download and upload images from ~/images

d) Create demo tenants

e) Write a tempest configuration file and clone the tempest repository from upstream


test - tempest smoke
====================

 * Smoke tests include ~430 exercises, generally taking ~30 minutes to run.

```
cd tempest
sudo pip install -r requirements.txt
./run_tempest.sh -N --smoke
```

NOTES: 

 * Some failures are to be expected, depending on deployment environment (firewall, proxy
   restrictions, capacity, etc.).

 * As of 1/9/2014, tempest smoke failure norms on serverstack were:
    p-i-next: 5
    t-i-next: 5
    t-j-next: 6
    u-j-next: 6
    p-i: 6
    t-i: 5
    t-j: 4
    u-j: 8


test - tempest full
===================

 * Full tests include over 2000 exercises and may take several
   hours to execute.

cd tempest
sudo pip install -r requirements.txt
./run_tempest.sh -N -t


destroy
=======

juju destroy-environment <your-enviro-name>


manual instance test example (tools usage)
==========================================

 * A common use for the bundles and tools might look like this.
 * See the tune-and-launch script as one common post-deployment time-saver.

```
# deploy a cloud
juju-deployer --bootstrap -c default.yaml -d trusty-juno

# configure the cloud and add images
./configure    (or use configure-dellstack or configure-stsstack)

# get overcloud credentials
. novarc

# check basic cloud and CLI functionality
nova hypervisor-list && glance image-list && keystone token-get

# shrink flavors just for testing
./tools/flavor_shrink.sh

# bump up quotas to a ridiculous level
./tools/quota_million.sh

# add security groups
./tools/sec_groups.sh

# launch some amd64 instances
./tools/instance_launch.sh 2 cirros
./tools/instance_launch.sh 2 trusty
./tools/instance_launch.sh 2 vivid

# optionally add ppc64el images
./tools/images_ppc64el.sh

# optionally launch ppc64el instances
./tools/instance_launch.sh 2 trusty-ppc64el
./tools/instance_launch.sh 2 vivid-ppc64el

# give floating IPs to all instances
./tools/float_all.sh

# ssh to any of the new instances
nova list
ssh -i ~/testkey.pem <floating-ip-address>
```