Skip to content

Commit a67997a

Browse files
committed
Merge branch 'develop' into release/v1.9.0
2 parents f6cb915 + 32e92cb commit a67997a

File tree

8 files changed

+631
-0
lines changed

8 files changed

+631
-0
lines changed

.github/workflows/amplify.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: Amplify Security
3+
on:
4+
pull_request: {}
5+
workflow_dispatch: {}
6+
push:
7+
branches: ["main"]
8+
9+
permissions:
10+
contents: read
11+
id-token: write
12+
13+
jobs:
14+
amplify-security-scan:
15+
name: Amplify Security Scan
16+
runs-on: ubuntu-latest
17+
if: (github.actor != 'dependabot[bot]')
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Amplify Runner
22+
uses: amplify-security/[email protected]

.github/workflows/ci.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: CI
3+
4+
"on":
5+
pull_request: {}
6+
push:
7+
branches: ["main"]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
11+
cancel-in-progress: true
12+
13+
defaults:
14+
run:
15+
shell: bash
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
vagrant-deploy:
22+
runs-on: ubuntu-22.04
23+
steps:
24+
- uses: actions/checkout@v4
25+
- run: sudo apt install nfs-kernel-server
26+
- run: sudo pipx inject ansible-core jmespath netaddr
27+
- run: ansible-galaxy install geerlingguy.ntp
28+
- name: setup vagrant
29+
run: |
30+
# Copyright The containerd Authors
31+
#
32+
# Licensed under the Apache License, Version 2.0 (the "License");
33+
# you may not use this file except in compliance with the License.
34+
# You may obtain a copy of the License at
35+
#
36+
# http://www.apache.org/licenses/LICENSE-2.0
37+
#
38+
# Unless required by applicable law or agreed to in writing, software
39+
# distributed under the License is distributed on an "AS IS" BASIS,
40+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
41+
# See the License for the specific language governing permissions and
42+
# limitations under the License.
43+
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
44+
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
45+
sudo sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
46+
sudo apt-get update
47+
sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant
48+
sudo systemctl enable --now libvirtd
49+
sudo usermod -aG libvirt ${USER}
50+
sudo apt-get build-dep -y vagrant ruby-libvirt
51+
sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
52+
vagrant plugin install vagrant-libvirt
53+
- run: >
54+
sudo -E -u ${USER}
55+
ANSIBLE_STDOUT_CALLBACK=debug
56+
ANSIBLE_DISPLAY_SKIPPED_HOSTS=no
57+
ANSIBLE_DISPLAY_OK_HOSTS=no
58+
DEBIAN_FRONTEND=noninteractive
59+
PATH=$PIPX_BIN_DIR:$PATH
60+
vagrant up --no-tty || true

.yamllint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
yaml:
3+
rules:
4+
line-length:
5+
max: 120

README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,9 @@ of the `ops` group. Read the **User and ACL Management** section for more info.
218218
The backend needs to be supported by [Proxmox][pvesm]. Read the **Storage
219219
Management** section for more info.
220220

221+
`pve_metric_servers` allows you to configure a metric server for the PVE cluster.
222+
This is useful if you want to use InfluxDB, Graphite or other (with telegraf).
223+
221224
`pve_ssh_port` allows you to change the SSH port. If your SSH is listening on
222225
a port other than the default 22, please set this variable. If a new node is
223226
joining the cluster, the PVE cluster needs to communicate once via SSH.
@@ -386,6 +389,7 @@ pve_check_for_kernel_update: true # Runs a script on the host to check kernel ve
386389
pve_reboot_on_kernel_update: false # If set to true, will automatically reboot the machine on kernel updates
387390
pve_reboot_on_kernel_update_delay: 60 # Number of seconds to wait before and after a reboot process to proceed with next task in cluster mode
388391
pve_remove_old_kernels: true # Currently removes kernel from main Debian repository
392+
# pve_default_kernel_version: # version to pin proxmox-default-kernel to (see https://pve.proxmox.com/wiki/Roadmap#Kernel_6.8)
389393
pve_pcie_passthrough_enabled: false # Set this to true to enable PCIe passthrough.
390394
pve_iommu_passthrough_mode: false # Set this to true to allow VMs to bypass the DMA translation. This might increase performance for IOMMU passthrough.
391395
pve_iommu_unsafe_interrupts: false # Set this to true if your system doesn't support interrupt remapping.
@@ -420,6 +424,7 @@ pve_roles: [] # Added more roles with specific privileges. See section on User M
420424
pve_groups: [] # List of group definitions to manage in PVE. See section on User Management.
421425
pve_users: [] # List of user definitions to manage in PVE. See section on User Management.
422426
pve_storages: [] # List of storages to manage in PVE. See section on Storage Management.
427+
pve_metric_servers: [] # List of metric servers to configure in PVE.
423428
pve_datacenter_cfg: {} # Dictionary to configure the PVE datacenter.cfg config file.
424429
pve_domains_cfg: [] # List of realms to use as authentication sources in the PVE domains.cfg config file.
425430
pve_no_log: false # Set this to true in production to prevent leaking of storage credentials in run logs. (may be used in other tasks in the future)
@@ -835,6 +840,64 @@ Then system interrupt remapping is supported and you do not need to enable unsaf
835840

