Foreman Docker Plugin
This plugin has been discontinued. The latest release only helps with its removal. If you're interested in taking over the maintanance, let us know.
In order to remove the plugin from you Foreman installation, following steps need to be taken
- make a backup
- upgrade to last version of foreman-docker 5.0 (and Katello if you're using it)
- run
foreman-rake db:migrate
(if you have Katello, this will erase docker data) - run
foreman-rake foreman_docker:cleanup
(cleans up all data that this plugin introduced) -
yum remove tfm-rubygem-foreman_docker
orapt remove ruby-foreman-docker
-
yum remove tfm-rubygem-hammer_cli_foreman_docker
orapt remove ruby-hammer-cli-foreman-docker
unless you still use katello commands from it - update apipie cache
foreman-rake apipie:cache
service httpd restart
foreman_docker
enables provisioning and managing of Docker containers and images in Foreman, all of that under the GPL v3+ license.
- Website: TheForeman.org
- ServerFault tag: Foreman
- Issues: foreman_docker Redmine
- Wiki: Foreman wiki
- Community and support: #theforeman for general support, #theforeman-dev for development chat in Freenode
- Mailing lists:
Features
- Special view with logs and processes of Foreman managed containers
- Wizard for container creation and cgroups configuration
- Commit and upload containers: creates an image with the status of your current container
- Container listing and basic CRUD operations
Planned
- Kubernetes integration
- Events stream (#8037)
- Tight integration between Docker hosts Atomic and CoreOS and containers (#7653, #7652)
- Quickstart images - pre-supplied images and configuration (#7869)
- Links to other containers (#7866)
- API (#7874)
- Hammer CLI support (#8227)
Installation
Please see the Foreman manual for appropriate instructions:
Red Hat, CentOS, Fedora, Scientific Linux (rpm)
Set up the repo as explained in the link above, then run
# yum install ruby193-rubygem-foreman_docker
Debian, Ubuntu (deb)
Set up the repo as explained in the link above, then run
# apt-get install ruby-foreman-docker
Bundle (gem)
Add the following to bundler.d/Gemfile.local.rb in your Foreman installation directory (/usr/share/foreman by default)
$ gem 'foreman_docker'
Then run bundle install
and foreman-rake db:migrate
from the same directory
To verify that the installation was successful, go to Foreman, top bar Administer > About and check 'foreman_docker' shows up in the System Status menu under the Plugins tab. You should also see a 'Containers' button show up in the top bar, similar to this
Configuration
Go to Infrastructure > Compute Resources and click on "New Compute Resource".
Choose the Docker provider, and fill in all the fields. User name, password, and email are used so that Docker clients such as Foreman can make the host download images from the Docker hub. Your password will be encrypted in the database.
That's it. You're now ready to create and manage containers in your new Docker compute resource.
Compatibility
Foreman | Plugin |
---|---|
>= 1.5 | 0.0.1 - 0.0.3 |
>= 1.6 | 0.1.0 - 0.2.0 |
>= 1.7 | 1.0.0 - 2.1.1 |
>= 1.7 | 3.0.0+ |
>= 1.15 | 3.1.0+ |
Docker Registry API Compatibility
Plugin version | Registry API version |
---|---|
< 3.1.0 | v1 |
>= 3.1.0 | v1, v2***** |
*** Note:** API v2 as default and v1 to fall back on.
See extras/RELEASE.md for more detailed information on compatibility and releases.
How to contribute?
Generally, follow the Foreman guidelines. For code-related contributions, fork this project and send a pull request with all changes. Some things to keep in mind:
- Code from the master branch can contain features only present in Fog's master branch, we commit to wait for the next Fog release to put that code in a foreman-docker release.
- Follow the rules about commit message style and create a Redmine issue. Doing this right will help reviewers to get your contribution merged faster.
-
Rubocop will analyze your code, you can run it locally with
rake rubocop
. - All of our pull requests run the full test suite in our Jenkins CI system. Please include tests in your pull requests for any additions or changes in functionality
Testing
Run rake test:docker
from your Foreman directory to run the test suite.
Latest code
You can get the develop branch of the plugin by specifying your Gemfile in this way:
gem 'foreman_docker', :git => "https://github.com/theforeman/foreman-docker.git"
Copyright
Copyright (c) 2014 Amos Benari
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.