File: pre_test_hook.sh

package info (click to toggle)
barbican-tempest-plugin 4.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 456 kB
  • sloc: python: 3,656; sh: 21; makefile: 19
file content (42 lines) | stat: -rwxr-xr-x 1,532 bytes parent folder | download | duplicates (4)
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
#!/bin/bash
#
# This script is executed inside pre_test_hook function in devstack gate.

set -ex

export DEST=${DEST:-$BASE/new}
export DEVSTACK_DIR=${DEVSTACK_DIRE:-$DEST/devstack}
export LOCALCONF_PATH=$DEVSTACK_DIR/local.conf

# Here we can set some configurations for local.conf
# for example, to pass some config options directly to .conf files

# Set up LVM device
echo -e '[[local|localrc]]' >> $LOCALCONF_PATH
echo -e 'NOVA_BACKEND=LVM' >> $LOCALCONF_PATH
echo -e 'LVM_VOLUME_CLEAR=none' >> $LOCALCONF_PATH

# Enable image signature verification in nova.conf
echo -e '[[post-config|$NOVA_CONF]]' >> $LOCALCONF_PATH
echo -e '[glance]' >> $LOCALCONF_PATH
echo -e 'verify_glance_signatures = True' >> $LOCALCONF_PATH

# Enable ephemeral storage encryption in nova.conf
echo -e '[ephemeral_storage_encryption]' >> $LOCALCONF_PATH
echo -e 'key_size = 256' >> $LOCALCONF_PATH
echo -e 'cipher = aes-xts-plain64' >> $LOCALCONF_PATH
echo -e 'enabled = True' >> $LOCALCONF_PATH

# Allow dynamically created tempest users to create secrets
# in barbican in tempest.conf
echo -e '[[test-config|$TEMPEST_CONFIG]]' >> $LOCALCONF_PATH
echo -e '[auth]' >> $LOCALCONF_PATH
echo -e 'tempest_roles=creator' >> $LOCALCONF_PATH

# Glance v1 doesn't do signature verification on image upload
echo -e '[image-feature-enabled]' >> $LOCALCONF_PATH
echo -e 'api_v1=False' >> $LOCALCONF_PATH

# Enable ephemeral storage encryption in tempest.conf
echo -e '[ephemeral_storage_encryption]' >> $LOCALCONF_PATH
echo -e 'enabled = True' >> $LOCALCONF_PATH