• Hello FOG Team,

    I am using the postdownload scripts a lot after our ubuntu installations for hostname change, setting up fixed ips, adding the machine to the AD and very basic settings setup.

    Now we would like to use those scripts on already imaged machines to update those as well after imaging.

    So my thought was to create a git repository containing the scripts and either the postdownload script would pull the latest code and run it or we can pull it and run it manually.

    Do you have an idea how to make git work within FOS in case it is possible?

    My alternative idea would be to make the git repository available via nfs and on the FOG server install a cronjob updating the repo every 5 minutes or so. But I don’t really like that workaround since the update frequency is quite low 🙂

    I am also open for alternatives 🙂

    Best,
    Markus


  • @george1421 @Sebastian-Roth I just wanted to let you know that I moved to snapins and never regreted it for one second 🙂
    It is indeed much more flexible and involves way less maintenance on FOG updates.

    Thanks again!


  • @Sebastian-Roth I successfully finished the FOS kernel build including git 🙂
    I started with the FOS 1.5.9 TAG. I already started the build before I read your message.

    I installed the following packages:

    • CA Certificates <- Necessary for git https authentification
    • git
    • git-crypt <- We use this, so I was happy it is as easy as checking it 🙂

    And things work great 🙂
    Thank you for the guidance! It was actually very straight forward.

    @george1421 Thank you for the input. As far as I understand it is required to have the FOG client up and running in order to deploy snapins? That actually might be something I will look into as well!
    Actually during the FOS rebuild I had a similar idea, but instead of using snapins I was thinking of chrooting into the deployed system and run everything from there.
    However, I am not sure if that would be a robust solution.

  • Moderator

    @mstabrin I’m wondering if you are going about this from a wrong direction. Why not use rsync to keep your files in sync between your repository and the local server. If you use rsync or git for that matter, if you deployed as a snapin you would use rsync or git from your linux distro then would not need to add it to FOS Linux. It would only need to be in fos linux if you needed it to sync during imaging. (I need to check but I think rsync is already in FOS Linux).

    If you didn’t want to deploy via snapin just create a cron job that runs once a days to “freshen” the local files to your repo. With rsync only the changed files would be sync’d on each run.

  • Senior Developer

    @mstabrin said in Using git inside FOS:

    Something I need to be careful about regarding the git FOS version? When I use FOG 1.5.9 the latest master branch is ok I guess?

    Yes, latest master branch of the fos repo should be fine. I have to say that I updated to a newer buildroot version a day ago which is not yet tested much. But as it’s just an update to buildroot’s latest LTS version I don’t think there is much to possibly go wrong with that. I will release that for dev-branch soon as well.


  • @Sebastian-Roth I totally understand why you would not want that in the official release 🙂

    But I think that this really sounds like a great solution for my case! I will test it as soon as possible:)

    Something I need to be careful about regarding the git FOS version? When I use FOG 1.5.9 the latest master branch is ok I guess?

    Best, Markus

  • Senior Developer

    @mstabrin While I can see why you would want to have that I am not too keen to add this to the official FOS inits because I imagine they will grow a fair bit when git is added and most people don’t use it.

    But you are free and welcome to compile your own inits and enable git to be added. Start by cloning the fos repo to some machine with CPU and RAM power and at least 20 GB of disk space available. Then change into that directory and run ./build.sh -f -a x64 - it starts downloading and preparing stuff for you. Then it will ask if you want to edit the configuration. Say y(es) here and you will get to a blue screen menu setup. Navigate to Target Packages -> Development Tools and enbale git (hit space key). Then choose EXIT (right arrow key + ENTER) three times to get back and confirm saving config changes. Then again say y(es) to let it start building.

    Will take 90 minutes on a powerful machine and heaps longer on a normal consumer laptop.

    If it all works out you should have a fresh compiles 64 bit FOS init file in …/fos/dist/init.xz to use on your FOG server.

329
Online

8.2k
Users

15.1k
Topics

141.9k
Posts