Project

General

Profile

Download (6.63 KB) Statistics
| Branch: | Tag: | Revision:

foreman_docker / README.md @ 8c1d6780

1
# Foreman Docker Plugin
2

    
3
[![Code Climate](https://codeclimate.com/github/theforeman/foreman-docker/badges/gpa.svg)](https://codeclimate.com/github/theforeman/foreman-docker)
4
[![Gem Version](https://badge.fury.io/rb/foreman_docker.svg)](http://badge.fury.io/rb/foreman_docker)
5
[![Dependency Status](https://gemnasium.com/theforeman/foreman-docker.svg)](https://gemnasium.com/theforeman/foreman-docker)
6

    
7
```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.
8

    
9
* Website: [TheForeman.org](http://theforeman.org)
10
* ServerFault tag: [Foreman](http://serverfault.com/questions/tagged/foreman)
11
* Issues: [foreman_docker Redmine](http://projects.theforeman.org/projects/docker/issues)
12
* Wiki: [Foreman wiki](http://projects.theforeman.org/projects/foreman/wiki/About)
13
* Community and support: #theforeman for general support, #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

    
18
## Features
19

    
20
* Special view with logs and processes of Foreman managed containers
21
    ![](http://i.imgur.com/D21bdgj.png)
22
    ![](http://i.imgur.com/XnrPTZC.png)
23
* Wizard for container creation and cgroups configuration
24
    ![Select a docker image](http://i.imgur.com/IoMuNnr.png)
25
    ![Cgroups configuration](http://i.imgur.com/74d99Tf.png)
26
* Commit and upload containers: creates an image with the status of your current container
27
    ![Commit and upload to the docker hub](http://i.imgur.com/coF5Y0L.png)
28
* Container listing and basic CRUD operations
29
    ![](http://i.imgur.com/DPcaHkZ.png)
30

    
31
### Planned
32
* [Kubernetes](https://github.com/GoogleCloudPlatform/kubernetes/) integration
33
* Events stream ([#8037](http://projects.theforeman.org/issues/8037))
34
* 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))
35
* Quickstart images - pre-supplied images and configuration ([#7869](http://projects.theforeman.org/issues/7869))
36
* Environment variables support ([#8226](http://projects.theforeman.org/issues/8226))
37
* Support to expose ports during creation or at runtime ([#7864](http://projects.theforeman.org/issues/7864))
38
* Links to other containers ([#7866](http://projects.theforeman.org/issues/7866))
39
* API ([#7874](http://projects.theforeman.org/issues/7874))
40
* [Hammer CLI](http://github.com/theforeman/hammer-cli-foreman) support ([#8227](http://projects.theforeman.org/issues/8227))
41

    
42
## Installation
43

    
44
Please see the Foreman manual for appropriate instructions:
45

    
46
* [Foreman: How to Install a Plugin](http://theforeman.org/manuals/latest/index.html#6.1InstallaPlugin)
47

    
48
### Red Hat, CentOS, Fedora, Scientific Linux (rpm)
49

    
50
Set up the repo as explained in the link above, then run
51

    
52
    # yum install ruby193-rubygem-foreman_docker
53

    
54
### Debian, Ubuntu (deb)
55

    
56
Set up the repo as explained in the link above, then run
57

    
58
    # apt-get install ruby-foreman-docker
59

    
60
### Bundle (gem)
61

    
62
Add the following to bundler.d/Gemfile.local.rb in your Foreman installation directory (/usr/share/foreman by default)
63

    
64
    $ gem 'foreman_docker'
65

    
66
Then run `bundle install` and `foreman-rake db:migrate` from the same directory
67

    
68
--------------
69

    
70
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
71

    
72
![](http://i.imgur.com/Ug14Ktl.png)
73

    
74
## Configuration
75

    
76
Go to **Infrastructure > Compute Resources** and click on "New Compute Resource".
77

    
78
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.
79

    
80
That's it. You're now ready to create and manage containers in your new Docker compute resource.
81

    
82
## Compatibility
83

    
84
| Foreman | Plugin |
85
| ---------------:| --------------:|
86
| >= 1.5         | 0.0.1 - 0.0.3   |
87
| >= 1.6         | 0.1.0 - 0.2.0   |
88
| >= 1.7         | 1.0.0           |
89

    
90
We will follow [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html). This means:
91
* MAJOR versions: will break compatibility with the latest supported Foreman version. For instance, foreman-docker 1.0 breaks Foreman 1.6 compatibility.
92
* MINOR versions: will enhance foreman-docker with features in a backwards-compatible manner.
93
* PATCH versions: will contain bugfixes for the latest minor version in a backwards-compatible manner.
94

    
95
## How to contribute?
96

    
97
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:
98
* Code from the master branch can contain features only present in [Fog's](http://github.com/fog/fog) master branch, we commit to wait for the next Fog release to put that code in a foreman-docker release.
99
* [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.
100
* [Rubocop](https://github.com/bbatsov/rubocop) will analyze your code, you can run it locally with `rake rubocop`.
101
* 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
102

    
103

    
104
### Testing
105

    
106
Run `rake test:docker` from your Foreman directory to run the test suite.
107

    
108
## Latest code
109

    
110
You can get the develop branch of the plugin by specifying your Gemfile in this way:
111

    
112
    gem 'foreman_docker', :git => "https://github.com/theforeman/foreman-docker.git"
113

    
114
# Copyright
115

    
116
Copyright (c) 2014 Amos Benari
117

    
118
This program is free software: you can redistribute it and/or modify
119
it under the terms of the GNU General Public License as published by
120
the Free Software Foundation, either version 3 of the License, or
121
(at your option) any later version.
122

    
123
This program is distributed in the hope that it will be useful,
124
but WITHOUT ANY WARRANTY; without even the implied warranty of
125
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
126
GNU General Public License for more details.
127

    
128
You should have received a copy of the GNU General Public License
129
along with this program.  If not, see <http://www.gnu.org/licenses/>.
130