Commit 7210501f authored by Alain Takoudjou's avatar Alain Takoudjou

fix devstack commit and solve service status after machine reboot

parent 44f5ebe2
......@@ -118,6 +118,7 @@ slap-ipv4 = $${slap-network-information:local-ipv4}
nova-passwd = $${master-passwd:passwd}
nova-user = $${slap-parameter:system-user}
vnc-url = $${request-openstack-vnc-frontend:connection-url}
devstack-revision = $${slap-parameter:devstack-revision}
[nova-conf-run]
recipe = slapos.recipe.template
......@@ -306,4 +307,7 @@ system-passwd = openstack
domain =
virtual-hard-drive-url =
virtual-hard-drive-md5sum =
\ No newline at end of file
virtual-hard-drive-md5sum =
#Using devstack to auto install openstack. We just specify here the commit to use
devstack-revision = b567fc1f6b412d8fca8035d1cb5fecc4f4e5f6ac
\ No newline at end of file
......@@ -36,7 +36,7 @@ eggs =
[template-openstack-main]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-main.cfg
md5sum = 52a8f4afb5ad06f29c34253b1cda07f8
md5sum = 9840a9dbb8ad336dc16b7deea815b6ea
output = ${buildout:directory}/template-openstack-main.cfg
mode = 0644
......@@ -68,12 +68,12 @@ md5sum = ffabb8448fda7f95e47831dad133659f
[compute-script-run]
<= template-download
filename = ssh-configure.py.in
md5sum = 18d2a7b3a8770726f061c8f2f4f9123b
md5sum = 72f1ca0f727b4e6d60cb7b5bcd9e6f96
[openstack-install]
<= template-download
filename = openstack-install.sh.in
md5sum = 674b2e2b7e5c5364c18ed63c2fa3ee98
md5sum = 0729848b62f50bc429f9df4d3caf12ac
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
......@@ -228,4 +228,10 @@ xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
\ No newline at end of file
zope.interface = 4.0.5
cliff = 1.4.4
cmd2 = 0.6.5.1
plone.recipe.command = 1.1
prettytable = 0.7.3-nxd001
requests = 1.2.3
slapos.recipe.build = 0.12
\ No newline at end of file
......@@ -20,6 +20,9 @@ fi
GIT_EXEC=`which git`
$GIT_EXEC clone $REPO_URL $BASE_DIR;
cd $BASE_DIR
$GIT_EXEC reset --hard ${:devstack-revision}
mkdir -p $INSTALL_LOG
cp -f $BASE_DIR/samples/local.sh $BASE_DIR/local.sh
......@@ -42,7 +45,7 @@ LOGDAYS=7
PUBLIC_INTERFACE=br100
FLAT_INTERFACE=eth0
FLAT_NETWORK_BRIDGE_DEFAULT=br100
VLAN_INTERFACE = eth0
VLAN_INTERFACE=eth0
ISCSI_IP_PREFIX=192.168.100
FIXED_RANGE=
NET_MAN=FlatDHCPManager
......@@ -56,7 +59,15 @@ chown -R $NOVA_USER: $BASE_DIR
#sudo dpkg --configure -a
cd $BASE_DIR; ./stack.sh
cd $BASE_DIR; ./local.sh
#cd $BASE_DIR; ./local.sh
if grep "/opt/stack/openstack/rejoin-stack.sh" /etc/rc.local > /dev/null
then
echo "Skipping configuring rc.local file..."
else
sudo sed -n '$!p' /etc/rc.local > temp-rc.local;
sudo mv temp-rc.local /etc/rc.local;
sudo echo -e "/opt/stack/openstack/rejoin-stack.sh \n\nexit 0" >> /etc/rc.local;
fi
exit 0
......@@ -51,7 +51,7 @@ def installCompute():
print "Checking nova service status..."
nova_command = 'echo %s | sudo -S /etc/init.d/nova-compute status' % password
stdin, stdout, stderr = client.exec_command(nova_command)
with open(ssh_check, 'a') as output:
with open(ssh_check, 'w') as output:
output.write(stdout.read())
def installManage():
......@@ -60,14 +60,14 @@ def installManage():
print "Downloading and installing Openstack on computer..."
install_command = "echo %s | sudo -S /bin/sh configure.sh" % password
stdin, stdout, stderr = client.exec_command(install_command)
with open(ssh_run, 'a') as output:
with open(ssh_run, 'w') as output:
output.write(stdout.read())
#Check installation status
#Check nova service status
print "Checking nova service status..."
nova_command = 'nova-manage service list'
stdin, stdout, stderr = client.exec_command(nova_command)
with open(ssh_check, 'a') as output:
with open(ssh_check, 'w') as output:
output.write(stdout.read())
if __name__ == '__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment