Fully Open Edge Cloud

FAQ

How To Generate BOM Of SlapOS And SR
  • Last Update:2022-09-14
  • Version:001
  • Language:en

Q: How to generate BOM of SlapOS node and SR

BOM of SlapOS Node

BOM(slapos-node) is for what slapos-node package ships. It consists of two parts. The first part is a list of Base OS packages that slapos-node requests to be installed when deployed on a minimal base system. For now, this part was handled manually. Which the method is generating an installed packages list before the slapo-node installation. Then deploy slapo-node. After the deployment, generate the installed packages list again. We can compare and diff the two installed packages lists, the newly installed packages were installed by slapos-node. 

Currently, this was done by semi-manual / semi-automatic) (pseudo-code):

  1. Install base-system via debootstrap
     $ debootstrap --verbose bullseye deb11-chroot

  2. Mount necessary directory
    $ mount -t proc /proc deb11-chroot/proc
    $ mount --rbind /dev deb11-chroot/dev
    $ mount --rbind /sys deb11-chroot/sys
     

  3. Enter deb11-chroot
    $ chroot deb11-chroot

  4. List dpkg of current debian system
    dpkg -l > dpkgl.0

  5. Prepare for installing SlapOS node
    $ ip -6 addr add fc01::1/32 dev lo # set up temporary IPv6 without re6st installed
    $ apt install wget
    $ wget https://deploy.rapid.space/slapos

  6. Deploy SlapOS: How To Install SlapOS Node (Comp-123)
    $ bash slapos

  7. List dpkg of current debian system with SlapOS installed
    $ dpkg -l > dpkgl.slapos

  8. Diff the lists
    diff -U0 dpkgl.0 dpkgl.slapos > slapos-bom.txt

BOM of software release

$ git clone https://lab.nexedi.com/nexedi/nxd-bom

$ cd nxd-bom

Usage: nxd-bom software   <path-to-installed-software>
       nxd-bom node       <slapos deploy-script>

In order to do it, we need the .installed.cfg to be present in the package.

Now we have a base OS packages list that requested by SlapOS node and a list of software that slapos-node brings with itself. We need to merge these two outputs.  Later we could improve the nxd-bom to do all those steps automatically.

BOM(ors-amarisoft) was only consists of the software that bring with itself, so we can call nxd-bom to generate it directly:

$ ./nxd-bom software /srv/slapgrid/slappartX # where lists .installed.cfg

We can see the whole result from there, which generated by Kirill:

https://lab.nexedi.com/nexedi/nxd-bom/blob/9273cfb9/example/ors-bom.txt