dev-lxc 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/docs/prerequisites.md +2 -2
- data/lib/dev-lxc/cluster.rb +12 -6
- data/lib/dev-lxc/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aeb8759ea61759a5c8b6888306cd05e0806ed1d
|
4
|
+
data.tar.gz: d12cfeeaa05bb6e5ce82896768ea87f7e01aa97d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7339707e329e093333257d64ef62b980919c10c87fd04efd26c6557ce1dd39ea4cc88b9c5f47933902926cb876c4acc2dca754a7205925a7275e24a97d76b7c1
|
7
|
+
data.tar.gz: 0b9c409e8b1f8a51e32cbf7a9b98582b4e119a1db6eb9822af6583885fd1049c0267a8eb0199250add89e6dd0cf74154ad97dc0cb60e5cfb363db7034c2a3f29
|
data/CHANGELOG.md
CHANGED
data/docs/prerequisites.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
|
2
2
|
#### Download and Install Prerequisites
|
3
3
|
|
4
|
-
Download and install [VirtualBox](https://www.virtualbox.org/wiki/Downloads).
|
4
|
+
Download and install [VirtualBox 5.0.14+](https://www.virtualbox.org/wiki/Downloads).
|
5
5
|
|
6
|
-
Download and install [Vagrant](https://www.vagrantup.com/downloads.html).
|
6
|
+
Download and install [Vagrant 1.8.5+](https://www.vagrantup.com/downloads.html).
|
7
7
|
|
8
8
|
Install the vagrant-persistent-storage plugin.
|
9
9
|
|
data/lib/dev-lxc/cluster.rb
CHANGED
@@ -452,7 +452,7 @@ module DevLXC
|
|
452
452
|
server.container.save_config
|
453
453
|
end
|
454
454
|
|
455
|
-
def
|
455
|
+
def get_product_download_info(server, product_name, product_options)
|
456
456
|
server_type = @server_configs[server.name][:server_type]
|
457
457
|
base_container = DevLXC::Container.new(@server_configs[server.name][:base_container_name])
|
458
458
|
mixlib_install_platform_detection_path = "#{base_container.config_item('lxc.rootfs')}/mixlib-install-platform-detection"
|
@@ -483,7 +483,7 @@ module DevLXC
|
|
483
483
|
puts JSON.pretty_generate(options)
|
484
484
|
exit 1
|
485
485
|
end
|
486
|
-
artifact.url
|
486
|
+
[artifact.url, artifact.sha256]
|
487
487
|
end
|
488
488
|
|
489
489
|
def calculate_required_products(servers, force=false)
|
@@ -501,11 +501,11 @@ module DevLXC
|
|
501
501
|
products.each do |product_name, product_options|
|
502
502
|
if product_options && product_options['package_source']
|
503
503
|
package_source = product_options['package_source']
|
504
|
-
all_required_products[package_source] = product_name
|
504
|
+
all_required_products[package_source] = [product_name, nil]
|
505
505
|
@server_configs[server.name][:required_products][product_name] = package_source
|
506
506
|
else
|
507
|
-
package_source =
|
508
|
-
all_required_products[package_source] = product_name
|
507
|
+
package_source, package_sha256 = get_product_download_info(server, product_name, product_options)
|
508
|
+
all_required_products[package_source] = [product_name, package_sha256]
|
509
509
|
product_cache_path = "/var/dev-lxc/cache/chef-products/#{product_name}/#{File.basename(package_source)}"
|
510
510
|
@server_configs[server.name][:required_products][product_name] = product_cache_path
|
511
511
|
end
|
@@ -516,7 +516,8 @@ module DevLXC
|
|
516
516
|
|
517
517
|
def prep_product_cache(servers, force=false)
|
518
518
|
all_required_products = calculate_required_products(servers, force)
|
519
|
-
all_required_products.each do |package_source,
|
519
|
+
all_required_products.each do |package_source, v|
|
520
|
+
product_name, package_sha256 = v
|
520
521
|
if package_source.start_with?('http')
|
521
522
|
product_cache_path = "/var/dev-lxc/cache/chef-products/#{product_name}/#{File.basename(package_source)}"
|
522
523
|
if !File.exist?(product_cache_path)
|
@@ -524,6 +525,11 @@ module DevLXC
|
|
524
525
|
puts "Downloading #{package_source} to #{product_cache_path}"
|
525
526
|
open(package_source) { |url| File.open(product_cache_path, 'wb') { |f| f.write(url.read) } }
|
526
527
|
end
|
528
|
+
actual_sha256 = Digest::SHA256.file(product_cache_path).hexdigest
|
529
|
+
if package_sha256 != actual_sha256
|
530
|
+
puts "ERROR: Invalid SHA256 #{actual_sha256} for #{File.basename(product_cache_path)}."
|
531
|
+
exit 1
|
532
|
+
end
|
527
533
|
elsif !File.exist?(package_source)
|
528
534
|
puts "ERROR: Package source #{package_source} does not exist."
|
529
535
|
exit 1
|
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: 2.2.
|
4
|
+
version: 2.2.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: 2016-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -134,4 +134,3 @@ signing_key:
|
|
134
134
|
specification_version: 4
|
135
135
|
summary: A tool for building Chef server clusters using LXC containers
|
136
136
|
test_files: []
|
137
|
-
has_rdoc:
|