the_foreman_proxmox 0.3.4 → 0.3.5

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: a8dcb7102bd33c2f618352c0ea500e5b5879477d
4
- data.tar.gz: 4b2f290d5749c2a0651f2c655c8353beeab2613c
3
+ metadata.gz: 6ea8e64ee1a5e0d1f3f5dba25b3e47b69fb9f06e
4
+ data.tar.gz: 8f1896a7323b719dd272a8c87b7f9b3bd9835685
5
5
  SHA512:
6
- metadata.gz: a9f3815bac178b6f87b713fbead16b63cee1d10a10fce5fdbbf6f92a2077bfc3460308f8c4431901a587632e45966dfcd81c109a30bbb6604683b729ca49dad2
7
- data.tar.gz: ee01802d92e90ac518130ab8c5fbc337af1b40bb029a31223f4fc87850482b9a6549d33b61dd968965cf7c6e1590e9045d15a4e1dcc0720be2a2b0e2880d55b7
6
+ metadata.gz: 2d8b13b62ce2594e551e6951c92f1daad8434b96773dcf6e78973e6e7b86005f870d3f39726384dea90b8c7eb1ec1f46bf205aa3e74806b10fb2c5c81dbec875
7
+ data.tar.gz: 741273a8f1e0ba41a056c52ed0fed811fff3a6985d72f559541603c95ac2aa659594c0f43c30ba4234e77c4ea47324f9264277128cf861de62e997f238f6e05f
data/README.md CHANGED
@@ -19,20 +19,70 @@ Tested with:
19
19
 
20
20
  ## Installation
21
21
 
