OpenStack Rally is a project under the Big Tent umbrella with the mission of verify OpenStack environments to ensure SLAs under high loads or fail over scenarios, and cloud services verification. Rally can also be used to continuous integration and delivery tasks.
Why use Rally inside a Docker container? Rally is a service that is not commonly used in most environments, is a tool that is used when new infrastructure changes are made or when a SLAs review must be done, not make any sense have a service consuming infrastructure resources or block a server only for use under specific situations. Also, if your OpenStack infrastructure is automated, with a container you can have a nice integration with CI/CD tools like Jenkins.
Main reasons to use Rally inside Docker containers:
Quick tests/deployments of Rally tasks
Automated testing
Cost savings
Operators can execute tasks with their own computers, freeing
infrastructure resources
Re-utilization of resources
Here you got my suggestions about how to use Rally inside Docker:
Create a new container(automatized or not by another tool)
Always use an external volume to store rally reports data
Execute Rally tasks
Export the reports to the volume shared with the Docker host
Kill the container
| Let\'s start with this quick guide: | Clone the repo i created with the Dockerfile
Start rally container with a pseudo-tty and a volume to store rally execution data
Create a file called deploy.json with the admin info of your OpenStack environment
Create a deployment with the json we previously created
Source the openrc file rally has created with your user info and test if you can connect with glance
Check deployment status
Create a test execution file, this test will check if nova can boot and delete some instances
Run the task with the following command
| After a while, you will receive an output execution resume, you can export to a report file with the following command in a pretty style report. | Use the volume we created with the Docker Host to save report files.
| Open the output file form a Web browser and review the report.
[root@07766ba700e8 /]# rally deployment create --file=deploy.json --name=existing
2016-06-15 09:42:25.428 25 INFO rally.deployment.engine [-] Deployment a5162111-02a5-458f-bb59-f822cab1aa93 | Starting: OpenStack cloud deployment.
2016-06-15 09:42:25.478 25 INFO rally.deployment.engine [-] Deployment a5162111-02a5-458f-bb59-f822cab1aa93 | Completed: OpenStack cloud deployment.
+--------------------------------------+----------------------------+----------+------------------+--------+
| uuid | created_at | name | status | active |
+--------------------------------------+----------------------------+----------+------------------+--------+
| a5162111-02a5-458f-bb59-f822cab1aa93 | 2016-06-15 09:42:25.391691 | existing | deploy->finished | |
+--------------------------------------+----------------------------+----------+------------------+--------+
Using deployment: a5162111-02a5-458f-bb59-f822cab1aa93
~/.rally/openrc was updated
HINTS:
* To get your cloud resources, run:
rally show [flavors|images|keypairs|networks|secgroups]
* To use standard OpenStack clients, set up your env by running:
source ~/.rally/openrc
OpenStack clients are now configured, e.g run:
glance image-list
[root@07766ba700e8 /]# rally deployment check
keystone endpoints are valid and following services are available:
+-------------+----------------+-----------+
| services | type | status |
+-------------+----------------+-----------+
| __unknown__ | volumev2 | Available |
| ceilometer | metering | Available |
| cinder | volume | Available |
| cloud | cloudformation | Available |
| glance | image | Available |
| heat | orchestration | Available |
| keystone | identity | Available |
| neutron | network | Available |
| nova | compute | Available |
+-------------+----------------+-----------+
NOTE: '__unknown__' service name means that Keystone service catalog doesn't return name for this service and Rally can not identify service by its type. BUT you still can use such services with api_versions context, specifying type of service (execute `rally plugin show api_versions` for more details).