oxidized 0.32.1 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
  4. data/.github/ISSUE_TEMPLATE/support-request.md +36 -0
  5. data/.github/workflows/publishdocker.yml +35 -16
  6. data/.gitignore +1 -0
  7. data/.rubocop.yml +0 -2
  8. data/.rubocop_todo.yml +5 -31
  9. data/CHANGELOG.md +54 -2
  10. data/CONTRIBUTING.md +10 -7
  11. data/Dockerfile +37 -64
  12. data/README.md +4 -95
  13. data/Rakefile +8 -9
  14. data/docs/Configuration.md +139 -27
  15. data/docs/Docker.md +240 -0
  16. data/docs/Issues.md +17 -0
  17. data/docs/Model-Notes/EatonNetwork.md +18 -0
  18. data/docs/Model-Notes/HPEAruba.md +3 -2
  19. data/docs/Release.md +5 -3
  20. data/docs/Supported-OS-Types.md +3 -0
  21. data/docs/Troubleshooting.md +6 -1
  22. data/extra/rest_client.rb +1 -1
  23. data/lib/oxidized/config/vars.rb +18 -14
  24. data/lib/oxidized/config.rb +3 -1
  25. data/lib/oxidized/core.rb +26 -5
  26. data/lib/oxidized/input/http.rb +1 -1
  27. data/lib/oxidized/model/aos7.rb +3 -0
  28. data/lib/oxidized/model/eatonnetwork.rb +65 -0
  29. data/lib/oxidized/model/fortios.rb +3 -3
  30. data/lib/oxidized/model/ingate.rb +47 -0
  31. data/lib/oxidized/model/ios.rb +1 -0
  32. data/lib/oxidized/model/netgear.rb +6 -0
  33. data/lib/oxidized/model/powerconnect.rb +31 -10
  34. data/lib/oxidized/model/srosmd.rb +1 -1
  35. data/lib/oxidized/model/unifiap.rb +142 -0
  36. data/lib/oxidized/output/git.rb +82 -32
  37. data/lib/oxidized/output/gitcrypt.rb +3 -0
  38. data/lib/oxidized/version.rb +6 -4
  39. data/lib/oxidized/worker.rb +2 -5
  40. data/lib/refinements.rb +2 -0
  41. data/oxidized.gemspec +5 -6
  42. metadata +30 -30
  43. data/examples/podman-compose/Makefile +0 -103
  44. data/examples/podman-compose/README.md +0 -94
  45. data/examples/podman-compose/docker-compose.yml +0 -30
  46. data/examples/podman-compose/gitserver/.gitignore +0 -1
  47. data/examples/podman-compose/gitserver/Dockerfile +0 -14
  48. data/examples/podman-compose/model-simulation/Dockerfile-model +0 -13
  49. data/examples/podman-compose/model-simulation/asternos.sh +0 -36
  50. data/examples/podman-compose/oxidized-config/.gitignore +0 -10
  51. data/examples/podman-compose/oxidized-config/config +0 -46
  52. data/examples/podman-compose/oxidized-config/config_csv-file +0 -46
  53. data/examples/podman-compose/oxidized-config/config_csv-gitserver +0 -56
  54. data/examples/podman-compose/oxidized-config/router.db +0 -1
  55. data/examples/podman-compose/oxidized-ssh/.gitignore +0 -1
  56. data/examples/podman-compose/oxidized-ssh/README.md +0 -14
@@ -2,9 +2,15 @@
2
2
 
3
3
  ## Debugging
4
4
 
5
- In case a model plugin doesn't work correctly (ios, procurve, etc.), you can enable live debugging of SSH/Telnet sessions. Just add a `debug` option containing the value true to the `input` section. The log files will be created depending on the parent directory of the logfile option.
5
+ In case a model plugin doesn't work correctly (ios, procurve, etc.), you can
6
+ enable live debugging of SSH/Telnet sessions. Just add a `debug` option
7
+ containing the value true to the `input` section. The log files will be created
8
+ depending on the parent directory of the logfile option.
6
9
 
7
- The following example will log an active ssh/telnet session `/home/oxidized/.config/oxidized/log/<IP-Address>-<PROTOCOL>`. The file will be truncated on each consecutive ssh/telnet session, so you need to put a `tailf` or `tail -f` on that file!
10
+ The following example will log an active ssh/telnet session
11
+ `/home/oxidized/.config/oxidized/log/<IP-Address>-<PROTOCOL>`. The file will be
12
+ truncated on each consecutive ssh/telnet session, so you need to put a `tailf`
13
+ or `tail -f` on that file!
8
14
 
