knife-azure 1.6.0.rc.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +304 -8
- data/lib/azure/azure_interface.rb +81 -0
- data/lib/azure/custom_errors.rb +35 -0
- data/lib/azure/helpers.rb +44 -0
- data/lib/azure/resource_management/ARM_base.rb +29 -0
- data/lib/azure/resource_management/ARM_deployment_template.rb +561 -0
- data/lib/azure/resource_management/ARM_interface.rb +795 -0
- data/lib/azure/resource_management/windows_credentials.rb +136 -0
- data/lib/azure/service_management/ASM_interface.rb +301 -0
- data/lib/azure/{ag.rb → service_management/ag.rb} +2 -2
- data/lib/azure/{certificate.rb → service_management/certificate.rb} +2 -2
- data/lib/azure/service_management/connection.rb +102 -0
- data/lib/azure/{deploy.rb → service_management/deploy.rb} +8 -2
- data/lib/azure/{disk.rb → service_management/disk.rb} +2 -2
- data/lib/azure/{host.rb → service_management/host.rb} +2 -2
- data/lib/azure/{image.rb → service_management/image.rb} +2 -2
- data/lib/azure/{loadbalancer.rb → service_management/loadbalancer.rb} +4 -18
- data/lib/azure/{rest.rb → service_management/rest.rb} +15 -10
- data/lib/azure/{role.rb → service_management/role.rb} +174 -6
- data/lib/azure/{storageaccount.rb → service_management/storageaccount.rb} +2 -2
- data/lib/azure/{utility.rb → service_management/utility.rb} +0 -0
- data/lib/azure/{vnet.rb → service_management/vnet.rb} +2 -2
- data/lib/chef/knife/azure_ag_create.rb +3 -6
- data/lib/chef/knife/azure_ag_list.rb +2 -16
- data/lib/chef/knife/azure_base.rb +89 -22
- data/lib/chef/knife/azure_image_list.rb +3 -7
- data/lib/chef/knife/azure_internal-lb_create.rb +2 -5
- data/lib/chef/knife/azure_internal-lb_list.rb +2 -16
- data/lib/chef/knife/azure_server_create.rb +122 -501
- data/lib/chef/knife/azure_server_delete.rb +15 -38
- data/lib/chef/knife/azure_server_list.rb +2 -27
- data/lib/chef/knife/azure_server_show.rb +4 -60
- data/lib/chef/knife/azure_vnet_create.rb +2 -7
- data/lib/chef/knife/azure_vnet_list.rb +2 -17
- data/lib/chef/knife/azurerm_base.rb +228 -0
- data/lib/chef/knife/azurerm_server_create.rb +393 -0
- data/lib/chef/knife/azurerm_server_delete.rb +121 -0
- data/lib/chef/knife/azurerm_server_list.rb +18 -0
- data/lib/chef/knife/azurerm_server_show.rb +37 -0
- data/lib/chef/knife/bootstrap/bootstrap_options.rb +105 -0
- data/lib/chef/knife/bootstrap/bootstrapper.rb +343 -0
- data/lib/chef/knife/bootstrap/common_bootstrap_options.rb +116 -0
- data/lib/chef/knife/bootstrap_azure.rb +110 -0
- data/lib/chef/knife/bootstrap_azurerm.rb +116 -0
- data/lib/knife-azure/version.rb +1 -2
- metadata +132 -16
- data/lib/azure/connection.rb +0 -99
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7780820cde5aa319045cb5befac28e85a6233112
|
4
|
+
data.tar.gz: 52a53c5e75597f6147ec4b296a44fa3e3743ca9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8b3d1f5345d5be91208a53fc9f0deb834e5507c3981e3855b328ad72b63b47391c537f1d0d5dcb501a669fe66cead87830b57851e296649e09406c0a580c2a5
|
7
|
+
data.tar.gz: e85e41b2659b2555dd16792af670ca805926f7a136a04d68b03ce033e09031335997fb611142e5d87dd533ba2adac155fa8bf1498900e9c677829227a68638ef
|
data/README.md
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
# Knife Azure
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/knife-azure.svg)](https://rubygems.org/gems/knife-azure)
|
4
|
+
[![Build Status](https://travis-ci.org/chef/knife-azure.svg?branch=master)](https://travis-ci.org/chef/knife-azure)
|
5
|
+
|
3
6
|
## Description
|
4
|
-
A [knife] (http://docs.chef.io/knife.html) plugin to create,
|
5
|
-
|
6
|
-
|
7
|
-
|
7
|
+
A [knife] (http://docs.chef.io/knife.html) plugin to create, delete, and enumerate
|
8
|
+
[Microsoft Azure] (https://azure.microsoft.com) resources to be managed by Chef.
|
9
|
+
|
10
|
+
NOTE: You may also want to consider using the [azure-xplat-cli](https://github.com/Azure/azure-xplat-cli),
|
11
|
+
this application is written by the Azure team and has many other integrations with
|
12
|
+
Azure. If click [here](https://github.com/chef-partners/azure-chef-extension/blob/master/examples/azure-xplat-cli-examples.md)
|
13
|
+
you'll see deeper examples of using the Chef extension and Azure.
|
8
14
|
|
9
15
|
## Installation
|
10
16
|
Be sure you are running the latest version of Chef DK, which can be installed
|
@@ -14,12 +20,26 @@ via:
|
|
14
20
|
|
15
21
|
This plugin is distributed as a Ruby Gem. To install it, run:
|
16
22
|
|
17
|
-
|
23
|
+
```bash
|
24
|
+
chef gem install knife-azure
|
25
|
+
```
|
18
26
|
|
19
27
|
Depending on your system's configuration, you may need to run this command
|
20
28
|
with root/administrator privileges.
|
21
29
|
|
30
|
+
## Modes
|
31
|
+
`knife-azure 1.6.0` onwards, we are adding support for Azure Resource Manager. You can easily switch between the
|
32
|
+
|
33
|
+
* Service management: commands using the Azure service management API
|
34
|
+
* Resource manager: commands using the Azure Resource Manager API
|
35
|
+
|
36
|
+
They are not designed to work together. Commands starting with `knife azure` use ASM mode, while commands starting with `knife azurerm` use ARM mode.
|
37
|
+
|
38
|
+
PLEASE NOTE that `Azuererm` subcommands are experimental and of alpha quality. Not suitable for production use. Please use ASM subcommands for production.
|
39
|
+
|
22
40
|
## Configuration
|
41
|
+
|
42
|
+
### ASM mode
|
23
43
|
For this plugin to interact with Azure's REST API, you will need to give Knife
|
24
44
|
information about your Azure account and credentials. The easiest way to do
|
25
45
|
this is to sign in to the Azure portal and download a publishsettings file
|
@@ -37,7 +57,36 @@ The plug-in also accepts authentication information specified using an
|
|
37
57
|
alternative set of options -- see the section on "Alternative Management
|
38
58
|
Certificate Specification" for details.
|
39
59
|
|
40
|
-
|
60
|
+
The plug-in can also read Azure account and credentials from the `Azure Profile` if Knife does not have the entry for `publish_settings_file`.
|
61
|
+
An `Azure Profile` is a `JSON` file with subscription and environment information in it. Its default location is `~/.azure/azureProfile.json`.
|
62
|
+
|
63
|
+
The Azure Profile file can be created and manipulated using the [Azure CLI](http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-command-line-tools/). You can
|
64
|
+
also refer [Azure Xplat-CLI](https://github.com/Azure/azure-xplat-cli#use-publish-settings-file-management-certificate-authentication).
|
65
|
+
|
66
|
+
If Azure Profile file has entries for multiple subscriptions then you can choose the default using `azure account set <subscription_name>`. The same default subscription will
|
67
|
+
be picked up that you have configured.
|
68
|
+
|
69
|
+
### ARM mode
|
70
|
+
ARM mode requires setting up service principal for authentication and permissioning. For setting up a service principal from the command line please refer
|
71
|
+
[Authenticating a service principal with Azure Resource Manager](http://aka.ms/cli-service-principal) or
|
72
|
+
[Unattended Authentication](http://aka.ms/auth-unattended). For detailed explanation of authentication in Azure,
|
73
|
+
see [Developer’s guide to auth with Azure Resource Manager API](http://aka.ms/arm-auth-dev-guide).
|
74
|
+
|
75
|
+
After creating the service principal, you should have these 3 values, a client id (GUID), client secret(string) and tenant id (GUID).
|
76
|
+
|
77
|
+
Be sure when you are creating the above user you change the example from `-o Reader` to `-o Contributor` otherwise you will not be able
|
78
|
+
to spin up or delete machines.
|
79
|
+
|
80
|
+
Put the following in your `knife.rb`
|
81
|
+
|
82
|
+
```ruby
|
83
|
+
knife[:azure_tenant_id] # found via: tenantId=$(azure account show -s <subscriptionId> --json | jq -r '.[0].tenantId')
|
84
|
+
knife[:azure_subscription_id] # found via: <subscriptionId>
|
85
|
+
knife[:azure_client_id] # appId=$(azure ad app show --search <principleappcreated> --json | jq -r '.[0].appId')
|
86
|
+
knife[:azure_client_secret] # password you set at initally
|
87
|
+
```
|
88
|
+
|
89
|
+
## Basic Examples for ASM
|
41
90
|
The following examples assume that you've configured the publishsettings file
|
42
91
|
location in your knife.rb:
|
43
92
|
|
@@ -67,7 +116,7 @@ Use the --help option to read more about each subcommand. Eg:
|
|
67
116
|
|
68
117
|
knife azure server create --help
|
69
118
|
|
70
|
-
## Detailed Usage
|
119
|
+
## Detailed Usage for ASM mode
|
71
120
|
|
72
121
|
### Common Configuration
|
73
122
|
Most configuration options can be specified either in your knife.rb file or as command line parameters. The CLI parameters override the knife.rb parameters.
|
@@ -276,6 +325,19 @@ We have also added cloud-api support for Centos now, for this you just need to s
|
|
276
325
|
|
277
326
|
`--delete-chef-extension-config` determines if Chef configuration files should be removed when Azure removes the Chef resource extension from the VM or not. This option is only valid for the 'cloud-api' bootstrap protocol. The default value is false. This is useful when `update` and `uninstall` commands are run for the extension on the VM created.
|
278
327
|
|
328
|
+
It's possible to pass bootstrap options to the extension which get specified in `client.rb` file on the VM. Following options can be passed:
|
329
|
+
|
330
|
+
--environment
|
331
|
+
--node-name
|
332
|
+
--secret-file
|
333
|
+
--server
|
334
|
+
--validation-client-name
|
335
|
+
--[no-]node-verify-api-cert
|
336
|
+
--bootstrap-version
|
337
|
+
--node-ssl-verify-mode
|
338
|
+
--bootstrap-proxy
|
339
|
+
|
340
|
+
|
279
341
|
#### Azure Server Create with Domain Join
|
280
342
|
Following options are used for creating server with domain join
|
281
343
|
|
@@ -360,6 +422,241 @@ Knife options:
|
|
360
422
|
For CIDR notation, see here: http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
|
361
423
|
Address available are defined in RFC 1918: http://en.wikipedia.org/wiki/Private_network
|
362
424
|
|
425
|
+
## Detailed Usage for ARM mode
|
426
|
+
|
427
|
+
### Common Configuration
|
428
|
+
|
429
|
+
ARM configuration options can be specified in your knife.rb file only.
|
430
|
+
|
431
|
+
The following options are required for all azurerm subcommands:
|
432
|
+
|
433
|
+
option :azure_subscription_id Your Azure subscription ID
|
434
|
+
option :azure_tenant_id Your subscription's tenant id
|
435
|
+
option :azure_client_id Your Active Directory Application id
|
436
|
+
option :azure_client_secret Your Active Directory Application's password
|
437
|
+
|
438
|
+
Note: The options mentioned above can be obtained from this [step](https://github.com/chef/knife-azure#arm-mode)
|
439
|
+
|
440
|
+
### Azure Server Create Subcommand
|
441
|
+
This subcommand provisions a new server in Azure and then performs a Chef bootstrap.
|
442
|
+
|
443
|
+
User can either provide just `--azure-image-os-type` or other image reference parameters i.e. `--azure-image-reference-publisher`, `--azure-image-reference-offer`, `--azure-image-reference-sku` and `--azure-image-reference-version` to specify the image.
|
444
|
+
|
445
|
+
Accepted values for `--azure-image-os-type` are `ubuntu`, `centos`, `rhel`, `debian ` and `windows`. It creates the server using standard image parameters for respective OS. However, they can be overridden using `--azure-image-reference-publisher`, `--azure-image-reference-offer`, `--azure-image-reference-sku` and `--azure-image-reference-version` options.
|
446
|
+
`--azure-image-os-type` option should not be used with other image reference parameters.
|
447
|
+
|
448
|
+
To see a list of commonly used image parameters, please refer https://azure.microsoft.com/en-in/documentation/articles/resource-groups-vm-searching/#table-of-commonly-used-images
|
449
|
+
|
450
|
+
For Windows:
|
451
|
+
|
452
|
+
```
|
453
|
+
knife azurerm server create
|
454
|
+
--azure-resource-group-name MyResourceGrpName
|
455
|
+
--azure-vm-name MyNewVMName
|
456
|
+
--azure-service-location 'WEST US'
|
457
|
+
--azure-image-os-type windows
|
458
|
+
-x myuser -P mypassword
|
459
|
+
-r "recipe[cbk1::rec2]"
|
460
|
+
-c ~/.chef/knife.rb
|
461
|
+
```
|
462
|
+
OR
|
463
|
+
```
|
464
|
+
knife azurerm server create
|
465
|
+
--azure-resource-group-name MyResourceGrpName
|
466
|
+
--azure-vm-name MyNewVMName
|
467
|
+
--azure-service-location 'WEST US'
|
468
|
+
--azure-image-reference-publisher 'MicrosoftWindowsServer'
|
469
|
+
--azure-image-reference-offer 'WindowsServer'
|
470
|
+
--azure-image-reference-sku '2012-R2-Datacenter'
|
471
|
+
--azure-image-reference-version 'latest'
|
472
|
+
-x myuser -P mypassword
|
473
|
+
-r "recipe[cbk1::rec2]"
|
474
|
+
-c ~/.chef/knife.rb
|
475
|
+
```
|
476
|
+
|
477
|
+
For Centos:
|
478
|
+
|
479
|
+
```
|
480
|
+
knife azurerm server create
|
481
|
+
--azure-resource-group-name MyResourceGrpName
|
482
|
+
--azure-vm-name MyNewVMName
|
483
|
+
--azure-service-location 'WEST US'
|
484
|
+
--azure-image-os-type centos
|
485
|
+
--azure-vm-size Small
|
486
|
+
-r "recipe[cbk1::rec1]"
|
487
|
+
-c ~/.chef/knife.rb
|
488
|
+
```
|
489
|
+
OR
|
490
|
+
```
|
491
|
+
knife azurerm server create
|
492
|
+
--azure-resource-group-name MyResourceGrpName
|
493
|
+
--azure-vm-name MyNewVMName
|
494
|
+
--azure-service-location 'WEST US'
|
495
|
+
--azure-image-reference-publisher 'OpenLogic'
|
496
|
+
--azure-image-reference-offer 'CentOS'
|
497
|
+
--azure-image-reference-sku '6.5'
|
498
|
+
--azure-image-reference-version 'latest'
|
499
|
+
--ssh-user myuser --ssh-password mypassword
|
500
|
+
--azure-vm-size Small
|
501
|
+
-r "recipe[cbk1::rec1]"
|
502
|
+
-c ~/.chef/knife.rb
|
503
|
+
```
|
504
|
+
|
505
|
+
For Ubuntu:
|
506
|
+
|
507
|
+
```
|
508
|
+
knife azurerm server create
|
509
|
+
--azure-resource-group-name MyResourceGrpName
|
510
|
+
--azure-vm-name MyNewVMName
|
511
|
+
--azure-service-location 'WEST US'
|
512
|
+
--azure-image-os-type ubuntu
|
513
|
+
--ssh-user myuser --ssh-password mypassword
|
514
|
+
--azure-vm-size Small
|
515
|
+
-r "recipe[cbk1::rec1]"
|
516
|
+
-c ~/.chef/knife.rb
|
517
|
+
```
|
518
|
+
OR
|
519
|
+
```
|
520
|
+
knife azurerm server create
|
521
|
+
--azure-resource-group-name MyResourceGrpName
|
522
|
+
--azure-vm-name MyNewVMName
|
523
|
+
--azure-service-location 'WEST US'
|
524
|
+
--azure-image-reference-publisher 'Canonical'
|
525
|
+
--azure-image-reference-offer 'UbuntuServer'
|
526
|
+
--azure-image-reference-sku '14.04.2-LTS'
|
527
|
+
--azure-image-reference-version 'latest'
|
528
|
+
--ssh-user myuser --ssh-password mypassword
|
529
|
+
--azure-vm-size Small
|
530
|
+
-r "recipe[cbk1::rec1]"
|
531
|
+
-c ~/.chef/knife.rb
|
532
|
+
```
|
533
|
+
|
534
|
+
For Rhel:
|
535
|
+
|
536
|
+
```
|
537
|
+
knife azurerm server create
|
538
|
+
--azure-resource-group-name MyResourceGrpName
|
539
|
+
--azure-vm-name MyNewVMName
|
540
|
+
--azure-service-location 'WEST US'
|
541
|
+
--azure-image-os-type rhel
|
542
|
+
--ssh-user myuser --ssh-password mypassword
|
543
|
+
--azure-vm-size Small
|
544
|
+
-r "recipe[cbk1::rec1]"
|
545
|
+
-c ~/.chef/knife.rb
|
546
|
+
```
|
547
|
+
OR
|
548
|
+
```
|
549
|
+
knife azurerm server create
|
550
|
+
--azure-resource-group-name MyResourceGrpName
|
551
|
+
--azure-vm-name MyNewVMName
|
552
|
+
--azure-service-location 'WEST US'
|
553
|
+
--azure-image-reference-publisher 'RedHat'
|
554
|
+
--azure-image-reference-offer 'RHEL'
|
555
|
+
--azure-image-reference-sku '7.2'
|
556
|
+
--azure-image-reference-version 'latest'
|
557
|
+
--ssh-user myuser --ssh-password mypassword
|
558
|
+
--azure-vm-size Small
|
559
|
+
-r "recipe[cbk1::rec1]"
|
560
|
+
-c ~/.chef/knife.rb
|
561
|
+
```
|
562
|
+
|
563
|
+
For Debian:
|
564
|
+
|
565
|
+
```
|
566
|
+
knife azurerm server create
|
567
|
+
--azure-resource-group-name MyResourceGrpName
|
568
|
+
--azure-vm-name MyNewVMName
|
569
|
+
--azure-service-location 'WEST US'
|
570
|
+
--azure-image-os-type debian
|
571
|
+
--ssh-user myuser --ssh-password mypassword
|
572
|
+
--azure-vm-size Small
|
573
|
+
-r "recipe[cbk1::rec1]"
|
574
|
+
-c ~/.chef/knife.rb
|
575
|
+
```
|
576
|
+
OR
|
577
|
+
```
|
578
|
+
knife azurerm server create
|
579
|
+
--azure-resource-group-name MyResourceGrpName
|
580
|
+
--azure-vm-name MyNewVMName
|
581
|
+
--azure-service-location 'WEST US'
|
582
|
+
--azure-image-reference-publisher 'credativ'
|
583
|
+
--azure-image-reference-offer 'Debian'
|
584
|
+
--azure-image-reference-sku '7'
|
585
|
+
--azure-image-reference-version 'latest'
|
586
|
+
--ssh-user myuser --ssh-password mypassword
|
587
|
+
--azure-vm-size Small
|
588
|
+
-r "recipe[cbk1::rec1]"
|
589
|
+
-c ~/.chef/knife.rb
|
590
|
+
```
|
591
|
+
|
592
|
+
User can use existing virtual network and subnet while server create by providing `--azure-vnet-name` and `--azure-vnet-subnet-name` options.
|
593
|
+
|
594
|
+
Note:
|
595
|
+
|
596
|
+
1. If these options are not given, default vnet and subnet with the VM name will be created.
|
597
|
+
2. User needs to provide valid existing vnet name and subnet name otherwise it will raise vnet or subnet not found error.
|
598
|
+
3. Vnet should belong to the same resource group that is provided in the command.
|
599
|
+
4. Subnet should belong to the same vnet that is provided in the command.
|
600
|
+
|
601
|
+
```
|
602
|
+
knife azurerm server create
|
603
|
+
--azure-resource-group-name MyResourceGrpName
|
604
|
+
--azure-vm-name MyNewVMName
|
605
|
+
--azure-service-location 'WEST US'
|
606
|
+
--azure-image-os-type ubuntu
|
607
|
+
--ssh-user myuser --ssh-password mypassword
|
608
|
+
--azure-vm-size Small
|
609
|
+
--azure-vnet-name 'VnetName'
|
610
|
+
--azure-vnet-subnet-name 'VnetSubnetName'
|
611
|
+
-r "recipe[cbk1::rec1]"
|
612
|
+
-c ~/.chef/knife.rb
|
613
|
+
```
|
614
|
+
|
615
|
+
#### --server-count option
|
616
|
+
User can pass `--server-count` option to specify the number of servers to be created with same configuration.
|
617
|
+
```
|
618
|
+
--server-count COUNT Number of servers to create with same configuration. Maximum count is 5. Default value is 1.
|
619
|
+
|
620
|
+
Command:
|
621
|
+
knife azurerm server create
|
622
|
+
--azure-resource-group-name MyResourceGrpName
|
623
|
+
--azure-vm-name MyNewVMName
|
624
|
+
--azure-service-location 'WEST US'
|
625
|
+
--azure-image-os-type centos
|
626
|
+
--azure-vm-size Small
|
627
|
+
--server-count 3
|
628
|
+
-x myuser -P mypassword
|
629
|
+
```
|
630
|
+
This will create 3 VMs with names: `MyNewVMName0`, `MyNewVMName1` and `MyNewVMName2`
|
631
|
+
|
632
|
+
|
633
|
+
### Azure Server Delete Subcommand
|
634
|
+
Deletes an existing ARM server in the currently configured Azure account. By default, this does not delete the associated resource-group, associated node and client objects from the Chef server.
|
635
|
+
For deleting associated resource-group along with server use --delete-resource-group flag.
|
636
|
+
For deleting associated node and client objects from the Chef server, add the --purge flag.
|
637
|
+
|
638
|
+
```
|
639
|
+
knife azurerm server delete MyVMName --azure-resource-group-name MyResourceGrpName -c ~/.chef/knife.rb
|
640
|
+
|
641
|
+
knife azurerm server delete MyVMName --azure-resource-group-name MyResourceGrpName -c ~/.chef/knife.rb --purge #purge chef node
|
642
|
+
|
643
|
+
knife azurerm server delete MyVMName --azure-resource-group-name MyResourceGrpName -c ~/.chef/knife.rb --delete-resource-group #deletes resource group
|
644
|
+
```
|
645
|
+
|
646
|
+
### Azure Server List Subcommand
|
647
|
+
Outputs a list of all ARM servers in the currently configured Azure account. PLEASE NOTE - this shows all instances associated with the account, some of which may not be currently managed by the Chef server.
|
648
|
+
|
649
|
+
```
|
650
|
+
knife azurerm server list
|
651
|
+
```
|
652
|
+
|
653
|
+
### Azure Server Show Subcommand
|
654
|
+
Outputs the details of an ARM server.
|
655
|
+
|
656
|
+
```
|
657
|
+
knife azurerm server show MyVMName --azure-resource-group-name MyResourceGrpName -c ~/.chef/knife.rb
|
658
|
+
```
|
659
|
+
|
363
660
|
|
364
661
|
## Alternative Management Certificate Specification
|
365
662
|
In addition to specifying the management certificate using the publishsettings
|
@@ -395,4 +692,3 @@ You might be asked to enter a password which is usually blank.
|
|
395
692
|
You might be also asked to enter a passphrase. Please enter the phrase of your choice.
|
396
693
|
|
397
694
|
It is possible to generate your own certificates and upload them. More Detailed Documentation about the Management Certificates is available : https://www.windowsazure.com/en-us/manage/linux/common-tasks/manage-certificates/
|
398
|
-
|
@@ -0,0 +1,81 @@
|
|
1
|
+
#
|
2
|
+
# Author::
|
3
|
+
# Copyright:: Copyright (c) 2016 Opscode, Inc.
|
4
|
+
# License:: Apache License, Version 2.0
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
|
19
|
+
require 'azure/custom_errors'
|
20
|
+
require 'azure/helpers'
|
21
|
+
|
22
|
+
|
23
|
+
module Azure
|
24
|
+
class AzureInterface
|
25
|
+
include CustomErrors
|
26
|
+
include Helpers
|
27
|
+
|
28
|
+
attr_accessor :ui
|
29
|
+
|
30
|
+
def initialize(options = {})
|
31
|
+
end
|
32
|
+
|
33
|
+
def create_server(params = {})
|
34
|
+
AzureInterface.api_not_implemented(self)
|
35
|
+
end
|
36
|
+
|
37
|
+
def list_servers
|
38
|
+
AzureInterface.api_not_implemented(self)
|
39
|
+
end
|
40
|
+
|
41
|
+
def delete_server(server_name)
|
42
|
+
AzureInterface.api_not_implemented(self)
|
43
|
+
end
|
44
|
+
|
45
|
+
def list_images
|
46
|
+
AzureInterface.api_not_implemented(self)
|
47
|
+
end
|
48
|
+
|
49
|
+
def show_server(server_name, resource_group = "")
|
50
|
+
AzureInterface.api_not_implemented(self)
|
51
|
+
end
|
52
|
+
|
53
|
+
def create_vnet(params = {})
|
54
|
+
AzureInterface.api_not_implemented(self)
|
55
|
+
end
|
56
|
+
|
57
|
+
def list_vnets
|
58
|
+
AzureInterface.api_not_implemented(self)
|
59
|
+
end
|
60
|
+
|
61
|
+
def list_internal_lb
|
62
|
+
AzureInterface.api_not_implemented(self)
|
63
|
+
end
|
64
|
+
|
65
|
+
def create_internal_lb(params = {})
|
66
|
+
AzureInterface.api_not_implemented(self)
|
67
|
+
end
|
68
|
+
|
69
|
+
def list_affinity_groups
|
70
|
+
AzureInterface.api_not_implemented(self)
|
71
|
+
end
|
72
|
+
|
73
|
+
def create_affinity_group(params = {})
|
74
|
+
AzureInterface.api_not_implemented(self)
|
75
|
+
end
|
76
|
+
|
77
|
+
def find_server(server_name)
|
78
|
+
AzureInterface.api_not_implemented(self)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|