Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement docker integration #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FoxxMD
Copy link

@FoxxMD FoxxMD commented May 3, 2024

A quick and dirty integration for onboarding docker containers into netbox. It needs more work but it is in a working state.

  • Connect to docker instances, through socket or http, using docker-py
  • Create and associate containers using Virtualization assets for Device X
    • Each docker instance is associated as a Virtualization Cluster for a Device X
      • Cluster gets a separate IPAM VRF for all associated VMs/Services
      • Non-compose containers create a Virtual Machine called Docker Standalone
      • composed containers create a Virtual Machine called Docker Compose [compose project name]
        • Config setting to disable/enable this behavior
    • Docker networks are created as Virtual Interfaces
      • Created with IP Ranges based on network subnet
      • Associated to compose/bridge VM
    • Containers created/updated as IPAM Service
      • Associated to VM
      • Creates IP address w/ VRF
      • Ports and Protocol updated on each run
      • Handles containers on the host docker network

I haven't decided if this is this the best way to organize containers yet as I haven't seen much guidance around docker and netbox in general. Feedback is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant