# ankurgautam90/openstack-init architecture

> Architecture diagram of the GitHub repository ankurgautam90/openstack-init, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ankurgautam90/openstack-init
- Repository: https://github.com/ankurgautam90/openstack-init

## Overview

##### Project type and purpose
- This is an automation tool (a Bash script) for initializing an OpenStack environment.
- It downloads VM images, optionally converts them, uploads them to Glance, creates flavors in Nova, builds a private network in Neutron, and provisions a project/user via Keystone.

##### File structure
- Top level:
- `.gitignore` – standard ignore rules
- `README.md` – project overview and usage
- `openstack_init.sh` – the sole script driving all actions
- `resume.md` – unrelated to the script
- No subdirectories or complex modules; all logic is in `openstack_init.sh`.

##### README for additional insights
- Lists each step the script performs: image download, optional conversion, Glance upload, flavor creation, network/subnet creation, Keystone project/user provisioning.
- Mentions conditional branching (Ceph vs QCOW2 conversion).
- Dependencies: Debian-based OS, `apt-get`, `qemu-img`, OpenStack client CLI, and source of `/etc/kolla/admin-openrc.sh`.

##### Detailed capture of essential elements
- Clearly call out the conditional branch: Ceph vs QCOW2.
- Authentication step (sourcing `admin-openrc.sh`) before any API calls.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Local Files
    subgraph "Local Files"
        Script["openstack_init.sh"]:::script
        README["README.md"]:::docs
        GITIGNORE[".gitignore"]:::docs
        RESUME["resume.md"]:::docs
    end

    %% External Systems
    External["External Image Sources\n(Cirros, Windows, Ubuntu)"]:::external

    %% Conversion & Backend
    Conversion["qemu-img (Conversion Utility)"]:::tool
    Ceph["Ceph RBD Backend"]:::storage

    %% OpenStack Services
    subgraph "OpenStack Services"
        Keystone["Keystone\n(Identity)"]:::openstack
        Glance["Glance\n(Image Service)"]:::openstack
        Nova["Nova\n(Compute)"]:::openstack
        Neutron["Neutron\n(Network)"]:::openstack
    end

    %% Workflow Arrows
    External -->|"download images"| Script
    Script -->|"if no Ceph: qemu-img convert"| Conversion
    Script -->|"source admin-openrc.sh"| Keystone
    Script -->|"openstack image create"| Glance
    Script -->|"openstack flavor create"| Nova
    Script -->|"openstack network/subnet create"| Neutron
    Glance -->|"store images"| Ceph

    %% Click Events
    click Script "https://github.com/ankurgautam90/openstack-init/blob/main/openstack_init.sh"
    click README "https://github.com/ankurgautam90/openstack-init/blob/main/README.md"
    click GITIGNORE "https://github.com/ankurgautam90/openstack-init/blob/main/.gitignore"
    click RESUME "https://github.com/ankurgautam90/openstack-init/blob/main/resume.md"

    %% Styling
    classDef external fill:#c2f0c2,stroke:#333,stroke-width:1px
    classDef script fill:#ffe4b5,stroke:#333,stroke-width:1px
    classDef tool fill:#ffd700,stroke:#333,stroke-width:1px
    classDef storage fill:#add8e6,stroke:#333,stroke-width:1px
    classDef openstack fill:#87cefa,stroke:#333,stroke-width:1px
    classDef docs fill:#f5f5f5,stroke:#333,stroke-width:1px
```
