itamae-plugin-recipe-spark 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itamae/plugin/recipe/spark/install.rb +22 -15
- data/lib/itamae/plugin/recipe/spark/{spark-2.2.0_sha256.txt → spark-2.2.0_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.3.1_sha256.txt → spark-2.3.1_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.3.2_sha256.txt → spark-2.3.2_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.4.0_sha256.txt → spark-2.4.0_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.4.3_sha256.txt → spark-2.4.3_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.4.4_sha256.txt → spark-2.4.4_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.4.5_sha256.txt → spark-2.4.5_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.4.6_sha256.txt → spark-2.4.6_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-2.4.7_sha256.txt → spark-2.4.7_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/{spark-3.0.1_sha256.txt → spark-3.0.1_hadoop_2.7_sha256.txt} +0 -0
- data/lib/itamae/plugin/recipe/spark/spark-3.0.1_hadoop_3.2_sha256.txt +1 -0
- data/lib/itamae/plugin/recipe/spark/version.rb +1 -1
- metadata +12 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 201de04bbae7c37fcb100e26b798361d35f7064b2809e01e1a34b1efb2e0768b
|
4
|
+
data.tar.gz: 92cf7328ac3cd04c97f948e6fb8ccb10e114040d03ac50bc8556ecb8b60e5d9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90e5650f5f509b8f29d2bde84b16df9f11278f8b9d2ff3f099e920f1728423c957dea0d29b698d229a8ec32dfe4196d4e3ae32aa8f5e53126929b1b6e6c0ad3f
|
7
|
+
data.tar.gz: 7f84c85db7a99f58fe1036483dc81157b2eba1f1f857b612ab26607110f9bf09cd75c94df74376c5c0f701ad830d2b38c987d5b4bfb6c97535780c8ffc0c0122
|
@@ -1,13 +1,20 @@
|
|
1
1
|
version = ENV['SPARK_VERSION'] || Itamae::Plugin::Recipe::Spark::SPARK_VERSION
|
2
2
|
hadoop_version = ENV['HADOOP_VERSION'] || Itamae::Plugin::Recipe::Hadoop::HADOOP_VERSION
|
3
|
+
hadoop_type = if Gem::Version.create(hadoop_version) >= Gem::Version.create('3.2')
|
4
|
+
'3.2'
|
5
|
+
elsif Gem::Version.create(hadoop_version) >= Gem::Version.create('2.7')
|
6
|
+
'2.7'
|
7
|
+
else
|
8
|
+
raise "Hadoop version #{hadoop_version} is not supported."
|
9
|
+
end
|
3
10
|
|
4
11
|
execute "download spark-#{version}" do
|
5
12
|
cwd '/tmp'
|
6
13
|
command <<-EOF
|
7
|
-
rm -f spark-#{version}-bin-
|
8
|
-
wget https://archive.apache.org/dist/spark/spark-#{version}/spark-#{version}-bin-
|
14
|
+
rm -f spark-#{version}-bin-hadoop#{hadoop_type}.tgz
|
15
|
+
wget https://archive.apache.org/dist/spark/spark-#{version}/spark-#{version}-bin-hadoop#{hadoop_type}.tgz
|
9
16
|
EOF
|
10
|
-
not_if "test -e /opt/spark/spark-#{version}-bin-
|
17
|
+
not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/INSTALLED || echo #{::File.read(::File.join(::File.dirname(__FILE__), "spark-#{version}_hadoop_#{hadoop_type}_sha256.txt")).strip} | sha256sum -c"
|
11
18
|
end
|
12
19
|
|
13
20
|
directory '/opt/spark' do
|
@@ -20,37 +27,37 @@ end
|
|
20
27
|
execute "install spark-#{version}" do
|
21
28
|
cwd '/tmp'
|
22
29
|
command <<-EOF
|
23
|
-
rm -Rf spark-#{version}-bin-
|
24
|
-
tar zxf spark-#{version}-bin-
|
25
|
-
sudo rm -Rf /opt/spark/spark-#{version}-bin-
|
26
|
-
sudo mv spark-#{version}-bin-
|
27
|
-
sudo touch /opt/spark/spark-#{version}-bin-
|
30
|
+
rm -Rf spark-#{version}-bin-hadoop#{hadoop_type}/
|
31
|
+
tar zxf spark-#{version}-bin-hadoop#{hadoop_type}.tgz
|
32
|
+
sudo rm -Rf /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}
|
33
|
+
sudo mv spark-#{version}-bin-hadoop#{hadoop_type} /opt/spark/
|
34
|
+
sudo touch /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/INSTALLED
|
28
35
|
EOF
|
29
|
-
not_if "test -e /opt/spark/spark-#{version}-bin-
|
36
|
+
not_if "test -e /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/INSTALLED"
|
30
37
|
end
|
31
38
|
|
32
39
|
execute 'install hadoop aws jars' do
|
33
40
|
cwd '/opt/hadoop/current'
|
34
41
|
command <<-EOF
|
35
42
|
cp -f share/hadoop/tools/lib/aws-java-sdk-*.jar \
|
36
|
-
/opt/spark/spark-#{version}-bin-
|
43
|
+
/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/
|
37
44
|
cp -f share/hadoop/tools/lib/hadoop-aws-#{hadoop_version}.jar \
|
38
|
-
/opt/spark/spark-#{version}-bin-
|
45
|
+
/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/
|
39
46
|
EOF
|
40
|
-
not_if "test `ls -1 /opt/spark/spark-#{version}-bin-
|
47
|
+
not_if "test `ls -1 /opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/jars/ | egrep '(hadoop-)?aws-.*' | wc -l` = 4"
|
41
48
|
end
|
42
49
|
|
43
|
-
template "/opt/spark/spark-#{version}-bin-
|
50
|
+
template "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/conf/spark-defaults.conf"
|
44
51
|
|
45
52
|
if ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
|
46
|
-
template "/opt/spark/spark-#{version}-bin-
|
53
|
+
template "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}/conf/hdfs-site.xml" do
|
47
54
|
variables aws_access_key_id: ENV['AWS_ACCESS_KEY_ID'],
|
48
55
|
aws_secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
|
49
56
|
end
|
50
57
|
end
|
51
58
|
|
52
59
|
link '/opt/spark/current' do
|
53
|
-
to "/opt/spark/spark-#{version}-bin-
|
60
|
+
to "/opt/spark/spark-#{version}-bin-hadoop#{hadoop_type}"
|
54
61
|
user 'root'
|
55
62
|
force true
|
56
63
|
end
|
data/lib/itamae/plugin/recipe/spark/{spark-2.2.0_sha256.txt → spark-2.2.0_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.3.1_sha256.txt → spark-2.3.1_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.3.2_sha256.txt → spark-2.3.2_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.4.0_sha256.txt → spark-2.4.0_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.4.3_sha256.txt → spark-2.4.3_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.4.4_sha256.txt → spark-2.4.4_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.4.5_sha256.txt → spark-2.4.5_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.4.6_sha256.txt → spark-2.4.6_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-2.4.7_sha256.txt → spark-2.4.7_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
data/lib/itamae/plugin/recipe/spark/{spark-3.0.1_sha256.txt → spark-3.0.1_hadoop_2.7_sha256.txt}
RENAMED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
e2d05efa1c657dd5180628a83ea36c97c00f972b4aee935b7affa2e1058b0279 spark-3.0.1-bin-hadoop3.2.tgz
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itamae-plugin-recipe-spark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ichylinux
|
@@ -92,16 +92,17 @@ files:
|
|
92
92
|
- itamae-plugin-recipe-spark.gemspec
|
93
93
|
- lib/itamae/plugin/recipe/spark.rb
|
94
94
|
- lib/itamae/plugin/recipe/spark/install.rb
|
95
|
-
- lib/itamae/plugin/recipe/spark/spark-2.2.
|
96
|
-
- lib/itamae/plugin/recipe/spark/spark-2.3.
|
97
|
-
- lib/itamae/plugin/recipe/spark/spark-2.3.
|
98
|
-
- lib/itamae/plugin/recipe/spark/spark-2.4.
|
99
|
-
- lib/itamae/plugin/recipe/spark/spark-2.4.
|
100
|
-
- lib/itamae/plugin/recipe/spark/spark-2.4.
|
101
|
-
- lib/itamae/plugin/recipe/spark/spark-2.4.
|
102
|
-
- lib/itamae/plugin/recipe/spark/spark-2.4.
|
103
|
-
- lib/itamae/plugin/recipe/spark/spark-2.4.7_sha256.txt
|
104
|
-
- lib/itamae/plugin/recipe/spark/spark-3.0.
|
95
|
+
- lib/itamae/plugin/recipe/spark/spark-2.2.0_hadoop_2.7_sha256.txt
|
96
|
+
- lib/itamae/plugin/recipe/spark/spark-2.3.1_hadoop_2.7_sha256.txt
|
97
|
+
- lib/itamae/plugin/recipe/spark/spark-2.3.2_hadoop_2.7_sha256.txt
|
98
|
+
- lib/itamae/plugin/recipe/spark/spark-2.4.0_hadoop_2.7_sha256.txt
|
99
|
+
- lib/itamae/plugin/recipe/spark/spark-2.4.3_hadoop_2.7_sha256.txt
|
100
|
+
- lib/itamae/plugin/recipe/spark/spark-2.4.4_hadoop_2.7_sha256.txt
|
101
|
+
- lib/itamae/plugin/recipe/spark/spark-2.4.5_hadoop_2.7_sha256.txt
|
102
|
+
- lib/itamae/plugin/recipe/spark/spark-2.4.6_hadoop_2.7_sha256.txt
|
103
|
+
- lib/itamae/plugin/recipe/spark/spark-2.4.7_hadoop_2.7_sha256.txt
|
104
|
+
- lib/itamae/plugin/recipe/spark/spark-3.0.1_hadoop_2.7_sha256.txt
|
105
|
+
- lib/itamae/plugin/recipe/spark/spark-3.0.1_hadoop_3.2_sha256.txt
|
105
106
|
- lib/itamae/plugin/recipe/spark/templates/hdfs-site.xml.erb
|
106
107
|
- lib/itamae/plugin/recipe/spark/templates/spark-defaults.conf.erb
|
107
108
|
- lib/itamae/plugin/recipe/spark/version.rb
|