forked from gukai/su-novadocker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnova-docker.spec
127 lines (90 loc) · 3.52 KB
/
nova-docker.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
%define name nova-docker
%define version 2.3
%define release 12
Summary: Docker driver for OpenStack Nova.
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}.tar.gz
License: UNKNOWN
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: OpenStack <[email protected]>
Url: http://www.openstack.org/
Requires: docker-io
Requires: python-pbr >= 0.5.21
Requires: python-babel >= 1.3
Requires: python-six >= 1.7.0
Requires: python-oslo-serialization >= 1.0.0
Requires: python-oslo-utils >= 1.0.0
Requires: python-oslo-config > 1.4.0
%description
===============================
nova-docker
===============================
Docker driver for OpenStack Nova.
Free software: Apache license
----------------------------
Installation & Configuration
----------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. Install the python modules.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For example::
$ python setup.py install
Note: There are better and cleaner ways of managing Python modules, such as using distribution packages or 'pip'. The setup.py file and Debian's stdeb, for instance, may be used to create Debian/Ubuntu packages.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2. Enable the driver in Nova's configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In nova.conf::
compute_driver=novadocker.virt.docker.DockerDriver
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3. Optionally tune site-specific settings.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In nova.conf::
[docker]
# Commented out. Uncomment these if you'd like to customize:
## vif_driver=novadocker.virt.docker.vifs.DockerGenericVIFDriver
## snapshots_directory=/var/tmp/my-snapshot-tempdir
--------------------------
Uploading Images to Glance
--------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. Enable the driver in Glance's configuration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In glance-api.conf::
container_formats=ami,ari,aki,bare,ovf,ova,docker
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2. Save docker images to Glance
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Images may now be saved directly to Glance::
$ docker pull busybox
$ docker save busybox | glance image-create --is-public=True --container-format=docker --disk-format=raw --name busybox
**Note:** At present, only administrators should be allowed to manage images.
The name of the image in Glance should be explicitly set to the same name as the image as it is known to Docker. In the example above, an image has been tagged in Docker as 'busybox'. Matching this is the '--name busybox' argument to *glance image-create*. If these names do not align, the image will not be bootable.
-----
Notes
-----
* Earlier releases of this driver required the deployment of a private docker registry. This is no longer required. Images are now saved and loaded from Glance.
* Images loaded from Glance may do bad things. Only allow administrators to add images. Users may create snapshots of their containers, generating images in Glance -- these images are managed and thus safe.
----------
Contact Us
----------
Join us in #nova-docker on Freenode IRC
--------
Features
--------
* TODO
%prep
#%setup -n %{name}-%{version} -n %{name}-%{version}
%setup -n %{name} -n %{name}
%build
python setup.py build
%install
python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)