(Optional) Installing OpenStack Barbican

Skip this section if OpenStack Barbican is already installed. The below steps are only for demonstration purposes and will change based on actual requirements.

Use the steps below to install OpenStack Dalmatian with Barbican via DevStack on a single node. DevStack is a series of extensible scripts used to quickly bring up a complete OpenStack environment either based on the latest versions of everything from git master or a selected release (Barbican, Flamingo, etc.).

  1. Create stack user with passwordless sudo privileges.

›_ Console

# sudo useradd -s /bin/bash -d /opt/stack -m stack

# echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack

# sudo chmod 0440 /etc/sudoers.d/stack

# sudo su - stack

  1. Clone the DevStack Repository and switch to stable Dalmatian 2024.2 release branch.

›_ Console

# cd /opt/stack
# git clone https://opendev.org/openstack/devstack
# cd devstack
# git checkout stable/2024.2

  1. Create the DevStack configuration file local.conf with the following content.

›_ Console

cat > local.conf << 'EOF'
[[local|localrc]]

ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

enable_plugin barbican https://opendev.org/openstack/barbican stable/2024.2

HOST_IP=127.0.0.1

LOGFILE=$DEST/logs/stack.sh.log

enable_service barbican
EOF

Adjust HOST_IP to your machine’s IP address if accessing from other systems. For single-machine testing, 127.0.0.1 is sufficient.

  1. Run DevStack installation.

›_ Console

# ./stack.sh

This process typically takes 15-30 minutes depending on your network speed and system resources. The script will download, configure, and start all necessary OpenStack services including Barbican.

  1. Verify the installation by sourcing the OpenStack credentials and then listing the Barbican secrets, which should return empty initially and check the Barbican service status.

›_ Console

# source ~/devstack/openrc admin admin

# openstack secret list

# systemctl status devstack@barbican-*.service