Add an openstack all-openstack-db element:
This element installs all openstack sql databases into a single image, useful for a bootstrap image. Change-Id: I6efe807793ec620a60d5798d28a7e3103a5b90e8
This commit is contained in:
parent
48e22d91b6
commit
dc845466bc
2
elements/openstack-db/README.md
Normal file
2
elements/openstack-db/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
Installs all openstack sql databases on a single server,
|
||||
for the purpose of building a bootstrap image.
|
2
elements/openstack-db/element-deps
Normal file
2
elements/openstack-db/element-deps
Normal file
@ -0,0 +1,2 @@
|
||||
os-svc-install
|
||||
keystone-config
|
25
elements/openstack-db/first-boot.d/50-openstack-db
Executable file
25
elements/openstack-db/first-boot.d/50-openstack-db
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
# TODO: make this easily configurable
|
||||
db_pass=stackdb
|
||||
|
||||
service mysql restart
|
||||
|
||||
create-os-db keystone keystone $db_pass
|
||||
keystone-manage db_sync
|
||||
|
||||
create-os-db cinder cinder $db_pass
|
||||
cinder-manage db sync
|
||||
|
||||
create-os-db nova nova $db_pass
|
||||
nova-manage db sync
|
||||
|
||||
create-os-db nova_bm nova $db_pass
|
||||
nova-baremetal-manage db sync
|
||||
|
||||
create-os-db glance glance $db_pass
|
||||
glance-manage db_sync
|
||||
|
||||
create-os-db ovs_quantum quantum $db_pass
|
||||
|
11
elements/openstack-db/install.d/50-openstack-db
Executable file
11
elements/openstack-db/install.d/50-openstack-db
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
install-packages mysql-server python-mysqldb
|
||||
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
|
||||
|
||||
os-svc-install -u keystone -r https://github.com/openstack/keystone.git
|
||||
os-svc-install -u cinder -r https://github.com/openstack/cinder.git
|
||||
os-svc-install -u nova -r https://github.com/openstack/nova.git
|
||||
os-svc-install -u glance -r https://github.com/openstack/glance.git
|
||||
os-svc-install -u quantum -r https://github.com/openstack/quantum.git
|
Loading…
Reference in New Issue
Block a user