Follow

Replacing a broken device with an existing device

In some cases, you may have an existing device that you wish to re-purpose as a replacement. There are two ways to change the identity of this device:

  • If you have access to the machine via SSH or a screen and keyboard, you can simply uninstall the existing agent, and then following the normal procedure for Replacing a broken device with a new device
  • If you only have access via the existing agent, you can replace the certificate "on the fly" and restart the agent remotely

Replacing the certificate

Same workgroup

If the machine will remain part of the same workgroup, then the upgrade process is quite straightforward:

  • Use the "reissue" option to download a replacement Certificate Pack for the broken device
  • Unzip the certificate pack and locate the "client.crt" and "client.key" files
  • Browse to Devices -> Manage and then click on the existing device that will be replacing the broken device
  • Take a backup of the existing keys using the Remote Shell
    • mkdir /etc/ardexa/keys/old
      cp /etc/ardexa/keys/* /etc/ardexa/keys/old
  • Use the "Send Files" tab to upload "client.crt" and "client.key" to "/etc/ardexa/keys/"
  • Restart the agent by opening the Configuration -> General tab and click the Restart Agent button
    • The existing device will go offline and the broken device will come online

Different workgroup

If the machine will change workgroups, then the upgrade process is a little trickier:

  • Use the "reissue" option to download a replacement Certificate Pack for the broken device
  • Unzip the certificate pack and locate the "client.crt" and "client.key" files
  • Browse to Devices -> Manage and then click on the existing device that will be replacing the broken device
  • Take a backup of the existing keys using the Remote Shell
    • mkdir /etc/ardexa/keys/old
      cp /etc/ardexa/keys/* /etc/ardexa/keys/old
  • IMPORTANT You MUST update the workgroup ID in the agent configuration files. Open the Remote Shell and run the following command. The syntax is very specific, so where possible, please copy and paste this command into your Remote Shell, replacing the "###" with the workgroup ID of the broken device.
    • sed -i 's/vhost: .*/vhost: ###/' /etc/ardexa/ardexa.yaml*
  • Double check that the configuration has been updated using the following command (you should see the new workgroup ID in the output)
    • grep vhost /etc/ardexa/ardexa.yaml*
  • Use the "Send Files" tab to upload "client.crt" and "client.key" to "/etc/ardexa/keys/"
  • Restart the agent by opening the Configuration -> General tab and click the Restart Agent button
    • The existing device will go offline
    • Switch over to the target workgroup and you should see the broken device is now online

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.