Search Unity

Unity Accelerator Ubuntu 20.04 Server Headless Install

Discussion in 'Unity Accelerator' started by SideSwipe9th, Jan 18, 2021.

  1. SideSwipe9th

    SideSwipe9th

    Joined:
    Jan 10, 2019
    Posts:
    36
    I'm trying to install Unity Accelerator on my home server, which is running Ubuntu Server 20.04 in headless mode. I have previously set up Unity Accelerator on my work server, running Ubuntu Server 18.04 with no issues, however this was with the older installer.

    Whenever I attempt to run the latest installer, even when querying it for command line parameters with --help I receive the following error:
    Code (CSharp):
    1. /tmp/.mount_unity-6UZrS6/unity-accelerator-app: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory
    As this is a headless server, I do not have X11 beyond what is included in the default Ubuntu Server image. I've tried using the older .run installer copied from my work server, however it is of an older version that doesn't seem to want to auto-update properly, despite my work server's Accelerator being up to date. And unfortunately I cannot seem to find a download archive for the latest version with the old installer which also contains the autoupdate and dashboard.

    Is there a known issue with the new installer when trying to run it on text mode only Linux installs? Is there anything I can do to help debug this further?

    I've also tried running the latest installer on a Ubuntu Desktop. Any attempt to invoke it with the --help parameter launches the GUI installer.
     
  2. SideSwipe9th

    SideSwipe9th

    Joined:
    Jan 10, 2019
    Posts:
    36
    Quick update, I was able to work around this do a degree by doing the following:
    • Install and configure an older version of Unity Accelerator that uses the .run installer
    • Stop the Unity Accelerator service
    • Mount the AppImage with the `--appimage-mount` parameter
    • Extract the `unityaccelerator` binary executable from the mounted installer, and replace the older version at its install path.
    • Restart the Unity Accelerator service

    While these steps resolve my immediate issue of trying to install the latest version of Unity Accelerator on a command line only install of Ubuntu Server, I'm still unable to figure out a way to get the .AppImage installer to install via the command line directly.
     
  3. gregoryh_unity

    gregoryh_unity

    Unity Technologies

    Joined:
    Oct 1, 2018
    Posts:
    50
    Hi!
    I'm sorry for the trouble you ran into -- the manual does not yet reflect the changes brought by the new installer. The new installer is based on Electron and Electron doesn't support headless servers, unfortunately, so we ended up writing a command line only installer, which the gui installer ends up calling.

    For headless installs, automated deploys, etc. you can use the unity-accelerator executable directly to access the command line installer. Instead of downloading the installer, you can download the executable directly:

    Linux: https://accelerator.cloud.unity3d.c...gent?target_os=linux&download_location=manual

    Mac: https://accelerator.cloud.unity3d.c...ent?target_os=darwin&download_location=manual

    Windows: https://accelerator.cloud.unity3d.c...nt?target_os=windows&download_location=manual

    By running `unity-installer install` you can get a quick rundown of the expectations:

    ./unity-accelerator install <install.json>

    Install the accelerator using built-in routines. Recommended steps:
    * Run ./unity-accelerator install --sample install.json to generate a sample install.json file with all the defaults.
    * Edit the install.json to reflect your preferences.
    * Run ./unity-accelerator install --dry-run install.json and evaluate the actions the installer would take.
    * When satisfied, run ./unity-accelerator install install.json to finalize the installation.

    Note that if the <install.json> filename is - then the install data will be read from stdin as a single JSON object.

    Options:
    -? -h --help Output this help text.
    --dry-run Pretend to run the installation, outputting detail on the actions that would be taken.
    --json Output progress details as JSON objects rather than plain text.
    --sample Generate a sample install.json file.
    --skip-admin-check Will skip the admin/root check and continue running as if it had such privileges.

    NOTE for Linux specifically: It is probably best to run the install as root, but set the AsUser item in the install.json file so that the resulting service will run as that regular user you've chosen.
     
    OrinocoE, mlgiardina3, ikriz and 3 others like this.
  4. SideSwipe9th

    SideSwipe9th

    Joined:
    Jan 10, 2019
    Posts:
    36
    Perfect! That's definitely an easier way to set it up than extracting the agent from the AppImage installer. Thank you!

    Could your reply get pinned or added to the release notes, in advance of the documentation being updated? Just so it's easier to find the information :)
     
  5. mlgiardina3

    mlgiardina3

    Joined:
    May 21, 2021
    Posts:
    1
    Can we get an update on this? The documentation is still incorrect and it took me a while to find this and get it figured out.
     
  6. BBlake3

    BBlake3

    Joined:
    Aug 3, 2020
    Posts:
    1
    This does not seem to work for headless Windows installs. It just launches the GUI installer. Tried the above with both Powershell and cmd with no success. Are the command line args different for windows?
     
  7. gregoryh_unity

    gregoryh_unity

    Unity Technologies

    Joined:
    Oct 1, 2018
    Posts:
    50
    It should work fine on Windows. I just gave it a quick try here.

    First I downloaded the exe from the link above https://accelerator.cloud.unity3d.c...nt?target_os=windows&download_location=manual

    That downloaded a unity-accelerator-v1.0.925+g55e634a-windows.exe file -- which you could rename to just unity-accelerator.exe if you want, but I just left it named as is, and then on a cmd:

    Code (CSharp):
    1. C:\Users\User>cd Downloads
    2.  
    3. C:\Users\User\Downloads>"unity-accelerator-v1.0.925+g55e634a-windows.exe"
    4. Unity Accelerator v1.0.925+g55e634a
    5.  
    6. Run on a local network to speed up transactions with Unity Services.
    7. ....
    8. Blah blah help text. ;-)
    9. ...
    10.  
    11. C:\Users\User\Downloads>"unity-accelerator-v1.0.925+g55e634a-windows.exe" install --sample install.json
    12.  
    13. C:\Users\User\Downloads>type install.json
    14. {
    15. ...
    16. Blah blah JSON config file.
    17. ...
    18. }
     
unityunity