How to automate installation testing with a configuration management software?

Forum / NoMachine for Linux / How to automate installation testing with a configuration management software?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12150
    alphonse
    Participant

    Hello all,

    I use https://en.wikipedia.org/wiki/Salt_(software) to automate nx installation and configuration, and I would like to test that everything went fine by automatically launching a nx session.

    However, I cannot find CLI options that I could provide to nxplayer to do that, neither return codes that could help me test if everything is working.

    Is there a recommended way to do it? How would you script it?

    Thank you very much in advance, Regards,

    Erick

    #12171
    nars
    Contributor

    Hello alphonse,

    to start session automatically you may use the command:

    “<NoMachine directory>/bin/nxplayer –session <nxs file>”

    where NoMachine directory is for example /usr/NX on linux and ‘nxs’ is a connection file generated in <home dir>/NoMachine (or <home dir>/Documents/NoMachine on Windows) every time when you create a new connection using nxplayer.

    Let’s configure nxs file to automatically connect to session – create new connection (nxs file) by clicking “new” in “recent connections” nxplayer view. Connect to server using it, type user credentials and check “save this password in connection file”. If you want to run new session, go to “New desktop”, select “Save this setting in the connection file” and create a session. If you want to connect to physical session then you have to install a version which doesn’t include virtual sessions feature – for example free or enterprise-desktop – then you will automatically connect to physical session when connect to server. It is not possible to connect to physical session directly if thw product contains the feature for creating new sessions on server. You can find more information about modifing nxs files here -> https://www.nomachine.com/DT02M00075

    After every reinstallation of NoMachine, nxplayer will need verification of host authenticity. You may copy certificates using script by adding to <home dir>/.nx/config/client.crt a certificate from server side located in <NX directory>/etc/keys/host/nx_host_rsa_key.crt file. In file, before certificate you should put information about server IP, ex.:

     

    Host:10.0.1.2

    —–BEGIN CERTIFICATE—–

    <certificate>

    —–END CERTIFICATE—–

     

    Nxplayer started from the command line doesn’t return any code. You may check if connection was established correctly by greping in nxplayer logs (session and connection files located in <home directory>/.nx/R-<nxplayer pid>-XXXXXXX)

    I recommend also to look at <home directory>/.nx/config/player.cfg file, you may change a lot of nxplayer settings here.

     

    Regards.

    #12251
    alphonse
    Participant

    Hello nars,

    Thank you so much, this is very useful. I will try it right away!

    And sorry for the delay, I did not get any notification. I though I checked.

    Regards

Viewing 3 posts - 1 through 3 (of 3 total)

This topic was marked as solved, you can't post.