Update PEG

Use the following instructions to update PEG to the latest version.

Prerequisites

Review the following considerations before updating the PEG version:
  • The current version of the PEG installation.
  • The Operating System (OS) version that the PEG is currently using.

    Run ssh in the PEG to retrieve the OS version.

    Note: If you see 18.04 as the Ubuntu OS version, then it is recommended that you get the latest PEG image and start a new configuration rather than updating the PEG version. The most recent PEG image is based on Ubuntu 20.04.
  • The Keys and Certificates that must be deployed for updating the PEG version.

Procedure

  1. Use the following instructions to test if PEG can access the required update files from the cloud storage:
    1. SSH into your PEG Virtual Machine (VM).
    2. Create a directory that will contain the update files.
      For example, mkdir update.
    3. Use the following command to navigate into the update directory:
      cd update
    4. Download the update_peg.rb script using the following command:
      curl "https://fiqpeg.blob.core.windows.net/updates/update_peg.rb?si=get_updates&sv=2020-08-04&sr=c&sig=vVI3fmLfJyu2zsCC9nxhxUKBhsgkp5K5DnrFCDQJ4CE%3D" -o update_peg.rb
      • If the above command was successful, PEG VM must be able to download all of the required files for the update. Review step 2 for instructions.
      • If the command times out or fails in any way, the PEG VM cannot download the update files directly. Review step 3 for instructions.
  2. If the above command was successful, use the following instructions to download the PEG update file directly to the PEG VM:
    1. Ensure that you are in the directory of PEG that you had previously created.
      Use the cd update command to get to the directory.
    2. Use the following command in order to make the update script executable:
      chmod ugo+x update_peg.rb
    3. Run the following update script:
      ./update_peg.rb
      This script will not update the PEG but will only download all the dependent files for the update.
      Note:
      By default, update_peg.rb downloads the update files from United States server. However, If the download times out or you encounter an error, you can download it from the Australia server by using the following command to switch the country:
      /update_peg.rb --country au
      If the download was successful, You have all files needed for the upgrade message is displayed.
    4. Run the following update script:
      ./update_peg.rb --upgrade-peg
      This can take a while (about an hour or less).
      Note: If the script fails before the update completes, do not run it again. Contact Automation Anywhere support for assistance.
      If the update was successful, an Update done message appears.
  3. If the PEG is unable to access the required update files from the cloud storage, use the following instructions to download the file outside the PEG VM:
    1. Run the following command on a Windows machine with curl (for example, Windows 10) or a Linux machine that has access to a public internet:
      curl "https://fiqpeg.blob.core.windows.net/updates/update_peg.rb?si=get_updates&sv=2020-08-04&sr=c&sig=vVI3fmLfJyu2zsCC9nxhxUKBhsgkp5K5DnrFCDQJ4CE%3D" -o update_peg.rb
      Note: If the above command fails or times out, you need not access the PEG update files. Try another machine that has outbound https port 443 access to fiqpeg.blob.core.windows.net.
    2. If the above command was successful, copy the downloaded update_peg.rb to the update folder in your PEG VM.
    3. Sign in to PEG.
    4. Use the following command to navigate to the update folder:
      cd update
    5. Use the following command in order to make the update script executable:
      chmod ugo+x update_peg.rb
    6. Use the following command to run the update script:
      ./update_peg.rb
      The update script will create a ./download_peg_updates.sh file. Run this script on a machine that can access the public internet you used earlier. If it is a windows machine, you can copy the contents of the ./download_peg_updates.sh file and run those curl commands.
    7. Copy all the files that were downloaded into the update folder in your PEG VM.
    8. Repeat the step c and g until ./update_peg.rb completes with a message You have all files needed for the upgrade.
      Note: You might have to repeat these steps multiple times as with each file you add to the update directory, the update_script.rb learns new info about what other update files are required. Typically, you have to run through this cycle of steps three times before the update script has the necessary files for the update.
    9. When the above step is successful, run the following update script:
      ./update_peg.rb --upgrade-peg
      This can take a while (about an hour or less).
      If the update was successful, an Update done message appears.