libvirtinator 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,5 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
chroot $1 apt-key adv --keyserver hkp://
|
4
|
-
chroot $1 sh -c "echo deb https://
|
5
|
-
chroot $1 apt-get
|
6
|
-
chroot $1 apt-get update -qq
|
7
|
-
chroot $1 apt-get install -y lxc-docker grub-pc
|
8
|
-
chroot $1 sed -i'' -e"s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"cgroup_enable=memory swapaccount=1\"/" /etc/default/grub
|
9
|
-
chroot $1 update-grub
|
3
|
+
chroot $1 apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
4
|
+
chroot $1 sh -c "echo deb https://apt.dockerproject.org/repo ubuntu-trusty main > /etc/apt/sources.list.d/docker.list"
|
5
|
+
chroot $1 apt-get update -qq && apt-get install -y docker-engine
|
@@ -12,5 +12,4 @@ flavour = virtual
|
|
12
12
|
suite = trusty
|
13
13
|
domain = example.com
|
14
14
|
components = main,restricted,universe,multiverse
|
15
|
-
|
16
|
-
addpkg = openssh-server, unattended-upgrades, acpid, aptitude, language-pack-en-base, bwm-ng, htop, iotop, bzip2, file, unzip, zip, rar, unrar, nmap, man-db, curl, tmux, git-core, vim, locate, ipcalc, sl, nagios-plugins-basic, wget, rsync, tcpdump, mtr, apparmor, cgroup-lite, apt-transport-https, linux-image-generic, grub-pc
|
15
|
+
addpkg = openssh-server, unattended-upgrades, acpid, aptitude, language-pack-en-base, bwm-ng, htop, iotop, bzip2, file, unzip, zip, rar, unrar, nmap, man-db, curl, tmux, git-core, vim, locate, ipcalc, sl, nagios-plugins-basic, wget, rsync, tcpdump, mtr, apparmor, cgroup-lite, apt-transport-https, linux-image-generic, linux-image-extra-virtual
|
data/lib/libvirtinator/vm.rb
CHANGED
@@ -227,8 +227,10 @@ task :update_root_image => 'libvirtinator:load_settings' do
|
|
227
227
|
"#{mount_point}/etc/sudoers"
|
228
228
|
user = fetch(:user)
|
229
229
|
begin
|
230
|
-
|
231
|
-
|
230
|
+
mounts = ["sys", "dev", "proc"]
|
231
|
+
mounts.each do |mount|
|
232
|
+
execute "mount", "-o", "bind", "/#{mount}", "#{mount_point}/#{mount}"
|
233
|
+
end
|
232
234
|
execute "chroot", mount_point, "/bin/bash", "-c",
|
233
235
|
"\"if", "!", "id", user, "&>", "/dev/null;", "then",
|
234
236
|
"useradd", "--user-group", "--shell",
|
@@ -250,8 +252,9 @@ task :update_root_image => 'libvirtinator:load_settings' do
|
|
250
252
|
execute "chmod", "600", "#{mount_point}/home/#{user}/.ssh/authorized_keys"
|
251
253
|
execute "mkdir", "-p", "#{mount_point}#{fetch(:data_disk_mount_point)}" if fetch(:data_disk_enabled)
|
252
254
|
ensure
|
253
|
-
|
254
|
-
|
255
|
+
mounts.each do |mount|
|
256
|
+
execute "umount", "#{mount_point}/#{mount}"
|
257
|
+
end
|
255
258
|
end
|
256
259
|
end
|
257
260
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libvirtinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|