Add cinder into the docker compose setup

This patch adds the docker-compose files, updates the docs,
and adds cinder to the start command.

Implements: blueprint container-set-storage-operation

Change-Id: I5386851e2247c00696704dc26a8a286451d4bf59
This commit is contained in:
Ryan Hallisey 2015-04-14 16:29:21 -04:00
parent e854587c94
commit 72d1ef47dd
8 changed files with 139 additions and 1 deletions

View File

@ -0,0 +1,15 @@
cinderapi:
image: kollaglue/centos-rdo-cinder-api:latest
name: cinder-api
net: host
restart: always
env_file:
- openstack.env
cinderscheduler:
image: kollaglue/centos-rdo-cinder-scheduler:latest
name: cinder-scheduler
net: host
restart: always
env_file:
- openstack.env

View File

@ -0,0 +1,9 @@
cinderbackup:
image: kollaglue/centos-rdo-cinder-backup:latest
name: cinder-backup
net: host
restart: always
env_file:
- openstack.env
volumes:
- /dev:/dev

18
compose/cinder-volume.yml Normal file
View File

@ -0,0 +1,18 @@
cinderdata:
image: kollaglue/centos-rdo-cinder-data:latest
name: cinderdata
restart: on-failure
cindervolume:
image: kollaglue/centos-rdo-cinder-volume:latest
name: cinder-volume
net: host
privileged: true
restart: always
env_file:
- openstack.env
volumes:
- /lib/modules:/lib/modules:ro
- /dev:/dev
volumes_from:
- cinderdata

View File

@ -14,6 +14,7 @@ libvirt:
volumes:
- /run:/run
- /sys/fs/cgroup:/sys/fs/cgroup
- /dev:/dev
volumes_from:
- computedata
@ -43,5 +44,6 @@ novacompute:
volumes:
- /run:/run
- /sys/fs/cgroup:/sys/fs/cgroup
- /dev:/dev
volumes_from:
- computedata

View File

@ -15,6 +15,7 @@ libvirt:
- /run:/run
- /sys/fs/cgroup:/sys/fs/cgroup
- /lib/modules:/lib/modules:ro
- /dev:/dev
volumes_from:
- computedata
@ -30,5 +31,6 @@ novacompute:
- /run:/run
- /sys/fs/cgroup:/sys/fs/cgroup
- /lib/modules:/lib/modules:ro
- /dev:/dev
volumes_from:
- computedata

View File