9
15
  ```yaml
10
16
  log: /home/oxidized/.config/oxidized/log
@@ -22,7 +28,9 @@ input:
22
28
 
23
29
  ## Privileged mode
24
30
 
25
- To start privileged mode before pulling the configuration, Oxidized needs to send the enable command. You can globally enable this, by adding the following snippet to the global section of the configuration file.
31
+ To start privileged mode before pulling the configuration, Oxidized needs to
32
+ send the enable command. You can globally enable this, by adding the following
33
+ snippet to the global section of the configuration file.
26
34
 
27
35
  ```yaml
28
36
  vars:
@@ -31,14 +39,17 @@ vars:
31
39
 
32
40
  ## Removing secrets
33
41
 
34
- To strip out secrets from configurations before storing them, Oxidized needs the `remove_secret` flag. You can globally enable this by adding the following snippet to the global section of the configuration file.
42
+ To strip out secrets from configurations before storing them, Oxidized needs the
43
+ `remove_secret` flag. You can globally enable this by adding the following
44
+ snippet to the global section of the configuration file.
35
45
 
36
46
  ```yaml
37
47
  vars:
38
48
  remove_secret: true
39
49
  ```
40
50
 
41
- Device models that contain substitution filters to remove sensitive data will now be run on any fetched configuration.
51
+ Device models that contain substitution filters to remove sensitive data will
52
+ now be run on any fetched configuration.
42
53
 
43
54
  As a partial example from ios.rb:
44
55
 
@@ -56,7 +67,9 @@ The above strips out snmp community strings from your saved configs.
56
67
 
57
68
  ## Disabling SSH exec channels
58
69
 
59
- Oxidized uses exec channels to make information extraction simpler, but there are some situations where this doesn't work well, e.g. configuring devices. This feature can be turned off by setting the `ssh_no_exec`
70
+ Oxidized uses exec channels to make information extraction simpler, but there
71
+ are some situations where this doesn't work well, e.g. configuring devices. This
72
+ feature can be turned off by setting the `ssh_no_exec`
60
73
  variable.
61
74
 
62
75
  ```yaml
@@ -66,7 +79,11 @@ vars:
66
79
 
67
80
  ## Disabling SSH keepalives
68
81
 
69
- Oxidized SSH input makes use of SSH keepalives to prevent timeouts from slower devices and to quickly tear down stale sessions in larger deployments. There have been reports of SSH keepalives breaking compatibility with certain OS types. They can be disabled using the `ssh_no_keepalive` variable on a per-node basis (by specifying it in the source) or configured application-wide.
82
+ Oxidized SSH input makes use of SSH keepalives to prevent timeouts from slower
83
+ devices and to quickly tear down stale sessions in larger deployments. There
84
+ have been reports of SSH keepalives breaking compatibility with certain OS
85
+ types. They can be disabled using the `ssh_no_keepalive` variable on a per-node
86
+ basis (by specifying it in the source) or configured application-wide.
70
87
 
71
88
  ```yaml
72
89
  vars:
@@ -84,9 +101,12 @@ vars:
84
101
 
85
102
  ## Public Key Authentication with SSH
86
103
 
87
- Instead of password-based login, Oxidized can make use of key-based SSH authentication.
104
+ Instead of password-based login, Oxidized can make use of key-based SSH
105
+ authentication.
88
106
 
89
- You can tell Oxidized to use one or more private keys globally, or specify the key to be used on a per-node basis. The latter can be done by mapping the `ssh_keys` variable through the active source.
107
+ You can tell Oxidized to use one or more private keys globally, or specify the
108
+ key to be used on a per-node basis. The latter can be done by mapping the
109
+ `ssh_keys` variable through the active source.
90
110
 
91
111
  Global:
92
112
 
@@ -108,7 +128,8 @@ vars_map:
108
128
  # ...
109
129
  ```
110
130
 
111
- If you are using a non-standard path, especially when copying the private key via a secured channel, make sure that the permissions are set correctly:
131
+ If you are using a non-standard path, especially when copying the private key
132
+ via a secured channel, make sure that the permissions are set correctly:
112
133
 
113
134
  ```bash
114
135
  foo@bar:~$ ls -la ~/.ssh/
@@ -120,15 +141,20 @@ drwx------ 5 oxidized oxidized 4096 Mar 13 21:40 ..
120
141
  -rw-r--r-- 1 oxidized oxidized 94 Mar 13 17:02 id_ed25519.pub