22
- ### Gem
22
+ ### From gem
23
+
24
+ See complete details in [plugin installation from gem](https://theforeman.org/plugins/#2.3AdvancedInstallationfromGems)
25
+
26
+ Here is a Debian sample:
27
+
28
+ * Install foreman 1.17 with [foreman-installer](https://theforeman.org/manuals/1.17/index.html#2.1Installation)
29
+ * Use only foreman user (**not root!**)
30
+ * In /usr/share/foreman/bundler.d directory, add Gemfile.local.rb file and add this line in it:
31
+
32
+ ```ruby
33
+ gem 'the_foreman_proxmox'
34
+ ```
35
+
36
+ * Install the gem plugin:
37
+
38
+ ```shell
39
+ /usr/bin/foreman-ruby /usr/bin/bundle install
40
+ ```
41
+
42
+ * Install plugin assets (proxmox.js, etc):
43
+
44
+ You need [nodejs](https://nodejs.org/en/download/package-manager/) installed and foreman-asset package.
45
+
46
+ Edit /usr/share/foreman/config/environments/production.rb:
47
+
48
+ ```ruby
49
+ config.cache_classes = false
50
+ ```
51
+
52
+ * Restart the server:
23
53
 
24
54
  ```shell
25
- gem install the_foreman_proxmox
55
+ touch ~foreman/tmp/restart.txt
56
+ ```
57
+
58
+ Precompile plugin assets:
59
+
60
+ ```shell
61
+ /usr/bin/foreman-ruby /usr/bin/bundle exec bin/rake plugin:asset:precompile[the_foreman_proxmox]
62
+ ```
63
+
64
+ Edit /usr/share/foreman/config/environments/production.rb:
65
+
66
+ ```ruby
67
+ config.cache_classes = true
26
68
  ```
27
69
 
70
+ * Restart the server:
71
+
72
+ ```shell
73
+ touch ~foreman/tmp/restart.txt
74
+ ```
75
+
76
+ See complete details in [plugin installation from gem](https://theforeman.org/plugins/#2.3.2Debiandistributions)
77
+
28
78
  You can see it in about foreman page:
29
79
 
30
80
  ![About resources](.github/images/about_resources.png)
31
81
  ![About greffon](.github/images/about_greffon.png)
32
82
 
33
- ### Packages
83
+ ### From OS packages
34
84
 
35
- Deb, yum, rpm: work in progress...
85
+ Deb, rpm: work in progress...
36
86
 
37
87
  Please see the Foreman manual for complete instructions:
38
88
 
@@ -45,46 +95,75 @@ Please see the Foreman manual for complete instructions:
45
95
 
46
96
  ## Development
47
97
 
98
+ ### Prerequisites
99
+
48
100
  You need a Proxmox VE >= 5.1 server running.
49
101
 
102
+ You also need nodejs in your dev machine to run webpack-dev-server.
103
+
104
+ ### Platform
105
+
50
106
  * Fork this github repo.
51
107
  * Clone it on your local machine
108
+ * Install foreman v1.17 on your machine:
109
+
110
+ ```shell
111
+ git clone https://github.com/theforeman/foreman
112
+ git checkout tags/1.17
113
+ ```
52
114
 
53
- To install the plugin with foreman in a Docker container, move to the source code:
115
+ * Create a Gemfile.local.rb file in foreman/bundler.d/
116
+ * Add this line:
117
+
118
+ ```ruby
119
+ gem 'the_foreman_proxmox', :path => '/your_path_to/foreman_proxmox'
120
+ ```
121
+
122
+ * In foreman directory, install dependencies:
123
+
124
+ ```shell
125
+ bundle install
126
+ ```
127
+
128
+ * Configure foreman settings:
54
129
 
55
130
  ```shell
56
- cd foreman_proxmox
131
+ cp config/settings.yaml.example config/settings.yaml
57
132
  ```
58
133
 
59
- Build a docker container:
134
+ * Install foreman database (sqlite is default in rails development):
60
135
 
61
136
  ```shell
62
- sudo docker build -t foreman .
137
+ cp config/database.yaml.example config/database.yaml
138
+ bundle exec rake db:migrate
139
+ bundle exec rake db:seed
63
140
  ```
64
141
 
65
- If you are behind a proxy http server, add:
142
+ * You can reset admin password if needed:
66
143
 
67
144
  ```shell
68
- --build-arg http_proxy=http://<user>:<password>@<ip>:<port>
69
- ...
145
+ bundle exec rake permissions:reset
70
146
  ```
71
147
 
72
- Run it:
148
+ * In foreman directory, after you modify the_foreman_proxmox specific assets (proxmox.js, etc) you have to precompile it:
73
149
 
74
150
  ```shell
75
- sudo docker run -it -p 3808:5000 --name foreman foreman
151
+ bundle plugin:assets:precompile[the_foreman_proxmox]
76
152
  ```
77
153
 
78
- Access container's bash console:
154
+ * In foreman directory, run rails server:
79
155
 
80
156
  ```shell
81
- sudo docker exec -it foreman bash
157
+ rails server
82
158
  ```
83
159
 
84
- The docker container use ruby 2.3.7, latest nodejs 8.x (8.11.2) and foreman 1.17.1.
160
+ * In foreman directory, run in a new terminal the webpack-dev-server:
161
+
162
+ ```shell
163
+ ./node_modules/.bin/webpack-dev-server --config config/webpack.config.js
164
+ ```
85
165
 
86
- If you want to debug live. You have to clone foreman 1.17.1 repo and install foreman_proxmox plugin as gem.
87
- See [how to create a foreman plugin](https://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin)
166
+ See details in [foreman plugin development](https://projects.theforeman.org/projects/foreman/wiki/How_to_Create_a_Plugin)
88
167
 
89
168
  ## Contributing
90
169
 
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ end
14
14
 
15
15
  RDoc::Task.new(:rdoc) do |rdoc|
16
16
  rdoc.rdoc_dir = 'rdoc'
17
- rdoc.title = 'ForemanProxmox'
17
+ rdoc.title = 'TheForemanProxmox'
18
18
  rdoc.options << '--line-numbers'
19
19
  rdoc.rdoc_files.include('README.rdoc')
20
20
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -60,7 +60,7 @@ function initOptions(name){
60
60
  tfm.tools.showSpinner();
61
61
  $.getJSON({
62
62
  type: 'get',
63
- url: '/foreman_proxmox/isos/'+storage,
63
+ url: '/the_foreman_proxmox/isos/'+storage,
64
64
  complete: function(){
65
65
  tfm.tools.hideSpinner();
66
66
  },
@@ -2,20 +2,20 @@
2
2
 
3
3
  # Copyright 2018 Tristan Robert
4
4
 
5
- # This file is part of ForemanProxmox.
5
+ # This file is part of TheForemanProxmox.
6
6
 
7
- # ForemanProxmox is free software: you can redistribute it and/or modify
7
+ # TheForemanProxmox is free software: you can redistribute it and/or modify
8
8
  # it under the terms of the GNU General Public License as published by
9
9
  # the Free Software Foundation, either version 3 of the License, or
10
10
  # (at your option) any later version.
11
11
 
12
- # ForemanProxmox is distributed in the hope that it will be useful,
12
+ # TheForemanProxmox is distributed in the hope that it will be useful,
13
13
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
15
  # GNU General Public License for more details.
16
16
 
17
17
  # You should have received a copy of the GNU General Public License
18
- # along with ForemanProxmox. If not, see <http://www.gnu.org/licenses/>.
18
+ # along with TheForemanProxmox. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  require 'the_foreman_proxmox/engine'
21
21
 
@@ -40,7 +40,7 @@ module TheForemanProxmox
40
40
  compute_resource TheForemanProxmox::Proxmox
41
41
  parameter_filter(ComputeResource, :uuid)
42
42
  # add dashboard widget
43
- widget 'the_foreman_proxmox_widget', name: N_('Foreman plugin template widget'), sizex: 4, sizey: 1
43
+ widget 'the_foreman_proxmox_widget', name: N_('Foreman Proxmox plugin template widget'), sizex: 4, sizey: 1
44
44
  end
45
45
  end
46
46
 
@@ -18,5 +18,5 @@
18
18
  # along with ForemanProxmox. If not, see <http://www.gnu.org/licenses/>.
19
19
 
20
20
  module TheForemanProxmox
21
- VERSION = '0.3.4'.freeze
21
+ VERSION = '0.3.5'.freeze
22
22
  end
@@ -1,14 +1,14 @@
1
- # foreman_proxmox
1
+ # the_foreman_proxmox
2
2
  #
3
- # This file is distributed under the same license as foreman_proxmox.
3
+ # This file is distributed under the same license as the_foreman_proxmox.
4
4
  #
5
5
  #, fuzzy
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: version 0.0.1\n"
8
+ "Project-Id-Version: version 0.3.5\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "POT-Creation-Date: 2014-08-20 08:46+0100\n"
11
- "PO-Revision-Date: 2014-08-20 08:54+0100\n"
11
+ "PO-Revision-Date: 2018-07-12 08:46+0100\n"
12
12
  "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
13
13
  "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
14
14
  "Language: \n"
@@ -0,0 +1,19 @@
1
+ # the_foreman_proxmox
2
+ #
3
+ # This file is distributed under the same license as the_foreman_proxmox.
4
+ #
5
+ #, fuzzy
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: version 0.3.5\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2014-08-20 08:46+0100\n"
11
+ "PO-Revision-Date: 2018-07-12 08:46+0100\n"
12
+ "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
13
+ "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
14
+ "Language: \n"
15
+ "MIME-Version: 1.0\n"
16
+ "Content-Type: text/plain; charset=UTF-8\n"
17
+ "Content-Transfer-Encoding: 8bit\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+
@@ -5,10 +5,10 @@
5
5
  #, fuzzy
6
6
  msgid ""
7
7
  msgstr ""
8
- "Project-Id-Version: version 0.0.1\n"
8
+ "Project-Id-Version: version 0.3.5\n"
9
9
  "Report-Msgid-Bugs-To: \n"
10
10
  "POT-Creation-Date: 2014-08-20 08:46+0100\n"
11
- "PO-Revision-Date: 2014-08-20 08:46+0100\n"
11
+ "PO-Revision-Date: 2018-07-12 08:46+0100\n"
12
12
  "Last-Translator: Foreman Team <foreman-dev@googlegroups.com>\n"
13
13
  "Language-Team: Foreman Team <foreman-dev@googlegroups.com>\n"
14
14
  "Language: \n"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: the_foreman_proxmox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tristan Robert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-10 00:00:00.000000000 Z
11
+ date: 2018-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fog-proxmox
@@ -105,7 +105,8 @@ files:
105
105
  - lib/the_foreman_proxmox/engine.rb
106
106
  - lib/the_foreman_proxmox/version.rb
107
107
  - locale/Makefile
108
- - locale/en/foreman_proxmox.po
108
+ - locale/en/the_foreman_proxmox.po
109
+ - locale/fr/the_foreman_proxmox.po
109
110
  - locale/gemspec.rb
110
111
  - locale/the_foreman_proxmox.pot
111
112
  - test/factories/the_foreman_proxmox_factories.rb