This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
khaleesi_guide [2015/03/10 15:29] Tim Rozet created |
khaleesi_guide [2015/04/07 22:23] (current) Daniel Farrell [Running Khaleesi] Proper code formatting for Khaleesi run cmd |
||
---|---|---|---|
Line 7: | Line 7: | ||
----- | ----- | ||
+ | |||
+ | ==== Prerequisites ==== | ||
+ | You should have BMC control enabled in Foreman via IPMI. Khaleesi will issue a REST API call to the Foreman server to reboot your nodes. Please see the "Using Foreman to Control Hardware" section in the [[https://wiki.opnfv.org/foreman_guide |Foreman Guide]]. | ||
==== Installation ==== | ==== Installation ==== | ||
Khaleesi can be installed on your provisioning server. First you need EPEL and some other packages: | Khaleesi can be installed on your provisioning server. First you need EPEL and some other packages: | ||
- | ''sudo rpm -i http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm'' | + | <code> |
- | + | sudo rpm -i http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm | |
- | ''sudo yum -y install python-pip python-virtualenv gcc git'' | + | sudo yum -y install python-pip python-virtualenv gcc git \ |
- | + | python-keystoneclient python-novaclient \ | |
- | ''sudo yum -y install python-keystoneclient python-novaclient python-glanceclient python-neutronclient python-keystoneclient'' | + | python-glanceclient python-neutronclient \ |
+ | python-keystoneclient sshpass | ||
+ | </code> | ||
Now clone Khaleesi where you like: | Now clone Khaleesi where you like: | ||
- | ''git clone -b foreman https://github.com/trozet/khaleesi.git'' | + | <code>git clone -b foreman https://github.com/trozet/khaleesi.git</code> |
Khaleesi recommeds using a virtual environment provided by python-virtualenv. Follow these steps to setup your virtualenv: | Khaleesi recommeds using a virtual environment provided by python-virtualenv. Follow these steps to setup your virtualenv: | ||
<code> | <code> | ||
- | virtualenv venv | + | virtualenv khaleesi_venv |
- | source venv/bin/activate | + | source khaleesi_venv/bin/activate |
pip install ansible | pip install ansible | ||
- | cd khaleesi | + | cd khaleesi/tools/ksgen |
- | cd tools/ksgen | + | |
python setup.py develop | python setup.py develop | ||
cd ../.. | cd ../.. | ||
</code> | </code> | ||
- | From the above you can see that "source venv/bin/activate" will activate your virtual environment. Simply use deactivate to exit. Now we need to create a default Ansible config: | + | From the above you can see that ''source khaleesi_venv/bin/activate'' will activate your virtual environment. Simply use deactivate to exit. Now we need to create a default Ansible config: |
<code> | <code> | ||
Line 48: | Line 52: | ||
Khaleesi uses a ksgen_settings.yml file for directing Khaleesi's execution. It is a YAML file that contains variables and topology information. This file can either be edited manually or can be autogenerated using another project called [[https://github.com/redhat-openstack/khaleesi-settings | khaleesi-settings]]. | Khaleesi uses a ksgen_settings.yml file for directing Khaleesi's execution. It is a YAML file that contains variables and topology information. This file can either be edited manually or can be autogenerated using another project called [[https://github.com/redhat-openstack/khaleesi-settings | khaleesi-settings]]. | ||
- | For our purposes it is easier to just modify an existing ksgen_settings file. Please use this as a template: [[ksgen_settings Intel example| https://gist.github.com/trozet/c5bde608822d8e6b063a]]. The configuration make look like a lot at first, but you only need to modify two pieces: | + | For our purposes it is easier to just modify an existing ksgen_settings file. Please use this as a template: [[https://gist.github.com/trozet/c5bde608822d8e6b063a| ksgen_settings Intel example]]. The configuration make look like a lot at first, but you only need to modify two pieces: |
=== Modify External Network === | === Modify External Network === | ||
You will notice part of the config that looks like this: | You will notice part of the config that looks like this: | ||
- | <code> | + | <code yaml> |
public_allocation_end: 10.2.84.71 | public_allocation_end: 10.2.84.71 | ||
skip: | skip: | ||
Line 69: | Line 73: | ||
The second piece of the configuration you need to change is the nodes dictionary. This configuration provides your Host inventory to ansible: | The second piece of the configuration you need to change is the nodes dictionary. This configuration provides your Host inventory to ansible: | ||
- | <code> | + | <code yaml> |
nodes: | nodes: | ||
compute: | compute: | ||
Line 121: | Line 125: | ||
</code> | </code> | ||
+ | Note: This is also a good time to mention that you should have tempest.pp applied to your tempest host group in Foreman. It contains a package required for Tempest to run. | ||
+ | |||
+ | ==== Running Khaleesi ==== | ||
+ | Now that you have Khaleesi installed and a configuration file, you are ready to rebuild your nodes. To run simply execute the following inside of your Khaleesi directory: | ||
+ | |||
+ | <code> | ||
+ | ./run.sh --use ../ksgen_settings.yml playbooks/quickstack.yml --no-logs -vv | ||
+ | </code> | ||
+ | |||
+ | The sequence of execution is as follows: | ||
+ | - Issue a reboot and rebuild to Foreman nodes given in your configuration | ||
+ | - Wait for Foreman to finish installing CentOS7 on your nodes | ||
+ | - Wait for puppet to check in and OPNFV puppet to install OPNFV target system | ||
+ | - Install and Configure the Tempest node | ||
+ | - Execute Tempest | ||
+ | |||
+ | ==== Checking Tempest Results ==== | ||
+ | Assuming everything executed you will get a "nosetests.xml" file in your Khaleesi/playbooks directory. This contains all of your Tempest test case results. | ||
+ | |||
+ | The first line will give you the overall execution summary, followed by individual results: | ||
+ | <code xml> | ||
+ | <testsuite errors="0" failures="179" name="" tests="2141" time="880.284"> | ||
+ | <testcase classname="" name="setUpClass (tempest.api.compute.flavors.test_flavors.FlavorsV3Test)" time="0.000"> | ||
+ | <skipped>FlavorsV3Test skipped as nova v3 api is not available</skipped> | ||
+ | </testcase> | ||
+ | <testcase classname="tempest.api.compute.admin.test_quotas.QuotasAdminTestJSON" name="test_get_updated_quotas[gate]" time="0.394"/> | ||
+ | </code> | ||
+ | |||
+ | As you can see from the above, a skipped or failed test case will contain that XML tag inside of the testcase tag. If a test case passed it will smiply show up as you see in the 3rd entry with no subtag. |