121
142
  ```
122
143
 
123
- Finally, multiple private keys can be specified as an array of file paths, such as `["~/.ssh/id_rsa", "~/.ssh/id_another_rsa"]`.
144
+ Finally, multiple private keys can be specified as an array of file paths, such
145
+ as `["~/.ssh/id_rsa", "~/.ssh/id_another_rsa"]`.
124
146
 
125
147
  ## SSH Proxy Command
126
148
 
127
- Oxidized can `ssh` through a proxy as well. To do so we just need to set `ssh_proxy` variable with the proxy host information and optionally set the `ssh_proxy_port` with the SSH port if it is not listening on port 22.
149
+ Oxidized can `ssh` through a proxy as well. To do so we just need to set
150
+ `ssh_proxy` variable with the proxy host information and optionally set the
151
+ `ssh_proxy_port` with the SSH port if it is not listening on port 22.
128
152
 
129
- This can be provided on a per-node basis by mapping the proper fields from your source.
153
+ This can be provided on a per-node basis by mapping the proper fields from your
154
+ source.
130
155
 
131
- An example for a `csv` input source that maps the 4th field as the `ssh_proxy` value and the 5th field as `ssh_proxy_port`.
156
+ An example for a `csv` input source that maps the 4th field as the `ssh_proxy`
157
+ value and the 5th field as `ssh_proxy_port`.
132
158
 
133
159
  ```yaml
134
160
  # ...
@@ -144,9 +170,12 @@ vars_map:
144
170
 
145
171
  ## SSH enabling legacy algorithms
146
172
 
147
- When connecting to older firmware over SSH, it is sometimes necessary to enable legacy/disabled settings like KexAlgorithms, HostKeyAlgorithms, MAC or the Encryption.
173
+ When connecting to older firmware over SSH, it is sometimes necessary to enable
174
+ legacy/disabled settings like KexAlgorithms, HostKeyAlgorithms, MAC or the
175
+ Encryption.
148
176
 
149
- These settings can be provided on a per-node basis by mapping the ssh_kex, ssh_host_key, ssh_hmac and the ssh_encryption fields from you source.
177
+ These settings can be provided on a per-node basis by mapping the ssh_kex,
178
+ ssh_host_key, ssh_hmac and the ssh_encryption fields from you source.
150
179
 
151
180
  ```yaml
152
181
  # ...
@@ -164,7 +193,9 @@ vars_map:
164
193
 
165
194
  ## FTP Passive Mode
166
195
 
167
- Oxidized uses ftp passive mode by default. Some devices require passive mode to be disabled. To do so, we can set `input.ftp.passive` to false - this will make use of FTP active mode.
196
+ Oxidized uses ftp passive mode by default. Some devices require passive mode to
197
+ be disabled. To do so, we can set `input.ftp.passive` to false - this will make
198
+ use of FTP active mode.
168
199
 
169
200
  ```yaml
170
201
  input:
@@ -207,7 +238,21 @@ crash:
207
238
  vars:
208
239
  enable: S3cr3tx
209
240
  groups: {}
210
- rest: 127.0.0.1:8888
241
+ extensions:
242
+ oxidized-web:
243
+ load: true
244
+ # Bind to any IPv4 interface
245
+ listen: 0.0.0.0
246
+ # Bind to port 8888 (default)
247
+ port: 8888
248
+ # Prefix prod to the URL, so http://oxidized.full.domain/prod/
249
+ url_prefix: prod
250
+ # virtual hosts to listen to (others will be denied)
251
+ vhosts:
252
+ - localhost
253
+ - 127.0.0.1
254
+ - oxidized
255
+ - oxidized.full.domain
211
256
  pid: ~/.config/oxidized/oxidized.pid
212
257
  input:
213
258
  default: ssh, telnet
@@ -337,35 +382,99 @@ From least to most important:
337
382
 
338
383
  More important options overwrite less important ones if they are set.
339
384
 
340
- ## RESTful API and Web Interface
385
+ ## oxidized-web: RESTful API and web interface
386
+
387
+ The RESTful API and web interface are enabled by installing the `oxidized-web`
388
+ gem and configuring the `extensions.oxidized-web:` section in the configuration
389
+ file. You can set the following parameter:
390
+ - `load`: `true`/`false`: Enables or disables the `oxidized-web` extension
391
+ (default: `false`)
392
+ - `listen`: Specifies the interface to bind to (default: `127.0.0.1`). Valid
393
+ options:
394
+ - `127.0.0.1`: Allows IPv4 connections from localhost only
395
+ - `'[::1]'`: Allows IPv6 connections from localhost only
396
+ - `<IPv4-Address>` or `'[<IPv6-Address>]'`: Binds to a specific interface
397
+ - `0.0.0.0`: Binds to any IPv4 interface
398
+ - `'[::]'`: Binds to any IPv4 and IPv6 interface
399
+ - `port`: Specifies the TCP port to listen to (default: `8888`)
400
+ - `url_prefix`: Defines a URL prefix (default: no prefix)
401
+ - `vhosts`: A list of virtual hosts to listen to. If not specified, it will
402
+ respond to any virtual host.
403
+
404
+ > [!NOTE]
405
+ > The old syntax `rest: 127.0.0.1:8888/prefix` is still supported but
406
+ > deprecated. It produces a warning and won't be suported in future releases.
407
+ >
408
+ > If the `rest` configuration is used, the extensions.oxidized-web will be
409
+ > ignored.
410
+
411
+ > [!NOTE]
412
+ > You need oxidized-web version 0.16.0 or later to use the
413
+ > extentions.oxidized-web configuration
341
414
 
