Skip to content

Instantly share code, notes, and snippets.

@peter-wangxu
Last active October 4, 2017 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peter-wangxu/f5bcbf6f904ef9706d604e571a8693d2 to your computer and use it in GitHub Desktop.
Save peter-wangxu/f5bcbf6f904ef9706d604e571a8693d2 to your computer and use it in GitHub Desktop.
cinder volume docker-compose.yml
version: "2"
services:
rabbitmq:
image: rabbitmq
ports:
- "5672:5672"
hostname: rabbitmq
networks:
cindernet:
ipv4_address: 172.49.49.5
mariadb:
image: mariadb
hostname: mariadb
environment:
- MYSQL_ROOT_PASSWORD=password
ports:
- 3306:3306
networks:
cindernet:
ipv4_address: 172.49.49.6
volumes:
- ./db-data:/var/lib/mysql
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
cinder-api:
image: cinder
hostname: cinder-api
volumes:
- ./etc-cinder:/etc/cinder
- ./init-scripts:/init-scripts
network_mode: "host"
ports:
- 8776:8776
depends_on:
- mariadb
extra_hosts:
- "rabbitmq:172.49.49.5"
- "mariadb:172.49.49.6"
environment:
- INIT_DB=true
command: sh /init-scripts/cinder-api.sh
cinder-scheduler:
image: cinder
hostname: cinder-scheduler
volumes:
- ./etc-cinder:/etc/cinder
depends_on:
- mariadb
- rabbitmq
- cinder-api
extra_hosts:
- "rabbitmq:172.49.49.5"
- "mariadb:172.49.49.6"
network_mode: "host"
depends_on:
- cinder-api
restart: on-failure
command: cinder-scheduler
cinder-volume:
image: cinder
hostname: cinder-volume-unity
privileged: true
depends_on:
- cinder-scheduler
ports:
- 3260:3260
network_mode: "host"
volumes:
- ./etc-cinder:/etc/cinder
- /dev/:/dev/
- /run/:/run/:shared
- /etc/localtime:/etc/localtime:ro
- /lib/modules:/lib/modules:ro
extra_hosts:
- "rabbitmq:172.49.49.5"
- "mariadb:172.49.49.6"
command: bash -c "pip install storops -q && cinder-volume -d --config-file /etc/cinder/cinder.conf.unity"
networks:
cindernet:
driver: bridge
ipam:
driver: default
config:
-
subnet: 172.49.49.0/24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment