r/openstack • • Mar 27 '25

Offline Deployment of Multinode Kolla Ansible OpenStack – Need Help with Ansible Dependencies

Hey everyone,

I’m working on an offline deployment of Kolla Ansible OpenStack and have made good progress so far:

I have a local container registry with all the necessary images.

I’ve tracked all .deb packages installed during deployment (including dependencies).

The remaining challenge is handling Ansible dependencies and any other miscellaneous requirements I might have missed.

Has anyone done this before? How did you ensure all required Ansible dependencies were available offline? Any tips or gotchas I should be aware of?

Would really appreciate any insights!

5 Upvotes

11 comments sorted by

3

u/[deleted] Mar 27 '25

we have air-gapped/offline installs. We use a deployment "node" to create a pip proxy for the python packages, a container repo and a Rocky yum repo. We use ansible to prep the offline installer with semui. It's a little bit of work up front, but comes together nicely.

Here is a task that setups the ansible stuff into the pip repo


    - name: Create directory for Ansible Galaxy collections
      ansible.builtin.file:
        path: "{{ collection_path }}"
        state: directory
        owner: nginx
        group: nginx
        mode: '0755'

    - name: Download each collection to local directory
      ansible.builtin.command:
        cmd: "ansible-galaxy collection install {{ item.name }}:{{ item.version }} -p {{ collection_path }}"
      loop: "{{ galaxy_collections }}"

    - name: Download ansible collection tar files
      ansible.builtin.get_url:
        url: "{{ item }}"
        dest: "/var/www/html/ansible_collections/"
        owner: nginx
        group: nginx
        mode: '0644'
      loop:
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-posix-1.6.2.tar.gz
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-netcommon-4.1.0.tar.gz
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-utils-5.1.2.tar.gz
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/containers-podman-1.16.2.tar.gz
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-crypto-2.22.3.tar.gz
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-3.13.2.tar.gz
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-library_inventory_filtering_v1-1.0.2.tar.gz
        - https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-general-6.6.9.tar.gz


    - name: Ensure git is installed
      ansible.builtin.package:
        name: git
        state: present

    - name: Clone ansible-collection-kolla repository (stable/2024.1 branch)
      ansible.builtin.git:
        repo: "https://opendev.org/openstack/ansible-collection-kolla.git"
        dest: "/tmp/ansible-collection-kolla"
        version: "stable/2024.1"
        depth: 1
        force: true

    - name: Create tar.gz archive of the repository
      ansible.builtin.command:
        cmd: tar -czf /var/www/html/ansible_collections/ansible-collection-kolla.tar.gz -C /tmp ansible-collection-kolla
      args:
        removes: "/tmp/ansible-collection-kolla.tar.gz"

    - name: Remove cloned repository
      ansible.builtin.file:
        path: "/tmp/ansible-collection-kolla"
        state: absent


    - name: Ensure SSL certificate is generated in the correct location
      ansible.builtin.command: >
        /usr/local/bin/mkcert
        -cert-file /etc/pki/nginx/server.crt
        -key-file /etc/pki/nginx/private/server.key
        {{ drks_mgr_name }}
      args:
        creates: /etc/pki/nginx/server.crt

    - name: Add NGINX configuration for serving Ansible Galaxy collections
      ansible.builtin.copy:
        dest: /etc/nginx/conf.d/ansible_collections.conf
        content: |
          server {
              listen 8888;
              listen 4433 ssl;
              server_name {{ drks_mgr_name }};
              ssl_certificate "/etc/pki/nginx/server.crt";
              ssl_certificate_key "/etc/pki/nginx/private/server.key";

              location /repo/ansible_collections/ {
                  alias /var/www/html/ansible_collections/;
                  autoindex on;
              }
          }

    - name: Restart NGINX to apply changes
      ansible.builtin.systemd:
        name: nginx
        state: restarted
        enabled: true

2

u/Dabloo0oo Mar 27 '25

Thanks for the information.

Do you have any detailed guide or doc for this.

2

u/[deleted] Mar 27 '25

Hi, let me check, we have "internal" docs and the quality mileage can vary :)

2

u/[deleted] Mar 27 '25

I did this through MAAS and squid proxy :) . Was a breeze and awesome. After deployment you can remove the proxy. Also are you a ex-bhumi employee?

1

u/Dabloo0oo Mar 27 '25

I've tried MaaS, but we are looking for the alternative of that due to compatibility issue of hw. (I'm not sure about this but customer told us not to use MaaS)

Also, I havent heard about bhumi.

3

u/Zehicle Mar 27 '25

If you're looking for a MaaS alternative that can handle air-gap installs and full bare metal life-cycle too, check out my company's Digital Rebar solution. It's commercial, not OSS, with full support from RackN. There's a feature called contexts that can be used to upload and run that container you made for Kolla too.

Air gap is really tricky to get right and we do a lot of work helping customers deliver that way as an integrated part of the product (not a special case).

1

u/Dabloo0oo Mar 28 '25

Sure. I'll check it out. Do you have demo or something of that?

1

u/Zehicle Mar 28 '25

Yes, lots from the website and also our YT channel:https://youtube.com/@rackndigitalrebar?si=UWYbkf2LUn7nm7YT

There also a self-trial that gives you full access. It's not designed for air-gap but we do have plenty of customers who have to start in a restricted lab. In those cases, I'd recommend calling to get started.

1

u/[deleted] Mar 27 '25

tried MaaS, it's nice, I didn't like how it put MaaS stuff into the host, like there are cloudint calls that stall the hypervisor boot if MaaS isn't available.

1

u/[deleted] Mar 27 '25

I think that is a tradeoff you need to decide upon. Yep.