dev-lxc 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +2 -7
- data/files/configs/standalone.yml +0 -4
- data/files/configs/tier.yml +0 -4
- data/lib/dev-lxc/container.rb +14 -15
- data/lib/dev-lxc/server.rb +0 -2
- data/lib/dev-lxc/version.rb +1 -1
- data/lib/dev-lxc.rb +5 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb62e2541fe4750d85c6cad1d92f629b3cc59c7c
|
4
|
+
data.tar.gz: ceab7ced54d9dd2f34e142bfc764d688cfcd062a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8545fe8abb277e0051d8b9ea25a98ef24e6732180fc1ff52d129fe80227c761a42269582eebef538535ffd0a975a6c5f594d62c3b1e55284b370505754fa9786
|
7
|
+
data.tar.gz: 76a6df69e886559c4d1a415f328bc1d9d454e20841e274cf7fc53ef1fefcd5169549c1b04ee5d7031eccf8cdf756e16d06e2c570988155c1be496537e8673d4d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# dev-lxc Change Log
|
2
2
|
|
3
|
+
## 1.5.0 (2015-04-14)
|
4
|
+
|
5
|
+
* Set lxc.network.hwaddr, if one doesn’t exist, instead of lxc.network.0.hwaddr
|
6
|
+
Fixes a bug that caused containers to get identical hwaddrs and IPs
|
7
|
+
|
8
|
+
* Remove chef-sync since it is EOL
|
9
|
+
|
10
|
+
* Refactor removal of container config's mount entries
|
11
|
+
Make sure you are using LXC 2.0 which includes a fix that allows the refactor to work
|
12
|
+
|
13
|
+
* Make mount section in dev-lxc.yml optional
|
14
|
+
|
3
15
|
## 1.4.0 (2015-12-08)
|
4
16
|
|
5
17
|
* Add ability to build and use Ubuntu 15.04 and Centos 7 platform containers
|
data/README.md
CHANGED
@@ -75,8 +75,7 @@ If you aren't familiar with using containers please read this introduction.
|
|
75
75
|
├── manage
|
76
76
|
├── osc
|
77
77
|
├── push-jobs-server
|
78
|
-
|
79
|
-
└── sync
|
78
|
+
└── reporting
|
80
79
|
```
|
81
80
|
|
82
81
|
## Update dev-lxc gem
|
@@ -512,10 +511,6 @@ chef-server:
|
|
512
511
|
manage: /root/dev/chef-packages/manage/chef-manage_2.1.1-1_amd64.deb
|
513
512
|
# reporting: /root/dev/chef-packages/reporting/opscode-reporting_1.5.5-1_amd64.deb
|
514
513
|
# push-jobs-server: /root/dev/chef-packages/push-jobs-server/opscode-push-jobs-server_1.1.6-1_amd64.deb
|
515
|
-
# sync: /root/dev/chef-packages/sync/chef-sync_1.0.0~rc.6-1_amd64.deb
|
516
|
-
|
517
|
-
## The chef-sync package will only be installed.
|
518
|
-
## chef-sync will NOT be configured since we don't know whether it should be a master or replica.
|
519
514
|
|
520
515
|
api_fqdn: chef.lxc
|
521
516
|
topology: tier
|
@@ -678,7 +673,7 @@ There are four image categories.
|
|
678
673
|
`DevLXC::Server#create_shared_image` controls the creation of a shared image.
|
679
674
|
|
680
675
|
Chef packages that are common to all servers in a Chef cluster, such as chef-server-core,
|
681
|
-
opscode-reporting
|
676
|
+
opscode-reporting and opscode-push-jobs-server are installed using `dpkg` or `rpm`.
|
682
677
|
|
683
678
|
Note the manage package will not be installed at this point since it is not common to all
|
684
679
|
servers (i.e. it does not get installed on backend servers).
|
@@ -21,10 +21,6 @@ chef-server:
|
|
21
21
|
manage: /root/dev/chef-packages/manage/chef-manage_2.1.1-1_amd64.deb
|
22
22
|
# reporting: /root/dev/chef-packages/reporting/opscode-reporting_1.5.5-1_amd64.deb
|
23
23
|
# push-jobs-server: /root/dev/chef-packages/push-jobs-server/opscode-push-jobs-server_1.1.6-1_amd64.deb
|
24
|
-
# sync: /root/dev/chef-packages/sync/chef-sync_1.0.0~rc.6-1_amd64.deb
|
25
|
-
|
26
|
-
## The chef-sync package will only be installed.
|
27
|
-
## chef-sync will NOT be configured since we don't know whether it should be a master or replica.
|
28
24
|
|
29
25
|
api_fqdn: chef.lxc
|
30
26
|
topology: standalone
|
data/files/configs/tier.yml
CHANGED
@@ -21,10 +21,6 @@ chef-server:
|
|
21
21
|
manage: /root/dev/chef-packages/manage/chef-manage_2.1.1-1_amd64.deb
|
22
22
|
# reporting: /root/dev/chef-packages/reporting/opscode-reporting_1.5.5-1_amd64.deb
|
23
23
|
# push-jobs-server: /root/dev/chef-packages/push-jobs-server/opscode-push-jobs-server_1.1.6-1_amd64.deb
|
24
|
-
# sync: /root/dev/chef-packages/sync/chef-sync_1.0.0~rc.6-1_amd64.deb
|
25
|
-
|
26
|
-
## The chef-sync package will only be installed.
|
27
|
-
## chef-sync will NOT be configured since we don't know whether it should be a master or replica.
|
28
24
|
|
29
25
|
api_fqdn: chef.lxc
|
30
26
|
topology: tier
|
data/lib/dev-lxc/container.rb
CHANGED
@@ -47,23 +47,22 @@ module DevLXC
|
|
47
47
|
existing_mounts = self.config_item("lxc.mount.entry")
|
48
48
|
unless existing_mounts.nil?
|
49
49
|
preserved_mounts = existing_mounts.delete_if { |m| m.end_with?("## dev-lxc ##") }
|
50
|
-
|
51
|
-
DevLXC.search_file_delete_line(self.config_file_name, /^lxc.mount.entry/)
|
52
|
-
self.clear_config
|
53
|
-
self.load_config
|
50
|
+
self.clear_config_item('lxc.mount.entry')
|
54
51
|
self.set_config_item("lxc.mount.entry", preserved_mounts)
|
55
52
|
end
|
56
|
-
mounts.
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
53
|
+
unless mounts.nil?
|
54
|
+
mounts.each do |mount|
|
55
|
+
unless File.exists?(mount.split.first)
|
56
|
+
puts "ERROR: Mount source #{mount.split.first} does not exist."
|
57
|
+
exit 1
|
58
|
+
end
|
59
|
+
if ! preserved_mounts.nil? && preserved_mounts.any? { |m| m.start_with?("#{mount} ") }
|
60
|
+
puts "Skipping mount entry #{mount}, it already exists"
|
61
|
+
next
|
62
|
+
else
|
63
|
+
puts "Adding mount entry #{mount}"
|
64
|
+
self.set_config_item("lxc.mount.entry", "#{mount} none bind,optional,create=dir 0 0 ## dev-lxc ##")
|
65
|
+
end
|
67
66
|
end
|
68
67
|
end
|
69
68
|
self.save_config
|
data/lib/dev-lxc/server.rb
CHANGED
@@ -55,7 +55,6 @@ module DevLXC
|
|
55
55
|
@shared_image_name += "-#{@chef_server_version}"
|
56
56
|
@shared_image_name += "-reporting-#{Regexp.last_match[1].gsub(".", "-")}" if @packages["reporting"].to_s.match(/[_-]((\d+\.?){3,})/)
|
57
57
|
@shared_image_name += "-pushy-#{Regexp.last_match[1].gsub(".", "-")}" if @packages["push-jobs-server"].to_s.match(/[_-]((\d+\.?){3,})/)
|
58
|
-
@shared_image_name += "-sync-#{Regexp.last_match[1].gsub(".", "-")}" if @packages["sync"].to_s.match(/[_-]((\d+\.?){3,})/)
|
59
58
|
end
|
60
59
|
end
|
61
60
|
|
@@ -261,7 +260,6 @@ module DevLXC
|
|
261
260
|
shared_image.install_package(@packages["server"]) unless @packages["server"].nil?
|
262
261
|
shared_image.install_package(@packages["reporting"]) unless @packages["reporting"].nil?
|
263
262
|
shared_image.install_package(@packages["push-jobs-server"]) unless @packages["push-jobs-server"].nil?
|
264
|
-
shared_image.install_package(@packages["sync"]) unless @packages["sync"].nil?
|
265
263
|
end
|
266
264
|
shared_image.stop
|
267
265
|
return shared_image
|
data/lib/dev-lxc/version.rb
CHANGED
data/lib/dev-lxc.rb
CHANGED
@@ -39,9 +39,11 @@ module DevLXC
|
|
39
39
|
unless platform_image.config_item("lxc.mount.auto").nil?
|
40
40
|
platform_image.set_config_item("lxc.mount.auto", "proc:rw sys:rw")
|
41
41
|
end
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
if platform_image.config_item("lxc.network.0.hwaddr").nil?
|
43
|
+
hwaddr = '00:16:3e:' + Digest::SHA1.hexdigest(Time.now.to_s).slice(0..5).unpack('a2a2a2').join(':')
|
44
|
+
puts "Setting '#{platform_image.name}' platform image's lxc.network.hwaddr to #{hwaddr}"
|
45
|
+
platform_image.set_config_item("lxc.network.hwaddr", hwaddr)
|
46
|
+
end
|
45
47
|
platform_image.save_config
|
46
48
|
platform_image.start
|
47
49
|
puts "Installing packages in platform image '#{platform_image.name}'"
|
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: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremiah Snapp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.5.2
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: A tool for creating Chef server clusters using LXC containers
|