ELBE Overview: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
Prepare for ELBE docker container
Prepare for ELBE docker container
Line 54: Line 54:


<!--
<!--
===Docker container===
===Premade Docker container===


We created docker container images with ELBE preinstalled, these can be found at [https://hub.docker.com/r/dhelectronics/elbe Docker Hub] under the name dhelectronics/elbe. There are two different versions of container tags available:
We created docker container images with ELBE preinstalled, these can be found at [https://hub.docker.com/r/dhelectronics/elbe Docker Hub] under the name dhelectronics/elbe. There are two different versions of container tags available:
Line 60: Line 60:
{| class="wikitable"
{| class="wikitable"
|-
|-
! Tag !! Meaning
! Tag !! Version the tag is pointing to.
|-
|-
| git-latest-tested || This tag always points to the latest version we have used and confirmed that is working with our own recipies. This version will change from time to time.
| git-latest-tested || Points to the latest version we have used and confirmed that is working with our own recipies. This version will change from time to time and some versions may be skipped.
|-
|-
| git-vX || These tags always point to a specific version of ELBE (e.g. git-v12.4 points to version 12.4 of ELBE).
| git-vX || Always points to the specific version X of ELBE (as an example git-v12.4 points to version 12.4 of ELBE).
|}
|}


Line 70: Line 70:
  <tt>docker pull dhelectronics/elbe:git-v12.4</tt>
  <tt>docker pull dhelectronics/elbe:git-v12.4</tt>


The container can be started with:
The container can be started with (the container does need extensive rights because a virtual machine is started inside it):


  <tt>docker run --name=elbe --mount type=bind,src=./,dst=/workdir-w /workdir/ --cap-add SYS_ADMIN --security-opt seccomp:unconfined --security-opt apparmor:unconfined --mount type=bind,src=/sys/fs/cgroup,dst=/sys/fs/cgroup --device /dev/kvm --device /dev/fuse --group-add kvm dhelectronics/elbe:git-v12.4</tt>
  <tt>docker run --name=elbe --mount type=bind,src=./,dst=/workdir-w /workdir/ --cap-add SYS_ADMIN --security-opt seccomp:unconfined --security-opt apparmor:unconfined --mount type=bind,src=/sys/fs/cgroup,dst=/sys/fs/cgroup --device /dev/kvm --device /dev/fuse --group-add kvm dhelectronics/elbe:git-v12.4</tt>
Line 90: Line 90:
This command appends the xml-file "example.xml" with the archive "example-archive.tar.bz2". The binary content of the archive is stored in BASE64 encoding inside a xml tag.
This command appends the xml-file "example.xml" with the archive "example-archive.tar.bz2". The binary content of the archive is stored in BASE64 encoding inside a xml tag.


If you add  <tt>--build-sdk</tt> at the "<tt>intvm create/submit</tt>"-command then as an addition to creating the root-filesystem, the SDK (for developing software for the root-filesystem) is created too.
If you add  <tt>--build-sdk</tt> at the "<tt>initvm create/submit</tt>"-command then as an addition to creating the root-filesystem, the SDK (for developing software for the root-filesystem) is created too. Usually CD-Images with all binary packages and all source packages (for the exact recreation of the rootfilesystem) are created. The creation of these can be skipped with the commandline switches <tt>--skip-build-bin</tt> and <tt>--skip-build-sources</tt>.


If an error happens while building the rootfilesystem, no files are returned. It is possible to get the log and other files of the build with an extra command. The complete call of the command (which differs for each build) is printed as exit-message of the ELBE build.
<!--
<!--
===Script for easy use with container images===
===Script for easy use with container images===


We created a script for easing the use of ELBE inside the container. This script is preinstalled in our [[Virtual_Machine_for_Application_Development|Virtual Machine for Application Development]] starting with version Stretch Vx. The script is called '''elbe_container_build_start.sh [OPTIONS] <elbe_build_description.xml>'''. The following options are available:
We created a script for easing the use of ELBE inside the container. This script is preinstalled in our [[Virtual_Machine_for_Application_Development|Virtual Machine for Application Development]] starting with version Stretch Vx. The script is called '''elbe_container_build_start.sh [OPTIONS] <elbe_build_description.xml>'''. In the standard configuration the CD-images with binary and source packages are created. The SDK is also created.
 
It is possible to start an additional container with a debian repository, the given path at --repodir has to point at the root of a debian repository. Inside the xml the repository can be used by adding the repo "<tt>http:<nowiki/>//dhdebrepo/dh_debian_repo <distro> <component></tt>" to the list of mirrors. Note that after the build process the repository is still inside the <tt>/etc/apt/sources.list</tt> of the resulting rootfilesystem. You have to remove this line at the finetuning section of the xml file or when the device running with the rootfilesystem has started. If you do not remove the repo, <tt>apt-get update</tt> will fail with an error if you want to update the system or install new packages afterwards.
 
The following options are available for the script:


{| class="wikitable"
{| class="wikitable"
|-
|-
! Option !! Meaning of the option
| --elbedockerimage <REPO:TAG> || Sets the docker image which is used for the elbe build.
|-
| --elbedockerimage <REPO:TAG> || Change elbe docker image
|-
|-
| --repodir <path> || Initiates a Debian repo web server to start, which uses this repo path
| --repodir <path> || Starts an additional container with a Debian repo webserver, which uses this repo path. If this option isn't set, then no container with the repo is started.
|-
|-
| --repodockerimage <REPO:TAG> || Change Debian repo webserver docker image
| --repodockerimage <REPO:TAG> || Sets Debian repo webserver docker image. Has no effect if <tt>--repodir<tt> is not set.
|-
|-
| --initvmtopdir <path> || Change initvm top directory
| --initvmtopdir <path> || Change initvm top directory, default value is the <tt><current-working-directory>/initvm-docker</tt>
|-
|-
| --fast || Using elbe fast option (--skip-build-bin --skip-build-sources)
| --fast || Speed up the build of the rootfilesystem with only building the rootfilesystem itself, and skipping the creation of the CD-images and of the SDK.
|-
|-
| --console || Ignore everything  and start console in docker
| --console || Ignore every other option and start the container and enter a console inside of the container.
|-
|-
| --version || Display version info
| --version || Display version info of the script and exit
|-
|-
| --help || Display this help and exit
| --help || Display the command line help and exit
|}
|}


It is possible to start an additional container with a debian repository, the given path at --repodir has to point at the root of a debian repository.
When the build is finished, the container exits and is removed. If an error happenes the container is not exited, and a console inside the container is opened, where you can get the logs and files of the failed build.
-->
-->
==XML-Example==
==XML-Example==

Revision as of 10:47, 4 September 2020