File: new-octavia-devstack.sh

package info (click to toggle)
octavia 17.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,248 kB
  • sloc: python: 99,849; sh: 2,459; pascal: 450; makefile: 114; ruby: 18
file content (68 lines) | stat: -rwxr-xr-x 2,010 bytes parent folder | download | duplicates (2)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#
# These instructions assume an Ubuntu-based host or VM for running devstack.
# Please note that if you are running this in a VM, it is vitally important
# that the underlying hardware have nested virtualization enabled or you will
# experience very poor amphora performance.

# Set up the packages we need. Ubuntu package manager is assumed.
apt-get update
apt-get install git vim -y

# TODO(sbalukoff): Add prerequisites for other distributions.

# Clone the devstack repo
git clone https://github.com/openstack-dev/devstack.git $HOME/devstack

cat <<EOF > $HOME/devstack/localrc
enable_plugin barbican https://opendev.org/openstack/barbican
enable_plugin neutron https://opendev.org/openstack/neutron
enable_plugin octavia https://opendev.org/openstack/octavia
LIBS_FROM_GIT+=python-octaviaclient

KEYSTONE_TOKEN_FORMAT=fernet

DATABASE_PASSWORD=secretdatabase
RABBIT_PASSWORD=secretrabbit
ADMIN_PASSWORD=secretadmin
SERVICE_PASSWORD=secretservice
SERVICE_TOKEN=111222333444
# Enable Logging
LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
# Pre-requisite
ENABLED_SERVICES=key,rabbit,mysql
# Nova
ENABLED_SERVICES+=,n-api,n-cpu,n-cond,n-sch
# Placement service needed for Nova
ENABLED_SERVICES+=,placement-api,placement-client
# Glance
ENABLED_SERVICES+=,g-api
# Neutron
ENABLED_SERVICES+=,neutron-api,neutron-agent,neutron-dhcp,neutron-l3
ENABLED_SERVICES+=,neutron-metadata-agent,neutron-qos
# Tempest (optional)
#ENABLED_SERVICES+=,tempest
# Octavia
ENABLED_SERVICES+=,octavia,o-api,o-cw,o-hm,o-hk,o-da
EOF

# Create the stack user
$HOME/devstack/tools/create-stack-user.sh

# Move everything into place
mv $HOME/devstack /opt/stack/
chown -R stack:stack /opt/stack/devstack/

# Fix permissions on current tty so screens can attach
chmod go+rw `tty`

# Stack that stack!
su - stack -c /opt/stack/devstack/stack.sh

# Add environment variables for auth/endpoints
echo 'source /opt/stack/devstack/openrc admin admin' >> /opt/stack/.bashrc

# Drop into a shell
exec su - stack