Skip to content

Commit 98c0180

Browse files
committed
nova sort of works?
1 parent 5b44deb commit 98c0180

File tree

26 files changed

+258
-376
lines changed

26 files changed

+258
-376
lines changed

src/core-switch/patch/nova.conf.patch

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
# Deprecated group/name - [DATABASE]/sql_connection
5151
# Deprecated group/name - [sql]/connection
5252
-#connection = <None>
53-
+connection = postgresql+psycopg2:///nova_api
53+
+connection = postgresql+psycopg2://nova:POSTGRES_PASSPHRASE@pgsql-infr/nova_api
5454

5555
# The SQLAlchemy connection string to use to connect to the slave database
5656
# (string value)
@@ -68,7 +68,7 @@
6868
# Deprecated group/name - [DATABASE]/sql_connection
6969
# Deprecated group/name - [sql]/connection
7070
-#connection = <None>
71-
+connection = postgresql+psycopg2:///nova
71+
+connection = postgresql+psycopg2://nova:POSTGRES_PASSPHRASE@pgsql-infr/nova
7272

7373
# The SQLAlchemy connection string to use to connect to the slave database
7474
# (string value)
@@ -95,7 +95,7 @@
9595
# undefined, tokens will instead be cached in-process (list value)
9696
# Deprecated group/name - [keystone_authtoken]/memcache_servers
9797
-#memcached_servers = <None>
98-
+memcached_servers = SERVICE_INSTALL_KEYSTONE_HOST:SERVICE_INSTALL_MEMCACHE_PORT
98+
+memcached_servers = mem-infr:SERVICE_INSTALL_MEMCACHE_PORT
9999

100100
# In order to prevent excessive effort spent validating tokens, the middleware
101101
# caches previously-seen tokens for a configurable duration (in seconds). Set to
@@ -295,13 +295,13 @@
295295
# incoming VNC connection requests on this node.
296296
# (host address value)
297297
-#server_listen = 127.0.0.1
298-
+server_listen = SERVICE_INSTALL_HOST_IP
298+
+server_listen = os-ctrl-mgmt
299299

300300
#
301301
# Private, internal IP address or hostname of VNC console proxy. For more
302302
# information, refer to the documentation. (host address value)
303303
-#server_proxyclient_address = 127.0.0.1
304-
+server_proxyclient_address = SERVICE_INSTALL_HOST_IP
304+
+server_proxyclient_address = os-ctrl-mgmt
305305

306306
#
307307
# Public address of noVNC VNC console proxy. For more information, refer to the

src/core-switch/scripts/infrastructure/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010
SCRIPTS_DIR=~/install/scripts
1111
INFRASTRUCTURE_DIR=${SCRIPTS_DIR}/infrastructure
1212

13-
TARGETS=(kafka memcached postgres rabbitmq)
13+
TARGETS=(kafka memcached postgres rabbitmq libvirtd)
1414

1515
for TARGET in "${TARGETS[@]}"
1616
do

src/core-switch/scripts/infrastructure/down.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ else
77
set -euo pipefail
88
fi
99

10-
sudo systemctl stop kafka zookeeper memcached postgresql rabbitmq-server epmd
10+
sudo systemctl stop kafka zookeeper memcached postgresql rabbitmq-server epmd libvirtd
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/bash
2+
# https://www.rabbitmq.com/install-debian.html
3+
4+
if [[ "$DEBUG" == "1" ]]
5+
then
6+
set -euxo pipefail
7+
else
8+
set -euo pipefail
9+
fi
10+
11+
sudo apt-get -y install libvirt-daemon-system
12+
sudo systemctl stop libvirtd
13+
sudo systemctl disable libvirtd

src/core-switch/scripts/infrastructure/up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ else
77
set -euo pipefail
88
fi
99

10-
sudo systemctl restart zookeeper kafka memcached postgresql rabbitmq-server
10+
sudo systemctl restart libvirtd zookeeper kafka memcached postgresql rabbitmq-server

src/core-switch/scripts/openstack/yoga/deploy-compute-service.sh

Lines changed: 0 additions & 242 deletions
This file was deleted.

