This container is designed to run from either Docker Compose or a container manager, like Portainer.
Modify the docker-compose.yml file. Make sure to change:
- Environment Variable NEW_ROOT_PASSWORD.
- Location of your corosync-data (to retain configuration across restarts, etc.).
- Location of your root homedir (to retain Proxmox SSH keys in authorized_keys).
- Hostname.
- Local network information.
parent (the ethernet device to bind macvlan)
ipv4_address
subnet
ip_range
gateway
In the location for your persistent storage, make sure to create the directories for the root homedir and the corosync-data.
For the storage location of "corosync-data" and "roothome", DO NOT use a path in /opt, /usr etc. Create a separate directory for proxmox-qdevice under one of your storage volumes.
Directories like /opt get erased across Synology DSM updates. Ask me how I know. ;)
You can either run the command:
docker compose up -d
Or cut and paste the docker-compose.yml into portainer.io as a stack and then deploy.
The very first time that you run the container, this will seemingly fail. It runs, but corosync-qnetd will fail to start. Refer to issue 5, or the "Completing setup" section below.
- Build your Proxmox cluster.
- Run the
proxmox-qdevicecontainer via Docker Compose.
Then fFollow the setup instructions on the Proxmox site, which means:
- Install the
corosync-qdevicepackage on all real cluster nodes. - Ensure that all cluster nodes can SSH to the container; I did
ssh_copy_id root@${qdeviceIP}. - Run
pvecm qdevice setup ${IPAddress}on one of the real cluster nodes. - Once that is done, restart the
proxmox-qdevicecontainer. This time, corosync-qnetd will startup correctly as it now has a full database and configuration.
This container installs and configures a sshd server that permits root logins. Proxmox runs in the same configuration. Upon startup, if the environment variable NEW_ROOT_PASSWORD exists the root password will be set to the value of that variable upon boot. You can specify what the root password should be setting the value of NEW_ROOT_PASSWORD to a password in one of the following ways:
- If you are using a container manager, such as portainer, set the environment variable NEW_ROOT_PASSWORD to your specified root password. This variable should get passed to the container.
- Follow one of the Docker provided ways documented in how to "Set environment variables within your container's environment". Please note that one of the ways described is setting the password in the docker-compose.yml (or the stack) in the environment section (i.e. hardcoding it). If you hardcode the password like this, you can expose the password. You have been warned.
Please note that all of the ways listed above to set the environment above should survive the recreation of the container.
Important
It is not recommended to use the latest (unixerius/proxmox-qdevice, unixerius/proxmox-qdevice:latest) tag for production setups.
Those tags point might not point to the latest commit in the master branch. They do not carry any promise of stability, and using them will probably put your proxmox-qdevice setup at risk of experiencing uncontrolled updates to non backward compatible versions (or versions with breaking changes). You should always specify the version you want to use explicitly to ensure your setup doesn't break when the image is updated.
This container installs and configures a sshd server that permits root logins. Proxmox runs in the same configuration. Upon startup, if the environment variable NEW_ROOT_PASSWORD exists the root password will be set to the value of that variable upon boot. You can specify what the root password should be setting the value of NEW_ROOT_PASSWORD to a password in one of the following ways:
- If you are using a container manager, such as portainer, set the environment variable NEW_ROOT_PASSWORD to your specified root password. This variable should get passed to the container.
- Follow one of the Docker provided ways documented in how to "Set environment variables within your container's environment". Please note that one of the ways described is setting the password in the docker-compose.yml (or the stack) in the environment section (i.e. hardcoding it). If you hardcode the password like this, you can expose the password. You have been warned.
Please note that all of the ways listed above to set the environment above should survive the recreation of the container.