Skip to content

Instantly share code, notes, and snippets.

@ntk148v
Created August 19, 2017 02:33
Show Gist options
  • Select an option

  • Save ntk148v/bb097477ff04c7acef2240bb21d631da to your computer and use it in GitHub Desktop.

Select an option

Save ntk148v/bb097477ff04c7acef2240bb21d631da to your computer and use it in GitHub Desktop.
#!/bin/bash
# sudo useradd -s /bin/bash -d /opt/stack -m stack
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo su - stack
# Create a root directory for devstack if needed
sudo mkdir -p /opt/stack
sudo chown $USER /opt/stack
git clone https://git.openstack.org/openstack-dev/devstack /opt/stack/devstack
cat > /opt/stack/devstack/local.conf << END
[[local|localrc]]
HOST_IP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
DATABASE_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_TOKEN=password
SERVICE_PASSWORD=password
ADMIN_PASSWORD=password
enable_plugin devstack-plugin-container https://git.openstack.org/openstack/devstack-plugin-container
enable_plugin zun https://git.openstack.org/openstack/zun
enable_plugin kuryr-libnetwork https://git.openstack.org/openstack/kuryr-libnetwork
# Optional: uncomment to enable the Zun UI plugin in Horizon
enable_plugin zun-ui https://git.openstack.org/openstack/zun-ui
END
cd /opt/stack/devstack
./stack.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment