foreman_azure 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c423d706f2ee1849a1524d2cfac17f3b5e0576ab
4
- data.tar.gz: 1f5145596fe51e1958da017b64b9cc99f4ddc75a
3
+ metadata.gz: ff11e43b657e5177c3219bf100c07633639e0469
4
+ data.tar.gz: 93a82f80824a9cdf07a1e799fd9602386c2a51dd
5
5
  SHA512:
6
- metadata.gz: 8542d5a51b205fb7b0ff9824e35885c8992e9bf74aed80612574c1e039a00ce32a4decce4d68418e24a73a7e15dff3a0cc49c6aa445805629751728dcc7fc509
7
- data.tar.gz: b6828bed9fef643e5e454b1c1c71240504e527cba638c651bc9f28ba3dbda453cec44920e904b266c02e82a0bf894bd3cbfa8af68dad3a85df8e670f3aa846f8
6
+ metadata.gz: 1deae213b992645d923eadfcb38ca7acb033b2e916af23d7d4efb3ae3849390f24799486cc75d10baeb063c404acef744f7ff30b42ec8916d54366385984574d
7
+ data.tar.gz: f5aa26b324b488f1c4c8494c969a0fcacff0b417bc1ca466382c4db0f1a94f2480b045d6a65ed3be4c020a2abbea3d839e66b31609a4d4085fe2dd9c0c01e49a
data/README.md CHANGED
@@ -8,78 +8,15 @@
8
8
 
