Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
4c2a328
feat: Scaffold modular Ansible project for Openstack Nova deployment …
onelrian Jun 29, 2025
d0cc899
Remove nova directory and its contents for new playbook structure
onelrian Jul 1, 2025
f8ffbc2
feat(check_dependencies): implement Keystone and Glance dependency ch…
onelrian Jul 1, 2025
52c841a
feat(check_dependencies): define default variables for Keystone and G…
onelrian Jul 1, 2025
c263252
feat(check_dependencies): add fixed token and endpoint paths as role …
onelrian Jul 1, 2025
1bbd665
docs(check_dependencies): add role description and usage instructions
onelrian Jul 1, 2025
efc6919
feat(nova_controller): implement full installation and registration o…
onelrian Jul 1, 2025
983a631
feat(nova_controller): add nova.conf template for controller-side config
onelrian Jul 1, 2025
ee9dc49
feat(nova_controller): define default DB and keystone password variables
onelrian Jul 1, 2025
6bcd83e
feat(nova_controller): define static nova service details and endpoin…
onelrian Jul 1, 2025
d46fd9e
feat(nova_controller): add handler to restart nova services when conf…
onelrian Jul 1, 2025
b658f0e
chore(nova_controller): add meta file for Galaxy compatibility
onelrian Jul 1, 2025
d96852e
docs(nova_controller): document role responsibilities, variables, and…
onelrian Jul 1, 2025
da90266
feat(nova_compute): implement installation and service management for…
onelrian Jul 1, 2025
d7ea6b5
feat(nova_compute): add Jinja2 template for nova.conf on compute nodes
onelrian Jul 1, 2025
eeff559
feat(nova_compute): define default controller host, user passwords, a…
onelrian Jul 1, 2025
b789582
feat(nova_compute): declare package list for compute installation
onelrian Jul 1, 2025
85c4e3d
feat(nova_compute): add handler to restart nova-compute on config cha…
onelrian Jul 1, 2025
b494081
docs(nova_compute): document role behavior and supported configuratio…
onelrian Jul 1, 2025
4c5dc70
chore(nova_compute): add meta file for Ansible Galaxy metadata
onelrian Jul 1, 2025
f1c0056
feat(kvm_config): configure KVM and libvirt for Nova compute integration
onelrian Jul 1, 2025
b3cb71c
feat(kvm_config): define default virtualization packages for installa…
onelrian Jul 1, 2025
69dc806
feat(kvm_config): define libvirt systemd services for control
onelrian Jul 1, 2025
ce6911e
docs(kvm_config): document libvirt/KVM configuration role usage and b…
onelrian Jul 1, 2025
04047ef
chore(kvm_config): add metadata for Ansible Galaxy compatibility
onelrian Jul 1, 2025
dce563d
feat(cell_discovery): implement cell0/cell1 setup, defaults, docs, an…
onelrian Jul 1, 2025
3ea19fd
style: changes author's name
onelrian Jul 1, 2025
906c1bd
feat(flavors): add role for provisioning flavors with defaults, docs,…
onelrian Jul 1, 2025
77d3c24
feat(test_vm_launch): implement test VM provisioning role with defaul…
onelrian Jul 1, 2025
ba5a7ce
feat(inventories): add production inventory, group_vars for controlle…
onelrian Jul 1, 2025
3394a8e
refactor(site): restructure playbooks and update docs for modular layout
onelrian Jul 1, 2025
3918374
chore(spellcheck): add custom terms to Vale accept list and check for…
onelrian Jul 1, 2025
4c34464
Merge branch 'main' into 50-compute-service-nova-automation
onelrian Jul 1, 2025
c465931
chore: standardize role structure with improved variable usage and de…
onelrian Jul 4, 2025
e6bb8fa
chore: standardize role structure with improved variable usage and de…
onelrian Jul 4, 2025
63e008b
feat(openstack-nova): Implement complete, production-aligned OpenStac…
onelrian Jul 31, 2025
9400183
build(setup.sh): Install Ansible on host in Python virtual environment
onelrian Jul 31, 2025
bfe5934
refactor(openstack-tasks): Convert to robust, idempotent CLI commands
onelrian Aug 1, 2025
6c476c3
refactor(setup-scripts): Enhance setup/cleanup for robustness
onelrian Aug 1, 2025
18442d8
refactor(setup.sh): adjusted os-release detection logic
onelrian Aug 1, 2025
6b08c81
feat(common): Add essential packages and host entries for all OpenSta…
onelrian Aug 1, 2025
0d139d7
Improve setup.sh: Add robust Ansible playbook completion checks, retr…
onelrian Aug 4, 2025
871b8e1
docs: Improve Keystone security and add comprehensive documentation
onelrian Aug 5, 2025
4a109e2
docs: Update documentation to reflect project aim and MIT license
onelrian Aug 5, 2025
c0ec0f4
Complete OpenStack Nova automation with enhanced error handling and o…
onelrian Aug 5, 2025
2e00a0d
Production-readiness review: Fix critical issues across OpenStack Nov…
onelrian Aug 5, 2025
1ad112d
Production-readiness review: Fix critical issues across OpenStack Nov…
onelrian Aug 5, 2025
0a4eab9
Fix libvirt permissions issue for ubuntu user
onelrian Aug 5, 2025
f43e145
Fix Ansible version compatibility and collections installation
onelrian Aug 5, 2025
d8cb7f1
fix(setup): improve collections directory structure and venv validation
onelrian Aug 5, 2025
4e12d58
fix(setup): resolve collections directory permissions with cleanup an…
onelrian Aug 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 44 additions & 34 deletions .github/styles/config/vocabularies/Ansible/accept.txt
Original file line number Diff line number Diff line change
@@ -1,46 +1,56 @@
(?i)ansible
(?i)openstack
(?i)APIs
(?i)balenaEtcher
(?i)UNetbootin
(?i)SELinux
(?i)bootable
(?i)bootloader
(?i)Ceph
(?i)check_dependencies
(?i)config
(?i)configs
(?i)Ctrl
(?i)Cirros
(?i)cirros
(?i)cell_discovery
(?i)env
(?i)Fernet
(?i)Hostname
(?i)hostnames
(?i)homebrew
(?i)Idempotency
(?i)inventory_docs
(?i)kvm
(?i)kvm_config
(?i)keypair
(?i)Libvirts?
(?i)Lubuntu
(?i)linux
(?i)macoss?
(?i)misconfigured
(?i)multipass?
(?i)netplan
(?i)networkd
(?i)nova_api
(?i)nova_controller
(?i)nova_compute
(?i)ntp
(?i)OAuth
(?i)openstack
(?i)os
(?i)Pulumi
(?i)qemu
(?i)sudo(ers?)?
(?i)Subnet
(?i)Nameservers
(?i)systemd
(?i)test_vm_launch
(?i)ufw
(?i)Ubuntu
(?i)ntp
(?i)update_cache
(?i)inventory_docs
(?i)Pulumi
(?i)sudo(ers?)?
(?i)linux
(?i)homebrew
(?i)Kubuntu
(?i)Lubuntu
(?i)VPNs
(?i)networkd
(?i)virtualized
(?i)systemd
(?i)minimalistic
(?i)netplan
(?i)Libvirts?
(?i)v?lans?
(?i)v?networks?
(?i)ethernets?
(?i)multipass?
(?i)v?switchs?
(?i)vms?
(?i)macoss?
(?i)oss?
(?i)config
(?i)configs
(?i)Cirros
(?i)Idempotency
(?i)hostnames
(?i)Fernet
(?i)Ceph
(?i)OAuth
(?i)APIs
(?i)cirros
(?i)VPNs
(?i)bootable
(?i)bootloader
(?i)UNetbootin
(?i)SELinux
(?i)Kubuntu
3 changes: 3 additions & 0 deletions playbooks/ansible-openstack-nova/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/bin/python3"
}
21 changes: 21 additions & 0 deletions playbooks/ansible-openstack-nova/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 onelrian

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
192 changes: 192 additions & 0 deletions playbooks/ansible-openstack-nova/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# OpenStack Nova Setup with Vagrant and Ansible

