diff options
author | Francisco Redondo Marchena <francisco.marchena@codethink.co.uk> | 2014-11-10 18:09:26 +0000 |
---|---|---|
committer | Richard Ipsum <richardipsum@fastmail.co.uk> | 2014-11-27 18:12:13 +0000 |
commit | efa0a85f77c8aa5765ee451156a0d0c114c36bcf (patch) | |
tree | b64e30e5ae3cd4f5b5d4081af1356862e929e565 | |
parent | aa1aa819c1b3bdf65d9161372e18e76af4eba6da (diff) | |
download | definitions-efa0a85f77c8aa5765ee451156a0d0c114c36bcf.tar.gz |
VERYWIP: Start configuring nova-setup service
-rw-r--r-- | openstack/usr/share/openstack/openstack-nova-setup | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/openstack/usr/share/openstack/openstack-nova-setup b/openstack/usr/share/openstack/openstack-nova-setup index 4213613d..5bb5ce9f 100644 --- a/openstack/usr/share/openstack/openstack-nova-setup +++ b/openstack/usr/share/openstack/openstack-nova-setup @@ -22,7 +22,7 @@ set -e getent group nova >/dev/null || groupadd -r --gid 165 nova getent passwd nova >/dev/null || \ useradd --uid 165 -r -g nova -d /var/lib/nova -s /sbin/nologin \ - -c "OpenStack Keystone Daemons" nova + -c "OpenStack Nova Daemons" nova # Create the keystone user and services @@ -32,7 +32,7 @@ export OS_SERVICE_ENDPOINT='http://localhost:35357/v2.0' keystone user-create --name ##NOVA_SERVICE_USER## --pass ##NOVA_SERVICE_PASSWORD## keystone user-role-add --tenant service --user ##NOVA_SERVICE_USER## --role admin -keystone service-create --name nova --type compute --description "OpenStack Image Service" +keystone service-create --name nova --type compute --description "OpenStack Compute Service" keystone endpoint-create --service-id $(keystone service-list | awk '/ compute / {print $2}') \ --publicurl ##NOVA_PUBLIC_URL## \ --internalurl ##NOVA_INTERNAL_URL## \ @@ -40,12 +40,28 @@ keystone endpoint-create --service-id $(keystone service-list | awk '/ compute --region ##NOVA_REGION## # Setup the nova database - if [ ! -e /var/lib/nova/nova.sqlite ]; then chown -R nova:nova /var/lib/nova sudo -u nova nova-manage db sync fi +# Nova compute configuration +if [ ! -d /var/run/nova ]; then + mkdir -p /var/run/nova + chown -R nova:nova /var/run/nova +fi + +if [ ! -d /var/lock/nova ]; then + mkdir -p /var/lock/nova + chown -R nova:nova /var/lock/nova +fi + +# Check existence of Network Block Device module in the kernel +# NOTE: modprobe does not work actually and returns always +# failure, enable this check when modprobe is fixed. +#modprobe nbd + +#systemctl start openstack-nova-compute #systemctl start openstack-nova-api #systemctl start openstack-nova-cert #systemctl start openstack-nova-consoleauth @@ -55,6 +71,12 @@ fi # TODO, need to start more nova services. +ln -s "/etc/systemd/system/openstack-nova-compute.service" \ + "/etc/systemd/system/multi-user.target.wants/openstack-nova-compute.service" + +ln -s "/etc/systemd/system/openstack-nova-api.service" \ + "/etc/systemd/system/multi-user.target.wants/openstack-nova-api.service" + #ln -s "/etc/systemd/system/openstack-nova-api.service" \ # "/etc/systemd/system/multi-user.target.wants/openstack-nova-api.service" |