...
Test Environment Setup
https://github.com/RackHD/RackHD RackHD test repository in open source
https://eos2git.cec.lab.emc.com/OnRack/dellemc-test Internal reposity for local configs, scripts, miscellaneous - that don't meet open source criteria or sensitive info Plymouth lab configuration is contained in config-mn.
Download Rackhd:
This gets the latest master branch from github.
git clone https://github.com/RackHD/RackHD rackhd
Download the internal repository:
This gets the latest master branch from internal github.
git clone https://eos2git.cec.lab.emc.com/OnRack/dellemc-test dellemc-test
If desired, local lab configs and internal tests can be copied into your working directory.
cd rackhd/test
cp -Rp dellemc-test/* .
Setup the virtual environment:
Note a separate environment is needed to run on Ubuntu14 verses Ubuntu16.
In the MN lab, test servers lab03-lab15 run Ubuntu14, lab15-lab24 run ubuntu16.
Name your environment to help yourself out, name it so that you know which OS you ran it on, if you run on both.
cd rackhd/test
./mkenv.sh eh_ubuntu14
source myenv_eh_ubuntu14
Test Beds supported Physical stacks - Reserve hardware stack via booked for MN, physical stacks exist in Hopkington, Austin, and Shanghai as well.
Vagrant virtual stacks - setup a virtual stack via virtrual box on your local laptop or virtual machine of choice - default stack is vagrant and localhost
...
https://github.com/RackHD/RackHD/tree/master/test
The test tree has the following structure:
rackhd/test/
- deploy (RackHD deployment and stack initialization scripts)
- common (shared framework and library import files)
- modules (miscellaneous library modules, logger and amqp being deprecated)
- templates (sample scripts)
- util (non-test utilities and helper scripts)
- tests (test scripts not included in the harness)
- Vagrantfile - vagrant installation configuration file
All testcode is written in Python 2.7x and conforms to Python unittest standards as defined here:
https://docs.python.org/2/library/unittest.html
...
For run_tests.py, the config files used are:
install_default.json - this file includes parameters needed for your local environment installation. Default
is for vagrant install, modify as needed for your lab. rackhd_default.json - this Default is for vagrant install, modify as needed for your lab.
rackhd_default.json - this file is the rackhd config.json that gets installed on your rackhd appliance. /opt/monorail/config.json
Default is for vagrant install. It should be updated based on your lab environment. stack_config.json environment.
stack_config.json - this file contains lab specific stack configurations, default is for vagrant stack. - this file contains lab specific stack configurations, default is for vagrant stack.
Used for communication to your test bed.
credentials_default.json - this file contains any username/password credentials for your lab, your hosts, nodes, switches, etc.
<my-config>.json - this file can contain any special parameters needed for a specific script, added via command line option -extra
...
config.ini - this file contains the rackhd defaults and test bed parameters
settings.py - this file reads the config.ini file to populate parameters.
Overrides can be done in here for certain parameters.
...
1. Install via Vagrant
Follow the directions in the RackHD/RackHD/test/ readme file
https://github.com/RackHD/RackHD/blob/master/test/README.md
2. Install from Jenkins job (MN Lab)
https://roebling.hwimo.lab.emc.com/jenkins/job/Running-Tests/job/Install-RackHD-on-any-Stack/ - this job will:
This job will run the deploy script run_rackhd_installer.py which does the following:
- install the ubuntu16 ova onto the stack via deploy script os_ova_install.py
- install latest rackhd code via deploy rackhd_source_install.py
- initialize the stack via deploy rackhd_stack_init.py
3. Installing via rackhd/test/deploy scripts (MN Lab) This allows you to deploy the latest rackhd code by hand as needed.
...