This repository contains a set of scripts to automate the installation and configuration of OpenStack on a multi-node setup with one Controller node, one Compute node, and one Storage node. These scripts are intended for educational and experimental purposes, particularly in a cybersecurity lab environment.
Working with OpenStack 2024.1 and Ubuntu 22.04 LTS
- Operating System: Ubuntu server 22.04
- Virtualization Software: VMware Workstation (or another compatible hypervisor)
- Network Configuration: Ensure the network topology matches the OpenStack requirements.
Read more here.
Hostname | NICs | IP Address | Gateway | DNS | RAM (GB) | CPU | DISK1 (GB) | DISK2 (GB) |
---|---|---|---|---|---|---|---|---|
controller | ens33 | 192.168.133.11/24 | 192.168.133.2 | 8.8.8.8 | 8 | 2 | 40 | |
ens34 | 10.0.0.11/24 | |||||||
compute | ens33 | 192.168.133.21/24 | 192.168.133.2 | 8.8.8.8 | 8 | 4 | 40 | |
ens34 | 10.0.0.21/24 | |||||||
block | ens33 | 192.168.133.31/24 | 192.168.133.2 | 8.8.8.8 | 4 | 2 | 40 | 100 |
ens34 | 10.0.0.31/24 |
git clone https://github.com/phannhat17/openstack-script.git
cd openstack-script
find . -type f -exec chmod +x {} \;
cd scripts
Ensure each node (Controller, Compute, Storage) is up and accessible as root within your network. Also, ensure that IPs are set correctly in the configuration files.
The Storage Node needs to have atleast two disks connected. And if this Node use LVM on the OS disk, read more here
config.cfg
: This file contains configuration variables such as IP addresses, hostnames, network interfaces, and service passwords. Ensure that these values are set correctly before running the scripts.
On each node (Controller, Compute, Storage), run the IP config script:
Note: Run this inside the scripts
folder
./config_ip.sh
The script will prompt you to select which node (Controller, Compute, or Storage) you are configuring. It will then update the network settings adn reboot that node.
On each node (Controller, Compute, Storage), run the service install script:
Note: Run this inside the scripts
folder
./install_service.sh
The script will prompt you to select which node (Controller, Compute, or Storage) you are configuring.
Service | Endpoint | |
---|---|---|
1 | Openstack Dashboard | http://10.0.0.11/horizon |
2 | Prometheus | http://10.0.0.10:9090 |
3 | Openstack exporter | http://10.0.0.10:9180 |
4 | Grafana | http://10.0.0.10:3000 |
This project is licensed under the MIT License. See the LICENSE file for details.