dev-lxc 1.3.1 → 1.4.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 +8 -0
- data/README.md +5 -5
- data/files/configs/adhoc.yml +1 -1
- data/files/configs/open-source.yml +1 -1
- data/files/configs/standalone.yml +5 -5
- data/files/configs/tier.yml +5 -5
- data/lib/dev-lxc/cli.rb +1 -1
- data/lib/dev-lxc/container.rb +4 -1
- data/lib/dev-lxc/version.rb +1 -1
- data/lib/dev-lxc.rb +22 -2
- 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: fea4ad6ddf4d00a8b9ae50752739377968e9148e
|
4
|
+
data.tar.gz: e3690d903aa0ddd0fc4ec5fc82432684293e57a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 091700cdc50e548222eff1ddd74a627075624d906a9e3efb04c05dfd92a5c67783e5370baed064888384fda2ed932a8f6cc64a4b8f6e033eb5b7f89fbbb8d683
|
7
|
+
data.tar.gz: e72904c833aa229875e06499a843d674ca64608a0f2bf8efeb266252a704f6f97049dcc001fcb7c34e3574866b8fd2698a2115c3e27d4738ab7af072d8802fef
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# dev-lxc Change Log
|
2
2
|
|
3
|
+
## 1.4.0 (2015-12-08)
|
4
|
+
|
5
|
+
* Add ability to build and use Ubuntu 15.04 and Centos 7 platform containers
|
6
|
+
|
7
|
+
* Update versions of Chef packages
|
8
|
+
|
9
|
+
* Refactor removal of container config's mount entries
|
10
|
+
|
3
11
|
## 1.3.1 (2015-05-21)
|
4
12
|
|
5
13
|
* Allow adhoc servers time to generate SSH Server Host Keys
|
data/README.md
CHANGED
@@ -490,7 +490,7 @@ dev-lxc init
|
|
490
490
|
|
491
491
|
```
|
492
492
|
## platform_image can be one of the following:
|
493
|
-
## p-centos-5, p-centos-6, p-ubuntu-1204 or p-ubuntu-
|
493
|
+
## p-centos-5, p-centos-6, p-centos-7, p-ubuntu-1204, p-ubuntu-1404 or p-ubuntu-1504
|
494
494
|
|
495
495
|
## Make sure a mount's source directory exists in the LXC host
|
496
496
|
|
@@ -508,9 +508,9 @@ chef-server:
|
|
508
508
|
mounts:
|
509
509
|
- /root/dev root/dev
|
510
510
|
packages:
|
511
|
-
server: /root/dev/chef-packages/cs/chef-server-core_12.
|
512
|
-
manage: /root/dev/chef-packages/manage/
|
513
|
-
# reporting: /root/dev/chef-packages/reporting/opscode-reporting_1.
|
511
|
+
server: /root/dev/chef-packages/cs/chef-server-core_12.3.1-1_amd64.deb
|
512
|
+
manage: /root/dev/chef-packages/manage/chef-manage_2.1.1-1_amd64.deb
|
513
|
+
# reporting: /root/dev/chef-packages/reporting/opscode-reporting_1.5.5-1_amd64.deb
|
514
514
|
# push-jobs-server: /root/dev/chef-packages/push-jobs-server/opscode-push-jobs-server_1.1.6-1_amd64.deb
|
515
515
|
# sync: /root/dev/chef-packages/sync/chef-sync_1.0.0~rc.6-1_amd64.deb
|
516
516
|
|
@@ -536,7 +536,7 @@ analytics:
|
|
536
536
|
mounts:
|
537
537
|
- /root/dev root/dev
|
538
538
|
packages:
|
539
|
-
analytics: /root/dev/chef-packages/analytics/opscode-analytics_1.
|
539
|
+
analytics: /root/dev/chef-packages/analytics/opscode-analytics_1.2.0-1_amd64.deb
|
540
540
|
|
541
541
|
analytics_fqdn: analytics.lxc
|
542
542
|
topology: tier
|
data/files/configs/adhoc.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
## platform_image can be one of the following:
|
2
|
-
## p-centos-5, p-centos-6, p-ubuntu-1204 or p-ubuntu-
|
2
|
+
## p-centos-5, p-centos-6, p-centos-7, p-ubuntu-1204, p-ubuntu-1404 or p-ubuntu-1504
|
3
3
|
|
4
4
|
## Make sure a mount's source directory exists in the LXC host
|
5
5
|
|
@@ -17,9 +17,9 @@ chef-server:
|
|
17
17
|
mounts:
|
18
18
|
- /root/dev root/dev
|
19
19
|
packages:
|
20
|
-
server: /root/dev/chef-packages/cs/chef-server-core_12.
|
21
|
-
manage: /root/dev/chef-packages/manage/
|
22
|
-
# reporting: /root/dev/chef-packages/reporting/opscode-reporting_1.
|
20
|
+
server: /root/dev/chef-packages/cs/chef-server-core_12.3.1-1_amd64.deb
|
21
|
+
manage: /root/dev/chef-packages/manage/chef-manage_2.1.1-1_amd64.deb
|
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
24
|
# sync: /root/dev/chef-packages/sync/chef-sync_1.0.0~rc.6-1_amd64.deb
|
25
25
|
|
@@ -37,7 +37,7 @@ analytics:
|
|
37
37
|
mounts:
|
38
38
|
- /root/dev root/dev
|
39
39
|
packages:
|
40
|
-
analytics: /root/dev/chef-packages/analytics/opscode-analytics_1.
|
40
|
+
analytics: /root/dev/chef-packages/analytics/opscode-analytics_1.2.0-1_amd64.deb
|
41
41
|
|
42
42
|
analytics_fqdn: analytics.lxc
|
43
43
|
topology: standalone
|
data/files/configs/tier.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
## platform_image can be one of the following:
|
2
|
-
## p-centos-5, p-centos-6, p-ubuntu-1204 or p-ubuntu-
|
2
|
+
## p-centos-5, p-centos-6, p-centos-7, p-ubuntu-1204, p-ubuntu-1404 or p-ubuntu-1504
|
3
3
|
|
4
4
|
## Make sure a mount's source directory exists in the LXC host
|
5
5
|
|
@@ -17,9 +17,9 @@ chef-server:
|
|
17
17
|
mounts:
|
18
18
|
- /root/dev root/dev
|
19
19
|
packages:
|
20
|
-
server: /root/dev/chef-packages/cs/chef-server-core_12.
|
21
|
-
manage: /root/dev/chef-packages/manage/
|
22
|
-
# reporting: /root/dev/chef-packages/reporting/opscode-reporting_1.
|
20
|
+
server: /root/dev/chef-packages/cs/chef-server-core_12.3.1-1_amd64.deb
|
21
|
+
manage: /root/dev/chef-packages/manage/chef-manage_2.1.1-1_amd64.deb
|
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
24
|
# sync: /root/dev/chef-packages/sync/chef-sync_1.0.0~rc.6-1_amd64.deb
|
25
25
|
|
@@ -45,7 +45,7 @@ analytics:
|
|
45
45
|
mounts:
|
46
46
|
- /root/dev root/dev
|
47
47
|
packages:
|
48
|
-
analytics: /root/dev/chef-packages/analytics/opscode-analytics_1.
|
48
|
+
analytics: /root/dev/chef-packages/analytics/opscode-analytics_1.2.0-1_amd64.deb
|
49
49
|
|
50
50
|
analytics_fqdn: analytics.lxc
|
51
51
|
topology: tier
|
data/lib/dev-lxc/cli.rb
CHANGED
@@ -28,7 +28,7 @@ module DevLXC::CLI
|
|
28
28
|
desc "create [PLATFORM_IMAGE_NAME]", "Create a platform image"
|
29
29
|
def create(platform_image_name=nil)
|
30
30
|
start_time = Time.now
|
31
|
-
platform_image_names = %w(p-ubuntu-1204 p-ubuntu-1404 p-centos-5 p-centos-6)
|
31
|
+
platform_image_names = %w(p-ubuntu-1204 p-ubuntu-1404 p-ubuntu-1504 p-centos-5 p-centos-6 p-centos-7)
|
32
32
|
if platform_image_name.nil? || ! platform_image_names.include?(platform_image_name)
|
33
33
|
platform_image_names_with_index = platform_image_names.map.with_index{ |a, i| [i+1, *a]}
|
34
34
|
print_table platform_image_names_with_index
|
data/lib/dev-lxc/container.rb
CHANGED
@@ -47,7 +47,10 @@ 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
|
-
self.clear_config_item('lxc.mount.entries')
|
50
|
+
# self.clear_config_item('lxc.mount.entries') doesn't work as of liblxc 1.1.2 and at least up to 1.1.5-0ubuntu3~ubuntu15.04.1~ppa1
|
51
|
+
DevLXC.search_file_delete_line(self.config_file_name, /^lxc.mount.entry/)
|
52
|
+
self.clear_config
|
53
|
+
self.load_config
|
51
54
|
self.set_config_item("lxc.mount.entry", preserved_mounts)
|
52
55
|
end
|
53
56
|
mounts.each do |mount|
|
data/lib/dev-lxc/version.rb
CHANGED
data/lib/dev-lxc.rb
CHANGED
@@ -20,10 +20,21 @@ module DevLXC
|
|
20
20
|
platform_image.create("download", "btrfs", {}, 0, ["-d", "ubuntu", "-r", "precise", "-a", "amd64"])
|
21
21
|
when "p-ubuntu-1404"
|
22
22
|
platform_image.create("download", "btrfs", {}, 0, ["-d", "ubuntu", "-r", "trusty", "-a", "amd64"])
|
23
|
+
when "p-ubuntu-1504"
|
24
|
+
platform_image.create("download", "btrfs", {}, 0, ["-d", "ubuntu", "-r", "vivid", "-a", "amd64"])
|
23
25
|
when "p-centos-5"
|
24
26
|
platform_image.create("centos", "btrfs", {}, 0, ["-R", "5"])
|
25
27
|
when "p-centos-6"
|
26
28
|
platform_image.create("download", "btrfs", {}, 0, ["-d", "centos", "-r", "6", "-a", "amd64"])
|
29
|
+
when "p-centos-7"
|
30
|
+
platform_image.create("download", "btrfs", {}, 0, ["-d", "centos", "-r", "7", "-a", "amd64"])
|
31
|
+
# Centos 7 needs setpcap capabilities
|
32
|
+
# ref: https://bugzilla.redhat.com/show_bug.cgi?id=1176816
|
33
|
+
# ref: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1339781
|
34
|
+
# ref: http://vfamilyserver.org/blog/2015/05/centos-7-lxc-container-slow-boot/
|
35
|
+
DevLXC.search_file_replace(platform_image.config_file_name, /centos.common.conf/, 'fedora.common.conf')
|
36
|
+
platform_image.clear_config
|
37
|
+
platform_image.load_config
|
27
38
|
end
|
28
39
|
unless platform_image.config_item("lxc.mount.auto").nil?
|
29
40
|
platform_image.set_config_item("lxc.mount.auto", "proc:rw sys:rw")
|
@@ -43,12 +54,19 @@ module DevLXC
|
|
43
54
|
end
|
44
55
|
platform_image.run_command("apt-get update")
|
45
56
|
platform_image.run_command("apt-get install -y standard^ server^ vim-nox emacs23-nox curl tree openssh-server")
|
46
|
-
IO.write("#{platform_image.config_item('lxc.rootfs')}/etc/rc.local", "/usr/sbin/dpkg-reconfigure openssh-server\n")
|
57
|
+
IO.write("#{platform_image.config_item('lxc.rootfs')}/etc/rc.local", "#!/usr/bin/env bash\n\n/usr/sbin/dpkg-reconfigure openssh-server\n")
|
47
58
|
FileUtils.chmod(0755, "#{platform_image.config_item('lxc.rootfs')}/etc/rc.local")
|
48
59
|
when "p-ubuntu-1204", "p-ubuntu-1404"
|
49
60
|
platform_image.run_command("apt-get update")
|
50
61
|
platform_image.run_command("apt-get install -y standard^ server^ vim-nox emacs23-nox tree openssh-server")
|
51
|
-
IO.write("#{platform_image.config_item('lxc.rootfs')}/etc/rc.local", "/usr/sbin/dpkg-reconfigure openssh-server\n")
|
62
|
+
IO.write("#{platform_image.config_item('lxc.rootfs')}/etc/rc.local", "#!/usr/bin/env bash\n\n/usr/sbin/dpkg-reconfigure openssh-server\n")
|
63
|
+
FileUtils.chmod(0755, "#{platform_image.config_item('lxc.rootfs')}/etc/rc.local")
|
64
|
+
when "p-ubuntu-1504"
|
65
|
+
platform_image.run_command("apt-get update")
|
66
|
+
# install policykit-1 first Ref: https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1447654/
|
67
|
+
platform_image.run_command("apt-get install -y policykit-1")
|
68
|
+
platform_image.run_command("apt-get install -y standard^ server^ vim-nox emacs24-nox tree openssh-server")
|
69
|
+
IO.write("#{platform_image.config_item('lxc.rootfs')}/etc/rc.local", "#!/usr/bin/env bash\n\n/usr/sbin/dpkg-reconfigure openssh-server\n")
|
52
70
|
FileUtils.chmod(0755, "#{platform_image.config_item('lxc.rootfs')}/etc/rc.local")
|
53
71
|
when "p-centos-5"
|
54
72
|
# downgrade openssl temporarily to overcome an install bug
|
@@ -60,6 +78,8 @@ module DevLXC
|
|
60
78
|
append_line_to_file("#{platform_image.config_item('lxc.rootfs')}/etc/sudoers", "\n#includedir /etc/sudoers.d\n")
|
61
79
|
when "p-centos-6"
|
62
80
|
platform_image.run_command("yum install -y @base @core vim-enhanced emacs-nox tree openssh-server")
|
81
|
+
when "p-centos-7"
|
82
|
+
platform_image.run_command("yum install -y @base @core vim-enhanced emacs-nox tree openssh-server")
|
63
83
|
end
|
64
84
|
platform_image.run_command("useradd --create-home --shell /bin/bash --password $6$q3FDMpMZ$zfahCxEWHbzuEV98QPzhGZ7fLtGcLNZrbKK7OAYGXmJXZc07WbcxVnDwrMyX/cL6vSp4/IjlrVUZFBp7Orhyu1 dev-lxc")
|
65
85
|
|
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.4.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: 2015-
|
11
|
+
date: 2015-12-08 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.4.
|
115
|
+
rubygems_version: 2.4.8
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: A tool for creating Chef server clusters using LXC containers
|