Giter Club home page Giter Club logo

micro-qa's Introduction

micro-qa

Self Contained Automated Test Environment

Setting up with Virtual Box

  1. Download and install VirtualBox

  2. Download and install Vagrant >= 1.6.3

  3. Do a fork of MicroQA project (requires github account for information on how to set up a Github account, refer to the following URL: http://help.github.com/set-up-git-redirect/). On information on how to fork a project, refer to the following link: http://help.github.com/fork-a-repo/.

  4. Clone your fork to your local machine.

  5. Install the Vagrant plugins:

         vagrant plugin install vagrant-berkshelf --plugin-version '>= 2.0.1'
         vagrant plugin install vagrant-omnibus
    
  6. Once inside the repository run "vagrant up". This will download a virtual machine, boot it, and install MicroQA.

  7. Login to MicroQA on your browser by visiting: http://localhost:8080

Setting up with AWS or Eucalyptus

  1. Download and install Vagrant >= 1.6.3

  2. Install the Vagrant plugins:

     vagrant plugin install vagrant-aws  --plugin-version '== 0.5.0'
         vagrant plugin install vagrant-berkshelf --plugin-version '>= 2.0.1'
         vagrant plugin install vagrant-omnibus
    
  3. Do a fork of MicroQA project (requires github account for information on how to set up a Github account, refer to the following URL: http://help.github.com/set-up-git-redirect/). On information on how to fork a project, refer to the following link: http://help.github.com/fork-a-repo/.

  4. Clone your fork to your local machine.

  5. Edit the following parameters in the Vagrantfile:

    aws.access_key_id = "XXXXXXXXXXXXXXXXXX"
    aws.secret_access_key = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
    aws.instance_type = "m1.medium"
    ## This CentOS 6 EMI needs to have the following commented out of /etc/sudoers,
    ## Defaults    requiretty
    aws.ami = "emi-1873419A"
    aws.security_groups = ["default"]
    aws.region = "eucalyptus"
    aws.endpoint = "http://10.0.1.91:8773/services/Eucalyptus"
    aws.keypair_name = "vic"
    override.ssh.username ="root"
    override.ssh.private_key_path ="/Users/viglesias/.ssh/id_rsa"
    
  6. Once inside the repository run "vagrant up --provider=aws". This will run a virtual machine, and install MicroQA in your cloud.

  7. Login to MicroQA on your browser by visiting: http://<instance-ip>:8080

Guidelines for Contributing to MicroQA

  1. Create a test job from the MicroQA Jenkins instance (or edit an existing job)
  • Click the New Job link.
  • Enter a descriptive job name and use the Copy existing job option to pick a job that is similar to what you want to do (or a new empty job is there are no similar jobs).
  • After the job is created, then Configure the job to do what you want it to do.
  • Add a description to the job by clicking edit description on the job page. The description should be very clear about what the job does. Make sure that your job's use case is general enough to be useful to other people.
  1. Test your job and ensure it's working like you want.

  2. From your micro-qa directory login to the instance using the command: "vagrant ssh"

  3. Run the command "jenkins-sync" inside the vagrant instance.

  4. Exit the vagrant shell then commit your changes to the MicroQA repo.

  5. Once your commit is available on GitHub submit a pull request to the upstream repository.

Make sure that each pull request you submit contains a single new job, or fixes to a single job. Try not to combine too many changes in a single pull request.

micro-qa's People

Contributors

ccassler avatar gregdek avatar kushaldas avatar kyolee310 avatar mspaulding06 avatar paulweiss avatar shaon avatar tbeckham avatar viglesiasce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

micro-qa's Issues

cloud::frontend group should include UFS

Cloud Frontend group should also include user facing services since supported topology is having 1 UFS collocated w/ CLC

  group 'frontend' do
    recipe 'eucalyptus::cloud-controller'
    recipe 'eucalyptus::register-components'
    recipe 'eucalyptus::walrus'
    recipe 'eucalyptus::user-console'

Upgrade view is a multijob view which ends up including all jobs

@tbeckham

The upgrade view needs to be reconstructed as a sectioned view so that it has the sequence at the top and the individual tests at the bottom. Currently its a Multi Job View which sadly includes all multijobs. I am working on an example sectioned view for the Tests tab that you can use as reference.

Need a way to use enterprise packages without a certificate file for testing

Eucalyptus provisioning with enterprise packages fails if there is no certificate and key files specified.

[2014-07-08T16:45:03Z] PID[3862] TID[k53x4] INFO: [10.111.1.16 ](SSH) /var/chef/cache/cookbooks/eucalyptus/recipes/default.rb:

 69:  
 70:  if Eucalyptus::Enterprise.is_enterprise?(node)
 71:    cert_file = "/etc/pki/tls/certs/eucalyptus-enterprise.crt"
 72:    key_file = "/etc/pki/tls/private/eucalyptus-enterprise.key"
 73:    file cert_file do
 74:      content <<-EOH
 75:      -----BEGIN CERTIFICATE-----
 76>>     #{node['eucalyptus']['enterprise']['clientcert']}
 77:      -----END CERTIFICATE-----
 78:      EOH
 79:      mode "0700"
 80:    end
 81:    file key_file do
 82:      content <<-EOH
 83:      -----BEGIN RSA PRIVATE KEY-----
 84:      #{node['eucalyptus']['enterprise']['clientkey']}
 85:      -----END RSA PRIVATE KEY-----
�[0m

vagrant provision fails if pip setuptools < 17.1 in /vagrant

Args:
vagrant provision

Symptoms:
==> default: Ran /vagrant/jenkins/share/eutester-base/bin/pip install --pre eutester returned 1
==> default: [2015-08-13T13:26:33+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Reason:
==> default: Downloading/unpacking mock (from eutester)
==> default: Running setup.py egg_info for package mock
==> default: mock requires setuptools>=17.1. Aborting installation
==> default: Complete output from command python setup.py egg_info:
==> default: mock requires setuptools>=17.1. Aborting installation

[root@ip-10-112-26-206 ~]# /vagrant/jenkins/share/eutester-base/bin/pip list | grep setuptools
setuptools (0.9.8)

Solution:
/vagrant/jenkins/share/eutester-base/bin/pip install --upgrade setuptools

This could be done manually but each 'vagrant provision' erases the previous alterations as it overwrites everything in /vagrant.
Can whatever creates /vagrant/jenkins/share/eutester-base/bin/pip (possibly cookbooks/micro-qa/recipes/eutester.rb) be adjusted so that it updates setuptools immediately afterwards?

Handle Spaces in Bootstrap Json

Currently a space after a json element is not handled. We should handle it for a more robust/forgiving system

EX spaces after cc and sc ips:

          "PARTI00": {
            "cc-1": "10.111.1.178 ",
            "sc-1": "10.111.1.178 ",
            "storage-backend": "netapp",
            "nodes": "10.111.5.3"
          }

Prohibion of the micro-qa failed

I was trying to reuse a box created earlier. Last few lines are below

  • cd /
  • wget -q https://selenium.googlecode.com/files/selenium-server-2.35.0.zip
  • unzip selenium-server-2.35.0.zip
    Archive: selenium-server-2.35.0.zip
    replace selenium-2.35.0/CHANGELOG? [y]es, [n]o, [A]ll, [N]one, [r]ename: error: invalid response [exit]
    replace selenium-2.35.0/CHANGELOG? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
    (EOF or read error, treating as "[N]one" ...)
  • dbus-uuidgen
    /tmp/vagrant-shell: line 73: /var/lib/dbus/machine-id: No such file or directory
  • Xvfb :0 -ac
  • bash
  • export DISPLAY=:0
  • DISPLAY=:0
  • nohup java -jar selenium-2.35.0/selenium-server-standalone-2.35.0.jar -trustAllSSLCertificates
  • curl -L https://www.opscode.com/chef/install.sh
    Feb 20, 2014 5:38:26 PM org.openqa.grid.selenium.GridLauncher main
    INFO: Launching a standalone server
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 017:38:27.793 INFO - Java: Oracle Corporation 24.45-b08
    17:38:27.794 INFO - OS: Linux 2.6.32-358.el6.x86_64 amd64
    17:38:27.805 INFO - v2.35.0, with Core v2.35.0. Built from revision c916b9d
    17:38:28.020 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
    17:38:28.022 INFO - Version Jetty/5.1.x
    17:38:28.023 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
    17:38:28.024 INFO - Started HttpContext[/selenium-server,/selenium-server]
    17:38:28.025 INFO - Started HttpContext[/,/]
    100 13347 100 13347 0 0 6097 0 0:00:02 0:00:02 --:--:-- 18036
    Downloading Chef for el...
    downloading https://www.opscode.com/chef/metadata?v=&prerelease=false&p=el&pv=6&m=x86_64
    to file /tmp/install.sh.3823/metadata.txt
    trying wget...
    url https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-11.10.2-1.el6.x86_64.rpm
    md5 53af40ca3ba1787e87b7b670c21fd9cc
    sha256 89b32fd69674c33de2d037d02ef01e4fa8698743eb8d0c36c01af02daae1c0f0
    downloaded metadata file looks valid...
    downloading https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chef-11.10.2-1.el6.x86_64.rpm
    to file /tmp/install.sh.3823/chef-11.10.2-1.el6.x86_64.rpm
    trying wget...
    17:38:42.863 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@15c955b7
    17:38:42.863 INFO - Started HttpContext[/wd,/wd]
    17:38:42.866 WARN - Failed to start: [email protected]:4444
    Exception in thread "main" java.net.BindException: Selenium is already running on port 4444. Or some other service is.
    at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:491)
    at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:300)
    at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
    at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:93)

Bootstrap build parameters "<YOUR MACHINE IP>" is ambiguous.

The deploy job node bootstrap build parameters value "" is ambiguous. Does this mean the IP of the VM/host that MicroQA is running on? I think it should be The doc here helps explain bootstrap manifest

{
  "nodes": [
    {
      "groups": ["cloud::full","node::default"],
      "hosts": ["<YOUR MACHINE IP>"]
    }
  ]
}

Incorrect interface used to garner IP for chef api_url

With a fresh install of Micro-QA in virtualbox via vagrant up, the motherbrain config is set with the IP from eth0 but it should get the IP from eth1. I had to manually edit the file /root/.mb/config.json to the correct url so that clients could reach and register with the chef server.

yum timeouts should kill the install

A frequent issue I have when installing is yum timeouts/failures. To wit:

Downloading Packages:
http://pkg.jenkins-ci.org/redhat/jenkins-1.546-1.1.noarch.rpm: [Errno 12] Timeout on http://ftp-nyc.osuosl.org/pub/jenkins/redhat/jenkins-1.546-1.1.noarch.rpm: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 120 seconds')
Trying other mirror.

Error Downloading Packages:
  jenkins-1.546-1.1.noarch: failure: jenkins-1.546-1.1.noarch.rpm from jenkins: [Errno 256] No more mirrors to try.

+ chkconfig jenkins on
error reading information on service jenkins: No such file or directory

Should catch yum install errors and abort the install, since it then takes an additional 15-20 minutes to realize that the install has failed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.