{"id":34127,"date":"2018-07-20T12:48:04","date_gmt":"2018-07-20T12:48:04","guid":{"rendered":"http:\/\/www.sickgaming.net\/blog\/2018\/07\/20\/using-linux-containers-to-manage-embedded-build-environments\/"},"modified":"2018-07-20T12:48:04","modified_gmt":"2018-07-20T12:48:04","slug":"using-linux-containers-to-manage-embedded-build-environments","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2018\/07\/20\/using-linux-containers-to-manage-embedded-build-environments\/","title":{"rendered":"Using Linux Containers to Manage Embedded Build Environments"},"content":{"rendered":"<div><img decoding=\"async\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/07\/using-linux-containers-to-manage-embedded-build-environments.jpg\" class=\"ff-og-image-inserted\" \/><\/div>\n<p><span><span>Linux container technology has been proposed by companies like <\/span><a href=\"https:\/\/www.linux.com\/news\/future-iot-containers-aim-solve-security-crisis\"><span>Resin.io<\/span><\/a><span> as a simpler and more secure way to deploy embedded devices. And, Daynix Computing has developed an open source framework called <\/span><a href=\"http:\/\/rbld.io\/\"><span>Rebuild<\/span><\/a><span> that uses Linux containers in the build management process of embedded IoT development. At the 2017 <\/span><a href=\"https:\/\/events.linuxfoundation.org\/events\/open-source-summit-north-america-2018\/\"><span>Open Source Summit<\/span><\/a><span>, Daynix \u201cvirtualization expert\u201d Yan Vugenfirer gave a presentation on Rebuild called \u201c<\/span><span>How Linux Containers can Help to Manage Development Environments for IoT and Embedded Systems.\u201d<\/span><\/span><\/p>\n<p><span><span>Vugenfirer started by reminding the audience of the frustrations of embedded development, especially when working with large, complex projects. <\/span><span>\u201cYou\u2019re dealing with different toolchains, SDKs, and compilers all with different dependencies,\u201d he said. \u201cIt gets more complicated if you need to update packages, or change SDKs, or run a codebase over several devices. The code may compile on your machine, but there may be problems in the build server or in the CI (continuous integration) server.\u201d<\/span><\/span><\/p>\n<p><span><span>Rebuild offers an easier way to manage build environments by leveraging the power of Linux containers, said <\/span><span>Vugenfirer<\/span><span>. \u201cRebuild allows seamless integration between the containers and your existing build environment and enables easy sharing of environments between team members. We are mapping the local file system into the container in order to preserve all permissions and ownership when working with source code. The code is stored locally on our file system while we work with different environments.\u201d<\/span><\/span><\/p>\n<p><span><span>Based on <\/span><a href=\"http:\/\/ruby-doc.org\/stdlib-2.0.0\/libdoc\/rubygems\/rdoc\/Gem.html\"><span>Ruby 2.0+ Gem<\/span><\/a><span> and Docker, Rebuild supports Linux, Windows, and Mac OS environments. It\u2019s available in free and commercial versions.<\/span><\/span><\/p>\n<p><span><span>The software lets you run multiple platforms on same machine and gives you the assurance that it will run the same on the build or CI servers as it does on your development workstation, said <\/span><span>Vugenfirer<\/span><span>. The developer can choose whether actions performed on the build environment change the original. <\/span><\/span><\/p>\n<h3><span><span>Build management designed for teams<\/span><\/span><\/h3>\n<p><span><span>The software is particularly useful for sharing environments between team members. It provides a \u201cunified experience,\u201d and offers features like track versioning,\u201d said <\/span><span>Vugenfirer<\/span><span>. Other benefits include easier technical support, as well as the ability to \u201creproduce an environment in the future with different developers.\u201d Rebuild also \u201ceases preparation for certification audits for medical or automotive devices by letting you show what libraries are certified,\u201d he added.<\/span><\/span><\/p>\n<p><span><span>Developers control Rebuild via the Rebuild CLI interface, which \u201cacts as a gateway for scripts on CI or build servers,\u201d explained <\/span><span>Vugenfirer. Below that in the architecture hierarchy sits Docker, and on the base level is the <\/span><span>Environments Registry, which works with Docker to manage and share the container images. Rebuild currently supports DockerHub as the default, as well as Docker private registry and Daynix\u2019s own Rebuild Native Registry.<\/span><\/span><\/p>\n<p><span><span>Developers can use existing scripts to build the software by simply prefacing it with the \u201crbld run\u201d command. \u201cYou don\u2019t need to know about Docker or Docker files,\u201d said <\/span><span>Vugenfirer.<\/span><\/span><\/p>\n<p><span><span>Daynix CTO <\/span><span>Dmitry Fleytman joined Vugenfirer to give a demo of Rebuild that showed how to <\/span><span>search a registry for available environments such as Raspbian, Ubuntu, BeagleBone, and QEMU. He then deployed the Raspbian environment and issued a Run command to compile source code. There\u2019s also an interactive mode alternative to issuing a single run command. In either case, the process \u201cneeds to be done only once for each environment version,\u201d said <\/span><span>Vugenfirer.<\/span><\/span><\/p>\n<p><span><span>Although you can run an environment without modifying it, you can also do the opposite by using the \u201crbld modify\u201d command, which lets you update packages. Other commands include \u201crbld commit\u201d for a local commit and \u201crbld publish\u201d to share it. You can also revert changes with \u201crbld checkout.\u201d<\/span><\/span><\/p>\n<p><span><span>Rebuild lets you create a new environment from scratch using the file system or build on a base image from one of the distros in environment repository. After using the \u201crbld create\u201d command, you can then modify, commit, and publish it. <\/span><\/span><\/p>\n<p><span><span>Future plans for Rebuild include adding role management for the Rebuild Native Registry to assign who can create an environment vs. simply running them. Daynix also plans to add more registries, provide IDE extensions, and offer more tracking of environment usage. They have just begun working on Yocto Project integration.<\/span><\/span><\/p>\n<p><span><span>More information can be found in the conference video below:<\/span><\/span><\/p>\n<p>[embedded content]<\/p>\n<p><span><span>Join us at <\/span><a href=\"https:\/\/events.linuxfoundation.org\/events\/elc-openiot-europe-2018\/\"><span>Open Source Summit + Embedded Linux Conference Europe<\/span><\/a><span> in Edinburgh, UK on October 22-24, 2018, for 100+ sessions on Linux, Cloud, Containers, AI, Community, and more.<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux container technology has been proposed by companies like Resin.io as a simpler and more secure way to deploy embedded devices. And, Daynix Computing has developed an open source framework called Rebuild that uses Linux containers in the build management process of embedded IoT development. At the 2017 Open Source Summit, Daynix \u201cvirtualization expert\u201d Yan [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":34128,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40],"tags":[],"class_list":["post-34127","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-freebsd-unix"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/34127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=34127"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/34127\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/34128"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=34127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=34127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=34127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}