src/core-switch/scripts/openstack/yoga/deploy-network-service.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ sudo chown -R $SERVICE:$SERVICE /var/log/$SERVICE
6464
HOST=$(hostname -f)
6565
SERVICE_PASSPHRASE=$NEUTRON_PASSPHRASE
6666

67-
. ~/.openrc-admin
67+
source ~/.openrc-admin
6868
openstack user create --domain default $SERVICE --password=$SERVICE_PASSPHRASE
6969
openstack role add --project service --user $SERVICE admin
7070
openstack service create --name $SERVICE --description "$DESCRIPTION" $SERVICE_TYPE

src/core-switch/scripts/openstack/yoga/deploy.sh

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,23 @@ export METADATA_HOST=$(hostname -f)
1818
DEPLOY_DIR=~/install/scripts/openstack/yoga/nodes/controller/deploy
1919
SERVICE=keystone SERVICE_PORT=$KEYSTONE_PORT SERVICE_ADMIN_PORT=35357 ${DEPLOY_DIR}/identity.sh
2020
SERVICE=glance SERVICE_TYPE=image SERVICE_PORT=9292 WSGI_SCRIPT=glance-wsgi-api DESCRIPTION="OpenStack Image API (glance)" ${DEPLOY_DIR}/image.sh
21+
2122
export PLACEMENT_PASSPHRASE=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
23+
2224
SERVICE=placement SERVICE_TYPE=placement SERVICE_PORT=8778 WSGI_SCRIPT=placement-api DESCRIPTION="OpenStack Placement API (placement)" ${DEPLOY_DIR}/placement.sh
23-
# export NOVA_PASSPHRASE=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
24-
# export NEUTRON_PASSPHRASE=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
25-
# export RABBIT_PASSPHRASE=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
26-
# export METADATA_SECRET=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
27-
# SERVICE=nova SERVICE_TYPE=compute SERVICE_PORT=8774 WSGI_SCRIPT=nova-api-wsgi DESCRIPTION="OpenStack Compute API (nova)" ${DEPLOY_DIR}/compute.sh
28-
# unset PLACEMENT_PASSPHRASE
25+
26+
export NOVA_PASSPHRASE=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
27+
export NEUTRON_PASSPHRASE=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
28+
export RABBIT_PASSPHRASE=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
29+
export METADATA_SECRET=$(dd if=/dev/urandom bs=32 count=1 | base64 | tr / -)
30+
31+
SERVICE=nova SERVICE_TYPE=compute SERVICE_PORT=8774 WSGI_SCRIPT=nova-api-wsgi DESCRIPTION="OpenStack Compute API (nova)" ${DEPLOY_DIR}/compute.sh
32+
33+
unset PLACEMENT_PASSPHRASE
2934

3035
# SERVICE=nova ~/install/scripts/openstack/yoga/deploy-compute-node.sh
3136
# SERVICE=neutron SERVICE_TYPE=network SERVICE_PORT=9696 WSGI_SCRIPT=neutron-api DESCRIPTION="OpenStack Network API (neutron)" ~/install/scripts/openstack/yoga/deploy-network-service.sh
3237

33-
3438
unset NOVA_PASSPHRASE
3539
unset METADATA_SECRET
3640
unset RABBIT_PASSPHRASE
37-
38-
unset KEYSTONE_HOST
39-
unset KEYSTONE_PORT
40-
unset MEMCACHE_PORT
41-
unset RABBIT_HOST
42-
unset RABBIT_PORT

src/core-switch/scripts/openstack/yoga/down.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ do
2020
SERVICE=$(basename ${SERVICE_PATH})
2121
sudo systemctl stop ${SERVICE}
2222
done
23+
24+
sudo systemctl stop nova-scheduler nova-conductor

src/core-switch/scripts/openstack/yoga/install-network-service.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ enable_isolated_metadata = true
8989
EOF
9090

9191
[[ -f /var/lib/$SERVICE/venv/bin/activate ]] || python3 -m venv /var/lib/$SERVICE/venv
92-
. /var/lib/$SERVICE/venv/bin/activate
92+
source /var/lib/$SERVICE/venv/bin/activate
9393

9494
pip install -r requirements.txt
9595
# requirements for our setup

0 commit comments

Comments
 (0)