Skip to content

Contributing to the IP Fabric Infoblox Integration

Overview

The IP Fabric Infoblox Integration development environment is used to test or develop new features. The project uses invoke to manage the development environment and streamline the development process.

Requirements

  • Python Version > 3.9.7, < 3.13
  • Docker
  • Basic knowledge of Python, Docker, and Git

Setting up the Development Environment

  1. Clone the repository:

    git clone git@gitlab.com:ip-fabric/integrations/ipfabric-infoblox.git
    
    Example output:

      ❯ git clone git@gitlab.com:ip-fabric/integrations/ipfabric-infoblox.git
      Cloning into 'ipfabric-infoblox'...
      remote: Enumerating objects: 442, done.
      remote: Counting objects: 100% (442/442), done.
      remote: Compressing objects: 100% (241/241), done.
      remote: Total 442 (delta 236), reused 367 (delta 189), pack-reused 0 (from 0)
      Receiving objects: 100% (442/442), 334.05 KiB | 8.79 MiB/s, done.
      Resolving deltas: 100% (236/236), done.
    

    1a. Change to the project directory:

    cd ipfabric-infoblox
    
    1b. Confirm the project directory:
    pwd
    

    Example output:

      ❯ pwd
      /Desktop/dev/ipfabric-infoblox
    
  2. Install the development requirements:

    2a. Poetry Poetry Installation
    Run the following command to confirm the installation:

    poetry about
    

    Example output:

    ❯ poetry about
    Poetry - Package Management for Python
    
    Version: 1.8.5
    Poetry-Core Version: 1.9.1
    
    Poetry is a dependency manager tracking local dependencies of your projects and libraries.
    See https://github.com/python-poetry/poetry for more information.
    

    2b. Install the development requirements:

    poetry install
    

    Example output:

    ❯ poetry install
    Installing dependencies from lock file
    
    Package operations: 0 installs, 0 updates, 18 removals
    
    ...............
    
    Installing the current project: ipfabric-infoblox (0.1.1)
    
  3. Activate the virtual environment:

    poetry shell
    
    Example output:

    ❯ poetry shell
    Spawning shell within .pyenv/versions/ipfabric/bin/python/ipfabric-infoblox-YefWEBcd-py3.12
    ❯ emulate bash -c '. .pyenv/versions/ipfabric/bin/python/ipfabric-infoblox-YefWEBcd-py3.12/bin/activate'
    
  4. Deploy the development environment:

    invoke run-ipfabric-infoblox
    

    Example output:

    ❯ invoke run-ipfabric-infoblox
    
    Docker version 24.0.6, build ed223bc
    Docker Compose version v2.23.0-desktop.1
    Running on a native Linux system
    #0 building with "desktop-linux" instance using docker driver
    
    #1 [internal] load .dockerignore
    #1 transferring context: 2B done
    #1 DONE 0.0s
    
    ...............
    
    #11 exporting to image
    #11 exporting layers
    #11 exporting layers 8.7s done
    #11 writing image sha256:712d73700463444f711ed7b20d58ad38f33efdc1b97d4f319e0f8bbb6b9926a6 0.0s done
    #11 naming to docker.io/library/ipfabric-infoblox 0.1s done
    #11 DONE 8.8s
    
    What's Next?
      View a summary of image vulnerabilities and recommendations → docker scout quickview
    ipfabric-infoblox
    75b663088e111071844dc3817dec71e8c58ece0030cfb612ee42e2198a2cc0ae
    CONTAINER ID   IMAGE                    COMMAND                  CREATED        STATUS                                     PORTS                    NAMES
    75b663088e11   ipfabric-infoblox        "poetry run streamli…"   1 second ago   Up Less than a second (health: starting)   0.0.0.0:8501->80/tcp     ipfabric-infoblox
    4e042dca76d5   ipfabric-infoblox-docs   "poetry run mkdocs s…"   20 hours ago   Up 20 hours                                0.0.0.0:8001->8000/tcp   ipfabric-infoblox-docs
    IPFabric Infoblox container is running
    You can access the web interface at http://localhost:8501
    
    5. Access the web interface at http://localhost:8501

Setting up the Development Environment for Documentation

Follow steps one, two, and three from the previous section.

  1. Run the docs container
      invoke run-ipfabric-infoblox-docs
    

    Example output:

    ❯ invoke run-docs-container
    
    Docker version 24.0.6, build ed223bc
    Docker Compose version v2.23.0-desktop.1
    Running on a native Linux system
    #0 building with "desktop-linux" instance using docker driver
    
    #1 [internal] load .dockerignore
    #1 transferring context: 2B done
    #1 DONE 0.0s
    
    ...............
    
    #12 exporting to image
    #12 exporting layers
    #12 exporting layers 1.2s done
    #12 writing image sha256:deadecd7211749ccfe9d787b3810250f3446a4eb027c822f5e365e71f4e949d4 done
    #12 naming to docker.io/library/ipfabric-infoblox-docs done
    #12 DONE 1.2s
    What's Next?
        View a summary of image vulnerabilities and recommendations → docker scout quickview
    ipfabric-infoblox-docs
    c03901b192dbb3a13e359a1b1ff5f78c07cd189703f9690fbc6350b710bd35c8
    CONTAINER ID   IMAGE                    COMMAND                  CREATED        STATUS                  PORTS                    NAMES
    c03901b192db   ipfabric-infoblox-docs   "poetry run mkdocs s…"   1 second ago   Up Less than a second   0.0.0.0:8001->8000/tcp   ipfabric-infoblox-docs
    Docs are available at http://localhost:8001