-
Notifications
You must be signed in to change notification settings - Fork 14
/
packstack-install.sh
53 lines (50 loc) · 1.73 KB
/
packstack-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Run as root, of course.
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Must be root to run this script."
exit $E_NOTROOT
fi
if [ -n "$1" ]
# Test whether command-line argument is present (non-empty).
then
lines=$1
else
lines=$LINES # Default, if not specified on command-line.
fi
echo "Installing Packstack Openstack Repo"
yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
echo "Performing yum update. Please wait..."
yum update -y
echo "Finished yum update"
echo "Downloading Packstack"
yum install -y openstack-packstack
echo "Installed Packstack"
echo "Performing final yum update"
yum update -y
echo "Completed yum update"
echo "Stopping NetworkManager"
service NetworkManager stop
chkconfig NetworkManager off
echo "Starting Manual Network Configuration"
sed -ie 's/BOOTPROTO=\"dhcp\"/BOOTPROTO=\"static\"/g' /etc/sysconfig/network-scripts/ifcfg-enp0s3
sed -ie 's/ONBOOT=\"no\"/ONBOOT=\"yes\"/g' /etc/sysconfig/network-scripts/ifcfg-enp0s3
echo "IPADDR=\"10.0.2.15\"" > /etc/sysconfig/network-scripts/ifcfg-enp0s3
echo "NETMASK=\"255.255.255.0\"" > /etc/sysconfig/network-scripts/ifcfg-enp0s3
echo "NM_CONTROLLED=\"no\"" > /etc/sysconfig/network-scripts/ifcfg-enp0s3
echo "DNS1=\"8.8.8.8\"" > /etc/sysconfig/network-scripts/ifcfg-enp0s3
echo "NETWORKING=yes"> /etc/sysconfig/network
echo "HOSTNAME=openstack"> /etc/sysconfig/network
route add default gw 10.0.2.2 dev enp0s3
echo "Completed Network Configuration"
echo "Restarting network"
service network restart
echo "Restarted network"
ifconfig enp0s3 down
ifconfig enp0s3 up
dhclient enp0s3
ifconfig
echo "Completed Network configuration"
echo "Installing Openstack. This may take 1 - 2 hours atleast. Please wait..."
packstack --allinone
echo "Packstack installation completed"