knife-profitbricks 1.2.1 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +303 -96
- data/knife-profitbricks.gemspec +1 -1
- data/lib/chef/knife/profitbricks_base.rb +24 -0
- data/lib/chef/knife/profitbricks_composite_server_create.rb +59 -45
- data/lib/chef/knife/profitbricks_contract_list.rb +37 -0
- data/lib/chef/knife/profitbricks_datacenter_create.rb +8 -7
- data/lib/chef/knife/profitbricks_firewall_create.rb +15 -15
- data/lib/chef/knife/profitbricks_firewall_delete.rb +6 -8
- data/lib/chef/knife/profitbricks_firewall_list.rb +6 -5
- data/lib/chef/knife/profitbricks_ipblock_create.rb +6 -7
- data/lib/chef/knife/profitbricks_ipfailover_add.rb +60 -0
- data/lib/chef/knife/profitbricks_ipfailover_remove.rb +60 -0
- data/lib/chef/knife/profitbricks_lan_create.rb +5 -3
- data/lib/chef/knife/profitbricks_lan_list.rb +1 -1
- data/lib/chef/knife/profitbricks_nic_create.rb +12 -14
- data/lib/chef/knife/profitbricks_nic_delete.rb +4 -3
- data/lib/chef/knife/profitbricks_nic_list.rb +4 -3
- data/lib/chef/knife/profitbricks_server_create.rb +14 -16
- data/lib/chef/knife/profitbricks_server_delete.rb +1 -1
- data/lib/chef/knife/profitbricks_server_list.rb +1 -1
- data/lib/chef/knife/profitbricks_server_reboot.rb +1 -1
- data/lib/chef/knife/profitbricks_server_start.rb +1 -1
- data/lib/chef/knife/profitbricks_server_stop.rb +1 -1
- data/lib/chef/knife/profitbricks_volume_attach.rb +5 -5
- data/lib/chef/knife/profitbricks_volume_create.rb +38 -18
- data/lib/chef/knife/profitbricks_volume_delete.rb +1 -1
- data/lib/chef/knife/profitbricks_volume_detach.rb +4 -4
- data/lib/chef/knife/profitbricks_volume_list.rb +5 -6
- data/lib/knife-profitbricks/version.rb +1 -1
- data/spec/chef/knife/profitbricks_composite_server_create_spec.rb +64 -0
- data/spec/chef/knife/profitbricks_contract_list_spec.rb +20 -0
- data/spec/chef/knife/profitbricks_datacenter_create_spec.rb +44 -0
- data/spec/chef/knife/profitbricks_datacenter_delete_spec.rb +39 -0
- data/spec/chef/knife/profitbricks_datacenter_list_spec.rb +7 -6
- data/spec/chef/knife/profitbricks_firewall_create_spec.rb +74 -0
- data/spec/chef/knife/profitbricks_firewall_delete_spec.rb +86 -0
- data/spec/chef/knife/profitbricks_firewall_list_spec.rb +61 -0
- data/spec/chef/knife/profitbricks_image_list_spec.rb +19 -0
- data/spec/chef/knife/profitbricks_ipblock_create_spec.rb +39 -0
- data/spec/chef/knife/profitbricks_ipblock_delete_spec.rb +37 -0
- data/spec/chef/knife/profitbricks_ipfailover_add_spec.rb +80 -0
- data/spec/chef/knife/profitbricks_ipfailover_remove_spec.rb +85 -0
- data/spec/chef/knife/profitbricks_lan_create_spec.rb +59 -0
- data/spec/chef/knife/profitbricks_lan_delete_spec.rb +58 -0
- data/spec/chef/knife/profitbricks_lan_list_spec.rb +37 -0
- data/spec/chef/knife/profitbricks_location_list_spec.rb +24 -0
- data/spec/chef/knife/profitbricks_nic_create_spec.rb +71 -0
- data/spec/chef/knife/profitbricks_nic_delete_spec.rb +69 -0
- data/spec/chef/knife/profitbricks_nic_list_spec.rb +69 -0
- data/spec/chef/knife/profitbricks_server_create_spec.rb +63 -0
- data/spec/chef/knife/profitbricks_server_delete_spec.rb +63 -0
- data/spec/chef/knife/profitbricks_server_list_spec.rb +65 -0
- data/spec/chef/knife/profitbricks_server_reboot_spec.rb +65 -0
- data/spec/chef/knife/profitbricks_server_start_spec.rb +68 -0
- data/spec/chef/knife/profitbricks_server_stop_spec.rb +65 -0
- data/spec/chef/knife/profitbricks_volume_attach_spec.rb +70 -0
- data/spec/chef/knife/profitbricks_volume_create_spec.rb +63 -0
- data/spec/chef/knife/profitbricks_volume_delete_spec.rb +70 -0
- data/spec/chef/knife/profitbricks_volume_detach_spec.rb +81 -0
- data/spec/chef/knife/profitbricks_volume_list_spec.rb +80 -0
- data/spec/spec_helper.rb +22 -3
- data/spec/test.sh +1 -1
- metadata +81 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bce4842d7d224840142aac9373abb82b5d3d8f94
|
4
|
+
data.tar.gz: d854007f93993768dd63b43c946a8ee55b6024ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4d695ad8f4971730c5945526d7bd682f617cea211a044557592f5a291cd5ce3d7e2428eecb25cba238fb9142e6da468a83313ac81958bdfb1474fc4daf96c13
|
7
|
+
data.tar.gz: 8a271f015f30c9c05384352c4c872d4c08f47878b1b9a72663d8cf6085678d1907d2112a85e8c243e99e291deef011c3bbc279575e90e73366b7c0cbb0b00389
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,17 +1,61 @@
|
|
1
|
-
# Knife
|
2
|
-
|
3
|
-
##
|
4
|
-
|
5
|
-
|
1
|
+
# ProfitBricks Chef Knife Plugin
|
2
|
+
|
3
|
+
## Table of Contents
|
4
|
+
|
5
|
+
* [Concepts](#concepts)
|
6
|
+
* [Requirements](#requirements)
|
7
|
+
* [Getting Started](#getting-started)
|
8
|
+
* [Installation](#installation)
|
9
|
+
* [Configuration](#configuration)
|
10
|
+
* [How To](#how-to)
|
11
|
+
* [List Data Centers](#list-data-centers)
|
12
|
+
* [Create Data Center](#create-data-center)
|
13
|
+
* [Create Server](#create-server)
|
14
|
+
* [List Servers](#list-servers)
|
15
|
+
* [List Images](#list-images)
|
16
|
+
* [Create Volume](#create-volume)
|
17
|
+
* [List Volumes](#list-volumes)
|
18
|
+
* [Attach and Detach Volume](#attach-and-detach-volume)
|
19
|
+
* [Reserve IP Block](#reserve-ip-block)
|
20
|
+
* [Create Public LAN](#create-public-lan)
|
21
|
+
* [Create NIC](#create-nic)
|
22
|
+
* [Create Composite Server](#create-composite-server)
|
23
|
+
* [Delete Data Center](#delete-data-center)
|
24
|
+
* [Reference](#reference)
|
25
|
+
* [Location](#location)
|
26
|
+
* [Data Center](#data-center)
|
27
|
+
* [Server](#server)
|
28
|
+
* [Volume](#volume)
|
29
|
+
* [Image](#image)
|
30
|
+
* [LAN](#lan)
|
31
|
+
* [NIC](#nic)
|
32
|
+
* [IP Block](#ip-block)
|
33
|
+
* [Firewall](#firewall)
|
34
|
+
* [IP Failover](#ip-failover)
|
35
|
+
* [Support](#support)
|
36
|
+
* [Testing](#testing)
|
37
|
+
* [Contributing](#contributing)
|
38
|
+
|
39
|
+
## Concepts
|
40
|
+
|
41
|
+
Chef is a popular configuration management tool that allows simplified configuration and maintenance of both servers and cloud provider environments through the use of common templates called recipes. The Chef `knife` command line tool allows management of various nodes within those environments. The `knife-profitbricks` plugin utilizes the ProfitBricks REST API to provision and manage various cloud resources on the ProfitBricks platform.
|
6
42
|
|
7
43
|
## Requirements
|
8
44
|
|
9
45
|
* Chef 12.3.0 or higher
|
10
46
|
* Ruby 2.0.x or higher
|
11
47
|
|
48
|
+
## Getting Started
|
49
|
+
|
50
|
+
Before you begin you will need to have [signed-up](https://www.profitbricks.com/signup/) for a ProfitBricks account. The credentials you establish during sign-up will be used to authenticate against the [ProfitBricks Cloud API](https://devops.profitbricks.com/api/).
|
51
|
+
|
12
52
|
## Installation
|
13
53
|
|
14
|
-
|
54
|
+
The `knife-profitbricks` plugin can be installed as a gem:
|
55
|
+
|
56
|
+
$ gem install knife-profitbricks
|
57
|
+
|
58
|
+
Or the plugin can be installed by adding the following line to your application's Gemfile:
|
15
59
|
|
16
60
|
gem 'knife-profitbricks'
|
17
61
|
|
@@ -19,190 +63,353 @@ And then execute:
|
|
19
63
|
|
20
64
|
$ bundle
|
21
65
|
|
22
|
-
Or install it yourself as:
|
23
|
-
|
24
|
-
$ gem install knife-profitbricks
|
25
|
-
|
26
66
|
## Configuration
|
27
67
|
|
28
|
-
The ProfitBricks
|
68
|
+
The ProfitBricks account credentials can be added to the `knife.rb` configuration file.
|
29
69
|
|
30
70
|
knife[:profitbricks_username] = 'username'
|
31
71
|
knife[:profitbricks_password] = 'password'
|
32
72
|
|
33
|
-
If a virtual data center has already been created under the ProfitBricks account, then the data center
|
34
|
-
|
73
|
+
If a virtual data center has already been created under the ProfitBricks account, then the data center UUID can be added to the `knife.rb` which reduces the need to include the `--datacenter-id [datacenter_id]` parameter for each action within the data center.
|
74
|
+
|
35
75
|
knife[:datacenter_id] = 'f3f3b6fe-017d-43a3-b42a-a759144b2e99'
|
36
76
|
|
37
77
|
Optional parameters include the following:
|
38
78
|
|
39
79
|
knife[:profitbricks_url] = 'https://api.profitbricks.com'
|
40
80
|
knife[:profitbricks_debug] = true
|
41
|
-
|
42
|
-
## Sub Commands
|
43
81
|
|
44
|
-
|
82
|
+
The configuration parameters can also be passed using shell environment variables. First, the following should be added to the `knife.rb` configuration file:
|
45
83
|
|
46
|
-
|
84
|
+
knife[:profitbricks_username] = ENV['PROFITBRICKS_USERNAME']
|
85
|
+
knife[:profitbricks_password] = ENV['PROFITBRICKS_PASSWORD']
|
47
86
|
|
48
|
-
|
87
|
+
Now the parameters can be set as environment variables:
|
49
88
|
|
50
|
-
|
89
|
+
$ export PROFITBRICKS_USERNAME='username'
|
90
|
+
$ export PROFITBRICKS_PASSWORD='password'
|
51
91
|
|
52
|
-
|
92
|
+
# How To
|
53
93
|
|
54
|
-
|
94
|
+
## List Data Centers
|
55
95
|
|
56
|
-
|
96
|
+
ProfitBricks introduces the concept of virtual data centers. These are logically separated from one another and allow you to have a self-contained environment for all servers, volumes, networking, and other resources. The goal is to give you the same experience as you would have if you were running your own physical data center.
|
57
97
|
|
58
|
-
|
98
|
+
A list of available data centers can be obtained with the following command.
|
59
99
|
|
60
|
-
|
100
|
+
knife profitbricks datacenter list
|
61
101
|
|
62
|
-
|
102
|
+
## Create Data Center
|
63
103
|
|
64
|
-
|
104
|
+
Unless you are planning to manage an existing ProfitBricks environment, the first step will typically involve choosing the location for a new virtual data center. A list of locations can be obtained with location command.
|
65
105
|
|
66
|
-
|
106
|
+
knife profitbricks location list
|
67
107
|
|
68
|
-
|
108
|
+
Make a note of the desired location ID and now the data center can be created.
|
69
109
|
|
70
|
-
|
110
|
+
knife profitbricks datacenter create --name "Production" --description "Production webserver environment" --location "us/las"
|
71
111
|
|
72
|
-
|
112
|
+
## Create Server
|
73
113
|
|
74
|
-
|
114
|
+
One of the unique features of the ProfitBricks platform when compared with the other providers is that they allow you to define your own settings for cores, memory, and disk size without being tied to a particular size or flavor.
|
75
115
|
|
76
|
-
|
116
|
+
Note: *The memory parameter value must be a multiple of 256, e.g. 256, 512, 768, 1024, and so forth.*
|
77
117
|
|
78
|
-
|
118
|
+
The following example shows you how to create a new server in the data center created above:
|
79
119
|
|
80
|
-
|
120
|
+
knife profitbricks server create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "Frontend Webserver" --cores 1 --ram 1024 --availability-zone ZONE_1 --cpu-family INTEL_XEON
|
81
121
|
|
82
|
-
|
122
|
+
## List Servers
|
83
123
|
|
84
|
-
|
124
|
+
The new server should appear when listing all servers under the specified data center.
|
85
125
|
|
86
|
-
|
126
|
+
knife profitbricks server list --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1
|
87
127
|
|
88
|
-
|
128
|
+
## List Images
|
89
129
|
|
90
|
-
|
130
|
+
A list of disk and ISO images are available from ProfitBricks for immediate use. These can be easily reviewed and selected with the following command.
|
91
131
|
|
92
|
-
|
132
|
+
knife profitbricks image list
|
93
133
|
|
94
|
-
|
134
|
+
Make sure the image you use is in the same location as the virtual data center.
|
95
135
|
|
96
|
-
|
136
|
+
## Create Volume
|
97
137
|
|
98
|
-
|
138
|
+
ProfitBricks allows for the creation of multiple storage volumes that can be attached and detached as needed. It is useful to attach an image when creating a storage volume. The storage size is in gigabytes (GB).
|
99
139
|
|
100
|
-
|
140
|
+
knife profitbricks volume create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "OS Volume" --size 20 --type HDD --image c4263e0f-e75e-11e4-91fd-8fa3eaae9f6b --ssh-keys "ssh-rsa AAAAB3NzaC1..."
|
101
141
|
|
102
|
-
|
142
|
+
## List Volumes
|
103
143
|
|
104
|
-
|
144
|
+
The following example will list all available volumes under a data center.
|
105
145
|
|
106
|
-
|
146
|
+
knife profitbricks volume list --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1
|
107
147
|
|
108
|
-
|
148
|
+
You can also list all volumes attached to a specific server.
|
109
149
|
|
110
|
-
|
150
|
+
knife profitbricks volume list --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --server-id 2e438d3b-02f0-47d0-8594-4ace38ed2804
|
111
151
|
|
112
|
-
|
152
|
+
## Attach and Detach Volume
|
113
153
|
|
114
|
-
|
154
|
+
ProfitBricks allows for the creation of multiple storage volumes. You can detach and reattach these on the fly. This allows for various scenarios such as re-attaching a failed OS disk to another server for possible recovery or moving a volume to another location and bringing it online.
|
115
155
|
|
116
|
-
|
156
|
+
The following illustrates how you would attach a volume with a UUID of 9b45f734-01ec-46ca-b163-d06c5a9d707f to a server:
|
117
157
|
|
118
|
-
|
158
|
+
knife profitbricks volume attach --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --server-id 2e438d3b-02f0-47d0-8594-4ace38ed2804 9b45f734-01ec-46ca-b163-d06c5a9d707f
|
119
159
|
|
120
|
-
|
160
|
+
If you need to detach the same volume:
|
121
161
|
|
122
|
-
|
162
|
+
knife profitbricks volume detach --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --server-id 2e438d3b-02f0-47d0-8594-4ace38ed2804 9b45f734-01ec-46ca-b163-d06c5a9d707f
|
123
163
|
|
124
|
-
|
164
|
+
## Reserve IP Block
|
165
|
+
|
166
|
+
The IP block size (number of IP addresses) and location are required to reserve an IP block:
|
167
|
+
|
168
|
+
knife profitbricks ipblock create --size 5 --location "us/las"
|
169
|
+
|
170
|
+
## Create Public LAN
|
171
|
+
|
172
|
+
A pubic LAN must be created within a data center.
|
173
|
+
|
174
|
+
knife profitbricks lan create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "Public Network" --public
|
125
175
|
|
126
|
-
|
176
|
+
## Create NIC
|
177
|
+
|
178
|
+
The ProfitBricks platform supports adding multiple NICs to a server. These NICs can be used to create different, segmented networks on the platform.
|
179
|
+
|
180
|
+
The example below shows you how to add a second NIC to an existing server and LAN:
|
181
|
+
|
182
|
+
knife profitbricks nic create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --server-id 2e438d3b-02f0-47d0-8594-4ace38ed2804 --name "Public NIC" --lan 1
|
183
|
+
|
184
|
+
## Create Composite Server
|
185
|
+
|
186
|
+
This creates a new composite server with an attached volume and NIC in a specified virtual data center.
|
187
|
+
|
188
|
+
knife profitbricks composite server create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "Backend Database" --cores 1 --ram 8192 --size 5 --type SSD --lan 1 --image 2ead2908-df61-11e5-80a4-52540005ab80 --ssh-keys "ssh-rsa AAAAB3NzaC1..."
|
189
|
+
|
190
|
+
## Delete Data Center
|
191
|
+
|
192
|
+
You will want to exercise a bit of caution here. Removing a data center will destroy all objects contained within that data center -- servers, volumes, snapshots, and so on. The objects -- once removed -- will be unrecoverable.
|
193
|
+
|
194
|
+
knife profitbricks datacenter delete ade28808-9253-4d4e-9f5d-f1f7f1038fb1
|
195
|
+
|
196
|
+
# Reference
|
197
|
+
|
198
|
+
## Location
|
199
|
+
|
200
|
+
### List Locations
|
201
|
+
|
202
|
+
List available physical locations where resources can reside.
|
203
|
+
|
204
|
+
knife profitbricks location list
|
205
|
+
|
206
|
+
## Data Center
|
207
|
+
|
208
|
+
### List Data Centers
|
209
|
+
|
210
|
+
List all available data centers under the ProfitBricks account.
|
211
|
+
|
212
|
+
knife profitbricks datacenter list
|
213
|
+
|
214
|
+
### Create Data Center
|
215
|
+
|
216
|
+
Creates a new data center where servers, volumes, and other resources will reside.
|
217
|
+
|
218
|
+
knife profitbricks datacenter create --name [string] --description [string] --location [location_id]
|
219
|
+
|
220
|
+
### Delete Data Center
|
221
|
+
|
222
|
+
* **USE WITH EXTREME CAUTION**
|
223
|
+
|
224
|
+
Deletes an existing data center and all resources within that data center.
|
225
|
+
|
226
|
+
knife profitbricks datacenter delete [datacenter_id]
|
227
|
+
|
228
|
+
## Server
|
229
|
+
|
230
|
+
### List Servers
|
127
231
|
|
128
232
|
List all available servers under a specified data center.
|
129
233
|
|
130
|
-
|
234
|
+
knife profitbricks server list --datacenter-id [datacenter_id]
|
235
|
+
|
236
|
+
### Create Server
|
237
|
+
|
238
|
+
Creates a new server within a specified data center.
|
239
|
+
|
240
|
+
knife profitbricks server create --datacenter-id [datacenter_id] --name [string] --cores [int] --ram [int] ...
|
241
|
+
|
242
|
+
### Delete Server
|
243
|
+
|
244
|
+
Deletes an existing server.
|
245
|
+
|
246
|
+
knife profitbricks server delete --datacenter-id [datacenter_id] [server_id]
|
247
|
+
|
248
|
+
### Reboot Server
|
131
249
|
|
132
250
|
Performs a hard reset on a server.
|
133
251
|
|
134
|
-
|
252
|
+
knife profitbricks server reboot --datacenter-id [datacenter_id] [server_id]
|
253
|
+
|
254
|
+
### Start Server
|
135
255
|
|
136
256
|
Starts a server.
|
137
257
|
|
138
|
-
|
258
|
+
knife profitbricks server start --datacenter-id [datacenter_id] [server_id]
|
259
|
+
|
260
|
+
### Stop Server
|
139
261
|
|
140
262
|
Stops a server.
|
141
263
|
|
142
|
-
|
264
|
+
knife profitbricks server stop --datacenter-id [datacenter_id] [server_id]
|
143
265
|
|
144
|
-
|
266
|
+
## Volume
|
145
267
|
|
146
|
-
###
|
268
|
+
### List Volumes
|
269
|
+
|
270
|
+
Lists all available volumes under a data center. Passing the `--server-id` parameter will also list all volumes attached to the specified server.
|
271
|
+
|
272
|
+
knife profitbricks volume list --datacenter-id [datacenter_id]
|
273
|
+
|
274
|
+
knife profitbricks volume list --datacenter-id [datacenter_id] --server-id [server_id]
|
275
|
+
|
276
|
+
### Create Volume
|
147
277
|
|
148
278
|
Creates a new volume.
|
149
279
|
|
150
|
-
|
280
|
+
knife profitbricks volume create --datacenter-id [datacenter_id] --name [string] --size [int] --image [image_id] ...
|
281
|
+
|
282
|
+
### Delete Volume
|
151
283
|
|
152
284
|
Deletes an existing volume.
|
153
285
|
|
154
|
-
|
286
|
+
knife profitbricks volume delete --datacenter-id [datacenter_id] [volume_id]
|
155
287
|
|
156
|
-
|
288
|
+
### Attach Volume
|
157
289
|
|
158
|
-
|
290
|
+
Attaches an existing volume to a server.
|
159
291
|
|
160
|
-
|
292
|
+
knife profitbricks volume attach --datacenter-id [datacenter_id] --server-id [server_id] [volume_id]
|
161
293
|
|
162
|
-
|
294
|
+
### Detach Volume
|
163
295
|
|
164
|
-
|
296
|
+
Detaches a volume from a server.
|
165
297
|
|
166
|
-
knife profitbricks datacenter
|
298
|
+
knife profitbricks volume detach --datacenter-id [datacenter_id] --server-id [server_id] [volume_id]
|
167
299
|
|
168
|
-
|
300
|
+
## Image
|
301
|
+
|
302
|
+
### List Images
|
303
|
+
|
304
|
+
Lists all available images.
|
169
305
|
|
170
306
|
knife profitbricks image list
|
171
|
-
knife profitbricks location list
|
172
307
|
|
173
|
-
|
308
|
+
## LAN
|
174
309
|
|
175
|
-
|
310
|
+
### List LANs
|
176
311
|
|
177
|
-
|
312
|
+
Lists all available LANs under a data center.
|
178
313
|
|
179
|
-
knife profitbricks
|
180
|
-
knife profitbricks volume create --datacenter-id ade28808-9253-4d4e-9f5d-f1f7f1038fb1 --name "OS Volume" --size 5 --type HDD --image c4263e0f-e75e-11e4-91fd-8fa3eaae9f6b --ssh-keys "ssh-rsa AAAAB3NzaC1..."
|
314
|
+
knife profitbricks lan list
|
181
315
|
|
182
|
-
|
316
|
+
### Create LAN
|
183
317
|
|
184
|
-
|
318
|
+
Creates a new LAN under a data center.
|
185
319
|
|
186
|
-
|
320
|
+
knife profitbricks lan create --datacenter-id [datacenter_id] --name [string] [--public]
|
187
321
|
|
188
|
-
|
322
|
+
### Delete LAN
|
189
323
|
|
190
|
-
|
324
|
+
Deletes an existing LAN.
|
191
325
|
|
192
|
-
knife profitbricks
|
326
|
+
knife profitbricks lan delete --datacenter-id [datacenter_id]
|
193
327
|
|
194
|
-
|
328
|
+
## NIC
|
195
329
|
|
196
|
-
|
330
|
+
### List NICs
|
197
331
|
|
198
|
-
|
332
|
+
List all available NICs connected to a server.
|
199
333
|
|
200
|
-
knife profitbricks
|
334
|
+
knife profitbricks nic list
|
335
|
+
|
336
|
+
### Create NIC
|
337
|
+
|
338
|
+
Creates a NIC on the specified server.
|
339
|
+
|
340
|
+
knife profitbricks nic create --datacenter-id [datacenter_id] --server-id [server_id] --name [string] --lan [int] -ips IP[,IP,...] [--dhcp]
|
341
|
+
|
342
|
+
### Delete NIC
|
343
|
+
|
344
|
+
Deletes an existing NIC from a server.
|
345
|
+
|
346
|
+
knife profitbricks nic delete --datacenter-id [datacenter_id] [nic_id]
|
347
|
+
|
348
|
+
## IP Block
|
349
|
+
|
350
|
+
### List IP Blocks
|
351
|
+
|
352
|
+
Lists all available IP blocks.
|
353
|
+
|
354
|
+
knife profitbricks ipblock list
|
355
|
+
|
356
|
+
### Reserve IP Block
|
357
|
+
|
358
|
+
Reserve a new IP block.
|
359
|
+
|
360
|
+
knife profitbricks ipblock create --size [int] --location [string]
|
361
|
+
|
362
|
+
### Release IP Block
|
363
|
+
|
364
|
+
Releases a currently assigned IP block.
|
365
|
+
|
366
|
+
knife profitbricks ipblock delete [ipblock_id]
|
367
|
+
|
368
|
+
## Firewall
|
369
|
+
|
370
|
+
### List Firewall Rules
|
371
|
+
|
372
|
+
Lists all available firewall rules assigned to a NIC.
|
373
|
+
|
374
|
+
knife profitbricks firewall list
|
375
|
+
|
376
|
+
### Create Firewall Rule
|
377
|
+
|
378
|
+
Creates a new firewall rule on an existing NIC.
|
379
|
+
|
380
|
+
knife profitbricks firewall create --datacenter-id [datacenter_id] --server-id [server_id] --nic-id [nic_id] --name [string] --protocol [TCP, UDP] --port-range-start [int] --port-range-end [int] --source-ip [IP]
|
381
|
+
|
382
|
+
### Delete Firewall Rule
|
383
|
+
|
384
|
+
Deletes a firewall rule from an existing NIC.
|
385
|
+
|
386
|
+
knife profitbricks firewall delete --datacenter-id [datacenter_id] --server-id [server_id] --nic-id [nic_id] [firewall_id]
|
387
|
+
|
388
|
+
## IP Failover
|
389
|
+
|
390
|
+
### Add IP to LAN failover group
|
391
|
+
|
392
|
+
Adds IPs to LAN
|
393
|
+
|
394
|
+
knife profitbricks failover add --datacenter-id [datacenter_id] --lan-id [lan_id] --ip [ip1] --nic-id [nic_id]
|
395
|
+
|
396
|
+
### Remove IP from LAN failover group
|
397
|
+
|
398
|
+
Remove IP Failover from LAN
|
399
|
+
|
400
|
+
knife profitbricks failover remove --datacenter-id [datacenter_id] --lan-id [lan_id] --ip [ip1] --nic-id [nic_id]
|
401
|
+
|
402
|
+
## Contract Resources
|
403
|
+
|
404
|
+
Lists information about available contract resources
|
405
|
+
|
406
|
+
knife profitbricks contract list
|
407
|
+
|
408
|
+
## Support
|
201
409
|
|
202
|
-
|
410
|
+
Please report any issues through the [project repository on GitHub](https://github.com/profitbricks/knife-profitbricks).
|
203
411
|
|
204
|
-
|
205
|
-
* Ask a question or discuss at [ProfitBricks DevOps Central](https://devops.profitbricks.com/community).
|
412
|
+
Questions and discussions can be directed to [ProfitBricks DevOps Central](https://devops.profitbricks.com/) site.
|
206
413
|
|
207
414
|
## Testing
|
208
415
|
|
@@ -210,8 +417,8 @@ The new data center and **all resources within that data center** can be deleted
|
|
210
417
|
|
211
418
|
## Contributing
|
212
419
|
|
213
|
-
1. Fork it ( https://github.com/[my-github-username]/knife-profitbricks/fork )
|
214
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
215
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
216
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
217
|
-
5. Create a new Pull Request
|
420
|
+
1. Fork it ( https://github.com/[my-github-username]/knife-profitbricks/fork ).
|
421
|
+
2. Create your feature branch (`git checkout -b my-new-feature`).
|
422
|
+
3. Commit your changes (`git commit -am 'Add some feature'`).
|
423
|
+
4. Push to the branch (`git push origin my-new-feature`).
|
424
|
+
5. Create a new Pull Request.
|