@ -142,7 +142,27 @@ all containers. This allows a simple method of ensuring every type of node
DESIGNATE_SINK_NEUTRON_DOMAIN_NAME=<neutron.example.org.> - Name of domain used to create records from Neutron notifications
DESIGNATE_SINK_NOVA_FORMATS=<("%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s" "%(hostname)s.%(domain)s")> - List of formats for records that will be created by Nova handler
DESIGNATE_SINK_NEUTRON_FORMATS=<("%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s" "%(hostname)s.%(domain)s")> - List of formats for records that will be created by Neutron handler
CINDER_API_SERVICE_HOST=<IP> - The IP Address where the Cinder service is running
CINDER_API_SERVICE_PORT=<8776> - Port where Cinder operates
CINDER_API_SERVICE_LISTEN=<IP> - The IP Address where the Cinder API listens
CINDER_KEYSTONE_USER=<cinder> - Cinder Keystone User
CINDER_KEYSTONE_PASSWORD=<password> - The Cinder Keystone password
CINDER_ADMIN_PASSWORD=<password> - The Cinder password
CINDER_DB_NAME=<cinder> - Cinder's DB name
CINDER_DB_USER=<cinder> - User name of Cinder in the database
CINDER_DB_PASSWORD=<password> - Cinder DB password
CINDER_BACKUP_DRIVER=<driver> - The backup driver for Cinder
CINDER_BACKUP_MANAGER=<manager> - The backup manager for Cinder
CINDER_BACKUP_API_CLASS=<api> - The cinder-backup api class
CINDER_BACKUP_NAME_TEMPLATE=<template> - The naming template for Cinder backups
ISCSI_HELPER=<lioadm> - The ISCSI user tool to use
ISCSI_IP_ADDRESS=<IP> - The IP Address to connect to ISCSI
CINDER_LVM_LO_VOLUME_SIZE=<size> - The size of the volume group (4G)
CINDER_VOLUME_GROUP=<cinder-volumes> - The name of the volume group
CINDER_VOLUME_BACKEND_NAME=<LVM_iSCSI57> - The backend name for a given driver implementation
CINDER_VOLUME_DRIVER=<cinder.volume.drivers.lvm.LVMISCSIDriver> - The driver used for volume creation
CINDER_ENABLED_BACKEND=<lvm57> - A list of backend names to use
INIT_CINDER_DB=<true|false> - Initialize or update the cinder db
[Minimum environment variable setup guide.](https://github.com/stackforge/kolla/blob/master/docs/minimal-environment-vars.md)

View File

@ -26,6 +26,7 @@ ADMIN_USER_PASSWORD=steakfordinner
HOST_IP=$MY_IP
MARIADB_ROOT_PASSWORD=kolla
PASSWORD=12345
INIT_CINDER_DB=true
# Galera
DB_CLUSTER_BIND_ADDRESS=0.0.0.0
@ -53,6 +54,11 @@ NEUTRON_SERVER_LOG_FILE=
NEUTRON_L3_AGENT_LOG_FILE=
NEUTRON_LINUXBRIDGE_AGENT_LOG_FILE=
NEUTRON_METADATA_AGENT_LOG_FILE=
CINDER_LOG_DIR=
CINDER_API_LOG_FILE=
CINDER_VOLUME_LOG_FILE=
CINDER_BACKUP_LOG_FILE=
CINDER_SCHEDULER_LOG_FILE=
# RabbitMQ
RABBITMQ_SERVICE_HOST=$HOST_IP
@ -157,6 +163,35 @@ DESIGNATE_SINK_NEUTRON_DOMAIN_NAME=neutron.example.org.
DESIGNATE_SINK_NOVA_FORMATS=("%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s" "%(hostname)s.%(domain)s")
DESIGNATE_SINK_NEUTRON_FORMATS=("%(octet0)s-%(octet1)s-%(octet2)s-%(octet3)s.%(domain)s" "%(hostname)s.%(domain)s")
# Cinder API
CINDER_API_SERVICE_HOST=$HOST_IP
CINDER_API_SERVICE_PORT=8776
CINDER_API_SERVICE_LISTEN=$HOST_IP
CINDER_KEYSTONE_USER=cinder
CINDER_KEYSTONE_PASSWORD=password
CINDER_ADMIN_PASSWORD=password
# Cinder Scheduler
CINDER_DB_NAME=cinder
CINDER_DB_USER=cinder
CINDER_DB_PASSWORD=password
# Cinder Backup
CINDER_BACKUP_MANAGER=cinder.backup.manager.BackupManager
CINDER_BACKUP_API_CLASS=cinder.backup.api.API
CINDER_BACKUP_NAME_TEMPLATE=backup-%s
CINDER_BACKUP_DRIVER=cinder.backup.drivers.swift
# Cinder Volume
ISCSI_HELPER=lioadm
ISCSI_IP_ADDRESS=$HOST_IP
CINDER_LVM_LO_VOLUME_SIZE=4G
CINDER_VOLUME_API_LISTEN=$HOST_IP
CINDER_VOLUME_GROUP=cinder-volumes
CINDER_VOLUME_BACKEND_NAME=LVM_iSCSI57
CINDER_VOLUME_DRIVER=cinder.volume.drivers.lvm.LVMISCSIDriver
CINDER_ENABLED_BACKEND=lvm57
cat > ./openrc <<EOF
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:5000/v2.0"
export OS_USERNAME=$ADMIN_TENANT_NAME
@ -273,7 +308,41 @@ DB_CLUSTER_INIT_DB=$DB_CLUSTER_INIT_DB
DB_CLUSTER_NAME=$DB_CLUSTER_NAME
DB_CLUSTER_NODES=$DB_CLUSTER_NODES
DB_CLUSTER_WSREP_METHOD=$DB_CLUSTER_WSREP_METHOD
CINDER_API_SERVICE_HOST=$HOST_IP
CINDER_API_SERVICE_PORT=$CINDER_API_SERVICE_PORT
CINDER_API_SERVICE_LISTEN=$MY_IP
CINDER_KEYSTONE_USER=$CINDER_KEYSTONE_USER
CINDER_KEYSTONE_PASSWORD=$CINDER_KEYSTONE_PASSWORD
CINDER_ADMIN_PASSWORD=$CINDER_ADMIN_PASSWORD
CINDER_DB_NAME=$CINDER_DB_NAME
CINDER_DB_USER=$CINDER_DB_USER
CINDER_DB_PASSWORD=$CINDER_DB_PASSWORD
CINDER_BACKUP_MANAGER=$CINDER_BACKUP_MANAGER
CINDER_BACKUP_API_CLASS=$CINDER_BACKUP_API_CLASS
CINDER_BACKUP_NAME_TEMPLATE=$CINDER_BACKUP_NAME_TEMPLATE
ISCSI_HELPER=$ISCSI_HELPER
ISCSI_IP_ADDRESS=$ISCSI_IP_ADDRESS
CINDER_BACKUP_DRIVER=$CINDER_BACKUP_DRIVER
CINDER_LVM_LO_VOLUME_SIZE=$CINDER_LVM_LO_VOLUME_SIZE
CINDER_VOLUME_GROUP=$CINDER_VOLUME_GROUP
CINDER_VOLUME_API_LISTEN=$CINDER_VOLUME_API_LISTEN
CINDER_VOLUME_BACKEND_NAME=$CINDER_VOLUME_BACKEND_NAME
CINDER_VOLUME_DRIVER=$CINDER_VOLUME_DRIVER
CINDER_ENABLED_BACKEND=$CINDER_ENABLED_BACKEND
CINDER_LOG_DIR=$CINDER_LOG_DIR
CINDER_API_LOG_FILE=$CINDER_API_LOG_FILE
CINDER_VOLUME_LOG_FILE=$CINDER_VOLUME_LOG_FILE
CINDER_BACKUP_LOG_FILE=$CINDER_BACKUP_LOG_FILE
CINDER_SCHEDULER_LOG_FILE=$CINDER_SCHEDULER_LOG_FILE
EOF
echo Please customize your FLAT_INTERFACE to a different network then your
echo main network. The FLAT_INTERFACE is used for inter-VM communication.
echo the FLAT_INTERFACE should not have an IP address assigned.
# https://bugs.launchpad.net/kolla/+bug/1461635
echo
echo Cinder requires mounting /dev in the cinder-volume, nova-compute,
echo and libvirt containers. If /dev/pts/ptmx does not have proper permissions
echo on the host, then libvirt will fail to boot an instance.
echo This is a bug in Docker where it is not correctly mounting /dev/pts
echo **Temporary fix**
echo chmod 666 /dev/pts/ptmx

View File

@ -44,6 +44,9 @@ function process_all {
process heat-api-engine
process magnum-api-conductor
process horizon
process cinder-api-scheduler
process cinder-backup
process cinder-volume
}
function check_selinux {