342
- The RESTful API and Web Interface is enabled by configuring the `rest:` parameter in the config file. This parameter can optionally contain a relative URI.
343
415
 
344
416
  ```yaml
345
417
  # Listen on http://[::1]:8888/
346
- rest: "[::1]:8888"
418
+ extensions:
419
+ oxidized-web:
420
+ load: true
421
+ listen: '[::1]'
422
+ port: 8888
347
423
  ```
348
424
 
349
425
  ```yaml
350
426
  # Listen on http://127.0.0.1:8888/
351
- rest: 127.0.0.1:8888
427
+ extensions:
428
+ oxidized-web:
429
+ load: true
430
+ listen: 127.0.0.1
431
+ port: 8888
352
432
  ```
353
433
 
354
434
  ```yaml
355
435
  # Listen on http://[2001:db8:0:face:b001:0:dead:beaf]:8888/oxidized/
356
- rest: "[2001:db8:0:face:b001:0:dead:beaf]:8888"
436
+ extensions:
437
+ oxidized-web:
438
+ load: true
439
+ listen: '[2001:db8:0:face:b001:0:dead:beaf]'
440
+ port: 8888
441
+ url_prefix: oxidized
357
442
  ```
358
443
 
359
444
  ```yaml
360
445
  # Listen on http://10.0.0.1:8000/oxidized/
361
- rest: 10.0.0.1:8000/oxidized
446
+ extensions:
447
+ oxidized-web:
448
+ load: true
449
+ listen: 10.0.0.1
450
+ port: 8000
451
+ url_prefix: oxidized
452
+ ```
453
+
454
+ ```yaml
455
+ # Listen on any interface to http://oxidized.rocks:8888 and
456
+ # http://oxidized:8888
457
+ extensions:
458
+ oxidized-web:
459
+ load: true
460
+ listen: '[::]'
461
+ url_prefix: oxidized
462
+ vhosts:
463
+ - oxidized.rocks
464
+ - oxidized
362
465
  ```
363
466
 
364
467
  ## Triggered backups
365
468
 
366
- A node can be moved to head-of-queue via the REST API `GET/POST /node/next/[NODE]`. This can be useful to immediately schedule a fetch of the configuration after some other event such as a syslog message indicating a configuration update on the device.
469
+ A node can be moved to head-of-queue via the REST API `GET/PUT
470
+ /node/next/[NODE]`. This can be useful to immediately schedule a fetch of the
471
+ configuration after some other event such as a syslog message indicating a
472
+ configuration update on the device.
367
473
 
368
- In the default configuration this node will be processed when the next job worker becomes available, it could take some time if existing backups are in progress. To execute moved jobs immediately a new job can be added automatically:
474
+ In the default configuration this node will be processed when the next job
475
+ worker becomes available, it could take some time if existing backups are in
476
+ progress. To execute moved jobs immediately a new job can be added
477
+ automatically:
369
478
 