This project provides an automated setup for a minimal OpenStack Nova environment using Vagrant and Ansible. It creates two virtual machines (controller and compute) and deploys a basic OpenStack Nova setup with all necessary services.

## Project Overview

The setup includes:
- **Controller VM**: Runs OpenStack control plane services
- Keystone (Identity)
- Glance (Image)
- Placement (Resource tracking)
- Nova Controller
- **Compute VM**: Runs Nova compute service
- **Libvirt/KVM**: Used as the hypervisor
- **Ansible**: Used for provisioning and configuration management

## Architecture

```
+------------------+ +------------------+
| Controller | | Compute |
| | | |
| Keystone | | Nova Compute |
| Glance | | Libvirt/KVM |
| Placement | | |
| Nova Controller | | |
+------------------+ +------------------+
| |
+------------------------+
|
Management Network
|
(192.168.56.0/24)
```

## Prerequisites

- Linux system with KVM support
- Minimum 8GB RAM and 2 CPU cores
- Internet connectivity (for initial setup)

## Quick Start

1. **Basic Setup**:
```bash
./setup.sh
```

2. **Access the VMs**:
```bash
# SSH into controller
vagrant ssh controller

# SSH into compute node
vagrant ssh compute
```

3. **Test the Setup**:
```bash
./test-setup.sh
```

