59 lines
1 KiB
Bash
Executable file
59 lines
1 KiB
Bash
Executable file
#!/bin/sh
|
||
|
||
# useradd -s /bin/bash -d /opt/stack -m stack
|
||
# chmod +x /opt/stack
|
||
|
||
# apt-get install sudo -y
|
||
# echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
|
||
|
||
##
|
||
## Install prerequisites
|
||
##
|
||
sudo apt-get install -y git bridge-utils
|
||
|
||
##
|
||
## Create network
|
||
##
|
||
sudo tee /etc/network/interfaces.d/openstack >/dev/null <<MARK
|
||
# auto eth1
|
||
# iface dummy0 inet manual
|
||
# pre-up ip link add dummy0 type dummy
|
||
|
||
auto br25
|
||
iface br25 inet static
|
||
address 172.16.0.2/16
|
||
bridge_ports eth1
|
||
bridge_stp off
|
||
bridge_maxwait 0
|
||
bridge_fd 0
|
||
MARK
|
||
sudo ifup br25
|
||
|
||
##
|
||
## Get openstack
|
||
##
|
||
git clone https://opendev.org/openstack/devstack
|
||
cd devstack || exit 1
|
||
|
||
##
|
||
## Create configuration
|
||
##
|
||
cat > local.conf <<-MARK
|
||
[[local|localrc]]
|
||
HOST_IP=172.16.0.1
|
||
FLAT_INTERFACE=br25
|
||
PUBLIC_INTERFACE=eth1
|
||
FLOATING_RANGE=172.16.0.128/25
|
||
FIXED_RANGE=10.11.12.0/24
|
||
|
||
ADMIN_PASSWORD=admin1pass
|
||
DATABASE_PASSWORD=database2pass
|
||
RABBIT_PASSWORD=rabbit3pass
|
||
SERVICE_PASSWORD=service4pass
|
||
MARK
|
||
|
||
##
|
||
## Run devstack
|
||
##
|
||
./stack.sh
|
||
|