Boot Image - Python 2.7/3.5

  1. 2 years ago

    Hi there!
    I was wondering if it is possible (easy within reason xD ) to add python 2.7/3.5 to the boot image for advanced scripting with the possibility to access an API (or MySQL db directly)?

    Our company sells/lease PC cash registers and when we lease cash registers there are a bunch of settings that has to be done on each machine. Today we are using CD to deploy a standard image for each PC and CD makes sure they always get the same Computer Name. After that we set all the other settings manually.

    P.S. The rest of our backend system is running on python and flask API.

  2. clonedeploy

    7 Jun 2016 Administrator

    I should be able to get it in depending on how large it ends up being. It will need to wait until the next release though.

  3. Thanks for the quick reply!

    Until you are able to add it to the boot image... :)
    Is it possible to use files/folders to upload a freezed python executable and run it from an imaging script?
    or would i be using it in the wrong way?

  4. clonedeploy

    7 Jun 2016 Administrator

    Using files / folders will always place the contents onto a set partition of the imaged computer. It won't put it in the boot image, I think that would be overkill anyway. I would just put the files on your CloneDeploy smb share, you can then access them easily from your imaging script since the smb share is already mounted at /storage. The big question is will the python executable run from the boot image being an embedded linux version with busybox.

  5. clonedeploy

    7 Jun 2016 Administrator

    The easiest way to test things like this.

    1. Pxe boot to client console
    2. export task=ond
    3. cd /etc/init.d
    4. ./S99cd
    5. Login if prompted
    6. Start a deploy task from the on demand menu
    7. After the smb share is done connecting press ctrl+c
    8. You'll be back at the shell where you can test away
  6. I will try this ASAP.

    Do you have some more information on how you created/modified the boot image for CloneDeploy. ex. if you based it on someones work or created it from scratch? I am going to read some more into how i would embed python into/beside the boot image or deployment process.

  7. clonedeploy

    8 Jun 2016 Administrator

    it was created from buildroot
    https://buildroot.org/

    I want to get documentation for it done but it is a mess right now. There are many utilities I could not get to compile with buildroot so I have statically compiled them and added them later.

 

or Sign Up to reply!