Ravenports generated: 04 Feb 2024 05:27
[ravenports.git] / bucket_2C / python-netbox-agent
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-netbox-agent
4 VERSION=                0.7.1
5 KEYWORDS=               python
6 VARIANTS=               v11 v12
7 SDESC[v11]=             NetBox agent for server (3.11)
8 SDESC[v12]=             NetBox agent for server (3.12)
9 HOMEPAGE=               https://github.com/solvik/netbox_agent
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/n/netbox-agent
14 DISTFILE[1]=            netbox_agent-0.7.1.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[v11]=             single
17 SPKGS[v12]=             single
18
19 OPTIONS_AVAILABLE=      PY311 PY312
20 OPTIONS_STANDARD=       none
21 VOPTS[v11]=             PY311=ON PY312=OFF
22 VOPTS[v12]=             PY311=OFF PY312=ON
23
24 DISTNAME=               netbox_agent-0.7.1
25
26 GENERATED=              yes
27
28 [PY311].BUILDRUN_DEPENDS_ON=            python-pynetbox:single:v11
29                                         python-netaddr:single:v11
30                                         python-netifaces:single:v11
31                                         python-PyYAML:single:v11
32                                         python-jsonargparse:single:v11
33                                         python-python-slugify:single:v11
34                                         python-packaging:single:v11
35                                         python-distro:single:v11
36 [PY311].USES_ON=                        python:v11,sutools
37
38 [PY312].BUILDRUN_DEPENDS_ON=            python-pynetbox:single:v12
39                                         python-netaddr:single:v12
40                                         python-netifaces:single:v12
41                                         python-PyYAML:single:v12
42                                         python-jsonargparse:single:v12
43                                         python-python-slugify:single:v12
44                                         python-packaging:single:v12
45                                         python-distro:single:v12
46 [PY312].USES_ON=                        python:v12,sutools
47
48 [FILE:3044:descriptions/desc.single]
49 # Netbox agent [Build Status]
50
51 This project aims to create hardware automatically into [Netbox] based on
52 standard tools (dmidecode, lldpd, parsing /sys/, etc).
53
54 The goal is to generate an existing infrastructure on Netbox and have the
55 ability to update it regularly by executing the agent.
56
57 # Features
58
59 * Create virtual machines, servers, chassis and blade through standard
60 tools (`dmidecode`)
61 * Create physical, bonding and vlan network interfaces with IPs (IPv4 &
62 IPv6)
63 * Create IPMI interface if found
64 * Create or get existing VLAN and associate it to interfaces
65 * Generic ability to guess datacenters and rack location through drivers
66 (`cmd` and `file` and custom ones)
67 * Update existing `Device` and `Interface`
68 * Handle blade moving (new slot, new chassis)
69 * Handle blade GPU expansions
70 * Automatic cabling (server's interface to switch's interface) using lldp
71 * Local inventory using `Inventory Item` for CPU, GPU, RAM, RAID cards,
72 physical disks (behind raid cards)
73 * PSUs creation and power consumption reporting (based on vendor's tools)
74
75 # Requirements
76
77 - Netbox >= 2.6
78 - Python >= 3.4
79 - [pynetbox]
80 - [python3-netaddr]
81 - [python3-netifaces]
82 - [jsonargparse]
83
84 - ethtool
85 - dmidecode
86 - ipmitool
87 - lldpd
88 - lshw
89
90 ## Inventory requirement
91 - hpassacli
92 - storcli
93 - omreport
94
95 # Installation
96
97 ```
98 # pip3 install netbox-agent
99 ```
100
101 # Usage
102
103 The agent can be run from a shell and get its configuration from either the
104 configuration file or environment variables.
105
106 Configuration values are overridden based on the following precedence:
107 command line arguments (might include config file) > environment variables
108 > default config file > defaults.
109
110 ```
111 # netbox_agent -c /etc/netbox_agent.yaml --register
112 INFO:root:Creating chassis blade (serial: QTFCQ574502EF)
113 INFO:root:Creating blade (serial: QTFCQ574502D2) myserver on chassis
114 QTFCQ574502EF
115 INFO:root:Setting device (QTFCQ574502D2) new slot on Slot 9 (Chassis
116 QTFCQ574502EF)..
117 INFO:root:Interface a8:1e:84:f2:9e:6a not found, creating..
118 INFO:root:Creating NIC enp1s0f1 (a8:1e:84:f2:9e:6a) on myserver
119 INFO:root:Interface 02:42:7a:89:cf:a4 not found, creating..
120 INFO:root:Creating NIC br-07ea1e4a2f0e (02:42:7a:89:cf:a4) on myserver
121 INFO:root:Create new IP 172.19.0.1/16 on br-07ea1e4a2f0e
122 INFO:root:Interface a8:1e:84:f2:9e:69 not found, creating..
123 INFO:root:Creating NIC enp1s0f0 (a8:1e:84:f2:9e:69) on myserver
124 INFO:root:Create new IP 42.42.42.42/24 on enp1s0f0
125 INFO:root:Create new IP fe80::aa1e:84ff:fef2:9e69/64 on enp1s0f0
126 INFO:root:Interface a8:1e:84:cd:9d:d6 not found, creating..
127 INFO:root:Creating NIC IPMI (a8:1e:84:cd:9d:d6) on myserver
128 INFO:root:Create new IP 10.191.122.10/24 on IPMI
129 ```
130
131 If you need, you can update only specific informations like:
132 * Network
133 * Inventory
134 * Location
135 * PSUs
136
137 ```
138 # ip a add 42.42.42.43/24 dev enp1s0f1
139 # netbox_agent -c /etc/netbox_agent.yaml --update-network
140 INFO:root:Create new IP 42.42.42.43/24 on enp1s0f1
141 # netbox_agent --update-inventory
142 INFO:root:Creating Disk Samsung SSD 850 S2RBNX0K101698D
143 ```
144
145 # Configuration
146
147 ```
148 # Netbox configuration
149
150
151 [FILE:104:distinfo]
152 1ca117bea69d6635e826789cf0aa6b7b6883515b9aaef1f0a7ac8c730d539dbc        45388 netbox_agent-0.7.1.tar.gz
153