sapoku 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. data/lib/sapoku.rb +9 -6
  2. metadata +1 -1
data/lib/sapoku.rb CHANGED
@@ -54,6 +54,7 @@ class Tadpole
54
54
  self.save
55
55
  output = "Creating new container for your app using the #{@stack} stack"
56
56
  output += `sudo lxc-clone -o #{@stack} -n #{@app_name}`
57
+ output += "Applying new config file to container"
57
58
  create_lxc_config
58
59
  output += "Booting your new container"
59
60
  output += `sudo lxc-start -n #{@app_name} -d`
@@ -119,11 +120,17 @@ class Tadpole
119
120
  @name = self.app_name
120
121
 
121
122
  template = %{
123
+ lxc.utsname = <%= @name %>
124
+ lxc.mount = /var/lib/lxc/<%= @name %>/fstab
125
+ lxc.rootfs = /var/lib/lxc/<%= @name %>/rootfs
126
+
127
+ # networking
122
128
  lxc.network.type=veth
123
- lxc.network.link=lxcbr0
124
129
  lxc.network.flags=up
130
+ lxc.network.link=lxcbr0
125
131
  #lxc.network.hwaddr=00:16:3e:85:68:c1
126
- lxc.network.ipv4=<%= @ip %>
132
+ lxc.network.name = eth0
133
+ lxc.network.ipv4=<%= @ip %>/24
127
134
 
128
135
  lxc.devttydir = lxc
129
136
  lxc.tty = 4
@@ -160,10 +167,6 @@ lxc.cgroup.devices.allow = c 10:200 rwm
160
167
  lxc.cgroup.devices.allow = c 1:7 rwm
161
168
  lxc.cgroup.devices.allow = c 10:228 rwm
162
169
  lxc.cgroup.devices.allow = c 10:232 rwm
163
-
164
- lxc.utsname = <%= @name %>
165
- lxc.mount = /var/lib/lxc/<%= @name %>/fstab
166
- lxc.rootfs = /var/lib/lxc/<%= @name %>/rootfs
167
170
  }
168
171
 
169
172
  erb = ERB.new(template)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sapoku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: