Beautify code and log messages

This commit is contained in:
tigerblue77 2022-04-11 20:38:11 +02:00
parent 67c7f905bf
commit 6731fe48b8
6 changed files with 82 additions and 50 deletions

View file

@ -1,10 +1,34 @@
# IDRAC Fan Controller Docker Image
To use,
- `IDRAC_HOST` parameter can be set to "local" or to your distant iDRAC's IP address. Default value is "local".
- `IDRAC_USERNAME` parameter is only necessary if you're adressing a distant iDRAC. Default value is "root".
- `IDRAC_PASSWORD` parameter is only necessary if you're adressing a distant iDRAC. Default value is "calvin".
- `FAN_SPEED` parameter can be set as a decimal or hexadecimal value (0x00 to 0x64). Default value is 5 (%).
`docker run -e IDRAC_HOST=<host ip> -e IDRAC_USER=<username> -e IDRAC_PW=<password> -e FAN_SPEED=<dec or hex fan speed> alombardo4/idrac-fan-control:latest`
To use:
`FAN_SPEED` can be set as a decimal or hexadecimal value (0x00 to 0x64). Default value is 5 (%).
1. with local iDRAC:
```bash
docker run -d \
--name Dell_iDRAC_fan_controller \
--restart unless-stopped \
-e FAN_SPEED=<dec or hex fan speed> \
alombardo4/idrac-fan-control:latest
```
2. with LAN iDRAC:
```bash
docker run -d \
--name Dell_iDRAC_fan_controller \
--restart unless-stopped \
-e IDRAC_HOST=<iDRAC host IP> \
-e IDRAC_USERNAME=<iDRAC username> \
-e IDRAC_PASSWORD=<iDRAC password> \
-e FAN_SPEED=<dec or hex fan speed> \
alombardo4/idrac-fan-control:latest
```
`docker-compose.yml` examples:
@ -16,6 +40,7 @@ version: '3'
services:
Dell_iDRAC_fan_controller:
image: alombardo4/idrac-fan-control
container_name: Dell_iDRAC_fan_controller
restart: unless-stopped
environment:
- IDRAC_HOST=local # can be omitted as it is the default value
@ -32,10 +57,11 @@ version: '3'
services:
Dell_iDRAC_fan_controller:
image: alombardo4/idrac-fan-control
container_name: Dell_iDRAC_fan_controller
restart: unless-stopped
environment:
- IDRAC_HOST=192.168.1.100 # override to the IP of your IDRAC
- IDRAC_USER=root # set to your IPMI username
- IDRAC_PW=calvin # set to your IPMI password
- IDRAC_HOST=192.168.1.100 # override to the IP address of your IDRAC
- IDRAC_USERNAME=root # set to your IPMI username
- IDRAC_PASSWORD=calvin # set to your IPMI password
- FAN_SPEED=0x05 # set to the decimal or hexadecimal value you want to set the fans to (from 0 to 100%)
```