Revision ab73d5cf
Added by Daniel Lobato Garcia about 8 years ago
README.md | ||
---|---|---|
1 | 1 |
# Foreman Docker Plugin |
2 | 2 |
|
3 |
This plugin enables provisioning and managing Docker containers and images in Foreman. |
|
3 |
```foreman_docker``` enables provisioning and managing of [Docker](http://docker.com) containers and images in [Foreman](http://github.com/theforeman/foreman), all of that under the GPL v3+ license. |
|
4 |
|
|
5 |
* Website: [TheForeman.org](http://theforeman.org) |
|
6 |
* ServerFault tag: [Foreman](http://serverfault.com/questions/tagged/foreman) |
|
7 |
* Issues: [foreman_docker Redmine](http://projects.theforeman.org/projects/docker/issues) |
|
8 |
* Wiki: [Foreman wiki](http://projects.theforeman.org/projects/foreman/wiki/About) |
|
9 |
* Community and support: #theforeman for general support, #theforeman-dev for development chat in [Freenode](irc.freenode.net) |
|
10 |
* Mailing lists: |
|
11 |
* [foreman-users](https://groups.google.com/forum/?fromgroups#!forum/foreman-users) |
|
12 |
* [foreman-dev](https://groups.google.com/forum/?fromgroups#!forum/foreman-dev) |
|
13 |
|
|
14 |
## Features |
|
15 |
|
|
16 |
* Special view with logs and processes of Foreman managed containers |
|
17 |
 |
|
18 |
 |
|
19 |
* Wizard for container creation and cgroups configuration |
|
20 |
 |
|
21 |
 |
|
22 |
* Commit and upload containers: creates an image with the status of your current container |
|
23 |
 |
|
24 |
* Container listing and basic CRUD operations |
|
25 |
 |
|
26 |
|
|
27 |
### Planned |
|
28 |
* [Kubernetes](https://github.com/GoogleCloudPlatform/kubernetes/) integration |
|
29 |
* Events stream ([#8037](http://projects.theforeman.org/issues/8037)) |
|
30 |
* Tight integration between Docker hosts [Atomic](http://www.projectatomic.io/) and [CoreOS](http://coreos.com/) and containers ([#7653](http://projects.theforeman.org/issues/7653), [#7652](http://projects.theforeman.org/issues/7652)) |
|
31 |
* Quickstart images - pre-supplied images and configuration ([#7869](http://projects.theforeman.org/issues/7869)) |
|
32 |
* Environment variables support ([#8226](http://projects.theforeman.org/issues/8226)) |
|
33 |
* Support to expose ports during creation or at runtime ([#7864](http://projects.theforeman.org/issues/7864)) |
|
34 |
* Links to other containers ([#7866](http://projects.theforeman.org/issues/7866)) |
|
35 |
* API ([#7874](http://projects.theforeman.org/issues/7874)) |
|
36 |
* [Hammer CLI](http://github.com/theforeman/hammer-cli-foreman) support ([#8227](http://projects.theforeman.org/issues/8227)) |
|
4 | 37 |
|
5 | 38 |
## Installation |
6 | 39 |
|
... | ... | |
8 | 41 |
|
9 | 42 |
* [Foreman: How to Install a Plugin](http://theforeman.org/manuals/latest/index.html#6.1InstallaPlugin) |
10 | 43 |
|
11 |
The gem name is "foreman_docker".
|
|
44 |
### Red Hat, CentOS, Fedora, Scientific Linux (rpm)
|
|
12 | 45 |
|
13 |
RPM users can install the "ruby193-rubygem-foreman_docker" or "rubygem-foreman_docker" packages.
|
|
46 |
Set up the repo as explained in the link above, then run
|
|
14 | 47 |
|
15 |
After installing plugin and before restarting foreman run: |
|
16 |
`foreman-rake db:migrate` |
|
48 |
# yum install ruby193-rubygem-foreman_docker |
|
49 |
|
|
50 |
### Debian, Ubuntu (deb) |
|
51 |
|
|
52 |
Set up the repo as explained in the link above, then run |
|
53 |
|
|
54 |
# apt-get install ruby-foreman-docker |
|
55 |
|
|
56 |
### Bundle (gem) |
|
57 |
|
|
58 |
Add the following to bundler.d/Gemfile.local.rb in your Foreman installation directory (/usr/share/foreman by default) |
|
59 |
|
|
60 |
$ gem 'foreman_docker' |
|
61 |
|
|
62 |
Then run `bundle install` and `foreman-rake db:migrate` from the same directory |
|
63 |
|
|
64 |
-------------- |
|
65 |
|
|
66 |
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 |
|
67 |
|
|
68 |
 |
|
69 |
|
|
70 |
## Configuration |
|
71 |
|
|
72 |
Go to **Infrastructure > Compute Resources** and click on "New Compute Resource". |
|
73 |
|
|
74 |
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. |
|
75 |
|
|
76 |
That's it. You're now ready to create and manage containers in your new Docker compute resource. |
|
17 | 77 |
|
18 | 78 |
## Compatibility |
19 | 79 |
|
20 |
| Foreman Version | Plugin Version |
|
|
80 |
| Foreman | Plugin |
|
|
21 | 81 |
| ---------------:| --------------:| |
22 |
| >= 1.5 | 0.0.1 | |
|
82 |
| >= 1.5 | 0.0.1 - 0.0.3 | |
|
83 |
| >= 1.6 | 0.1.0 - 0.2.0 | |
|
84 |
|
|
85 |
## Known bugs |
|
86 |
* Unsaved new containers leave a dangling container object in the database |
|
87 |
* Power operations redirect to compute resource container view even for managed container |
|
23 | 88 |
|
24 |
## Testing
|
|
89 |
## How to contribute?
|
|
25 | 90 |
|
26 |
Run `rake test:docker:test` from your Foreman directory to run the test suite. |
|
91 |
Generally, follow the [Foreman guidelines](http://theforeman.org/contribute.html). For code-related contributions, fork this project and send a pull request with all changes. Some things to keep in mind: |
|
92 |
* [Follow the rules](http://theforeman.org/contribute.html#SubmitPatches) about commit message style and create a Redmine issue. Doing this right will help reviewers to get your contribution merged faster. |
|
93 |
* [Rubocop](https://github.com/bbatsov/rubocop) will analyze your code, you can run it locally with `rake rubocop`. |
|
94 |
* All of our pull requests run the full test suite in our [Jenkins CI system](http://ci.theforeman.org/). Please include tests in your pull requests for any additions or changes in functionality |
|
95 |
|
|
96 |
|
|
97 |
### Testing |
|
98 |
|
|
99 |
Run `rake test:docker` from your Foreman directory to run the test suite. |
|
27 | 100 |
|
28 | 101 |
## Latest code |
29 | 102 |
|
... | ... | |
47 | 120 |
|
48 | 121 |
You should have received a copy of the GNU General Public License |
49 | 122 |
along with this program. If not, see <http://www.gnu.org/licenses/>. |
123 |
|
Also available in: Unified diff
Fixes #8236: 1.6 compatibility