Remotely Upgrade Multiple Photon OS Machines With Lightwave Client and Photon Management Daemon Installed
After you have a configured the Photon Management Daemon (PMD) on multiple machines, you can remotely upgrade any installed package on these machines.
Upgrade process uses
copenapi_cli that is supported from both Lightwave and Photon Management Daemon. You can initiate the upgrade process from any machine that has Photon Management Daemon installed.
- Have an installed Lightwave server with configured domain controller on it.
- Have installed Lightwave clients that are joined to the domain.
- Have installed Photon Management Daemon on the clients.
To initiate remote upgrade, log in to a Photon OS machine over SSH to install the Photon Management Daemon CLI.
# tdnf install pmd-cli
copenapi_clispec files so that you can specify the machines you want to upgrade and credentials to be used.
.netrcfile to specify machines to be upgraded and credentials for the PMD service.
# vi ~/.netrc
In the file, enter the IP addresses for the machines and administrative credentials, save and close the file.
# machine <IP-address> login <pmd-administrative-user> password <pmd-administrative user-password>
Go to https://raw.githubusercontent.com/vmware/pmd/master/conf/restapispec.json and save the
restapispec.jsonfile locally to the
4. Edit the `restapispec.json` file to enter the IP address of the machine to be upgraded. `# vi /root/restapispec.json` 5. Change the `host` value to the IP address or the hostname of the machine, leave the port number, and save and close the file. `"host":"<ip-address>:2081"`
Initiate the upgrade, in this example of the
sedpackage and wait for the command to complete.
-kto force blind trust of certificates and
-nto use the credentials from the
# copenapi_cli pkg update --packages sed -kn
(Optional) Verify that the client machine package was upgraded successfully.
- Log in to the machine that was upgraded over SSH.
List the installed version of the
# tdnf list installed sed