knife-clodo 0.1.5 → 0.1.6
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.
- data/README +6 -10
- data/knife-clodo.gemspec +2 -2
- data/lib/chef/knife/bootstrap/debian6apt.erb +4 -2
- data/lib/chef/knife/clodo_server_create.rb +8 -1
- metadata +9 -9
data/README
CHANGED
@@ -2,14 +2,11 @@ knife-clodo is a knife plugin for Clodo.Ru API.
|
|
2
2
|
|
3
3
|
It uses fog library to interact with API.
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
Starting from fog-1.1.2, fog's provider for clodo presented
|
6
|
+
in upstream Git, so installation and setup is as simple as
|
7
|
+
running "gem install knife-clodo" from command line, and
|
8
|
+
adding next lines in your knife's configuration file:
|
8
9
|
|
9
|
-
|
10
|
-
Usage is simple as:
|
11
|
-
|
12
|
-
Write authorization data in your knife.rb as below:
|
13
10
|
knife[:clodo_username] = 'your@registration.email.net' # Your email used to authorise in clodo.ru billing.
|
14
11
|
knife[:clodo_api_key] = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' # Your API key
|
15
12
|
knife[:clodo_api_auth_url] = 'testapi.kh.clodo.ru' # Domain name of API server.
|
@@ -23,11 +20,10 @@ knife clodo server list
|
|
23
20
|
(To list your virtual servers)
|
24
21
|
|
25
22
|
knife clodo server start --server=10474
|
26
|
-
(where 10474
|
27
|
-
start)
|
23
|
+
(where 10474 is an ID of virtual server to start)
|
28
24
|
|
29
25
|
knife clodo server start --all
|
30
|
-
(that will request start
|
26
|
+
(that will request to start all of the servers that is not in
|
31
27
|
"is_running" or "is_request" state)
|
32
28
|
|
33
29
|
knife clodo server create -d debian6apt -r "recipe[vds-performance-tests]" --server-disk=5 --server-memory=256 --server-memory-max=512 -I 541
|
data/knife-clodo.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'knife-clodo'
|
3
|
-
spec.version = '0.1.
|
3
|
+
spec.version = '0.1.6'
|
4
4
|
spec.summary = 'Clodo.Ru knife plugin'
|
5
|
-
spec.add_dependency('fog', '>=
|
5
|
+
spec.add_dependency('fog', '>= 1.1.2')
|
6
6
|
spec.description = <<-EOF
|
7
7
|
Knife plugin for Clodo.Ru cloud provider.
|
8
8
|
EOF
|
@@ -1,7 +1,9 @@
|
|
1
1
|
bash -c '
|
2
2
|
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
|
3
3
|
|
4
|
-
|
4
|
+
ip route flush proto kernel scope link
|
5
|
+
|
6
|
+
while [ -e /var/adm/autoinstall/init.d/* ]; do
|
5
7
|
echo "Autoinstallation still in progress. Waiting 5sec...";
|
6
8
|
sleep 5;
|
7
9
|
done
|
@@ -39,7 +41,7 @@ rm /tmp/validation.pem
|
|
39
41
|
<% end -%>
|
40
42
|
|
41
43
|
<% if @config[:chef_node_name] %>
|
42
|
-
[ `grep -qx "node_name
|
44
|
+
[ `grep -qx "node_name " /etc/chef/client.rb` ] || echo "node_name \"$(hostname -f)\"" >> /etc/chef/client.rb
|
43
45
|
<% end -%>
|
44
46
|
|
45
47
|
<% if knife_config[:bootstrap_proxy] %>
|
@@ -112,6 +112,12 @@ class Chef
|
|
112
112
|
:proc => lambda { |o| o.split(/[\s,]+/) },
|
113
113
|
:default => []
|
114
114
|
|
115
|
+
option :autoupdate,
|
116
|
+
:long => "--auto-update",
|
117
|
+
:description => "Allow clodo panel to autoupdate OS packages at first run? (default is do not allow)",
|
118
|
+
:proc => {|a| Chef::Config[:knife][:autoupdate] = 1 },
|
119
|
+
:default => 0
|
120
|
+
|
115
121
|
def tcp_test_ssh(hostname)
|
116
122
|
tcp_socket = TCPSocket.new(hostname, 22)
|
117
123
|
readable = IO.select([tcp_socket], nil, nil, 5)
|
@@ -150,7 +156,8 @@ class Chef
|
|
150
156
|
:vps_memory_max => locate_config_value(:server_memory_max),
|
151
157
|
:vps_hdd => locate_config_value(:server_disk),
|
152
158
|
:vps_admin => locate_config_value(:server_support_level),
|
153
|
-
:vps_os => locate_config_value(:image)
|
159
|
+
:vps_os => locate_config_value(:image),
|
160
|
+
:vps_autoupdate => locate_config_value(:autoupdate)
|
154
161
|
}
|
155
162
|
|
156
163
|
options[:vps_title] = config[:server_name] if config[:server_name]
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-clodo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stepan G. Fedorov
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-12-19 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: fog
|
@@ -25,12 +25,12 @@ dependencies:
|
|
25
25
|
requirements:
|
26
26
|
- - ">="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
28
|
+
hash: 23
|
29
29
|
segments:
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
version:
|
30
|
+
- 1
|
31
|
+
- 1
|
32
|
+
- 2
|
33
|
+
version: 1.1.2
|
34
34
|
type: :runtime
|
35
35
|
version_requirements: *id001
|
36
36
|
description: "\tKnife plugin for Clodo.Ru cloud provider.\n"
|