- Notifications
You must be signed in to change notification settings - Fork4
Fork of mendersoftware/mender-convert
License
lyft/mender-convert
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Mender is an open source over-the-air (OTA) software updater for embedded Linuxdevices. Mender comprises a client running at the embedded device, as well as aserver that manages deployments across many devices.
This repository contains mender-convert, which is used to convert pre-built diskimages (Debian, Ubuntu, Raspbian, etc) to a Mender compatible image byrestructuring partition table and injecting the necessary files.
For a full list of tested devices and images please visitMenderHub. If your deviceand image combination is not listed as supported, this does not necessarily meanthat it will not work, it probably just means that no one has tested andreported it back and usually only small tweaks are necessary to get this runningon your device.
To start using Mender, we recommend that you begin with the Getting startedsection inthe Mender documentation.
For more detailed information aboutmender-convert
please visit theDebian family section inthe Mender documentation.
Download the raw Raspberry Pi disk image into a subdirectory input:
mkdir -p inputcd inputwget https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2019-06-24/2019-06-20-raspbian-buster-lite.zip
Extract the raw Raspberry Pi disk image:
unzip 2019-06-20-raspbian-buster-lite.zipINPUT_DISK_IMAGE=$(ls*raspbian-buster*.img)cd ..
Bootstrap the demo rootfs overlay that is configured to connect toa Mender server with polling intervals set appropriately fordemonstration purposes. There are three scripts here to supportthe Mender demo server, the Mender production server, and MenderProfessional.
NOTE! Only run one of these three steps depending on the servertype you are implementing.
Using theMender demo server
./scripts/bootstrap-rootfs-overlay-demo-server.sh \ --output-dir${PWD}/rootfs_overlay_demo \ --server-ip 192.168.1.1
Using theMender production server
./scripts/bootstrap-rootfs-overlay-production-server.sh \ --output-dir${PWD}/rootfs_overlay_demo \ --server-url https://foobar.mender.io \ [ --server-cert~/server.crt ]
UsingMender Professional
./scripts/bootstrap-rootfs-overlay-hosted-server.sh \ --output-dir${PWD}/rootfs_overlay_demo \ --tenant-token"Paste token from Mender Professional"
To make using mender-convert easier, a reference setup using a Dockercontainer is provided.
You need toinstall Docker Engine to usethis environment.
Build a container with all required dependencies formender-convert
:
./docker-build
This will create a container image with the namemender-convert
which you canuse to runmender-convert
without polluting your host environment with thenecessary dependencies.
Run mender-convert from inside the container with your desired options, e.g.
MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert \ --disk-image input/$INPUT_DISK_IMAGE \ --config configs/raspberrypi3_config \ --overlay rootfs_overlay_demo/
Conversion will take 10-30 minutes, depending on image size and resourcesavailable. You can watchWORKDIR/convert.log
for progress and diagnosticsinformation.
After it finishes, you can find your images in thedeploy
directory on yourhost machine!
In order to be able to manipulate and create filesystem and disk images,mender-convert has a few dependencies, and their version and name vary betweenLinux distributions. Here is an example of how to install the dependencies on aDebian based distribution:
sudo apt install$(cat requirements-deb.txt)
Start the conversion process with:
MENDER_ARTIFACT_NAME=release-1 ./mender-convert \ --disk-image input/$INPUT_DISK_IMAGE \ --config configs/raspberrypi3_config \ --overlay rootfs_overlay_demo/
NOTE! You will be prompted to entersudo
password during the conversionprocess. This is required to be able to loopback mount images and for modifyingthem. Our recommendation is to use the provided Docker container, to run thetool in a isolated environment.
We welcome and ask for your contribution. If you would like to contribute toMender, please read our guide on how to best get startedcontributing code or documentation.
Mender is licensed under the Apache License, Version 2.0. SeeLICENSEfor the full license text.
We take security very seriously. If you come across any issue regardingsecurity, please disclose the information by sending an email tosecurity@mender.io. Please do not create a new publicissue. We thank you in advance for your cooperation.
- Join theMender Hub discussion forum
- Follow us onTwitter. Pleasefeel free to tweet us questions.
- Fork us onGithub
- Create an issue in thebugtracker
- Email us atcontact@mender.io
- Connect to the#mender IRC channel on Freenode
Mender was created by the team atNorthern.tech AS,with many contributions from the community. Thankseveryone!
Mender is sponsored byNorthern.tech AS.
About
Fork of mendersoftware/mender-convert
Resources
License
Stars
Watchers
Forks
Languages
- Shell89.4%
- JavaScript7.9%
- Dockerfile2.0%
- Python0.7%