370
479
  ```yaml
371
480
  next_adds_job: true
@@ -375,7 +484,10 @@ This will allow for a more timely fetch of the device configuration.
375
484
 
376
485
  ## Disabling DNS resolution
377
486
 
378
- In some instances it might not be desirable to attempt to resolve names of nodes. One such use case is when nodes are accessed through an SSH proxy, where the remote end resolves the names differently than the host on which Oxidized runs would.
487
+ In some instances it might not be desirable to attempt to resolve names of
488
+ nodes. One such use case is when nodes are accessed through an SSH proxy, where
489
+ the remote end resolves the names differently than the host on which Oxidized
490
+ runs would.
379
491
 
380
492
  Names can instead be passed verbatim to the input:
381
493
 
data/docs/Docker.md ADDED
@@ -0,0 +1,240 @@
1
+ # Running oxidized within an OCI container (docker, podman...)
2
+
3
+ ## Docker image
4
+ The official Docker image is automatically built and pushed to hub.docker.com
5
+ as [oxidized/oxidized](https://hub.docker.com/r/oxidized/oxidized/) with a
6
+ [GitHub CI](/.github/workflows/publishdocker.yml).
7
+
8
+ There are three different types of tags:
9
+ - Each commit to the master branch will be published with the tag
10
+ `master-(git sha oid)`
11
+ - Each release will be published with the version as a tag
12
+ - Latest is the latest release, either from a commit or a release tag
13
+
14
+ Currently, Docker Hub automatically builds the master branch for linux/amd64 and
15
+ linux/arm64 platforms as
16
+ [oxidized/oxidized](https://hub.docker.com/r/oxidized/oxidized/). You can make
17
+ use of this container or build your own.
18
+
19
+ ## Choose a container running environment
20
+ There are many options to run containers. Two main options are
21
+ [docker](https://www.docker.com/) and [podman](https://podman.io/). A main
22
+ difference is that docker requires root rights to run, and podman can be run
23
+ by a local user. Both work with oxidized, so the choice is up to you.
24
+
25
+ Oxidized has also been reported to work with
26
+ [Portainer](https://www.portainer.io/).
27
+
28
+ ## File rights in the container userspace and host userspace
29
+ As oxidized runs under the user "oxidized" (UID: 30000) in the container
30
+ userspace, docker and podman will map this UID in the shared volumes, producing
31
+ weird UIDs in the host userspace.
32
+
33
+ ### docker
34
+ When docker runs the container as root, the mapping to the UIDs in the host
35
+ userspace will be the same as in the container, so the files produced by the
36
+ oxidized user in the container will have UID 30000 in the host.
37
+
38
+ If you map a volume between the host and the container and need it to be
39
+ accessed by the oxidized user, you need to fix the UIDs:
40
+ ```
41
+ sudo chown 30000:30000 ~/oxidized-config
42
+ ```
43
+
44
+ ### podman
45
+ When podman is run as a user, the mapping of UIDs between the container and the
46
+ linux host will depend on your UID on the host.
47
+
48
+ If you map a volume between the host and the container and need it to be
49
+ accessed by the oxidized user, you need to fix the UIDs:
50
+
51
+ ```
52
+ podman unshare chown 30000:30000 ~/oxidized-config
53
+ ```
54
+
55
+ If you need to access the files from the linux host, you can do this by
56
+ prefixing `podman unshare` to your shell commands.
57
+
58
+ ## Build you own container image
59
+ To build your own container image, clone the git repository:
60
+
61
+ ```shell
62
+ git clone https://github.com/ytti/oxidized
63
+ ```
64
+
65
+ Then, build the container locally:
66
+
67
+ ```shell
68
+ sudo docker build -q -t oxidized/oxidized:latest oxidized/
69
+ ```
70
+
71
+ - `-q` stands for quiet; remove it if you want to see the build process.
72
+ - `-t oxidized/oxidized:latest` tags the image as `oxidized/oxidized:latest`
73
+
74
+ You can also build with podman:
75
+ ```
76
+ podman build -t oxidized:latest oxidized/
77
+ ```
78
+
79
+ Within the oxidized repository, using `rake build_container` will automatically
80
+ build the container (with podman or docker), name it `localhost/oxidized` and
81
+ give it the tags `latest` and `<branchname>-<sha-tag>`, for example
82
+ `localhost/oxidized:master-65baab9`.
83
+
84
+ ## Set up an environment for the container
85
+ Once you've built the container (or chosen to make use of the automatically
86
+ built container in Docker Hub, which will be downloaded for you by docker on the
87
+ first `run` command had you not built it), you need to set up an environment
88
+ for the container.
89
+
90
+ First, you need a configuration directory in the host system that you can map
91
+ in the container. You can choose any directory you want, we'll take
92
+ `~/oxidized-config` in our example. Don't forget to adjust the permissions as
93
+ explained above.
94
+
95
+ If you already have a configuration for oxidized (`config`), you can skip this
96
+ step. Just save it under `~/oxidized-config` and run the container (see below).
97
+
98
+ If you don't have a configuration, you can make oxidized produce one for you, so
99
+ that you just have to adapt it to your needs.
100
+
101
+ ```shell
102
+ sudo docker run --rm -v ~/oxidized-config:/home/oxidized/.config/oxidized docker.io/oxidized/oxidized:latest su - oxidized -c oxidized
103
+ ```
104
+ ```shell
105
+ podman run --rm -v ~/oxidized-config:/home/oxidized/.config/oxidized docker.io/oxidized/oxidized:latest su - oxidized -c oxidized
106
+ ```
107
+
108
+ - `--rm` tells docker to automatically remove the container when he exits
109
+ - `-v ~/oxidized-config:/home/oxidized/.config/oxidized` maps your local
110
+ `~/oxidized-config` into `/home/oxidized/.config/oxidized`in the container
111
+ environment.
112
+ - `su - oxidized -c oxidized` runs oxidized under the user oxidized, so that it
113
+ can produce a configuration under `/home/oxidized/.config/oxidized`
114
+
115
+
116
+ This will return `edit /home/oxidized/.config/oxidized/config`, which is the
117
+ path in the container context. Now you can edit `~/oxidized-config/config` to
118
+ fit your needs.
119
+
120
+ You can reiterate this process a few times, until oxidized is happy with the
121
+ config, an then you're finished with setting up the environment.
122
+
123
+
124
+ You also need to create the `router.db` file under
125
+ `~/oxidized-config/config/router.db` (see
126
+ [CSV Source](/docs/Sources.md#source-csv) for further info) or configure another
127
+ source to suit your needs. Don't forget to set the file permissions (owner)
128
+ properly!
129
+
130
+
131
+
132
+ ## Run the container
133
+ Now you can run the container without specifying an entry point. It will
134
+ automatically start oxidized and every other process needed.
135
+ ```shell
136
+ sudo docker run --rm -v ~/oxidized-config:/home/oxidized/.config/oxidized -p 8888:8888/tcp docker.io/oxidized/oxidized:latest
137
+ ```
138
+ ```shell
139
+ podman run --rm -v ~/oxidized-config:/home/oxidized/.config/oxidized -p 8888:8888/tcp docker.io/oxidized/oxidized:latest
140
+ ```
141
+
142
+ `-p 8888:8888/tcp` maps the TCP port 8888 in the container with the port
143
+ 8888 on the host, so that you can access the RESTful API and Web Interface
144
+ from the host.
145
+ If the RESTful API and Web Interface should be enabled, edit the
146
+ configuration (in our example `~/oxidized-config/config`) and modify
147
+ `rest: 127.0.0.1:8888` to `rest: 0.0.0.0:8888`. This will bind port 8888 to all
148
+ interfaces, and expose the port so that it can be accessed externally.
149
+ [(Issue #445)](https://github.com/ytti/oxidized/issues/445)
150
+
151
+
152
+ ## Run with with docker-compose / podman-compose
153
+ Alternatively, you can use docker-compose or podman-compose to run the
154
+ container:
155
+
156
+ ```yaml
157
+ # docker-compose.yml
158
+ # docker-compose file example for oxidized that will start along with docker daemon
159
+ ---
160
+ version: "3"
161
+ services:
162
+ oxidized:
163
+ restart: always
164
+ image: docker.io/oxidized/oxidized:latest
165
+ ports:
166
+ - 8888:8888/tcp
167
+ environment:
168
+ # Reload hosts list once per day
169
+ CONFIG_RELOAD_INTERVAL: 86400
170
+ volumes:
171
+ - ~/oxidized-config/config:/home/oxidized/.config/oxidized/
172
+ ```
173
+
174
+ To start the pod, use `docker-compose up` or `podman-compose down`.
175
+
176
+ ## Special configurations of the official container
177
+ ### Reload the configuration
178
+ If you want to have the config automatically reloaded (e.g. when using a http
179
+ source that changes), you need to set the environment variable
180
+ CONFIG_RELOAD_INTERVAL. This can be done in `docker-compose.yml` (see above) or
181
+ on the command line:
182
+
183
+ ```shell
184
+ sudo docker run -v ~/oxidized-config:/home/oxidized/.config/oxidized -p 8888:8888/tcp -e CONFIG_RELOAD_INTERVAL=3600 docker.io/oxidized/oxidized:latest
185
+ ```
186
+ ### Use an internal CA
187
+ If you need to use an internal CA (e.g. to connect to an private github instance):
188
+
189
+ ```shell
190
+ docker run -v /etc/oxidized:/home/oxidized/.config/oxidized -v /path/to/MY-CA.crt:/usr/local/share/ca-certificates/MY-CA.crt -p 8888:8888/tcp -e UPDATE_CA_CERTIFICATES=true -t oxidized/oxidized:latest
191
+ ```
192
+
193
+ ### Pass the ssh passphrase for a remote git
194
+ If you don't want to authenticate with user & password but with a ssh-key, you
195
+ can set the ssh passphrase with the environment variable
196
+ `OXIDIZED_SSH_PASSPHRASE`
197
+
198
+ ## Tipps & tricks
199
+ ### podman & Debian Bookworm
200
+ To install podman in Debian Bookwork, you need following packages:
201
+ ```shell
202
+ sudo apt install podman containers-storage podman-compose
203
+ ```
204
+
205
+ Ensure Podman is using the overlay driver for image storage.
206
+ Without this driver, Podman may save every container layer separately rather
207
+ than only the changes, which can quickly consume disk space.
208
+
209
+ This issue can occur if podman was run before installing the
210
+ `container-storage` package.
211
+
212
+ ```shell
213
+ podman info | grep graphDriverName
214
+ ```
215
+
216
+ You should get this reply
217
+ ```shell
218
+ graphDriverName: overlay
219
+ ```
220
+
221
+ If not, a quick way to solve it is to delete `~/.local/share/containers/`.
222
+ Beware - this will delete **all** your containers!
223
+
224
+ ### Store the ssh keys a remote git repository
225
+ When you user the githubrepo hook to upload your configs to a remote git repository, you have to store your ssh-key and the public keys of the remote server. Create a folder `~/oxidized-ssh` and map it to `/home/oxidized/.ssh`.
226
+
227
+
228
+ To generate an ssh-key, run:
229
+ ```shell
230
+ ssh-keygen -q -t ed25519 -C "Oxidized Push Key@`hostname`" -N "YOURPASSPHRASE" -m PEM -f ~/oxidized-ssh/oxidized-key
231
+ ```
232
+
233
+ You also need to store the public keys of the remote git server in known_hosts. If you do not,
234
+ oxidized will refuse to push to the remote Git with the error `#<Rugged::SshError: invalid or unknown remote ssh hostkey>`, see Issue #2753.
235
+
236
+ ```shell
237
+ ssh-keyscan git-server.example.com > ~/oxidized-ssh/known_hosts
238
+ ```
239
+
240
+ Don't forget to set the permission (owner) of the files for the user oxidized inside the container!
data/docs/Issues.md CHANGED
@@ -11,6 +11,23 @@ Why write good issues?
11
11
  - By spending time to write a good issue, you save developers time, contributing
