dev-lxc 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dev-lxc/cli.rb +2 -1
- data/lib/dev-lxc/cluster.rb +5 -5
- data/lib/dev-lxc/version.rb +1 -1
- 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: 292b5df53d047927c96eb8d73e13739b17c57c99
|
4
|
+
data.tar.gz: 3e696698a4ab38c75ef4cd428637b8ed95d21a6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f7bba6ca362e9f8de32c9702ebb9eca1af73f78f4049c63e39f1dd865423fb059f69ea9e4e67414d473fb35d181c9327a40e59fe38b80c5ced151abb2a24a15
|
7
|
+
data.tar.gz: 916d5ce93646952a3e69f858471a4dc837b01c3acc16a2e89b4d1c64f593fb2fc08fe2439620be12ab2c804aebb7353260df932711b0845ab194b9a98f853856
|
data/lib/dev-lxc/cli.rb
CHANGED
@@ -77,9 +77,10 @@ module DevLXC::CLI
|
|
77
77
|
|
78
78
|
desc "chef-repo", "Creates a `bootstrap-node` script and chef-repo in the current directory using files from the cluster's backend /root/chef-repo"
|
79
79
|
option :config, :desc => "Specify a cluster's YAML config file. `./dev-lxc.yml` will be used by default"
|
80
|
+
option :force, :aliases => "-f", :type => :boolean, :desc => "Overwrite any existing knife.rb or pivotal.rb files"
|
80
81
|
option :pivotal, :aliases => "-p", :type => :boolean, :desc => "Also copy pivotal.rb and pivotal.pem"
|
81
82
|
def chef_repo
|
82
|
-
get_cluster(options[:config]).chef_repo(options[:pivotal])
|
83
|
+
get_cluster(options[:config]).chef_repo(options[:force], options[:pivotal])
|
83
84
|
end
|
84
85
|
|
85
86
|
desc "list_images [SERVER_NAME_REGEX]", "List of each servers' images created during the build process"
|
data/lib/dev-lxc/cluster.rb
CHANGED
@@ -58,7 +58,7 @@ module DevLXC
|
|
58
58
|
servers = chef_servers + analytics_servers
|
59
59
|
end
|
60
60
|
|
61
|
-
def chef_repo(
|
61
|
+
def chef_repo(force=false, pivotal=false)
|
62
62
|
if @chef_server_bootstrap_backend.nil?
|
63
63
|
puts "A bootstrap backend Chef Server is not defined in the cluster's config. Please define it first."
|
64
64
|
exit 1
|
@@ -76,7 +76,7 @@ module DevLXC
|
|
76
76
|
if pem_files.empty?
|
77
77
|
puts "The pem files can not be copied because they do not exist in '#{chef_server.server.name}' Chef Server's `/root/chef-repo/.chef` directory"
|
78
78
|
else
|
79
|
-
pem_files.delete_if { |pem_file| pem_file.end_with?("/pivotal.pem") } unless
|
79
|
+
pem_files.delete_if { |pem_file| pem_file.end_with?("/pivotal.pem") } unless pivotal
|
80
80
|
FileUtils.cp( pem_files, "./chef-repo/.chef" )
|
81
81
|
end
|
82
82
|
|
@@ -88,8 +88,8 @@ module DevLXC
|
|
88
88
|
chef_server_url = "https://#{@api_fqdn}/organizations/ponyville"
|
89
89
|
validator_name = "ponyville-validator"
|
90
90
|
|
91
|
-
if
|
92
|
-
if File.exists?("./chef-repo/.chef/pivotal.rb")
|
91
|
+
if pivotal
|
92
|
+
if File.exists?("./chef-repo/.chef/pivotal.rb") && ! force
|
93
93
|
puts "Skipping pivotal.rb because it already exists in `./chef-repo/.chef`"
|
94
94
|
else
|
95
95
|
pivotal_rb_path = "#{chef_server.abspath('/root/chef-repo/.chef')}/pivotal.rb"
|
@@ -105,7 +105,7 @@ module DevLXC
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
|
108
|
-
if File.exists?("./chef-repo/.chef/knife.rb")
|
108
|
+
if File.exists?("./chef-repo/.chef/knife.rb") && ! force
|
109
109
|
puts "Skipping knife.rb because it already exists in `./chef-repo/.chef`"
|
110
110
|
else
|
111
111
|
knife_rb_path = "#{chef_server.abspath('/root/chef-repo/.chef')}/knife.rb"
|
data/lib/dev-lxc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dev-lxc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremiah Snapp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|