Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #608 from caskdata/feature/import-cdap-fix
Browse files Browse the repository at this point in the history
Feature/import cdap fix
  • Loading branch information
albertshau committed Sep 26, 2014
2 parents 322dadf + dfa520b commit 078dc5a
Show file tree
Hide file tree
Showing 34 changed files with 438 additions and 65 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# cdap cookbook

[![Cookbook Version](http://img.shields.io/cookbook/v/cdap.svg)](https://supermarket.getchef.com/cookbooks/cdap)
[![Build Status](http://img.shields.io/travis/caskdata/cdap_cookbook.svg)](http://travis-ci.org/caskdata/cdap_cookbook)

# Requirements

* Oracle Java JDK 6+ (provided by `java` cookbook)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
default['cdap']['repo']['url'] = 'http://repository.cask.co/ubuntu/precise/amd64/releases'
else
default['cdap']['repo']['url'] = 'http://repository.cask.co/centos/6/x86_64/releases'
default['cdap']['repo']['key_url'] = 'http://repository.cask.co/centos/6/x86_64/pubkey.gpg'
end
# Repository components to use
default['cdap']['repo']['components'] = ['releases']
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cdap",
"description": "Installs/Configures Cask DAP (CDAP)",
"long_description": "# cdap cookbook\n\n# Requirements\n\n* Oracle Java JDK 6+ (provided by `java` cookbook)\n* Hadoop 2.0+ HDFS, YARN, ZooKeeper, and HBase (provided by `hadoop` cookbook)\n* Node.JS 0.8.16+ (provided by `nodejs` cookbook, tested with `1.3.0` and `2.1.0`)\n\n# Usage\n\n# Attributes\n\n* `['cdap']['conf_dir']` - The directory used inside `/etc/cdap` and used via the alternatives system. Default `conf.chef`\n* `['cdap']['repo']['url']` - Specifies URL for fetching packages\n* `['cdap']['repo']['components']` - Repository components to use for APT repositories\n\n# Recipes\n\n* `config` - Configures all services\n* `default` - Installs `cdap` base package and performs configuration of `cdap-site.xml`\n* `fullstack` - Installs all packages and services on a single node\n* `gateway` - Installs the `cdap-gateway` package and `cdap-gateway` and `cdap-router` services\n* `init` - Sets up HDFS\n* `kafka` - Installs the `cdap-kafka` package and `cdap-kafka-server` service\n* `master` - Installs the `cdap-master` package and service\n* `repo` - Sets up package manager repositories for cdap packages\n* `security` - Installs the `cdap-security` package and `cdap-auth-server` service\n* `web_app` - Installs the `cdap-web-app` package and service\n\n# Author\n\nAuthor:: Cask (<[email protected]>)\n\n# Testing\n\nThis cookbook requires the `vagrant-omnibus` and `vagrant-berkshelf` Vagrant plugins to be installed.\n\n# License\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this software except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n",
"description": "Installs/Configures Cask Data Application Platform (CDAP)",
"long_description": "# cdap cookbook\n\n[![Cookbook Version](http://img.shields.io/cookbook/v/cdap.svg)](https://supermarket.getchef.com/cookbooks/cdap)\n[![Build Status](http://img.shields.io/travis/caskdata/cdap_cookbook.svg)](http://travis-ci.org/caskdata/cdap_cookbook)\n\n# Requirements\n\n* Oracle Java JDK 6+ (provided by `java` cookbook)\n* Hadoop 2.0+ HDFS, YARN, ZooKeeper, and HBase (provided by `hadoop` cookbook)\n* Node.JS 0.8.16+ (provided by `nodejs` cookbook, tested with `1.3.0` and `2.1.0`)\n\n# Usage\n\n# Attributes\n\n* `['cdap']['conf_dir']` - The directory used inside `/etc/cdap` and used via the alternatives system. Default `conf.chef`\n* `['cdap']['repo']['url']` - Specifies URL for fetching packages\n* `['cdap']['repo']['components']` - Repository components to use for APT repositories\n\n# Recipes\n\n* `config` - Configures all services\n* `default` - Installs `cdap` base package and performs configuration of `cdap-site.xml`\n* `fullstack` - Installs all packages and services on a single node\n* `gateway` - Installs the `cdap-gateway` package and `cdap-gateway` and `cdap-router` services\n* `init` - Sets up HDFS\n* `kafka` - Installs the `cdap-kafka` package and `cdap-kafka-server` service\n* `master` - Installs the `cdap-master` package and service\n* `repo` - Sets up package manager repositories for cdap packages\n* `security` - Installs the `cdap-security` package and `cdap-auth-server` service\n* `web_app` - Installs the `cdap-web-app` package and service\n\n# Author\n\nAuthor:: Cask (<[email protected]>)\n\n# Testing\n\nThis cookbook requires the `vagrant-omnibus` and `vagrant-berkshelf` Vagrant plugins to be installed.\n\n# License\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this software except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n",
"maintainer": "Cask",
"maintainer_email": "[email protected]",
"license": "All rights reserved",
Expand All @@ -24,20 +24,28 @@
"krb5_utils": ">= 0.0.0"
},
"recommendations": {

},
"suggestions": {

},
"conflicting": {

},
"providing": {

},
"replacing": {

},
"attributes": {

},
"groupings": {

},
"recipes": {

},
"version": "0.1.6"
}
"version": "0.1.7"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
maintainer 'Cask'
maintainer_email '[email protected]'
license 'All rights reserved'
description 'Installs/Configures Cask DAP (CDAP)'
description 'Installs/Configures Cask Data Application Platform (CDAP)'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.6'
version '0.1.7'

%w(apt hadoop java nodejs ntp yum yum-epel).each do |cb|
depends cb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
yum_repository 'cdap' do
description 'CDAP YUM repository'
url node['cdap']['repo']['url']
gpgkey node['cdap']['repo']['key_url']
gpgcheck false
action :add
end
when 'debian'
Expand All @@ -33,6 +35,7 @@
components node['cdap']['repo']['components']
action :add
arch 'amd64'
trusted true
key "#{node['cdap']['repo']['url']}/pubkey.gpg"
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ HashSyntax:
Enabled: False
SingleSpaceBeforeFirstArg:
Enabled: false
AsciiComments:
Enabled: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://api.berkshelf.com'

metadata
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Unreleased

## v1.0.2

Update README to new attribute layout via @joraff
Simplify default realm configuration

## v1.0.1

Fix a bug with the new default realm attributes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
source 'https://rubygems.org'

gem 'berkshelf', '~> 2.0'
gem 'chefspec', '~> 3.1'
gem 'chef-zero', '~> 1.7'
gem 'berkshelf', '~> 3.1'
gem 'chefspec', '~> 4.0'
gem 'rspec', '~> 3.0'
gem 'chef-zero', '~> 2.0'
gem 'foodcritic', '~> 3.0'
gem 'rubocop', '~> 0.21.0'
gem 'rubocop-checkstyle_formatter', require: false
gem 'rubocop', '~> 0.21'

group :integration do
gem 'test-kitchen'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
krb5 Cookbook
=============

[![Cookbook Version](http://img.shields.io/cookbook/v/krb5.svg)](https://supermarket.getchef.com/cookbooks/krb5)
[![Build Status](https://secure.travis-ci.org/atomic-penguin/cookbook-krb5.svg?branch=master)](http://travis-ci.org/atomic-penguin/cookbook-krb5)


Expand Down Expand Up @@ -105,11 +106,15 @@ a single realm configuration, using the OHAI domain attribute for the realm.
name "krb5_domain"
description "Configures Kerberos 5 Authentication for domain realm"
override_attributes "krb5" => {
"default_realm_kdcs" => [
"kdc1.example.com",
"kdc2.example.com",
"kdc3.example.com"
]
"krb5_conf" => {
"realms" => {
"default_realm_kdcs" => [
"kdc1.example.com",
"kdc2.example.com",
"kdc3.example.com"
]
}
}
}
run_list "recipe[krb5]"
```
Expand All @@ -121,17 +126,23 @@ The second example is a role for multiple Kerberos realms.
name "krb5_multirealm"
description "Configures Kerberos 5 Authentication for example.com and example.org realm"
override_attributes "krb5" => {
"default_realm" = > "example.com",
"realms" => [
"example.com",
"example.org"
],
"default_realm_kdcs" => [
"kdc1.example.com",
"kdc2.example.com",
"kdc3.example.com"
],
"lookup_kdcs" => "true"
"krb5_conf" => {
"libdefaults" => {
"default_realm" => "example.com",
"dns_lookup_kdc" => "true"
},
"realms" => {
"realms" => [
"example.com",
"example.org"
],
"default_realm_kdcs" => [
"kdc1.example.com",
"kdc2.example.com",
"kdc3.example.com"
],
}
}
}
run_list "recipe[krb5]"
```
Expand All @@ -140,9 +151,12 @@ License and Authors
-------------------

Author:: Eric G. Wolfe

Author:: Chris Gianelloni
Copyright:: 2012-2014, Eric G. Wolfe
Copyright:: 2014 Cask Data, Inc.

Copyright:: © 2012-2014 Eric G. Wolfe

Copyright:: © 2014 Cask Data, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ end
# rubocop rake task
desc 'Ruby style guide linter'
task :rubocop do
sh 'rubocop'
end

# rubocop jenkins rake task
desc 'Ruby style guide - checkformat output'
task :rubocop_checkformat do
sh 'rubocop --require rubocop/formatter/checkstyle_formatter --format Rubocop::Formatter::CheckstyleFormatter > checkstyle.xml'
sh 'rubocop --fail-level E'
end

# test-kitchen task
Expand Down Expand Up @@ -47,4 +41,4 @@ end
task :default => %w(foodcritic rubocop chefspec)

# jenkins tasks format for metric tracking
task :jenkins => %w(foodcritic rubocop_checkformat chefspec)
task :jenkins => %w(foodcritic rubocop chefspec)
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure('2') do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.

# We *need* vagrant-omnibus for these box images
config.omnibus.chef_version = '11.4.0'

config.vm.hostname = 'krb5-berkshelf.local'

# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = 'opscode-centos-6.5'

# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = 'https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.5_provisionerless.box'

# Assign this VM to a host-only network IP, allowing you to access it
# via the IP. Host-only networks can talk to the host machine as well as
# any other machines on the same network, but cannot be accessed (through this
# network interface) by any external networks.
config.vm.network :private_network, ip: '33.33.33.10'

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.

# config.vm.network :public_network

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
# config.vm.synced_folder "../data", "/vagrant_data"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider :virtualbox do |vb|
# # Don't boot with headless mode
# vb.gui = true
#
# Use VBoxManage to customize the VM. For example to change memory:
vb.customize ['modifyvm', :id, '--memory', '1024']
end
#
# View the documentation for the provider you're using for more
# information on available options.

# The path to the Berksfile to use with Vagrant Berkshelf
# config.berkshelf.berksfile_path = "./Berksfile"

# Enabling the Berkshelf plugin. To enable this globally, add this configuration
# option to your ~/.vagrant.d/Vagrantfile file
config.berkshelf.enabled = true

# An array of symbols representing groups of cookbook described in the Vagrantfile
# to exclusively install and copy to Vagrant's shelf.
# config.berkshelf.only = []

# An array of symbols representing groups of cookbook described in the Vagrantfile
# to skip installing and copying to Vagrant's shelf.
# config.berkshelf.except = []

config.vm.provision :chef_solo do |chef|
chef.json = {
:mysql => {
:server_root_password => 'rootpass',
:server_debian_password => 'debpass',
:server_repl_password => 'replpass'
},
:java => {
:install_flavor => 'oracle',
:jdk_version => '6',
:oracle => {
:accept_oracle_download_terms => true
}
},
:krb5 => {
:default_realm_kdcs => ['localhost'],
:default_realm_admin_server => 'localhost'
}
}

chef.run_list = [
'recipe[krb5::default]',
'recipe[krb5::kadmin]'
]
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Cookbook Name:: krb5
# Attributes:: default
#
# Copyright © 2012, Eric G. Wolfe
# Copyright © 2013, Gerald L. Hevener Jr., M.S.
# Copyright © 2012 Eric G. Wolfe
# Copyright © 2013 Gerald L. Hevener Jr., M.S.
# Copyright © 2014 Cask Data, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -49,7 +49,7 @@
end

default['krb5']['default_logging'] = 'FILE:/var/log/krb5libs.log'
default['krb5']['default_realm'] = node['domain']
default['krb5']['default_realm'] = node['domain'].upcase
default['krb5']['realms'] = [node['domain']]
default['krb5']['default_realm_kdcs'] = []
default['krb5']['lookup_kdc'] = 'true'
Expand All @@ -58,11 +58,11 @@
default['krb5']['forwardable'] = 'true'

default_realm =
if node['krb5']['default_realm']
node['krb5']['default_realm'].upcase
elsif node['krb5'].key?('krb5_conf') && node['krb5']['krb5_conf'].key?('libdefaults') &&
if node['krb5'].key?('krb5_conf') && node['krb5']['krb5_conf'].key?('libdefaults') &&
node['krb5']['krb5_conf']['libdefaults'].key?('default_realm')
node['krb5']['krb5_conf']['libdefaults']['default_realm'].upcase
elsif node['krb5']['default_realm']
node['krb5']['default_realm'].upcase
else
'LOCAL'
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Put files/directories that should be ignored in this file.
# Lines that start with '# ' are comments.

# gitignore
\.gitignore

# emacs
*~

# vim
*.sw[a-z]

# subversion
*/.svn/*

# travis
\.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
maintainer 'Chris Gianelloni'
maintainer_email '[email protected]'
license 'Apache 2.0'
description 'Installs and configures krb5 authentication'
description 'Installs and configures Kerberos V authentication'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '1.0.1'
version '1.0.4'

%w(redhat centos scientific amazon ubuntu debian suse).each do |os|
supports os
Expand Down
Loading

0 comments on commit 078dc5a

Please sign in to comment.