Using Distrobuilder 2.0 snap

So I have some possibly dumb questions around use of the distrobuilder snap.

I want to use the distrobuilder 2.0 snap to build a custom Oracle 8 LXD image. I have a few questions around that. I was able to successfully install and setup the distrobuilder 2.0 snap on Oracle 8.3 as follows after first installing snapd (which requires the oracle8 epel) :

[ubuntu@o84sv1 ubuntu]$ sudo dnf -y install oracle-epel-release-el8
[ubuntu@o84sv1 ubuntu]$ sudo dnf -y install snapd
[ubuntu@o84sv1 ubuntu]$ sudo systemctl enable --now snapd.socket
[ubuntu@o84sv1 ubuntu]$ sudo ln -s /var/lib/snapd/snap /snap
[ubuntu@o84sv1 ubuntu]$ sudo snap install distrobuilder --classic
[ubuntu@o84sv1 ubuntu]$ distrobuilder --version

So then I went to the distrobuilder How to Use documentation.

However, the “How to Use” seems to be based on the non-snapd installation method (i.e. Installation from Source) and additional searches for information on using the snapd variant of distrobuilder are pretty sparse.

Is there any good documentation for How to Use if you are using the snapd implementation of distrobuilder ?

There is a thread here that suggests a path forward that pretty much covers how to create for example a CentOS 7 LXD image with the snapd distrobuillder so I can probably find my way through with those bits.

However that brings me to my next question.

The jenkins server has had this banner on it that says “Jenkins is going to shut down no further builds will be performed.” That message has been on a red banner at the top of the Jenkins server landing page for as long as I can recall and I just want to understand … does that mean “the Jenkins server is shutting down for a backup” or does it mean that “the Jenkins server is going away permanently.”

If I’m understand the process correctly, the source for the yaml files will the the github here, for example for Oracle Linux here so I am atm planning to pull yaml files from the github.

As a “naive” first cut at creating the aforementioned centos7 LXD using snapd distrobuilder for example:

[root@o84sv1 ~]# distrobuilder build-lxd centos.yaml -o image.architecture=x86_64 -o image.release=7

Error: Failed to get definition: open centos.yaml: no such file or directory
INFO	Removing cache directory

[root@o84sv1 ~]# wget -4

--2021-10-30 10:29:30--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘centos.yaml’

centos.yaml                                                                         [  <=>                                                                                                                                                                                                ] 325.07K  1.17MB/s    in 0.3s    

2021-10-30 10:29:30 (1.17 MB/s) - ‘centos.yaml’ saved [332873]

[root@o84sv1 ~]# distrobuilder build-lxd centos.yaml -o image.architecture=x86_64 -o image.release=7

Error: Failed to get definition: yaml: line 138: mapping values are not allowed in this context
INFO	Removing cache directory
[root@o84sv1 ~]#

When I try the exact same syntax for an Oracle8 build I get that same error at line 138 about “mapping values are not allowed in this context.”

So I’m just trying to get up to speed on using the snapd of distrobuilder (because I work so much on redhat-family linuxes) to build images and I just need some clarification on how to go about building a custom Oracle 8 LXD image, and then also just want to understand the medium- to long-term fate of the Jenkins server.


That downloads a bunch of html, try the following command

wget -4

I cant answer the rest, sorry!

@turtle0x1 I will give it a try and update with results. TY !

@turtle0x1 Your instructions worked perfectly! Thanks!

1 Like