Skip to content

Instantly share code, notes, and snippets.

@miharp
Last active September 15, 2015 18:30
Show Gist options
  • Save miharp/2e4ac2a28bef3a3f3c14 to your computer and use it in GitHub Desktop.
Save miharp/2e4ac2a28bef3a3f3c14 to your computer and use it in GitHub Desktop.

Download and install Intellij

  • Add Plugins
    • Python
    • Vagrant
    • Bash

Checkout Hadoop Builder from subversion

svn co https://continuum.td.teradata.com/svn/HadoopBuilder/trunk/ HadoopBuilder-Trunk
Checkout automated tests from svn to HadoopBuilder-Trunk directory
    cd HadoopBuilder-Trunk
    svn co https://continuum.td.teradata.com/svn/APE/automated_tests/branches/cdh-5.4 automated_tests_5.4 
Create virtualenv with needed packages
    virtualenv automated_tests
    source ./automated_tests/bin/activate
    pip install fabric
    pip install teamcity-messages
Create a new vagrant build server VM in Hadoop Builder directory
wget -N http://tully1.labs.teradata.com/repo/Images/SLES11_SP3/SLE-11-SP3-SDK-DVD-x86_64-GM-DVD1.iso
wget -N http://tully1.labs.teradata.com/repo/Images/SLES11_SP3/SLES-11-SP3-TDC-v11.3.0-GCA-DVD.iso
vagrant init sles11sp3BuildServer http://tully1.labs.teradata.com/repo/Vagrant/boxes/tdc-sles-virtualbox-11.03.0-GCA-um.box
vagrant up #Takes a few minutes
vagrant ssh
su - #Password is root
cd /vagrant
sh ./src/scripts/sandbox/vagrant/sles11sp3_toolchain.sh #Get some coffee
. /root/.bash_profile
Open HadoopBuilder-Trunk directory in Intellij
  • Add Project SDK in Intellij
    • Project Structure->Project SDK->New Python SDK
    • Select the automated_tests directory we created in HadoopBuilder-Trunk
In Intellij->Tools->Start ssh session and select Vagrant
  • Should see new ssh window open for the vagrant vm
In Intellij ssh terminal window
su -
cd /vagrant
mkdir -p bin/releases
ant BuildRelease_CDH -Dbuild.number=999
Update your test file to copy local rpm to remote host.
cdh.tasks.FileUtils.CopyTo('primary_master', "../../HadoopBuilder-Trunk/bin/releases/RPMS/noarch/teradata-hadoop-builder-cdh-5.4.20.999-1.noarch.rpm", "/var/opt/teradata/packages/hadoop")
Back in Intellij
  • Open testrunner.py from automated_tests_5.4/bin
  • Create a new Debug configuration if you do not already have one.
    • Name it something like this, testrunner_vm2-c10.
    • Script Paramaters: -j ../config/vm2-c10/config -l ../config/vm2-c10/tests
  • Run or Debug without needing TeamCity!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment