foreman_azure 1.0.1 → 1.0.2
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 +4 -4
- data/README.md +59 -11
- data/app/assets/javascripts/foreman_azure/host_os_azure_selected.js +2 -1
- data/app/controllers/foreman_azure/concerns/hosts_controller_extensions.rb +10 -2
- data/app/models/foreman_azure/azure.rb +0 -1
- data/lib/foreman_azure/engine.rb +1 -0
- data/lib/foreman_azure/version.rb +1 -1
- data/locale/en/foreman_azure.po +59 -2
- data/locale/foreman_azure.pot +90 -8
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eb742a3fe12f6b8d5dc15b70e8bf013882043eb
|
4
|
+
data.tar.gz: 898eaf3509f80f66122a4cd858d5d6d4d1c4ec7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8462d89f84a66de679117da52a237e307e4a45d6bdbbb6c65799e4e39d448990c454117eed1bb7e622ff7facb25a99cba17c128fab221b98ad5c11f0558c4de
|
7
|
+
data.tar.gz: f68f09e9099f31a8d8f29a6dcd5d506cd9d079a6fb9af02b20bc825e4e860afefbdf4d38837d0d639ede4f6283d0b5f7f5b941687ab0dc6ca72952db7f89fdef
|
data/README.md
CHANGED
@@ -1,15 +1,68 @@
|
|
1
|
+
[](https://codeclimate.com/github/theforeman/foreman_azure)
|
2
|
+
[](https://badge.fury.io/rb/foreman_azure)
|
3
|
+
[](https://github.com/theforeman/foreman_azure/blob/master/LICENSE)
|
4
|
+
|
1
5
|
# Foreman Azure
|
2
6
|
|
3
|
-
|
7
|
+
[Microsoft Azure](http://azure.com/) compute resource for [Foreman](http://theforeman.org/)
|
8
|
+
|
9
|
+
* Website: [theforeman.org](http://theforeman.org)
|
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)
|
13
|
+
* 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
|
+
* Mailing lists:
|
15
|
+
* [foreman-users](https://groups.google.com/forum/?fromgroups#!forum/foreman-users)
|
16
|
+
* [foreman-dev](https://groups.google.com/forum/?fromgroups#!forum/foreman-dev)
|
17
|
+
|
4
18
|
|
5
19
|
## Installation
|
6
20
|
|
7
|
-
See [
|
8
|
-
|
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
|
+

|
54
|
+
|
55
|
+
Then associate your Foreman operating system with an image on Azure:
|
56
|
+
|
57
|
+

|
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
|
+

|
9
62
|
|
10
63
|
## Configuration
|
11
64
|
|
12
|
-
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
|
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.
|
13
66
|
|
14
67
|
### Certificate creation
|
15
68
|
|
@@ -23,15 +76,10 @@ To create the .cer file, execute the following command:
|
|
23
76
|
|
24
77
|
openssl x509 -inform pem -in /etc/foreman/azure.pem -outform der -out /etc/foreman/azure.cer
|
25
78
|
|
26
|
-
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 management portal.
|
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/).
|
27
80
|
|
28
|
-
|
81
|
+

|
29
82
|
|
30
|
-
* foreman-installer support
|
31
|
-
* listing in theforeman.org
|
32
|
-
* improve documentation
|
33
|
-
* packaging
|
34
|
-
* move to github.com/theforeman
|
35
83
|
|
36
84
|
## Copyright
|
37
85
|
|
@@ -3,7 +3,7 @@ function azure_image_selected() {
|
|
3
3
|
var imageId = $('#host_compute_attributes_image').val();
|
4
4
|
var azure_locations = $('#azure_locations');
|
5
5
|
var locations_spinner = $('#azure_locations_spinner');
|
6
|
-
|
6
|
+
tfm.tools.showSpinner();
|
7
7
|
locations_spinner.removeClass('hide');
|
8
8
|
$.ajax({
|
9
9
|
data: { "image_id": imageId },
|
@@ -12,6 +12,7 @@ function azure_image_selected() {
|
|
12
12
|
complete: function(){
|
13
13
|
reloadOnAjaxComplete('#host_compute_attributes_image');
|
14
14
|
locations_spinner.addClass('hide');
|
15
|
+
tfm.tools.hideSpinner();
|
15
16
|
},
|
16
17
|
error: function(request, status, error) {
|
17
18
|
},
|
@@ -2,8 +2,16 @@ module ForemanAzure
|
|
2
2
|
module Concerns
|
3
3
|
module HostsControllerExtensions
|
4
4
|
def locations
|
5
|
-
azure_resource = Image.find_by_uuid(params[:image_id]).
|
6
|
-
|
5
|
+
if (azure_resource = Image.find_by_uuid(params[:image_id])).present?
|
6
|
+
render :json => azure_resource.compute_resource.
|
7
|
+
image_locations(params[:image_id])
|
8
|
+
else
|
9
|
+
error = _('The operating system you selected has no associated image.'\
|
10
|
+
' Please select a different one or go to Infrastructure >'\
|
11
|
+
' Compute Resources to associate an image with this '\
|
12
|
+
'operating system.')
|
13
|
+
render :json => "[\"#{error}\"]"
|
14
|
+
end
|
7
15
|
end
|
8
16
|
end
|
9
17
|
end
|
data/lib/foreman_azure/engine.rb
CHANGED
data/locale/en/foreman_azure.po
CHANGED
@@ -2,12 +2,10 @@
|
|
2
2
|
#
|
3
3
|
# This file is distributed under the same license as foreman_azure.
|
4
4
|
#
|
5
|
-
#, fuzzy
|
6
5
|
msgid ""
|
7
6
|
msgstr ""
|
8
7
|
"Project-Id-Version: version 0.0.1\n"
|
9
8
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"POT-Creation-Date: 2014-08-20 08:46+0100\n"
|
11
9
|
"PO-Revision-Date: 2014-08-20 08:54+0100\n"
|
12
10
|
"Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
|
13
11
|
"Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
|
@@ -17,3 +15,62 @@ msgstr ""
|
|
17
15
|
"Content-Transfer-Encoding: 8bit\n"
|
18
16
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
19
17
|
|
18
|
+
msgid "Action"
|
19
|
+
msgstr ""
|
20
|
+
|
21
|
+
msgid "Azure as a Compute Resource of Foreman"
|
22
|
+
msgstr ""
|
23
|
+
|
24
|
+
msgid "Azure location"
|
25
|
+
msgstr ""
|
26
|
+
|
27
|
+
msgid "Certificate path (.pem)"
|
28
|
+
msgstr ""
|
29
|
+
|
30
|
+
msgid "Choose an operating system and image first"
|
31
|
+
msgstr ""
|
32
|
+
|
33
|
+
msgid "Cloud service name"
|
34
|
+
msgstr ""
|
35
|
+
|
36
|
+
msgid "Defaults to VM name"
|
37
|
+
msgstr ""
|
38
|
+
|
39
|
+
msgid "Does this image support user data input (e.g. via cloud-init)?"
|
40
|
+
msgstr ""
|
41
|
+
|
42
|
+
msgid "Image"
|
43
|
+
msgstr ""
|
44
|
+
|
45
|
+
msgid "Location"
|
46
|
+
msgstr ""
|
47
|
+
|
48
|
+
msgid "Name"
|
49
|
+
msgstr ""
|
50
|
+
|
51
|
+
msgid "None"
|
52
|
+
msgstr ""
|
53
|
+
|
54
|
+
msgid "Please select an image"
|
55
|
+
msgstr ""
|
56
|
+
|
57
|
+
msgid "Role size"
|
58
|
+
msgstr ""
|
59
|
+
|
60
|
+
msgid "Size"
|
61
|
+
msgstr ""
|
62
|
+
|
63
|
+
msgid "State"
|
64
|
+
msgstr ""
|
65
|
+
|
66
|
+
msgid "Storage account"
|
67
|
+
msgstr ""
|
68
|
+
|
69
|
+
msgid "Subscription ID"
|
70
|
+
msgstr ""
|
71
|
+
|
72
|
+
msgid "Test Connection"
|
73
|
+
msgstr ""
|
74
|
+
|
75
|
+
msgid "The user that is used to ssh into the instance, normally cloud-user, ec2-user, ubuntu, root etc"
|
76
|
+
msgstr ""
|
data/locale/foreman_azure.pot
CHANGED
@@ -1,19 +1,101 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
# This file is distributed under the same license as foreman_azure.
|
1
|
+
# SOME DESCRIPTIVE TITLE.
|
2
|
+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
3
|
+
# This file is distributed under the same license as the foreman_azure package.
|
4
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
4
5
|
#
|
5
6
|
#, fuzzy
|
6
7
|
msgid ""
|
7
8
|
msgstr ""
|
8
|
-
"Project-Id-Version:
|
9
|
+
"Project-Id-Version: foreman_azure 1.0.0\n"
|
9
10
|
"Report-Msgid-Bugs-To: \n"
|
10
|
-
"POT-Creation-Date:
|
11
|
-
"PO-Revision-Date:
|
12
|
-
"Last-Translator:
|
13
|
-
"Language-Team:
|
11
|
+
"POT-Creation-Date: 2016-08-26 10:34-0400\n"
|
12
|
+
"PO-Revision-Date: 2016-08-26 10:34-0400\n"
|
13
|
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
14
|
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14
15
|
"Language: \n"
|
15
16
|
"MIME-Version: 1.0\n"
|
16
17
|
"Content-Type: text/plain; charset=UTF-8\n"
|
17
18
|
"Content-Transfer-Encoding: 8bit\n"
|
18
19
|
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
19
20
|
|
21
|
+
#: ../app/helpers/azure_images_helper.rb:9
|
22
|
+
msgid "Please select an image"
|
23
|
+
msgstr ""
|
24
|
+
|
25
|
+
#: ../app/helpers/azure_images_helper.rb:22
|
26
|
+
msgid "Choose an operating system and image first"
|
27
|
+
msgstr ""
|
28
|
+
|
29
|
+
#: ../app/helpers/azure_images_helper.rb:23
|
30
|
+
msgid "Azure location"
|
31
|
+
msgstr ""
|
32
|
+
|
33
|
+
#: ../app/helpers/azure_images_helper.rb:33
|
34
|
+
msgid "None"
|
35
|
+
msgstr ""
|
36
|
+
|
37
|
+
#: ../app/helpers/azure_images_helper.rb:34
|
38
|
+
msgid "Storage account"
|
39
|
+
msgstr ""
|
40
|
+
|
41
|
+
#: ../app/helpers/azure_images_helper.rb:42
|
42
|
+
msgid "Role size"
|
43
|
+
msgstr ""
|
44
|
+
|
45
|
+
#: ../app/helpers/azure_images_helper.rb:49
|
46
|
+
msgid "Defaults to VM name"
|
47
|
+
msgstr ""
|
48
|
+
|
49
|
+
#: ../app/helpers/azure_images_helper.rb:50
|
50
|
+
msgid "Cloud service name"
|
51
|
+
msgstr ""
|
52
|
+
|
53
|
+
#: ../app/views/compute_resources/form/_azure.html.erb:1
|
54
|
+
msgid "Subscription ID"
|
55
|
+
msgstr ""
|
56
|
+
|
57
|
+
#: ../app/views/compute_resources/form/_azure.html.erb:2
|
58
|
+
msgid "Certificate path (.pem)"
|
59
|
+
msgstr ""
|
60
|
+
|
61
|
+
#: ../app/views/compute_resources/form/_azure.html.erb:4
|
62
|
+
msgid "Test Connection"
|
63
|
+
msgstr ""
|
64
|
+
|
65
|
+
#: ../app/views/compute_resources_vms/index/_azure.html.erb:4
|
66
|
+
msgid "Name"
|
67
|
+
msgstr ""
|
68
|
+
|
69
|
+
#: ../app/views/compute_resources_vms/index/_azure.html.erb:5
|
70
|
+
msgid "Image"
|
71
|
+
msgstr ""
|
72
|
+
|
73
|
+
#: ../app/views/compute_resources_vms/index/_azure.html.erb:6
|
74
|
+
msgid "Size"
|
75
|
+
msgstr ""
|
76
|
+
|
77
|
+
#: ../app/views/compute_resources_vms/index/_azure.html.erb:7
|
78
|
+
msgid "Location"
|
79
|
+
msgstr ""
|
80
|
+
|
81
|
+
#: ../app/views/compute_resources_vms/index/_azure.html.erb:8
|
82
|
+
msgid "State"
|
83
|
+
msgstr ""
|
84
|
+
|
85
|
+
#: ../app/views/compute_resources_vms/index/_azure.html.erb:9
|
86
|
+
msgid "Action"
|
87
|
+
msgstr ""
|
88
|
+
|
89
|
+
#: ../app/views/images/form/_azure.html.erb:4
|
90
|
+
msgid ""
|
91
|
+
"The user that is used to ssh into the instance, normally cloud-user, ec2-user,"
|
92
|
+
" ubuntu, root etc"
|
93
|
+
msgstr ""
|
94
|
+
|
95
|
+
#: ../app/views/images/form/_azure.html.erb:6
|
96
|
+
msgid "Does this image support user data input (e.g. via cloud-init)?"
|
97
|
+
msgstr ""
|
98
|
+
|
99
|
+
#: gemspec.rb:2
|
100
|
+
msgid "Azure as a Compute Resource of Foreman"
|
101
|
+
msgstr ""
|
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.0.
|
4
|
+
version: 1.0.2
|
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
|
+
date: 2016-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-azure
|
@@ -42,17 +42,17 @@ dependencies:
|
|
42
42
|
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.42'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
description:
|
54
|
+
version: '0.42'
|
55
|
+
description: Azure as a Compute Resource of Foreman
|
56
56
|
email:
|
57
57
|
- dlobatog@redhat.com
|
58
58
|
executables: []
|
@@ -86,7 +86,8 @@ files:
|
|
86
86
|
- locale/foreman_azure.pot
|
87
87
|
- locale/gemspec.rb
|
88
88
|
homepage: https://github.com/theforeman/foreman_azure
|
89
|
-
licenses:
|
89
|
+
licenses:
|
90
|
+
- GPL-3.0
|
90
91
|
metadata: {}
|
91
92
|
post_install_message:
|
92
93
|
rdoc_options: []
|
@@ -104,8 +105,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
105
|
version: '0'
|
105
106
|
requirements: []
|
106
107
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.
|
108
|
+
rubygems_version: 2.5.0
|
108
109
|
signing_key:
|
109
110
|
specification_version: 4
|
110
|
-
summary: Azure as a Compute Resource of Foreman
|
111
|
+
summary: Azure as a Compute Resource of Foreman (theforeman.org)
|
111
112
|
test_files: []
|