knife-cosmic 0.2.0
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.
- checksums.yaml +7 -0
- data/CHANGES.rdoc +186 -0
- data/LICENSE +202 -0
- data/README.rdoc +427 -0
- data/lib/chef/knife/cosmic_aag_list.rb +58 -0
- data/lib/chef/knife/cosmic_account_list.rb +87 -0
- data/lib/chef/knife/cosmic_base.rb +108 -0
- data/lib/chef/knife/cosmic_baselist.rb +111 -0
- data/lib/chef/knife/cosmic_cluster_list.rb +60 -0
- data/lib/chef/knife/cosmic_config_list.rb +56 -0
- data/lib/chef/knife/cosmic_disk_list.rb +58 -0
- data/lib/chef/knife/cosmic_domain_list.rb +53 -0
- data/lib/chef/knife/cosmic_firewallrule_create.rb +138 -0
- data/lib/chef/knife/cosmic_firewallrule_list.rb +62 -0
- data/lib/chef/knife/cosmic_forwardrule_create.rb +145 -0
- data/lib/chef/knife/cosmic_host_list.rb +61 -0
- data/lib/chef/knife/cosmic_hosts.rb +58 -0
- data/lib/chef/knife/cosmic_iso_list.rb +89 -0
- data/lib/chef/knife/cosmic_keypair_create.rb +72 -0
- data/lib/chef/knife/cosmic_keypair_delete.rb +60 -0
- data/lib/chef/knife/cosmic_keypair_list.rb +44 -0
- data/lib/chef/knife/cosmic_network_list.rb +63 -0
- data/lib/chef/knife/cosmic_oscategory_list.rb +50 -0
- data/lib/chef/knife/cosmic_ostype_list.rb +52 -0
- data/lib/chef/knife/cosmic_pod_list.rb +60 -0
- data/lib/chef/knife/cosmic_project_list.rb +63 -0
- data/lib/chef/knife/cosmic_publicip_list.rb +55 -0
- data/lib/chef/knife/cosmic_router_list.rb +64 -0
- data/lib/chef/knife/cosmic_securitygroup_list.rb +59 -0
- data/lib/chef/knife/cosmic_server_add_nic.rb +109 -0
- data/lib/chef/knife/cosmic_server_create.rb +674 -0
- data/lib/chef/knife/cosmic_server_delete.rb +153 -0
- data/lib/chef/knife/cosmic_server_list.rb +167 -0
- data/lib/chef/knife/cosmic_server_passwordreset.rb +91 -0
- data/lib/chef/knife/cosmic_server_reboot.rb +99 -0
- data/lib/chef/knife/cosmic_server_remove_nic.rb +101 -0
- data/lib/chef/knife/cosmic_server_start.rb +104 -0
- data/lib/chef/knife/cosmic_server_stop.rb +118 -0
- data/lib/chef/knife/cosmic_server_update.rb +47 -0
- data/lib/chef/knife/cosmic_service_list.rb +74 -0
- data/lib/chef/knife/cosmic_stack_create.rb +298 -0
- data/lib/chef/knife/cosmic_stack_delete.rb +79 -0
- data/lib/chef/knife/cosmic_template_create.rb +129 -0
- data/lib/chef/knife/cosmic_template_extract.rb +104 -0
- data/lib/chef/knife/cosmic_template_list.rb +88 -0
- data/lib/chef/knife/cosmic_template_register.rb +187 -0
- data/lib/chef/knife/cosmic_user_list.rb +62 -0
- data/lib/chef/knife/cosmic_volume_attach.rb +70 -0
- data/lib/chef/knife/cosmic_volume_create.rb +108 -0
- data/lib/chef/knife/cosmic_volume_delete.rb +97 -0
- data/lib/chef/knife/cosmic_volume_detach.rb +61 -0
- data/lib/chef/knife/cosmic_volume_list.rb +77 -0
- data/lib/chef/knife/cosmic_zone_list.rb +53 -0
- data/lib/knife-cosmic/connection.rb +1046 -0
- metadata +127 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dd5dbfbc2b0c84f32febd5ef2a8b44d1fd5075bd
|
4
|
+
data.tar.gz: fd7321a56f2f2887ad63797c45cb74029b005655
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1d2e0e81f8752262df52f1689f047784bd2668fc752fd6677975b9f5dbac45629782c7db1f5d6784a87a6dc95ab3b16a05d210d0c5b554fe95766a2531f1cf7e
|
7
|
+
data.tar.gz: 33eba13bc1cb02cf693a4355d68e5c412dd69c3c16519fc1caf033223451de07be718e5a854e327ee74ce61b198a6ac255161edb70e05cbfaaa71bc18cf29fdd
|
data/CHANGES.rdoc
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
= Changes
|
2
|
+
== 2016-03-18 (0.1.0)
|
3
|
+
* Added subcommand: <tt>cosmic volume attach</tt> (David Bruce 3 Jul 2015)
|
4
|
+
* Added subcommand: <tt>cosmic volume detach</tt> (David Bruce 3 Jul 2015)
|
5
|
+
* Removed gem depedency (Fred Neubauer 18 Mar 2016)
|
6
|
+
|
7
|
+
== 2015-04-24 (0.0.20)
|
8
|
+
* Added support for expunge option for <tt>cosmic server destroy</tt> (Anton Opgenoort 24 Mar 2015)
|
9
|
+
* Added support for Chef 12 Client (Sander Botman 24 Apr 2015)
|
10
|
+
|
11
|
+
== 2015-03-19 (0.0.19)
|
12
|
+
* Added support for --boostrap-proxy for <tt>cosmic server create</tt> (Rutger Te Nijenhuis 19 Feb 2015)
|
13
|
+
* Bugfix: no implicit conversion of String into Integer error, if no Nic present (Frank Louwers 19 Mar 2015)
|
14
|
+
|
15
|
+
== 2014-12-29 (0.0.18)
|
16
|
+
* Chef 12 has been released and installation of the plugin fails on certain components while it tries to install the latest chef-gem.
|
17
|
+
We are pinning this version on chef 11.0 and we will make the new version 0.1.0 chef 12 compatible.
|
18
|
+
If you have a urgent need for this, please drop us a line. (Sander Botman 29 Dec 2014)
|
19
|
+
* Added support for --bootstrap-wget-options for <tt>cosmic server create</tt> (Deepak Sihag 25 Sep 2014)
|
20
|
+
* Added subcommand: <tt>cosmic volume delete</tt> (Muga Nishizawa 7 May 2014)
|
21
|
+
* Bugfix: within the README (Warren Bain 15 Apr 2014)
|
22
|
+
* Added support for --size for <tt>cosmic server create</tt> (Muga Nishizawa 14 Apr 2014)
|
23
|
+
* Bugfix: list_object method calls by invalid typed parameters (Muga Nishizawa 11 Apr 2014)
|
24
|
+
* Bugfix: flexibility around ssh port configuration (Warren Bain 9 Apr 2014)
|
25
|
+
* Bugfix: cosmetic fix to options indenting (Warren Bain 9 Apr 2014)
|
26
|
+
* Bugfix: remove fqdn from node name when deleting server (Warren Bain 9 Apr 2014)
|
27
|
+
* Bugfix: fix whitespace (Warren Bain 9 Apr 2014)
|
28
|
+
|
29
|
+
== 2014-03-04 (0.0.17)
|
30
|
+
* Added support for --isdynamicallyscalable for <tt>cosmic template register</tt> (Sander Botman, 3 Apr 2014)
|
31
|
+
* Added support for --anti-affinity-groups for <tt>cosmic server create</tt> (John E. Vincent, 2 Apr 2014)
|
32
|
+
* Bugfix: on winrm bootstrap (Sander van Harmelen, 26 Mar 2014)
|
33
|
+
* Added support for --expunge for destroying server (Ian Southam, 19 Mar 2014)
|
34
|
+
* Bugfix: cosmetic changes on error output (Sander Botman, 5 Mar 2014)
|
35
|
+
|
36
|
+
== 2014-02-12 (0.0.16)
|
37
|
+
* Added support for --no-public-ip for <tt>cosmic server list</tt> (Sander Botman, 12 Feb 2014)
|
38
|
+
* Added support for secret and secret_file in <tt>cosmic server create</tt> (Jeremy Baumont, 10 Feb 2014)
|
39
|
+
* Bugfix: correction in isextractable on <tt>cosmic template register</tt> (Etharin, 30 Jan 2014
|
40
|
+
* Added support for private-ip in <tt>cosmic server create</tt> (Joaquim Dos Santos, 26 Jan 2014)
|
41
|
+
* Bugfix: Keypair support on stack create (Ben Langfeld, 29 Nov 2013)
|
42
|
+
* Bugfix: Bootstrap even without port_rules options (Ben Langfeld, 29 Nov 2013)
|
43
|
+
* Bugfix: Option to specify iso as template when deploying instance <tt>cosmic server create</tt> (Sander Botman, 28 Nov 2013)
|
44
|
+
* Restructure all list commands (Sander Botman, 28 Nov 2013)
|
45
|
+
* Added subcommand: <tt>cosmic aag list</tt> (John E. Vincent, 23 Nov 2013)
|
46
|
+
* Added support for anti-affinity groups in <tt>cosmic server create</tt> (John E. Vincent, 23 Nov 2013)
|
47
|
+
* Added subcommand: <tt>cosmic server add nic</tt> (John E. Vincent, 13 Nov 2014)
|
48
|
+
* Added Trademark (David Nalley, 08 Nov 2013)
|
49
|
+
* Bugfix: fixing server creation inside basic networks (Sander Botman, 07 Nov 2013)
|
50
|
+
|
51
|
+
== 2013-11-04 (0.0.15)
|
52
|
+
* Bugfix: fixed the proxy with the option: --cosmic-proxy http://username:password@yourproxy:8080 or use config file. (Sander Botman, 04 Nov 2013)
|
53
|
+
* Added subcommand: <tt>cosmic publicip list</tt> (Sander Botman, 03 Nov 2013)
|
54
|
+
* Bugfix: removed the chef rest dependency because this is changed in chef 11.8.0 (Sander Botman, 03 Nov 2013)
|
55
|
+
* Bugfix: added the option --cosmic-no-ssl-verify in order to ignore ssl verification (Sander Botman, 03 Nov 2013)
|
56
|
+
* Added subcommand: <tt>cosmic forwardrule create</tt> (Sander Botman, 28 Aug 2013)
|
57
|
+
* Added subcommand: <tt>cosmic firewallrule create</tt> (Sander Botman, 28 Aug 2013)
|
58
|
+
* Added the option: <tt>--set-display-name</tt> to <tt>server create</tt> (Florin Stan, 5 Aug 2013)
|
59
|
+
* Added the option: <tt>--keypair</tt> to <tt>server create</tt> (Florin Stan, 31 Jul 2013)
|
60
|
+
* Added subcommand: <tt>cosmic volume create</tt> (Jeremy Baumont, 17 Jul 2013)
|
61
|
+
* Added the option: <tt>--disk</tt> to <tt>server create</tt> (Stanislav Voroniy (voroniys) 13 Jun 2013)
|
62
|
+
* Added subcommands: <tt>cosmic keypair list</tt>, <tt>cosmic keypair create</tt>, <tt>cosmic keypair delete</tt> and adding basic zone check. (Sebastian Goasguen (runseb) 29 May 2013)
|
63
|
+
* Bugfix: changed output name to password (Warren Bain, 26 May 2013)
|
64
|
+
* Bugfix: various bugfixes and fixing bootstrap context (bacoboy, 22 Apr 2013)
|
65
|
+
|
66
|
+
== 2013-04-14 (0.0.14)
|
67
|
+
* Added bash/addinstance.sh script in onder to ease instance creation from cli.
|
68
|
+
|
69
|
+
* Added the cosmic_base.rb to merge all common options.
|
70
|
+
* Added the cosmic_base_list.rb to merge all common options and functions for the list commands.
|
71
|
+
* Added the option: <tt>-P</tt> / <tt>--cosmic-project</tt> to the following commands: <tt>account list</tt>, <tt>firewallrule list</tt>, <tt>hosts</tt>,
|
72
|
+
<tt>iso list</tt>, <tt>network list</tt>, <tt>router list</tt>, <tt>server list</tt>, <tt>template list</tt>, <tt>volume list</tt>
|
73
|
+
|
74
|
+
* Added subcommands: <tt>account list</tt>, <tt>cluster list</tt>, <tt>config list</tt>, <tt>disk create</tt>,
|
75
|
+
<tt>disk list</tt>, <tt>domain list</tt>,<tt>firewallrule list</tt>, <tt>host list</tt>,
|
76
|
+
<tt>iso list</tt>, <tt>ostype list</tt>, <tt>oscategory list</tt>, <tt>pod list</tt>, <tt>project list</tt>,
|
77
|
+
<tt>service create</tt>, <tt>template create</tt>, <tt>template extract</tt>, <tt>template register</tt>, <tt>router list</tt>, <tt>user list</tt>, <tt>volume list</tt>
|
78
|
+
|
79
|
+
* Updated subcommands: <tt>hosts</tt>, <tt>network list</tt>, <tt>server list</tt>, <tt>service list</tt>,
|
80
|
+
<tt>template list</tt>, <tt>zone list</tt>
|
81
|
+
|
82
|
+
* Added option: <tt>--filter</tt> to all list commands. This filters your output on the fields that you specify.
|
83
|
+
Filter can be a string <tt>'name'</tt> or regexp <tt>'/name/i'</tt>. Example: <tt>--filter "instancename:/i-xxx/i,accountname:jenkins"</tt>
|
84
|
+
Additional filters can be added by separating them using a comma ','
|
85
|
+
NOTE: --filter is done client side, filtering by --name or --keyword is faster and is done server side.
|
86
|
+
|
87
|
+
* Added option: <tt>--fields</tt> to all list commands. Here you specify the fields that you want to display in your output.
|
88
|
+
Default outputs will be shown if no fields are defined. Example: <tt>--fields "name, instancename, domain"</tt>
|
89
|
+
|
90
|
+
* Added option: <tt>--noheader</tt> to all list commands.
|
91
|
+
This will remove the header from the output.
|
92
|
+
|
93
|
+
* Added option: <tt>--fieldlist</tt> to all list commands. This will display the fields that you can use to filter or
|
94
|
+
use in your output. Example will be given with the first result that you specify in your filter.
|
95
|
+
|
96
|
+
* Added option: <tt>--listall</tt> to: <tt>account list</tt>, <tt>domain list</tt>, <tt>firewallrule list</tt>, <tt>hosts</tt>, <tt>iso list</tt>,
|
97
|
+
<tt>network list</tt>, <tt>project list</tt>, <tt>router list</tt>, <tt>server list</tt>, <tt>template list</tt>, <tt>user list</tt>, <tt>volume list</tt>.
|
98
|
+
|
99
|
+
* Added option: <tt>--keyword</tt> to: <tt>account list</tt>, <tt>cluster list</tt>, <tt>config list</tt>, <tt>disk list</tt>, <tt>firewallrule list</tt>,
|
100
|
+
<tt>hosts</tt>, <tt>iso list</tt>, <tt>network list</tt>, <tt>ostype list</tt>, <tt>oscategory list</tt>, <tt>pod list</tt>, <tt>project list</tt>, <tt>router list</tt>,
|
101
|
+
<tt>server list</tt>, <tt>service list</tt>, <tt>user list</tt>, <tt>volume list</tt>, <tt>zone list</tt>.
|
102
|
+
|
103
|
+
* Added option: <tt>--name</tt> to: <tt>account list</tt>, <tt>cluster list</tt>, <tt>config list</tt>, <tt>disk list</tt>, <tt>host list</tt>, <tt>hosts</tt>, <tt>iso list</tt>,
|
104
|
+
<tt>pod list</tt>, <tt>project list</tt>, <tt>router list</tt>, <tt>server list</tt>, <tt>service list</tt>, <tt>volume list</tt>
|
105
|
+
|
106
|
+
* Added option: <tt>--action</tt> to: <tt>server list</tt> which <tt>start</tt>, <tt>stop</tt> or <tt>destroy</tt> the machines based on the result.
|
107
|
+
* Added option: <tt>--cosmic-password</tt> to let cosmic generate the password (only works if your template supports this.)
|
108
|
+
* Added option: <tt>--ipfwd-rules</tt> and <tt>--fw-rules</tt> to: <tt>server create</tt>
|
109
|
+
* Fixed delay-loading.
|
110
|
+
* Fixed <tt>-F json</tt> / <tt>--format json</tt> option for every list command.
|
111
|
+
* Fixed <tt>--no-bootstrap</tt> option to ignore the chef bootstrap
|
112
|
+
* Fixed default bootstrap template to: <tt>chef-full</tt>
|
113
|
+
|
114
|
+
|
115
|
+
== 2012-11-29 (0.0.13)
|
116
|
+
* Windows support
|
117
|
+
https://github.com/cosmic-extras/knife-cosmic/issues/31
|
118
|
+
* Support for Projects
|
119
|
+
* HTTPS support
|
120
|
+
|
121
|
+
== 2012-05-17 (0.0.12)
|
122
|
+
* Adding option to disable public IP allocation on server create
|
123
|
+
https://github.com/cosmic/knife-cosmic/pull/8
|
124
|
+
* Fix whitespace issue in network names
|
125
|
+
https://github.com/cosmic/knife-cosmic/pull/7
|
126
|
+
|
127
|
+
== 2011-11-03 (0.0.11)
|
128
|
+
* Added LICENSE file and licensing headers to source. No feature changes.
|
129
|
+
|
130
|
+
== 2011-10-13 (0.0.10)
|
131
|
+
* Support for multi-homed VMs: The --networks option for the <tt>server create</tt> command takes a comma-separated list
|
132
|
+
of network offering names. The created VM will have one nic per network, with nicosmic assigned to networks in the order
|
133
|
+
specified (e.g. the first network in the list will be assigned to eth0, the second to eth1 and so on). The --networks
|
134
|
+
option replaces the --network option, which supported a single network name.
|
135
|
+
* The <tt>server list</tt> command now shows the VM 'displayname' in parentheses when the displayname is defined and is
|
136
|
+
different than the VM name.
|
137
|
+
* Public IP logic has been updated to support multi-homed VMs. It now uses the first nic attached to a network with the
|
138
|
+
'default' value set to true as the primary interface.
|
139
|
+
|
140
|
+
== 2011-08-30 (0.0.9)
|
141
|
+
* Added subcommands: <tt>server start</tt>, <tt>server stop</tt> and <tt>server reboot</tt>.
|
142
|
+
* Updated the <tt>hosts</tt> command to return short hostnames and FQDNs. Also added comments where needed so the output
|
143
|
+
can be directly pasted into /etc/hosts.
|
144
|
+
|
145
|
+
== 2011-08-06 (0.0.8)
|
146
|
+
* Changed cosmic async command timeout from 60 to 300 seconds.
|
147
|
+
|
148
|
+
== 2011-07-21 (0.0.7)
|
149
|
+
* Fixed http_request actions in <tt>stack create</tt>.
|
150
|
+
|
151
|
+
== 2011-07-15 (0.0.6)
|
152
|
+
* The <tt>server delete</tt> command now deletes the chef node and client if their names match the fqdn of the server.
|
153
|
+
* Added the <tt>stack create</tt> and <tt>stack delete</tt> commands for bulk creation and deletion of servers using a
|
154
|
+
JSON definition file. These commands are still experimental and subject to change. See README.rdoc for details.
|
155
|
+
* Added a <tt>hosts</tt> command, which lists the public ip address and fqdn of all servers in /etc/hosts file format.
|
156
|
+
* Fixed nil reference bug in <tt>server list</tt> command.
|
157
|
+
|
158
|
+
== 2011-06-05 (0.0.5)
|
159
|
+
* Added <tt>--port-rules</tt> option to the <tt>cosmic server create</tt> command. It accepts a list of port forwarding
|
160
|
+
rules to be created for the server (only applies to servers on a virtual network). See 'Port forwarding rules for
|
161
|
+
virtual networks' in README.rdoc for details.
|
162
|
+
|
163
|
+
== 2011-06-01 (0.0.4)
|
164
|
+
* Fixed ssh detection bug.
|
165
|
+
|
166
|
+
== 2011-05-30 (0.0.3)
|
167
|
+
|
168
|
+
* Added support for virtual networks. A public IP address is allocated for each new server in a virtual network
|
169
|
+
and an ssh port forwarding rule is created. The IP is released when the server is destroyed as long as it doesn't
|
170
|
+
have forwarding rules for any servers other than the one being deleted.
|
171
|
+
* Default network is now detected automatically. If there is more than one network marked as 'default' for an
|
172
|
+
account, the first Direct network is preferred.
|
173
|
+
|
174
|
+
== 2011-05-22 (0.0.2)
|
175
|
+
|
176
|
+
* Added subcommands: <tt>service list</tt>, <tt>template list</tt>, <tt>network list</tt> and <tt>zone list</tt>.
|
177
|
+
* Removed -H (and --hostname) option from the <tt>cosmic server create</tt> command. The host name is now the first
|
178
|
+
argument to the command: <tt>knife cosmic server create myhostname</tt>. If a host name is not specified, cosmic
|
179
|
+
will use an auto-generated name.
|
180
|
+
* Added --no-bootstrap option to the server create command. This prevents Chef from being installed on the new server.
|
181
|
+
* Fixed help banners (commands were shown as <tt>knife cosmic ...</tt> instead of <tt>knife cosmic ...</tt>).
|
182
|
+
* Added README.rdoc.
|
183
|
+
|
184
|
+
== 2011-05-15 (0.0.1)
|
185
|
+
|
186
|
+
* Initial release
|
data/LICENSE
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/README.rdoc
ADDED
@@ -0,0 +1,427 @@
|
|
1
|
+
= knife-cosmic
|
2
|
+
|
3
|
+
{<img src="https://codeclimate.com/github/cosmic-extras/knife-cosmic.png" />}[https://codeclimate.com/github/cosmic-extras/knife-cosmic]
|
4
|
+
{<img src="https://gemnasium.com/cosmic-extras/knife-cosmic.png" alt="Dependency Status" />}[https://gemnasium.com/cosmic-extras/knife-cosmic]
|
5
|
+
|
6
|
+
== DESCRIPTION:
|
7
|
+
|
8
|
+
This is the Edmunds Knife plugin for cosmic. This plugin gives Knife the ability to create, bootstrap and manage
|
9
|
+
cosmic instances.
|
10
|
+
|
11
|
+
== INSTALLATION:
|
12
|
+
This plugin is distributed as a Ruby Gem. To install it, run:
|
13
|
+
|
14
|
+
gem install knife-cosmic
|
15
|
+
|
16
|
+
Depending on your system's configuration, you may need to run this command with root privileges.
|
17
|
+
|
18
|
+
== CONFIGURATION:
|
19
|
+
In order to communicate with the cosmic API you will have to tell Knife about your cosmic API Key, your Secret Key and the URL of the API endpoint.
|
20
|
+
The easiest way to accomplish this is to create some entries in your <tt>knife.rb</tt> file:
|
21
|
+
|
22
|
+
knife[:cosmic_url] = "http://yourcosmicosmicerver.com:8080/client/api
|
23
|
+
knife[:cosmic_api_key] = "Your cosmic API Key"
|
24
|
+
knife[:cosmic_secret_key] = "Your cosmic Secret Key"
|
25
|
+
|
26
|
+
If your knife.rb file will be checked into a SCM system (ie readable by others) you may want to read the values from environment variables:
|
27
|
+
|
28
|
+
knife[:cosmic_url] = "#{ENV['cosmic_URL']}"
|
29
|
+
knife[:cosmic_api_key] = "#{ENV['cosmic_API_KEY']}"
|
30
|
+
knife[:cosmic_secret_key] = "#{ENV['cosmic_SECRET_KEY']}"
|
31
|
+
|
32
|
+
You also have the option of passing your cosmic URL and API/Secret Keys into the individual knife subcommands using the <tt>-U</tt> (or <tt>--cosmic-url</tt>),
|
33
|
+
<tt>-A</tt> (or <tt>--cosmic-api-key </tt>) <tt>-K</tt> (or <tt>--cosmic-secret-key</tt>) command options
|
34
|
+
# provision a new small RHEL 5.6 webserver
|
35
|
+
knife cosmic server create my-server -r 'role[webserver]' -S "small" -T "RHEL 5.6 Base" -A 'Your cosmic API Key' -K "Your cosmic Secret Key" --distro "rhel5-gems"
|
36
|
+
|
37
|
+
Additionally the following options may be set in your <tt>knife.rb</tt>:
|
38
|
+
|
39
|
+
* knife[:cosmic_service]
|
40
|
+
* knife[:cosmic_template]
|
41
|
+
* knife[:cosmic_zone]
|
42
|
+
* knife[:cosmic_proxy]
|
43
|
+
* knife[:cosmic_no_ssl_verify]
|
44
|
+
* knife[:distro]
|
45
|
+
* knife[:template_file]
|
46
|
+
|
47
|
+
== Public Clouds (Tata InstaCompute, Ninefold etc):
|
48
|
+
To get this plugin to work in public clouds, it is essential that the virtual network (and router) be allocated to the account. cosmic clouds automatically creates a virtual network when the first VM is requested to be created. Hence, it is essential to create the first VM (of a newly created account) manually(which can be terminated immediately if not required) to ensure the virtual network is created.
|
49
|
+
|
50
|
+
== SUBCOMMANDS:
|
51
|
+
|
52
|
+
This plugin provides the following Knife subcommands. Specific command options can be found by invoking the subcommand with a <tt>--help</tt> flag
|
53
|
+
|
54
|
+
=== knife cosmic <command> list
|
55
|
+
|
56
|
+
<tt>--filter</tt> Filters your output on the fields that you specify. Filter can be a string 'name' or regexp '/name/i'
|
57
|
+
Example: knife cosmic server list --filter "instancename:/i-xxx/i, account:accname"
|
58
|
+
|
59
|
+
<tt>--fields</tt> The fields that you want to display in your output. Default outputs will be shown if no fields are defined.
|
60
|
+
Example: knife cosmic server list --fields "name, instancename, domain"
|
61
|
+
|
62
|
+
<tt>--fieldlist</tt> This will display all information returned by the cosmic API. These fields can be used within the <tt>--fields</tt> or <tt>--filter</tt> to create custom output.
|
63
|
+
The data displayed is based on first result returned in your output. You can get other result by using the <tt>--filter</tt> option.
|
64
|
+
|
65
|
+
<tt>--noheader</tt> this will remove the column header from the output.
|
66
|
+
|
67
|
+
|
68
|
+
=== knife cosmic server create
|
69
|
+
|
70
|
+
Provisions a new server in cosmic and then performs a Chef bootstrap (using the SSH protocol). The goal of the bootstrap is to get Chef installed on the target
|
71
|
+
system so it can run Chef Client with a Chef Server. The main assumption is a baseline OS installation exists (provided by the provisioning). It is primarily
|
72
|
+
intended for Chef Client systems that talk to a Chef server. By default the server is bootstrapped using the 'chef-full' template (default bootstrap option for knife,
|
73
|
+
(Ref. http://docosmic.opscode.com/knife_bootstrap.html). This can be overridden using the <tt>-d</tt> or <tt>--template-file</tt> command options.
|
74
|
+
VM provided with <tt>--no-bootstrap</tt> option have no forwarded ports or forwared ip rules (in case <tt>--static-nat</tt> is used).
|
75
|
+
|
76
|
+
By default, new servers are allocated a public IP address mapping to the cosmic private IP address. If you do not want this behavior, pass the <tt>--no-public-ip</tt> option.
|
77
|
+
|
78
|
+
Forcing cloustack to reserve and use a certain private ipv4 address when deploying an instance inside an advanced zone is possible by passing <option>--private-ip</option> followed by the intended ipv4 address. Ip Address must be contained within the network mask of the isolated network, of course.
|
79
|
+
|
80
|
+
Example: knife cosmic server create testvm --private-ip 192.168.1.1 --networks mynetwork
|
81
|
+
|
82
|
+
Here mynetwork must have a network mask for example like 192.168.1.0/24.
|
83
|
+
|
84
|
+
==== Port forwarding rules for virtual networks
|
85
|
+
The <tt>--port-rules</tt> option takes a comma separated list of port forwarding rules. These rules are created on the
|
86
|
+
virtual public ip address of the server. Note that this option only applies to servers using a virtual network; it is
|
87
|
+
ignored if the server's public ip address is on a direct attached network.
|
88
|
+
|
89
|
+
Port forwarding rules have the syntax <tt>PUBLIC_PORT[:PRIVATE_PORT[:PROTOCOL]]</tt>. <tt>PRIVATE_PORT</tt> and
|
90
|
+
<tt>PROTOCOL</tt> are optional. The default value of <tt>PRIVATE_PORT</tt> is <tt>PUBLIC_PORT</tt> and the default
|
91
|
+
<tt>PROTOCOL</tt> is 'TCP'.
|
92
|
+
For example, a rule to forward from public port 80 to private port 7000 would look like <tt>80:7000:TCP</tt>.
|
93
|
+
Since 'TCP' is the default protocol, the rule can be shortened to <tt>80:7000</tt>. A rule can even be shortened to a
|
94
|
+
single number when the public and private ports are the same. For example, a rule to forward from public port 25 to
|
95
|
+
private port 25 can be stated as simply <tt>25</tt>. A list of such rules for a webserver might look like
|
96
|
+
<tt>80,443</tt>.
|
97
|
+
|
98
|
+
==== IP forwarding rules
|
99
|
+
The <tt>--ipfwd-rules</tt> option takes a comma separated list of ip forwarding rules. These rules are created on public ip appdress assigned obtained with <tt>--static-nat</tt> option.
|
100
|
+
(Ref. http://cosmic.apache.org/docosmic/api/apidocosmic-4.0.0/root_admin/createIpForwardingRule.html)
|
101
|
+
|
102
|
+
Ip forwarding rules have the syntax <tt>START_PORT[:END_PORT[:PROTOCOL]]</tt>. <tt>END_PORT</tt> and <tt>PROTOCOL</tt> are optional.
|
103
|
+
The default value of <tt>END_PORT</tt> is <tt>START_PORT</tt> and the default <tt>PROTOCOL</tt> is 'TCP'.
|
104
|
+
For example, a rule to forward ports range from 1024 to 10000 would look like <tt>1024:10000:TCP</tt>.
|
105
|
+
Since 'TCP' is the default protocol, the rule can be shortened to <tt>1024:10000</tt>. A rule can even be shortened to a
|
106
|
+
single number when the start and end ports are the same. For example, a rule to forward port 22 can be stated as simply <tt>22</tt>. A list of such rules for a webserver might look like <tt>80,443</tt>.
|
107
|
+
|
108
|
+
==== Create Firewall Rule for given ip address
|
109
|
+
The <tt>-f, --fw-rules</tt> option takes a comma separated list of firewall rules which are applied to the public ip address assigned to the current server.
|
110
|
+
|
111
|
+
Firewall rules have the syntax <tt>PROTOCOL[:CIDR_LIST[:START_PORT[:END_PORT]]]</tt>. <tt>START_PORT</tt> and <tt>END_PORT</tt> must not be specified when <tt>PROTOCOL</tt> is <tt>ICMP</tt>, <tt>CIDR_LIST</tt> is always optional.
|
112
|
+
The default value of <tt>END_PORT</tt> is <tt>START_PORT</tt>, the default <tt>CIDR_LIST</tt> is '0.0.0.0/0'.
|
113
|
+
For example, a rule to open firewall for port 80 to everyone would look like <tt>TCP::80</tt> and a rule to open ICMP to internal network would look like <tt>ICMP:10.0.0.0/8</tt>.
|
114
|
+
|
115
|
+
=== knife cosmic server delete
|
116
|
+
|
117
|
+
Deletes an existing server in the currently configured cosmic account. <b>PLEASE NOTE</b> - this does not delete
|
118
|
+
the associated node and client objects from the Chef server.
|
119
|
+
|
120
|
+
=== knife cosmic server list
|
121
|
+
|
122
|
+
Displays a list of all servers in the currently configured cosmic account. <b>PLEASE NOTE</b> - this shows all
|
123
|
+
servers associated with the cosmic account including servers that are not registered with a Chef server.
|
124
|
+
|
125
|
+
<tt>--listall</tt> This will list all the servers, depending on the account that you are using.
|
126
|
+
|
127
|
+
<tt>--keyword</tt> Filters your output on the instance name that you specify:
|
128
|
+
Example: --keyword "i-324", This will display all servers with <tt>'i-324'</tt> inside the instancename.
|
129
|
+
|
130
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
131
|
+
Example: --name "webserver", This will display all servers that contains 'webserver' inside the hostname.
|
132
|
+
|
133
|
+
<tt>--action</tt> This action will be executed on the output of the list command. Actions can be start, stop or destroy.
|
134
|
+
|
135
|
+
=== knife cosmic network list
|
136
|
+
Displays a list of all networks available in the currently configured cosmic account. A network can be specified
|
137
|
+
when creating a new server by passing the network name as an argument to the -W (or --network) option of the
|
138
|
+
<tt>knife cosmic server create</tt> command.
|
139
|
+
|
140
|
+
<tt>--listall</tt> This will list all the networks, depending on the account that you are using.
|
141
|
+
|
142
|
+
<tt>--keyword</tt> Filters your output on the keyword that you specify.
|
143
|
+
Example: --keyword "network1", This will display all networks with 'network1' inside the name.
|
144
|
+
|
145
|
+
=== knife cosmic service list
|
146
|
+
Displays a list of all service offerings available in the currently configured cosmic account. A service offering
|
147
|
+
can be specified when creating a new server by passing the name as an argument to the -S (or --service) option of the
|
148
|
+
<tt>knife cosmic server create</tt> command.
|
149
|
+
|
150
|
+
<tt>--keyword</tt> Filters your output on the service name, just like <tt>--name</tt> here below.
|
151
|
+
|
152
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
153
|
+
Example: --name "medium" or --keyword "medium", This will display all cpu service offerings with 'medium' inside the name.
|
154
|
+
|
155
|
+
=== knife cosmic template list
|
156
|
+
Displays a list of all templates in the currently configured cosmic account. Featured templates are displayed by default.
|
157
|
+
Use the -F (or --filter) option to use a different filter. The allowable filter values are:
|
158
|
+
|
159
|
+
* featured - templates that are featured and are public (this is the default)
|
160
|
+
* self - templates that have been registered/created by the owner
|
161
|
+
* self-executable - templates that have been registered/created by the owner that can be used to deploy a new VM
|
162
|
+
* executable - all templates that can be used to deploy a new VM
|
163
|
+
* community - templates that are public
|
164
|
+
|
165
|
+
A template can be specified when creating a new server by passing the template name as an argument to the -T
|
166
|
+
(or --template) option of the <tt>knife cosmic server create</tt> command.
|
167
|
+
|
168
|
+
<tt>--listall</tt> This will list all the templates, depending on the account that you are using.
|
169
|
+
|
170
|
+
=== knife cosmic template create
|
171
|
+
Creates a template based on a volumeID
|
172
|
+
|
173
|
+
=== knife cosmic template extract
|
174
|
+
Returns a link where an extractable template can be downloaded
|
175
|
+
|
176
|
+
=== knife cosmic template register
|
177
|
+
Creates a template based on a file
|
178
|
+
|
179
|
+
=== knife cosmic volume create
|
180
|
+
Creates a volume based on a name
|
181
|
+
|
182
|
+
=== knife cosmic zone list
|
183
|
+
Displays a list of all zones available in the currently configured cosmic account. A zone can be specified
|
184
|
+
when creating a new server by passing the zone name as an argument to the -Z (or --zone) option of the
|
185
|
+
<tt>knife cosmic server create</tt> command.
|
186
|
+
|
187
|
+
<tt>--keyword</tt> Filters your output on the keyword that you specify.
|
188
|
+
Example: --keyword "zone1", This will display all zones with 'zone1' inside the name
|
189
|
+
|
190
|
+
=== knife cosmic hosts
|
191
|
+
Convenience command that displays the public ip address and fqdn for all servers. Matches /etc/hosts file format.
|
192
|
+
|
193
|
+
<tt>--listall</tt> This will list all the servers, depending on the account that you are using.
|
194
|
+
|
195
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
196
|
+
|
197
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
198
|
+
|
199
|
+
==== knife cosmic account list
|
200
|
+
Displays all accounts that are currently in your cosmic environment.
|
201
|
+
|
202
|
+
<tt>--listall</tt> This will list all the possible results, depending on the account that you are using.
|
203
|
+
|
204
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
205
|
+
|
206
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
207
|
+
|
208
|
+
==== knife cosmic cluster list
|
209
|
+
Displays all clusters that are currently available in your cosmic environment.
|
210
|
+
|
211
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
212
|
+
|
213
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
214
|
+
|
215
|
+
==== knife cosmic config list
|
216
|
+
Displays all the configuration settings that are configured inside the cosmic environment.
|
217
|
+
|
218
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
219
|
+
|
220
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
221
|
+
|
222
|
+
==== knife cosmic disk list
|
223
|
+
Displays all the disks that are available within cosmic.
|
224
|
+
|
225
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
226
|
+
|
227
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
228
|
+
|
229
|
+
==== knife cosmic domain list
|
230
|
+
Displays all domains within the cosmic environment.
|
231
|
+
|
232
|
+
<tt>--listall</tt> This will list all the domains, depending on the account that you are using.
|
233
|
+
|
234
|
+
==== knife cosmic firewallrule list
|
235
|
+
Displays all firewall rules that are currently active within your cosmic environment.
|
236
|
+
|
237
|
+
<tt>--listall</tt> This will list all the firewallrules, depending on the account that you are using.
|
238
|
+
|
239
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
240
|
+
|
241
|
+
==== knife cosmic host list
|
242
|
+
Displays all hosts from the cosmic environment.
|
243
|
+
|
244
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
245
|
+
|
246
|
+
==== knife cosmic iso list
|
247
|
+
Displays all iso's that are available within the cosmic environment.
|
248
|
+
|
249
|
+
<tt>--listall</tt> This will list all the iso's, depending on the account that you are using.
|
250
|
+
|
251
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
252
|
+
|
253
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
254
|
+
|
255
|
+
==== knife cosmic ostype list
|
256
|
+
Displays all the os types that are available within the cosmic environment.
|
257
|
+
|
258
|
+
<tt>--keyword</tt> Filters your output on the keyword that you specify.
|
259
|
+
|
260
|
+
==== knife cosmic oscategory list
|
261
|
+
Displays all os categories that are available
|
262
|
+
<tt>--keyword</tt> Filters your output on the keyword that you specify.
|
263
|
+
|
264
|
+
==== knife cosmic pod list
|
265
|
+
Displays all the pods that are currently available within the cosmic environment.
|
266
|
+
|
267
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
268
|
+
|
269
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
270
|
+
|
271
|
+
==== knife cosmic project list
|
272
|
+
Displays all the projects that are within the cosmic environment.
|
273
|
+
|
274
|
+
<tt>--listall</tt> This will list all the projects, depending on the account that you are using.
|
275
|
+
|
276
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
277
|
+
|
278
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
279
|
+
|
280
|
+
==== knife cosmic publicip list
|
281
|
+
Displays all public ip's that are used within the cosmic environment.
|
282
|
+
|
283
|
+
<tt>--listall</tt> This will list all the public ip's, depending on the account that you are using.
|
284
|
+
|
285
|
+
==== knife cosmic router list
|
286
|
+
Displays all the routers that are within the cosmic environment.
|
287
|
+
|
288
|
+
<tt>--listall</tt> This will list all the routers, depending on the account that you are using.
|
289
|
+
|
290
|
+
<tt>--keyword</tt> Filters your result based on a keyword.
|
291
|
+
|
292
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
293
|
+
|
294
|
+
==== knife cosmic user list
|
295
|
+
Displays all the users that are available within your account.
|
296
|
+
|
297
|
+
<tt>--listall</tt> This will list all the users, depending on the account that you are using.
|
298
|
+
|
299
|
+
<tt>--keyword</tt> Filters your output on the keyword that you specify.
|
300
|
+
|
301
|
+
==== knife cosmic volume list:
|
302
|
+
Displays all the volumes that are currently available within the cosmic environment.
|
303
|
+
|
304
|
+
<tt>--listall</tt> This will list all the volumes, depending on the account that you are using.
|
305
|
+
|
306
|
+
<tt>--keyword</tt> Filters your output on the keyword that you specify.
|
307
|
+
|
308
|
+
<tt>--name</tt> Filters your output on the name that you specify.
|
309
|
+
|
310
|
+
=== knife cosmic stack create
|
311
|
+
Creates a "stack" of servers based on a JSON definition file. Simple orchestration can be performed by
|
312
|
+
specifying one or more actions to be executed after a server (or group of servers) is created.
|
313
|
+
|
314
|
+
<tt>--skip-existing</tt> Skip erroring on any servers already created in the stack (default is false)
|
315
|
+
|
316
|
+
==== Example Stack Definition File:
|
317
|
+
|
318
|
+
{
|
319
|
+
"name": "hadoop_cluster_a",
|
320
|
+
"description": "A small hadoop cluster with hbase",
|
321
|
+
"version": "1.0",
|
322
|
+
"environment": "production",
|
323
|
+
"servers": [
|
324
|
+
{
|
325
|
+
"name": "zookeeper-a, zookeeper-b, zookeeper-c",
|
326
|
+
"description": "Zookeeper nodes",
|
327
|
+
"template": "rhel-5.6-base",
|
328
|
+
"service": "small",
|
329
|
+
"port_rules": "2181",
|
330
|
+
"run_list": "role[cluster_a], role[zookeeper_server]",
|
331
|
+
"actions": [
|
332
|
+
{ "knife_ssh": ["role:zookeeper_server", "sudo chef-client"] }
|
333
|
+
]
|
334
|
+
},
|
335
|
+
{
|
336
|
+
"name": "hadoop-master",
|
337
|
+
"description": "Hadoop master node",
|
338
|
+
"template": "rhel-5.6-base",
|
339
|
+
"service": "large",
|
340
|
+
"networks": "app-net, storage-net",
|
341
|
+
"port_rules": "50070, 50030, 60010",
|
342
|
+
"run_list": "role[cluster_a], role[hadoop_master], role[hbase_master]"
|
343
|
+
},
|
344
|
+
{
|
345
|
+
"name": "hadoop-worker-a hadoop-worker-b hadoop-worker-c",
|
346
|
+
"description": "Hadoop worker nodes",
|
347
|
+
"template": "rhel-5.6-base",
|
348
|
+
"service": "medium",
|
349
|
+
"port_rules": "50075, 50060, 60030",
|
350
|
+
"run_list": "role[cluster_a], role[hadoop_worker], role[hbase_regionserver]",
|
351
|
+
"actions": [
|
352
|
+
{ "knife_ssh": ["role:hadoop_master", "sudo chef-client"] },
|
353
|
+
{ "http_request": "http://${hadoop-master}:50070/index.jsp" }
|
354
|
+
]
|
355
|
+
}
|
356
|
+
]
|
357
|
+
}
|
358
|
+
|
359
|
+
==== Stack Attributes
|
360
|
+
name:: Stack name. May be used in the future to e.g. look up a stack in a databag.
|
361
|
+
version:: Stack version. This attribute is not currently used.
|
362
|
+
environment:: Chef environment used for all servers in the stack.
|
363
|
+
servers:: List of servers to create.
|
364
|
+
|
365
|
+
==== Server Attributes
|
366
|
+
name:: The name of the new server. Specify a list of names separated by commas and/or spaces to create multiple servers.
|
367
|
+
description:: Server description.
|
368
|
+
template:: cosmic template name.
|
369
|
+
service:: cosmic service offering name.
|
370
|
+
port_rules:: Port forwarding rules for virtual networks. These are ignored when using direct or other network types.
|
371
|
+
run_list:: Chef run list.
|
372
|
+
actions:: List of actions to perform after the server (or group of servers) is created.
|
373
|
+
|
374
|
+
==== Actions
|
375
|
+
knife-ssh:: Performs a knife-ssh command. Takes the search query and the command to execute as an array of arguments.
|
376
|
+
http_request:: Performs an http request. Supports references to server names in the stack with ${server_name}.
|
377
|
+
|
378
|
+
==== Upcoming Actions
|
379
|
+
The following actions are under development:
|
380
|
+
|
381
|
+
runlist_add:: Adds an entry from the run list.
|
382
|
+
runlist_remove:: Removes an entry from the run list.
|
383
|
+
|
384
|
+
=== knife cosmic stack delete
|
385
|
+
Deletes all servers in the specified stack definition.
|
386
|
+
|
387
|
+
=== knife cosmic server start
|
388
|
+
Starts the specified virtual machine(s).
|
389
|
+
|
390
|
+
=== knife cosmic server stop
|
391
|
+
Stops the specified virtual machine(s). Force stop is optional.
|
392
|
+
|
393
|
+
=== knife cosmic server reboot
|
394
|
+
Reboots the specified virtual machines(s).
|
395
|
+
|
396
|
+
== LICENSE:
|
397
|
+
|
398
|
+
Original knife-cloudstack author:: Ryan Holmes <rholmes@edmunds.com>
|
399
|
+
Original knife-cloudstack author:: KC Braunschweig <kcbraunschweig@gmail.com>
|
400
|
+
Original knife-cloudstack author:: John E. Vincent <lusis.org+github.com@gmail.com>
|
401
|
+
Original knife-cloudstack author:: Sander Botman <sbotman@schubergphilis.com>
|
402
|
+
Original knife-cloudstack author:: Frank Breedijk <fbreedijk@schubergphilis.com>
|
403
|
+
Original knife-cloudstack author:: Jeremy Baumont <jbaumont@schubergphilis.com>
|
404
|
+
Copyright:: Copyright (c) 2011 Edmunds, Inc.
|
405
|
+
License:: Apache License, Version 2.0
|
406
|
+
|
407
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
408
|
+
you may not use this file except in compliance with the License.
|
409
|
+
You may obtain a copy of the License at
|
410
|
+
|
411
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
412
|
+
|
413
|
+
Unless required by applicable law or agreed to in writing, software
|
414
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
415
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
416
|
+
See the License for the specific language governing permissions and
|
417
|
+
limitations under the License.
|
418
|
+
|
419
|
+
== Trademark Attribution
|
420
|
+
|
421
|
+
knife is a trademark of Opscode
|
422
|
+
|
423
|
+
cosmic is a trademark or registered trademark of The Apache Software Foundation
|
424
|
+
|
425
|
+
The use of these marks is nominative in describing the function and integration of
|
426
|
+
this software and does not imply endorsement by Opscode, the Apache Software Foundation,
|
427
|
+
or Apache cosmic.
|