![Logo](images/Eaton_Corporation_logo.png)
Install and run Eaton® Intelligent Power® Protector onto a Debian docker container!
Explore the official Eaton® IPP documentation »
Report Bug
·
Request Feature
Table of Contents
"Eaton® Intelligent Power® Protector (IPP) is protection software that gracefully shuts down local computers and servers powered by a UPS in the event of a power outage."
Eaton® IPP is distributed on their download page for multiple platforms. However, a dockerised instance of IPP may be necessary if:
- You want to run IPP on an unsupported CPU architecture (arm/aarch64 for instance).
- You don't want, or can't install IPP directly on the target host, and prefer to offload it on a Docker node.
This repository contains a Dockerfile which installs and runs Eaton® IPP on the latest Debian container using their official deb installer package, as well as some utilities.
- AMD64 platform architecture, or emulate it
- git
- Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
docker build https://github.com/Mavyre/eaton-ipp-docker.git
OR
git clone https://github.com/Mavyre/eaton-ipp-docker.git
cd eaton-ipp-docker
docker build -t eaton-ipp .
When upgrading from app version prior to 1.72, the mount path inside the container changed.
Eaton IPP now resides in /usr/local/eaton/IntelligentPowerProtector
instead of /usr/local/Eaton/IntelligentPowerProtector
(notice the lower-case eaton
folder).
All mounted volume paths need to be adjusted.
Depending on the location of your shutdown script, you might need to update the path to it in Eaton IPP shutdown action as well.
docker run -d --net host -v ~/ipp/db:/usr/local/eaton/IntelligentPowerProtector/db -v ~/ipp/configs:/usr/local/eaton/IntelligentPowerProtector/configs --name eaton-ipp Mavyre/eaton-ipp
Launching the docker within the host namespace allows IPP to easily scan the network for UPSes, receive the shutdown signals and connect to the host to shut it down.
If the shutdown target is not the host, you can run the docker with -p 4679:4679 -p 4680:4680 -p 4679:4679/udp -p 4680:4680/udp
instead of --net host
.
The two folders db
and configs
are mapped on host to retain IPP configurations and database.
The easiest way with --net host
is to use a shutdown script and SSH:
- Prepare a shutdown script that connects to localhost.
shutdown.example.sh
can be used as a template.- The user must have sudo access to the
poweroff
command without password in/etc/sudoers
:
username ALL = (root) NOPASSWD: /usr/sbin/poweroff
- The user must have sudo access to the
- Eaton IPP enforces shutdown scripts to be located in its
/usr/local/eaton/IntelligentPowerProtector/configs/actions
folder, so put the script in~/ipp/configs/actions
- Allow the script to be executed in the container:
docker exec eaton-ipp chmod u+x /usr/local/eaton/IntelligentPowerProtector/configs/actions/shutdown.sh
- In IPP, under Settings, Shutdown, Edit shutdown configuration:
- Shutdown type: Script
- Shutdown script:
/usr/local/eaton/IntelligentPowerProtector/configs/actions/shutdown.sh
Each time a shutdown will be triggered by the UPS, the shutdown.sh
script will be executed by IPP and shut down the host using SSH.
IPP is not natively compatible with arm/aarch computers. If you want to run it anyway, you need to emulate the AMD64 architecture.
⚠️ Disclaimer: When emulating, IPP might be slow and eat a lot of resources even when idle.
You can enable the AMD64 emulation using the awesome helper by tonistiigi:
sudo docker run --privileged --rm tonistiigi/binfmt --install amd64
Next, run the docker using AMD64:
docker run -d --platform linux/amd64 --net host -v ~/ipp/db:/usr/local/eaton/IntelligentPowerProtector/db -v ~/ipp/configs:/usr/local/eaton/IntelligentPowerProtector/configs --name eaton-ipp Mavyre/eaton-ipp
Even if the container is run with the --restart
flag, it will not restart after a reboot.
The AMD64 emulation must be re-enabled before starting the IPP container.
In a Debian environment, the simple solution is to create a systemd
service.
First, stop the docker container:
docker stop eaton-ipp
Copy ipp.service
into /etc/systemd/system
. Then, enable the service on boot, and start IPP:
systemctl enable ipp
systemctl start ipp
The service will re-enable the AMD64 emulation before starting the IPP container at each reboot.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
The docker is distributed under the MIT License. See LICENSE.txt
for more information.
Eaton® Intelligent Power® Protector is distributed under its own EULA that you must read and accept prior using it.
- Thanks to both dersimn and ytzelf for their Eaton IPP containers that helped a lot to create this one
- othneildrew for their awesome Best README template which I recommended to kickstart any Readme file!