Skip to content

Instantly share code, notes, and snippets.

View kornypoet's full-sized avatar

Travis Dempsey kornypoet

View GitHub Profile
source'https://rubygems.org'
gem 'rest-client', '~> 1.6'
gem 'rspec', '~> 2.0'
gem 'capybara', '~> 2.3.0'
gem 'selenium-webdriver', '~> 2.42.0'
gem 'serverspec', '~> 1.9.0'
gem 'headless'
gem 'poltergeist'
gem 'pry'
;;; General Emacs Settings ;;;
;; Disable startup message
(setq inhibit-startup-message t)
;; Disable menu and tool bar
(menu-bar-mode -1)
(when window-system
(tool-bar-mode -1))
define install_waterline() {
exec { "Download tar ${title}":
command => "wget https://s3-us-west-1.amazonaws.com/wld-product-downloads/${title}",
onlyif => 'test ! -d /opt/waterlinedata',
user => 'root',
group => 'root',
cwd => '/opt',
require => Exec[waterlinedata_user_hdfs], #TODO: Maybe include whatever this is as well?
} ->
# Default parameter values for foundation/builder.rb
# Name of an existing EC2 KeyPair to enable SSH access to the instances
# Stack Default value
# KeyName:
KeyName: goblin
# Initial Password for the admin account.
# Stack Default value
# IpaAdminPassword: qwerty7asdf
# Stop existing cluster
/usr/local/rvm/gems/ruby-1.9.3-p547@global/bin/bundle exec bin/weavr.rb hwx stop
# Delete the old blueprint, especially if uploading a new configuration
# This assumes you are on the Ambari server and you did not alter the blueprint name at all
curl -X DELETE -H 'X-Requested-By: your mom' -u admin:admin 'http://localhost:8080/api/v1/blueprints/dev_service_blueprint'
# On all nodes
# Blow away any possible remaining data
sudo rm -r /data/hadoop/*
---
LineLength:
Max: 120
Style/Documentation:
Enabled: false
Style/Encoding:
EnforcedStyle: when_needed
Style/Semicolon:
AllowAsExpressionSeparator: true
Style/SingleLineMethods:
import argparse
import logging
import subprocess
import sys
import time
# Commandline args
parser = argparse.ArgumentParser(description='Deploy a CDH5 Hadoop cluster using the Cloudera Manager API')
parser.add_argument('cluster', nargs='?', default='cdh', help='Name of the cluster to interact with')
parser.add_argument('-c', '--host', default='localhost', help="Hostname of the Cloudera Manager API. Default 'localhost'")
#!/usr/bin/env python
import argparse
import subprocess
import sys
import time
from cm_api.api_client import ApiResource
from cm_api.endpoints.services import ApiServiceSetupInfo
parser = argparse.ArgumentParser(description='Deploy a CDH5 Hadoop cluster using the Cloudera Manager API')
#!/usr/bin/env python
import argparse
import subprocess
import sys
import time
from cm_api.api_client import ApiResource
from cm_api.endpoints.services import ApiServiceSetupInfo
parser = argparse.ArgumentParser(description='Deploy a CDH5 Hadoop cluster using the Cloudera Manager API')
# init.pp
class foo(
$var1 = undef,
$var2 = undef,
$var3 = undef
) {
include foo::prepare
include foo::install