9
9
  * Website: [theforeman.org](http://theforeman.org)
10
10
  * ServerFault tag: [Foreman](http://serverfault.com/questions/tagged/foreman)
11
- * Issues: [foreman Redmine](http://projects.theforeman.org/projects/foreman/issues)
12
- * Wiki: [Foreman wiki](http://projects.theforeman.org/projects/foreman/wiki/About)
11
+ * Issues: [foreman Redmine](http://projects.theforeman.org/projects/azure/issues/)
13
12
  * Community and support: [#theforeman](https://kiwiirc.com/client/irc.freenode.net/?#theforeman) for general support, [#theforeman-dev](https://kiwiirc.com/client/irc.freenode.net/?#theforeman-dev) for development chat in [Freenode](irc.freenode.net)
14
13
  * Mailing lists:
15
14
  * [foreman-users](https://groups.google.com/forum/?fromgroups#!forum/foreman-users)
16
15
  * [foreman-dev](https://groups.google.com/forum/?fromgroups#!forum/foreman-dev)
17
16
 
17
+ ## Documentation
18
18
 
19
- ## Installation
20
-
21
- See [the Foreman manual](https://theforeman.org/plugins/#2.2Packageinstallation). foreman-installer support is available.
22
-
23
- ### Red Hat, CentOS, Scientific Linux (rpm)
24
-
25
- Set up the repo as explained in the link above, then run
26
-
27
- # yum install tfm-rubygem-foreman_azure
28
-
29
- ### Fedora (rpm)
30
-
31
- Set up the repo as explained in the link above, then run
32
-
33
- # yum install rubygem-foreman_azure
34
-
35
- ### Debian, Ubuntu (deb)
36
-
37
- Set up the repo as explained in the link above, then run
38
-
39
- # apt-get install ruby-foreman-azure
40
-
41
- ### Bundle (gem)
42
-
43
- Add the following to bundler.d/Gemfile.local.rb in your Foreman installation directory (/usr/share/foreman by default)
44
-
45
- $ gem 'foreman_azure'
46
-
47
- Then run `bundle install` from the same directory
48
-
49
- ## Usage
50
-
51
- Same as any other compute resource, provide your credentials:
52
-
53
- ![Azure credentials](http://i.imgur.com/4uOVa2W.png)
54
-
55
- Then associate your Foreman operating system with an image on Azure:
56
-
57
- ![Azure image](http://i.imgur.com/KcnVgi0.png)
58
-
59
- And you'll be able to create hosts in Azure with that image and many other options, via Foreman. This will allow you to proactively manage your hosts DHCP/DNS, configuration management, parameters, run scripts via remote execution and more!
60
-
61
- ![Azure options on new host](http://i.imgur.com/iZdLCqs.png)
62
-
63
- ## Configuration
64
-
65
- When you create the compute resource, you need to provide your subscription ID, a path to the .pem certificate, and a URL to your Azure API. Read below how to create the certificate needed.
66
-
67
- ### Certificate creation
68
-
69
- The certificate used must be generated by the user. OpenSSL can be used to create the management certificates. Two certificates are needed: a .cer file, which is uploaded to Azure, and a .pem file, which is stored locally.
70
-
71
- To create the .pem file, execute the following command:
72
-
73
- openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/foreman/azure.pem -out /etc/foreman/azure.pem
74
-
75
- To create the .cer file, execute the following command:
76
-
77
- openssl x509 -inform pem -in /etc/foreman/azure.pem -outform der -out /etc/foreman/azure.cer
78
-
79
- After creating these files, the .cer file will need to be uploaded to Azure via the "Upload a Management Certificate" action of the "Management Certificates" tab within the "Settings" section of the classic management portal. Read how to upload the certificate on the [Azure official documentation](https://azure.microsoft.com/en-us/documentation/articles/azure-api-management-certs/).
80
-
81
- ![Management certificate upload](http://i.imgur.com/wy6AfG6.png)
82
-
19
+ See the [Foreman Azure manuals](https://theforeman.org/plugins/foreman_azure/) on the Foreman web site.
83
20
 
84
21
  ## Copyright
85
22
 
@@ -97,4 +34,3 @@ GNU General Public License for more details.
97
34
 
98
35
  You should have received a copy of the GNU General Public License
99
36
  along with this program. If not, see <http://www.gnu.org/licenses/>.
100
-
@@ -7,6 +7,10 @@ module FogExtensions
7
7
  @vm_svc.list_role_sizes
8
8
  end
9
9
 
10
+ def virtual_networks
11
+ ::Azure::VirtualNetworkManagementService.new.list_virtual_networks
12
+ end
13
+
10
14
  def cloud_services
11
15
  ::Azure::CloudServiceManagementService.new.list_cloud_services
12
16
  end
@@ -2,13 +2,14 @@ module ForemanAzure
2
2
  class Azure < ComputeResource
3
3
  alias_attribute :subscription_id, :user
4
4
  alias_attribute :certificate_path, :url
5
- if ::Foreman::Version.new.major.to_i == 1 && ::Foreman::Version.new.minor.to_i <= 13
5
+ if ::Foreman::Version.new.major.to_i == 1 && ::Foreman::Version.new.minor.to_i < 13
6
6
  attr_accessible :subscription_id, :certificate_path
7
7
  end
8
8
 
9
9
  before_create :test_connection
10
10
 
11
- delegate :storage_accounts, :role_sizes, :cloud_services, :to => :client
11
+ delegate :storage_accounts, :role_sizes, :cloud_services,
12
+ :virtual_networks, :to => :client
12
13
 
13
14
  def to_label
14
15
  "#{name} (#{provider_friendly_name})"
@@ -6,6 +6,14 @@
6
6
  <% arch ||= nil ; os ||= nil
7
7
  images = possible_images(compute_resource, arch, os) %>
8
8
 
9
+ <% virtual_networks = compute_resource.virtual_networks %>
10
+ <%= selectable_f f, :virtual_network_name,
11
+ virtual_networks.map(&:name),
12
+ { :include_blank => virtual_networks.any? ? false : _("No networks") },
13
+ { :class => "libvirt_nat", :label => _("Virtual Network"),
14
+ :disabled => !new_host }
15
+ %>
16
+
9
17
  <div id='image_selection'>
10
18
  <%= select_azure_image(f, images) %>
11
19
  </div>
@@ -1,3 +1,3 @@
1
1
  module ForemanAzure
2
- VERSION = '1.1.1'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-15 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-azure