836841
`pve_pcie_report_msrs` can be used to enable or disable logging messages of msrs warnings. If you see a lot of warning messages in your 'dmesg' system log, this value can be used to silence msrs warnings.
837842

843+
## Metrics Server Configuration
844+
845+
You can configure metric servers in Proxmox VE using the `pve_metric_servers` role variable. Below is an example configuration for different types of metric servers:
846+
847+
```yaml
848+
pve_metric_servers:
849+
- id: influxdb1
850+
port: 8086
851+
server: influxdb.example.com
852+
type: influxdb
853+
protocol: http
854+
organization: myorg
855+
bucket: mybucket
856+
token: mytoken
857+
timeout: 30
858+
max_body_size: 25000000
859+
verify_certificate: true
860+
- id: graphite1
861+
port: 2003
862+
server: graphite.example.com
863+
type: graphite
864+
protocol: tcp
865+
path: mygraphitepath
866+
mtu: 1500
867+
```
868+
869+
### Configuration Variables
870+
871+
- `id`: (required) Unique identifier for the metric server.
872+
- `port`: (optional) Port of the metric server. Default is `8089`.
873+
- `server`: (required) DNS name or IP address of the metric server.
874+
- `type`: (optional) Type of metric server. Possible values: `influxdb`, `graphite`. Default is `influxdb`.
875+
- `protocol`: (optional) Protocol used to send metrics. Possible values: `udp`, `tcp`, `http`, `https`. Default is `udp`.
876+
- `disable`: (optional) Disable the metric server. Default is `false`.
877+
- `organization`: (optional) Organization name. Available only for influxdb with the http v2 API.
878+
- `bucket`: (optional) Bucket name for influxdb. Useful only with the http v2 API or compatible.
879+
- `token`: (optional) InfluxDB access token. Required only when using the http v2 API.
880+
- `path`: (optional) Graphite root path. Available only for graphite.
881+
- `api_path_prefix`: (optional) API path prefix inserted between `<host>:<port>/` and `/api2/`. Useful if the InfluxDB service is running behind a reverse proxy. Available only for influxdb with the http v2 API.
882+
- `timeout`: (optional) Timeout in seconds. Available only for influxdb with the http v2 API or Graphite TCP socket.
883+
- `max_body_size`: (optional) Maximum body size in bytes. Available only for influxdb with the http v2 API. Default is `25000000`.
884+
- `mtu`: (optional) MTU for UDP metric transmission.
885+
- `verify_certificate`: (optional) Verify SSL certificate. Available only for influxdb with https.
886+
887+
## Non-default scenarios and other use cases
888+
889+
### Preventing upgrade to Linux kernel 6.8
890+
891+
Proxmox 8.2 introduces Linux 6.8, which may cause issues in some deployments.
892+
To work around this, you can pin the kernel version used to 6.5 by adding the following role variable:
893+
894+
```yaml
895+
pve_default_kernel_version: 1.0.1
896+
```
897+
898+
This creates a pin on the `proxmox-default-kernel` package, which is [the method suggested by PVE](https://pve.proxmox.com/wiki/Roadmap#Kernel_6.8).
899+
It can be later removed by unsetting this role variable.
900+
838901
## Developer Notes
839902

840903
When developing new features or fixing something in this role, you can test out
@@ -878,6 +941,7 @@ John Marion ([@jmariondev](https://github.com/jmariondev))
878941
foerkede ([@foerkede](https://github.com/foerkede)) - ZFS storage support
879942
Guiffo Joel ([@futuriste](https://github.com/futuriste)) - Pool configuration support
880943
Adam Delo ([@ol3d](https://github.com/ol3d)) - PCIe Passthrough Support
944+
Antoine Thys ([@thystips](https://github.com/thystips)) - Metric Servers Support
881945

882946
[Full list of contributors](https://github.com/lae/ansible-role-proxmox/graphs/contributors)
883947

defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pve_check_for_kernel_update: true
88
pve_reboot_on_kernel_update: false
99
pve_reboot_on_kernel_update_delay: 60
1010
pve_remove_old_kernels: true
11+
# pve_default_kernel_version:
1112
pve_run_system_upgrades: false
1213
pve_run_proxmox_upgrades: true
1314
pve_pcie_passthrough_enabled: false
@@ -56,6 +57,7 @@ pve_groups: []
5657
pve_users: []
5758
pve_acls: []
5859
pve_storages: []
60+
pve_metric_servers: []
5961
pve_ssh_port: 22
6062
pve_manage_ssh: true
6163
pve_hooks: {}

0 commit comments

Comments
 (0)