4. **Cleanup**:
```bash
./cleanup.sh
```

## Advanced Usage

### Handling Network Issues

If you encounter network connectivity issues with the default box:

1. **Automatic local box creation**:
```bash
# The setup script will automatically try to create a local box
./setup.sh
```

2. **Manual local box creation**:
```bash
# Create and add a local box manually
./add-local-box.sh

# Use the local box
VAGRANT_BOX=ubuntu2004 ./setup.sh
```

3. **Offline mode** (requires pre-installed boxes):
```bash
./setup.sh --offline
```

### Environment Variables

- `VAGRANT_BOX`: Specify a different Vagrant box (default: generic/ubuntu2004)
- `CONTROLLER_IP`: Controller VM IP address (default: 192.168.56.10)
- `COMPUTE_IP`: Compute VM IP address (default: 192.168.56.11)

### Script Options

**setup.sh**:
```bash
./setup.sh # Basic setup
./setup.sh --force-provision # Force Ansible provisioning
./setup.sh --offline # Offline mode (requires pre-installed boxes)
./setup.sh --cleanup # Cleanup after setup
VAGRANT_BOX=ubuntu2004 ./setup.sh # Use a specific box
```

**cleanup.sh**:
```bash
./cleanup.sh # Basic cleanup
./cleanup.sh --force # Force cleanup without playbook success check
```

**add-local-box.sh**:
```bash
./add-local-box.sh # Create and add default local box
./add-local-box.sh --box-name=mybox # Use custom box name
./add-local-box.sh --box-file=/path/to/box # Add existing box file
```

## Testing the Setup

After successful setup:
1. SSH into the controller VM: `vagrant ssh controller`
2. Source the OpenStack admin credentials: `source ~/admin-openrc.sh`
3. Run OpenStack commands:
```bash
openstack server list
openstack image list
openstack network list
```

## Project Structure

```
├── setup.sh # Main setup script
├── cleanup.sh # Cleanup script
├── add-local-box.sh # Local box creation helper
├── test-setup.sh # Setup verification script
├── Vagrantfile # Vagrant configuration
├── ansible.cfg # Ansible configuration
├── requirements.yml # Ansible collections requirements
├── inventory/ # Ansible inventory files
├── playbooks/ # Ansible playbooks
└── roles/ # Ansible roles for each service
```

## Services Deployed

- **Keystone**: Identity service with default admin user
- **Glance**: Image service with CirrOS test image
- **Placement**: Resource tracking for Nova
- **Nova**: Compute service with controller and compute components
- **MariaDB**: Database backend for all services
- **RabbitMQ**: Message queue for inter-service communication

## Troubleshooting

### Box Download Issues
If the setup fails due to box download issues:
1. Try running `./add-local-box.sh` to create a local box
2. Use `VAGRANT_BOX=ubuntu2004 ./setup.sh` to use the local box
3. Check network connectivity and firewall settings

### VM Provisioning Failures
If VM provisioning fails:
1. Check `vagrant_up.log` for detailed error messages
2. Try `./setup.sh --force-provision` to re-run Ansible
3. Verify system resources (RAM, CPU, disk space)

### Service Access Issues
If you cannot access OpenStack services:
1. Verify VMs are running: `vagrant status`
2. Check service status inside controller VM
3. Verify network connectivity between VMs

## Security Notes

- Default passwords are used for demonstration purposes only
- Host key checking is disabled for development convenience
- Not suitable for production use without security hardening

## Requirements

- Vagrant >= 2.4.1
- vagrant-libvirt plugin >= 0.12.2
- libvirt/KVM
- Ansible >= 8.7.0
- Minimum 8GB RAM and 2 CPU cores
Loading
Loading