itamae-plugin-recipe-hadoop 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d7de592062d83843c93d28c6f4501d37e528422ab2b956b016a4669f33c07765
4
+ data.tar.gz: f1918a567f415886abaff1cbb206f07325aa2bcba94e780f0ece778003dd5f4b
5
+ SHA512:
6
+ metadata.gz: 32f3d4f535e4b2cf309a429033b3220885f72d98f54fd5f45b8e2686c5d4e4f4b8fbc6bab60f12ac7af6930301a7f8745a5e4fbf926cfbd47bdfa595ae6fb818
7
+ data.tar.gz: e152ee479e579fff599ec19d9f6f1f8b603ddcffeabb339c5cc786e65981196750a2a8f294f60c26faa20f891817e40ebd3c37f79c7daa6726b849295670b554
@@ -0,0 +1,8 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>itamae-plugin-recipe-hadoop</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ </buildSpec>
9
+ <natures>
10
+ </natures>
11
+ </projectDescription>
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at matsuda@lab.acs-jp.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in itamae-plugin-recipe-hadoop.gemspec
4
+ gemspec
@@ -0,0 +1,41 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ itamae-plugin-recipe-hadoop (0.1.0)
5
+ itamae (~> 1.10, >= 1.10.4)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ansi (1.5.0)
11
+ hashie (4.1.0)
12
+ itamae (1.10.6)
13
+ ansi
14
+ hashie
15
+ schash (~> 0.1.0)
16
+ specinfra (>= 2.64.0, < 3.0.0)
17
+ thor
18
+ net-scp (2.0.0)
19
+ net-ssh (>= 2.6.5, < 6.0.0)
20
+ net-ssh (5.2.0)
21
+ net-telnet (0.1.1)
22
+ rake (13.0.1)
23
+ schash (0.1.2)
24
+ sfl (2.3)
25
+ specinfra (2.82.12)
26
+ net-scp
27
+ net-ssh (>= 2.7)
28
+ net-telnet (= 0.1.1)
29
+ sfl
30
+ thor (1.0.1)
31
+
32
+ PLATFORMS
33
+ ruby
34
+
35
+ DEPENDENCIES
36
+ bundler (~> 2.0)
37
+ itamae-plugin-recipe-hadoop!
38
+ rake (>= 12.3.3)
39
+
40
+ BUNDLED WITH
41
+ 2.0.2
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 y-matsuda
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,43 @@
1
+ # Itamae::Plugin::Recipe::Hadoop
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/itamae/plugin/recipe/hadoop`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'itamae-plugin-recipe-hadoop'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install itamae-plugin-recipe-hadoop
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/itamae-plugin-recipe-hadoop. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Itamae::Plugin::Recipe::Hadoop project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/itamae-plugin-recipe-hadoop/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "itamae/plugin/recipe/hadoop"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,29 @@
1
+ lib = File.expand_path("lib", __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "itamae/plugin/recipe/hadoop/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "itamae-plugin-recipe-hadoop"
7
+ spec.version = Itamae::Plugin::Recipe::Hadoop::VERSION
8
+ spec.authors = ["ichylinux"]
9
+ spec.email = ["ichylinux@gmail.com"]
10
+
11
+ spec.summary = %q{itamae recipe for apache hadoop installation}
12
+ spec.description = %q{itamae recipe for apache hadoop installation}
13
+ spec.homepage = "https://github.com/maedadev/itamae-plugin-recipe-hadoop"
14
+ spec.license = "MIT"
15
+
16
+ # Specify which files should be added to the gem when it is released.
17
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
+ end
21
+ spec.bindir = "exe"
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
+ spec.require_paths = ["lib"]
24
+
25
+ spec.add_dependency 'itamae', '~> 1.10', '>= 1.10.4'
26
+
27
+ spec.add_development_dependency "bundler", "~> 2.0"
28
+ spec.add_development_dependency "rake", ">= 12.3.3"
29
+ end
@@ -0,0 +1,3 @@
1
+ require "itamae/plugin/recipe/hadoop/version"
2
+
3
+ include_recipe './hadoop/install.rb'
@@ -0,0 +1 @@
1
+ d489df3808244b906eb38f4d081ba49e50c4603db03efd5e594a1e98b09259c2 hadoop-2.7.3.tar.gz
@@ -0,0 +1 @@
1
+ 6b545972fdd73173887cdbc3e1cbd3cc72068271924edea82a0e7e653199b115 hadoop-2.8.4.tar.gz
@@ -0,0 +1 @@
1
+ f9c726df693ce2daa4107886f603270d66e7257f77a92c9886502d6cd4a884a4 hadoop-2.8.5.tar.gz
@@ -0,0 +1,53 @@
1
+ version = ENV['HADOOP_VERSION'] || Itamae::Plugin::Recipe::Hadoop::HADOOP_VERSION
2
+
3
+ execute "download hadoop-#{version}" do
4
+ cwd '/tmp'
5
+ command <<-EOF
6
+ rm -f hadoop-#{version}.tar.gz
7
+ wget https://archive.apache.org/dist/hadoop/common/hadoop-#{version}/hadoop-#{version}.tar.gz
8
+ EOF
9
+ not_if "test -e /opt/hadoop/hadoop-#{version}/INSTALLED || echo #{::File.read(::File.join(::File.dirname(__FILE__), "hadoop-#{version}_sha256.txt")).strip} | sha256sum -c"
10
+ end
11
+
12
+ directory '/opt/hadoop' do
13
+ user 'root'
14
+ owner 'root'
15
+ group 'root'
16
+ mode '755'
17
+ end
18
+
19
+ execute "install hadoop-#{version}" do
20
+ cwd '/tmp'
21
+ command <<-EOF
22
+ rm -Rf hadoop-#{version}/
23
+ tar zxf hadoop-#{version}.tar.gz
24
+ sudo rm -Rf /opt/hadoop/hadoop-#{version}/
25
+ sudo mv hadoop-#{version}/ /opt/hadoop/
26
+ sudo touch /opt/hadoop/hadoop-#{version}/INSTALLED
27
+ EOF
28
+ not_if "test -e /opt/hadoop/hadoop-#{version}/INSTALLED"
29
+ end
30
+
31
+ %W(
32
+ /opt/hadoop/hadoop-#{version}/var/lib/hdfs
33
+ /opt/hadoop/hadoop-#{version}/var/lib/hdfs/name
34
+ /opt/hadoop/hadoop-#{version}/var/lib/hdfs/data
35
+ ).each do |name|
36
+ directory name do
37
+ user 'root'
38
+ owner ENV['USER']
39
+ group ENV['USER']
40
+ end
41
+ end
42
+
43
+ template "/opt/hadoop/hadoop-#{version}/etc/hadoop/core-site.xml"
44
+
45
+ template "/opt/hadoop/hadoop-#{version}/etc/hadoop/hdfs-site.xml" do
46
+ variables hadoop_home: "/opt/hadoop/hadoop-#{version}"
47
+ end
48
+
49
+ link '/opt/hadoop/current' do
50
+ to "/opt/hadoop/hadoop-#{version}"
51
+ user 'root'
52
+ force true
53
+ end
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
3
+ <configuration>
4
+ <property>
5
+ <name>fs.defaultFS</name>
6
+ <value>file://</value>
7
+ </property>
8
+ </configuration>
@@ -0,0 +1,14 @@
1
+ <configuration>
2
+ <property>
3
+ <name>dfs.name.dir</name>
4
+ <value><%= @hadoop_home %>/var/lib/hdfs/name</value>
5
+ </property>
6
+ <property>
7
+ <name>dfs.data.dir</name>
8
+ <value><%= @hadoop_home %>/var/lib/hdfs/data</value>
9
+ </property>
10
+ <property>
11
+ <name>dfs.replication</name>
12
+ <value>1</value>
13
+ </property>
14
+ </configuration>
@@ -0,0 +1,16 @@
1
+ module Itamae
2
+ module Plugin
3
+ module Recipe
4
+ module Hadoop
5
+ VERSION = "0.1.0"
6
+
7
+ HADOOP_VERSION = [
8
+ HADOOP_VERSION_MAJOR = '2',
9
+ HADOOP_VERSION_MINOR = '8',
10
+ HADOOP_VERSION_REVISION = '5'
11
+ ].join('.')
12
+
13
+ end
14
+ end
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: itamae-plugin-recipe-hadoop
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ichylinux
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-03-14 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: itamae
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 1.10.4
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.10'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.10.4
33
+ - !ruby/object:Gem::Dependency
34
+ name: bundler
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '2.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rake
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 12.3.3
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 12.3.3
61
+ description: itamae recipe for apache hadoop installation
62
+ email:
63
+ - ichylinux@gmail.com
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - ".gitignore"
69
+ - ".project"
70
+ - CODE_OF_CONDUCT.md
71
+ - Gemfile
72
+ - Gemfile.lock
73
+ - LICENSE.txt
74
+ - README.md
75
+ - Rakefile
76
+ - bin/console
77
+ - bin/setup
78
+ - itamae-plugin-recipe-hadoop.gemspec
79
+ - lib/itamae/plugin/recipe/hadoop.rb
80
+ - lib/itamae/plugin/recipe/hadoop/hadoop-2.7.3_sha256.txt
81
+ - lib/itamae/plugin/recipe/hadoop/hadoop-2.8.4_sha256.txt
82
+ - lib/itamae/plugin/recipe/hadoop/hadoop-2.8.5_sha256.txt
83
+ - lib/itamae/plugin/recipe/hadoop/install.rb
84
+ - lib/itamae/plugin/recipe/hadoop/templates/core-site.xml.erb
85
+ - lib/itamae/plugin/recipe/hadoop/templates/hdfs-site.xml.erb
86
+ - lib/itamae/plugin/recipe/hadoop/version.rb
87
+ homepage: https://github.com/maedadev/itamae-plugin-recipe-hadoop
88
+ licenses:
89
+ - MIT
90
+ metadata: {}
91
+ post_install_message:
92
+ rdoc_options: []
93
+ require_paths:
94
+ - lib
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ requirements: []
106
+ rubygems_version: 3.0.4
107
+ signing_key:
108
+ specification_version: 4
109
+ summary: itamae recipe for apache hadoop installation
110
+ test_files: []