-
Notifications
You must be signed in to change notification settings - Fork 1
/
devstack_on_openSUSE.2_docker.sh
executable file
·65 lines (51 loc) · 2.03 KB
/
devstack_on_openSUSE.2_docker.sh
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
## This script installs docker integrated with devstack
sudo -n zypper in docker
sudo systemctl start docker
sudo systemctl enable docker
## Prepare Nova-Docker
## Official Guide python packages unnecessary because openSUSE installs by default
sudo mkdir -p /opt/stack
sudo git clone https://git.openstack.org/openstack/nova-docker /opt/stack/nova-docker
cd /opt/stack/nova-docker
# Check out a different version if not using master, ie
# sudo git checkout stable/kilo && sudo git pull --ff-only origin stable/kilo
sudo pip install . #The linecache2 error appears to be benign
## Clone latest Devstack to your choice location. These are only the install files which you can remove later if you wish. Devstack will actually be installed into /opt. If unedited, the location is in your User /home
# su $USER
mkdir ~/devstack
git clone https://github.com/openstack-dev/devstack.git ~/devstack
cd ~/devstack
## Prepare your Devstack Answer file. Do not alter without good reason
cat >> local.conf << EOF
VIRT_DRIVER=novadocker.virt.docker.DockerDriver
# Introduce glance to docker images
\$GLANCE_API_CONF
[DEFAULT]
container_formats=ami,ari,aki,bare,ovf,ova,docker
# Configure nova to use the nova-docker driver--Neutron is the default as of kilo
\$NOVA_CONF
[DEFAULT]
compute_driver=novadocker.virt.docker.DockerDriver
# Set Project Name
# [DEFAULT]
# \$OS_PROJECT_NAME=default
EOF
# Configure the Answer file for stack.sh
# IMPORTANT! - change "password" in following to your password
cat >> localrc << EOF
ADMIN_PASSWORD=password
MYSQL_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=tokentoken
OS_PROJECT_NAME=default
FLAT_INTERFACE=br100
LOGFILE=\$DEST/logs/stack.sh.log
EOF
## Workaround for openSUSE "hostname" bug
## https://bugzilla.opensuse.org/show_bug.cgi?ie=952517
sed -i 's/hostname -f/hostname/g' lib/tls
## Install Devstack
FORCE=yes ./stack.sh
## Fix problem - Testing Nova Docker plugin driver later will look in wrong place
sudo cp /opt/stack/nova-docker/etc/nova/rootwrap.d/docker.filters /etc/nova/rootwrap.dc