bixby-provision 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/bixby-provision.gemspec +3 -3
- data/lib/bixby/provision.rb +1 -1
- data/lib/bixby/provision/app.rb +2 -0
- data/lib/bixby/provision/dsl/base.rb +13 -0
- data/lib/bixby/provision/dsl/packager/yum.rb +5 -3
- data/lib/bixby/provision/dsl/packager/yum/mongodb.rb +4 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78e2d92af6c09642d09a9cceea7b8293078039b5
|
4
|
+
data.tar.gz: da695f8b5263d53eadeebe9586b58bb8d4427304
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9175bbe8b45d1bdaa68cf8c0ab6da64ea8a533e673f17ff13e2a39d9a65d227f16342f2271ff90e86233c41d712ca23d6e6c7d13b079108ec21996b40f48777a
|
7
|
+
data.tar.gz: 492027346fe8ecdf96dfa545d2330912f94a48d11dfb70f809102294ccd4bf7fda1cc987fd71438ff90ee4b6f5cd6bd952f192936711823704a5bd957bb022e9
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/bixby-provision.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: bixby-provision 0.1.
|
5
|
+
# stub: bixby-provision 0.1.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "bixby-provision"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Chetan Sarva"]
|
14
|
-
s.date = "2014-05-
|
14
|
+
s.date = "2014-05-03"
|
15
15
|
s.description = "Bixby Provisioner"
|
16
16
|
s.email = "chetan@pixelcop.net"
|
17
17
|
s.executables = ["bixby-provision"]
|
data/lib/bixby/provision.rb
CHANGED
@@ -52,7 +52,7 @@ end
|
|
52
52
|
require "bixby/provision/manifest"
|
53
53
|
require "bixby/provision/dsl"
|
54
54
|
|
55
|
-
Bixby::Log.setup_logger(:filename => Bixby.path("var", "provision.log"))
|
55
|
+
Bixby::Log.setup_logger(:level => :info, :filename => Bixby.path("var", "provision.log"))
|
56
56
|
|
57
57
|
# enable condensed logging to stdout
|
58
58
|
Logging.appenders.stdout( 'provision_stdout',
|
data/lib/bixby/provision/app.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
|
2
|
+
require "tempfile"
|
3
|
+
|
2
4
|
require "bixby/provision/dsl/util/file"
|
3
5
|
|
4
6
|
module Bixby
|
@@ -70,6 +72,17 @@ module Bixby
|
|
70
72
|
nil
|
71
73
|
end
|
72
74
|
|
75
|
+
# Create a temporary file
|
76
|
+
#
|
77
|
+
# @param [Boolean] close If true, close the file handle before returning it (default: false)
|
78
|
+
#
|
79
|
+
# @return [Tempfile]
|
80
|
+
def tempfile(close=false)
|
81
|
+
t = Tempfile.new("bixby-provision-")
|
82
|
+
t.close if close
|
83
|
+
t
|
84
|
+
end
|
85
|
+
|
73
86
|
end
|
74
87
|
|
75
88
|
end
|
@@ -76,18 +76,20 @@ module Bixby
|
|
76
76
|
def install_repo_url(url, opts)
|
77
77
|
logger.info "installing repo from #{url}"
|
78
78
|
|
79
|
-
|
79
|
+
dest = File.join(YUM_REPOS_D, File.basename(url))
|
80
|
+
if File.exists? dest then
|
80
81
|
logger.debug "repo already exists"
|
81
82
|
return false
|
82
83
|
end
|
83
84
|
|
84
85
|
self.proxy.sys.package "wget"
|
85
86
|
|
86
|
-
|
87
|
+
t = tempfile(true)
|
88
|
+
if logged_systemu("wget -q #{url} -O #{t.path}").fail? then
|
87
89
|
# TODO raise
|
88
90
|
end
|
89
91
|
|
90
|
-
|
92
|
+
logged_sudo("mv -f #{t.path} #{dest}").success?
|
91
93
|
end
|
92
94
|
|
93
95
|
end # Yum
|
@@ -20,17 +20,16 @@ module Bixby
|
|
20
20
|
|
21
21
|
arch = amd64?() ? "x86_64" : "i686"
|
22
22
|
|
23
|
-
|
24
|
-
|
23
|
+
t = tempfile()
|
24
|
+
t.puts <<-EOF
|
25
25
|
[mongodb]
|
26
26
|
name=MongoDB Repository
|
27
27
|
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/#{arch}/
|
28
28
|
gpgcheck=0
|
29
29
|
enabled=1
|
30
30
|
EOF
|
31
|
-
|
32
|
-
|
33
|
-
true
|
31
|
+
t.close
|
32
|
+
logged_sudo("mv -f #{t.path} #{file}").success?
|
34
33
|
end
|
35
34
|
|
36
35
|
end # MongoDB
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bixby-provision
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chetan Sarva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bixby-client
|