Can I use some kind of script to create image and ghost my lab machines



  • Server
    • FOG Version: Latest
    • OS: Centos7
    Client
    • Service Version: What is this?
    • OS: Windows 10
    Description

    I’m using trying to use fog for test automation with Jenkins

    1. So I need a way to ghost machines using a Jenkins job (using some script such as python, bash or batch script).
    2. Secondly I need to create a new image of the current host by running some script in the host. (first I install my product, create image and ghost other machines to reduce the installation failures).

    Someone achieve point 1 and 2, appreciate you assist
    Thank you!


  • Moderator

    This is possible if we directly interact with the database and certain specific fog web files.

    We can query the DB to get the ID of the host using it’s name, and create a job in the DB. Then, we call the below link to do a WOL.
    http://x.x.x.x/fog/management/index.php?sub=wakeEmUp&mac=aa:bb:cc:dd:ee:ff

    I’ve been planning on doing something like this at my house for automated testing purposes - and I’d be glad to work out the details with you here.


  • Senior Developer

    Right now I am not sure this is possible. I know we are working on having an API level system in the future but as far as one that just works out the box right now is not in place.

    That said, somebody did kind of help provide an similar type system that was based on python. I’m certain it probably doesn’t work right out the gate anymore.

    https://github.com/JC-SoCal/pyFog


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.