12
12
  to Oxidized’s progress without writing a line of code.
13
13
 
14
+ ## Rules
15
+ The project receives too many incomplete issues, unnecessarily taking time that
16
+ could be invested in new code. Therefore, issues will be worked on with the
17
+ following rules:
18
+
19
+ - Use the predefined templates for bugs, feature requests and support requests.
20
+ - If you don't provide the necessary information (read this file, fill in the
21
+ questions in the templates), expect your issue to be closed without a comment.
22
+ - Inactive issues will be marked "stale" automatically after 90 days. Issues
23
+ are not closed automatically; this is a manual action by a maintainer.
24
+ - A feature requests may be closed after some time of inactivity, as obviously
25
+ no one has found the time to implement it. Consider contributing code in a
26
+ Pull Request instead.
27
+ - While it is OK to ask for help (using the support request template), don't be
28
+ disappointed if no one finds the time to answer your question. Stale questions
29
+ (after 90 days) will be closed without a comment.
30
+
14
31
  ## Submit to the correct project
15
32
  Choose the appropriate GitHub project based on your issue:
16
33
 
@@ -0,0 +1,18 @@
1
+ # EatonNetwork Configuration
2
+
3
+ This model uses the command `save_configuration -p <passphrase>` to get the backup config. The `-p` option is a required passphrase used to encrypted sensitive parts of the config data, the encrypted data is nondeterministic and changes with each run. The passphrase used is the auth password for the node.
4
+
5
+ See the [Eaton Network-M3 user's guide](https://www.eaton.com/content/dam/eaton/products/backup-power-ups-surge-it-power-distribution/power-management-software-connectivity/eaton-gigabit-network-card/network-m3/resources/eaton-network-m3-user-guide.pdf) section 7.7.14 (page 260) for more information.
6
+
7
+ To not have the backup change on each for all `eatonnetwork` node run set a model var in the config for the `eatonnetwork` model to [remove secrets](../Configuration.md#removing-secrets):
8
+
9
+ ```yaml
10
+ models:
11
+ eatonnetwork:
12
+ vars:
13
+ remove_secret: true
14
+ ```
15
+
16
+ See the [Eaton Network-M3 user's guide](https://www.eaton.com/content/dam/eaton/products/backup-power-ups-surge-it-power-distribution/power-management-software-connectivity/eaton-gigabit-network-card/network-m3/resources/eaton-network-m3-user-guide.pdf) section 3.20 (page 111) for details on JSON configuration structure, and restoring without sensitive/secrets.
17
+
18
+ Back to [Model-Notes](README.md)
@@ -26,6 +26,7 @@ is the operating system for the newer CX-Series.
26
26
  The Oxidized model is [aoscx](/lib/oxidized/model/aoscx.rb).
27
27
 
28
28
  ## Older Models
29
- Older Devices like ProCurve or 3Com/Comware are listed under the Vendor "HP" in
30
- the [Supported OS Types](docs/Supported-OS-Types.md) list.
29
+ Older Devices like [ProCurve](/lib/oxidized/model/procurve.rb) or 3Com/Comware
30
+ are listed under the Vendor "HP" in the
31
+ [Supported OS Types](/docs/Supported-OS-Types.md) list.
31
32
 
data/docs/Release.md CHANGED
@@ -23,10 +23,12 @@ If you change some code => Restart the release process at the beginning ;-)
23
23
  ## Make sure the file permissions are correct
24
24
  Run `bundle exec rake chmod`
25
25
 
26
- ## Test !
27
- Test the git code and the container against as much device types and environments as you can.
26
+ ## Make sure you pass all GitHub CI
27
+ They test different ruby versions, the docker build process and codeql.
28
28
 
29
- Do not integrate late PRs into master if they do not fix issues for the release. The must wait for the next release.
29
+ ## Test !
30
+ Test the git code and the container against as much device types and
31
+ environments as you can.
30
32
 
31
33
  ## Version numbering
32
34
  Oxidized versions are nummered like major.minor.patch
@@ -75,6 +75,7 @@
75
75
  | |Dell EMC Networking OS10 |[os10](/lib/oxidized/model/os10.rb) | |[Dell EMC Networking OS10](Model-Notes/OS10.md)
76
76
  |D-Link |D-Link |[dlink](/lib/oxidized/model/dlink.rb)
77
77
  | |D-Link cisco like CLI |[dlinknextgen](/lib/oxidized/model/dlinknextgen.rb)
78
+ |Eaton |Gigabit Network Card |[eatonnetwork](/lib/oxidized/model/eatonnetwork.rb) |@thanegill
78
79
  |ECI Telecom |ECIapollo |[eciapollo](/lib/oxidized/model/eciapollo.rb)
79
80
  |EdgeCore |ECS3510, ES3526XA-V2, ES3528M |[edgecos](/lib/oxidized/model/edgecos.rb)
80
81
  |Eltex |Eltex |[eltex](/lib/oxidized/model/eltex.rb)
@@ -113,6 +114,7 @@
113
114
  |Huawei |VRP |[vrp](/lib/oxidized/model/vrp.rb) | |[VRP-Huawei](Model-Notes/VRP-Huawei.md)
114
115
  | |SmartAX series |[smartax](/lib/oxidized/model/smartax.rb) | |[SmartAX-Huawei](Model-Notes/SmartAX-Huawei.md)
115
116
  |Icotera |6400 series |[icotera](/lib/oxidized/model/icotera.rb)
117
+ |Ingate |SIParator/Firewalls |[ingate](/lib/oxidized/model/ingate.rb) |@thanegill
116
118
  |IP Infusion |OcNOS |[ocnos](/lib/oxidized/model/ocnos.rb)
117
119
  |Juniper |JunOS |[junos](/lib/oxidized/model/junos.rb) | |[MX/QFX/EX/SRX/J Series](Model-Notes/JunOS.md)
118
120
  | |ScreenOS (Netscreen) |[screenos](/lib/oxidized/model/screenos.rb)
@@ -169,6 +171,7 @@
169
171
  | |Edgeos |[edgeos](/lib/oxidized/model/edgeos.rb)
170
172
  | |EdgeSwitch |[edgeswitch](/lib/oxidized/model/edgeswitch.rb)
171
173
  | |AirFiber |[airfiber](/lib/oxidized/model/airfiber.rb)
174
+ | |UnifiAP |[unifiap](/lib/oxidized/model/unifiap.rb) |@clifcox |Also suports AirOS, and some Unifi switches
172
175
  |Uplink |EP4440-DP |[EP4440](/lib/oxidized/model/uplinkolt.rb) | |Might support all EP4440 series
173
176
  |VMWare |NSX Edge (configuration) |[nsxconfig](/lib/oxidized/model/nsxconfig.rb)
174
177
  | |NSX Edge (firewall rules) |[nsxfirewall](/lib/oxidized/model/nsxfirewall.rb)
@@ -87,7 +87,8 @@ find an example how to do this under [examples/podman-compose](/examples/podman-
87
87
 
88
88
  ## Git performance issues with large device counts
89
89
  When you use git to store your configurations, the size of your repository will
90
- grow over time. This growth can lead to performance issues. To resolve these issues, you should perform a Git garbage collection on your repository.
90
+ grow over time. This growth can lead to performance issues. To resolve these
91
+ issues, you should perform a Git garbage collection on your repository.
91
92
 
92
93
  Follow these steps to do so:
93
94
 
@@ -97,6 +98,10 @@ Follow these steps to do so:
97
98
  4. Execute the command `git gc` to run the garbage collection
98
99
  5. Restart oxidized - you're done!
99
100
 
101
+ Note that slow performance in oxidized-web when listing the versions of a device
102
+ are due to the necessity to go through the whole git log to search the
103
+ history. See Issue #3121, the fix will come with oxidized version 0.33.0.
104
+
100
105
  ## Oxidized ignores the changes I made to its git repository
101
106
  First of all: you shouldn't manipulate the git repository of oxidized. Don't
102
107
  create it, don't modify it, leave it alone. You can break things. You have
data/extra/rest_client.rb CHANGED
@@ -6,7 +6,7 @@ module Oxidized
6
6
  require 'asetus'
7
7
 
8
8
  class Config
9
- Root = ENV['OXIDIZED_HOME'] || File.join(Dir.home, '.config', 'oxidized')
9
+ ROOT = ENV['OXIDIZED_HOME'] || File.join(Dir.home, '.config', 'oxidized')
10
10
  end
11
11
 
12
12
  CFGS = Asetus.new name: 'oxidized', load: false, key_to_s: true