Ask Your Question
0

docker setup on kilo

asked 2015-05-29 06:33:30 -0600

pawankkamboj gravatar image

updated 2015-05-29 06:40:55 -0600

dbaxps gravatar image

Setup kilo and have integrated docker in it. Below are steps follow.

git clone https://github.com/stackforge/nova-do...

cd nova-docker/

python setup.py install

chmod 666 /var/run/docker.sock

vim /etc/nova/nova.conf

compute_driver=novadocker.virt.docker.DockerDriver

mkdir /etc/nova/rootwrap.d

cd /etc/nova/rootwrap.d

vim docker.filters

# nova-rootwrap command filters for setting up network in the docker driver

# This file should be owned by (and only-writeable by) the root user

[Filters]

# nova/virt/docker/driver.py: 'ln', '-sf', '/var/run/netns/.*'

ln: CommandFilter, /bin/ln, root

vim /etc/glance/glance-api.conf

container_formats=ami,ari,aki,bare,ovf,ova,docker

systemctl restart openstack-glance-api

systemctl restart openstack-nova-compute

getting following exception in compute log-- any help?

2015-05-29 16:45:48.571 22384 ERROR nova.openstack.common.threadgroup [req-d63e8d1f-dddd-42d5-b402-2b7cd2e7b990 - - - - -] 'module' object has no attribute 'DOCKER'
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 145, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     x.wait()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/threadgroup.py", line 47, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return self.thread.wait()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return self._exit_event.wait()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return hubs.get_hub().switch()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     return self.greenlet.switch()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     result = function(*args, **kwargs)
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/openstack/common/service.py", line 497, in run_service
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     service.start()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/service.py", line 183, in start
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup     self.manager.pre_start_hook()
2015-05-29 16:45:48.571 22384 TRACE nova.openstack.common.threadgroup   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1291, in pre_start_hook
2015-05-29 16:45:48.571 22384 TRACE ...
(more)
edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2015-05-29 06:53:08 -0600

dbaxps gravatar image

updated 2015-05-30 12:20:17 -0600

UPDATE 05/30/2015
RDO Kilo installed on Fedora 22 allows to build Nova-Docker driver as follows:-

 # dnf -y update
 # dnf -y install git docker-io 
 # dnf -y install gcc python-devel
 # git clone http://github.com/stackforge/nova-docker.git
 # cd nova-docker
 # git checkout -b kilo origin/stable/kilo
 # python setup.py install
 # systemctl start docker
 # systemctl enable docker
 # chmod 666  /var/run/docker.sock
 # mkdir /etc/nova/rootwrap.d

Regarding RDO Kilo setup on F22 view: http://bderzhavets.blogspot.com/2015/...
END UPDATE

Whichever OS (F21 or CentOS 7.1) you are running , both require upgrades of some python modules via Fedora Rawhide ( to match Ubuntu's versions needed for correct driver build )

Detailed instructions here :-
http://bderzhavets.blogspot.com/2015/... (F21)
http://bderzhavets.blogspot.com/2015/... (CentOS 7.1)

 In both cases I suggest checkout stable/kilo branch before driver build. Required  Fedora Rawhide upgrades    described in links posted.
edit flag offensive delete link more

Comments

Wasn't kilo suppose to have nova-docker packaged in repository?

Tobias Urdin gravatar imageTobias Urdin ( 2015-05-30 09:38:32 -0600 )edit

Which one you expect RHEL/CentOS 7.X or maybe F22 ? Reread question one more time :-

systemctl restart openstack-glance-api
systemctl restart openstack-nova-compute

I am not expecting attempt to install on Ubuntu 15.04 ( systemd )

dbaxps gravatar imagedbaxps ( 2015-05-30 09:58:22 -0600 )edit
0

answered 2015-06-01 07:40:53 -0600

pawankkamboj gravatar image

after some changing in nova-docker, it is working fine.

edit flag offensive delete link more

Comments

Could you, kindly, elaborate?

Nastooh gravatar imageNastooh ( 2015-06-01 22:19:35 -0600 )edit

after installing driver then edit file "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py" line 322:::

        'supported_instances': jsonutils.dumps([
            ('i686', 'docker', 'lxc'),
            ('x86_64', 'docker', 'lxc')
        ])

and restart compute

pawankkamboj gravatar imagepawankkamboj ( 2015-06-02 03:36:40 -0600 )edit

Thank you for your reply. Opened a bug report: https://bugs.launchpad.net/nova/+bug/....

Nastooh gravatar imageNastooh ( 2015-06-02 14:18:57 -0600 )edit
0

answered 2015-06-02 00:58:04 -0600

No need of Any of these Manual steps as stackforge cookbooks have support for nova-docker integration

In Kilo, image and compute chef cookbooks are integrated with openstack docker support.

What you have to do is

a) Download latest openstack chef repo

b) https://github.com/stackforge/cookbook-openstack-compute/blob/master/attributes/default.rb (https://github.com/stackforge/cookboo...) (https://github.com/stackforge/cookboo...) Override ['openstack']['compute']['docker']['enable'] = false to true for all docker computes

c) curl -sSL https://get.docker.com/ubuntu/ | sudo sh

Execute above step in all docker computes

and create cloud as explained in openstack chef repo (https://github.com/stackforge/openstack-chef-repo (https://github.com/stackforge/opensta...) (https://github.com/stackforge/opensta...)) (https://github.com/stackforge/opensta...)

Telemetry changes are on the way and we can expect those in few weeks

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-05-29 06:33:30 -0600

Seen: 2,156 times

Last updated: Jun 02 '15