ForemanProxmox
Foreman plugin that adds Proxmox compute resource: managing virtual machines and containers using the fog-proxmox module.
It is intended to satisfy this feature.
Compatibility
Tested with:
- Foreman = 1.17.1
- Fog-proxmox >= 0.4.0
Installation
From gem
See complete details in plugin installation from gem
Here is a Debian sample:
- Install foreman 1.17 with foreman-installer
- Use only foreman user (not root!)
- In /usr/share/foreman/bundler.d directory, add Gemfile.local.rb file and add this line in it:
gem 'the_foreman_proxmox'
- Install the gem plugin:
/usr/bin/foreman-ruby /usr/bin/bundle install
- Install plugin assets (proxmox.js, etc):
You need nodejs installed and foreman-asset package.
Edit /usr/share/foreman/config/environments/production.rb:
config.cache_classes = false
- Restart the server:
touch ~foreman/tmp/restart.txt
Precompile plugin assets:
/usr/bin/foreman-ruby /usr/bin/bundle exec bin/rake plugin:asset:precompile[the_foreman_proxmox]
Edit /usr/share/foreman/config/environments/production.rb:
config.cache_classes = true
- Restart the server:
touch ~foreman/tmp/restart.txt
See complete details in plugin installation from gem
You can see it in about foreman page:
From OS packages
Deb, rpm: work in progress...
Please see the Foreman manual for complete instructions:
Usage
Development
Prerequisites
You need a Proxmox VE >= 5.1 server running.
You also need nodejs in your dev machine to run webpack-dev-server.
Platform
- Fork this github repo.
- Clone it on your local machine
- Install foreman v1.17 on your machine:
git clone https://github.com/theforeman/foreman
git checkout tags/1.17
- Create a Gemfile.local.rb file in foreman/bundler.d/
- Add this line:
gem 'the_foreman_proxmox', :path => '/your_path_to/foreman_proxmox'
- In foreman directory, install dependencies:
bundle install
- Configure foreman settings:
cp config/settings.yaml.example config/settings.yaml
- Install foreman database (sqlite is default in rails development):
cp config/database.yaml.example config/database.yaml
bundle exec rake db:migrate
bundle exec rake db:seed
- You can reset admin password if needed:
bundle exec rake permissions:reset
- In foreman directory, after you modify the_foreman_proxmox specific assets (proxmox.js, etc) you have to precompile it:
bundle plugin:assets:precompile[the_foreman_proxmox]
- In foreman directory, run rails server:
rails server
- In foreman directory, run in a new terminal the webpack-dev-server:
./node_modules/.bin/webpack-dev-server --config config/webpack.config.js
See details in foreman plugin development
Contributing
You can reach the contributors. Bug reports and pull requests are welcome on GitHub at ForemanProxmox. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Please read how to contribute.
License
The code is available as open source under the terms of the GNU Public License v3.
Code of Conduct
Everyone interacting in the ForemanProxmox project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.