Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration os #108

Draft
wants to merge 35 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e87a59a
prepare proof of concept migration OS
Josef-MrBeam Nov 24, 2023
b4d8e96
fix missing home
Josef-MrBeam Nov 24, 2023
b4a04a4
fix ssh error
Josef-MrBeam Nov 24, 2023
ab7cb2d
enable ssh again
Josef-MrBeam Nov 24, 2023
cde21fc
create migration os flavor
Josef-MrBeam Nov 24, 2023
a6458bf
fix folder
Josef-MrBeam Nov 24, 2023
5a38e95
install bmaptool
Josef-MrBeam Dec 6, 2023
2dcf605
SW-4170 Add migration os to beam os 2 flashing script (#109)
caglarkilimci Dec 13, 2023
e4e898d
SW-4209 Set a field to identify first boot after upgrade (#111)
amrithvenkat Dec 13, 2023
e61c0e8
SW-3164 Create a Migration OS that includes Beam OS 2 (#110)
caglarkilimci Dec 14, 2023
fb1d732
SW-4169 add migration service (#112)
amrithvenkat Dec 14, 2023
feb6822
SW-4141 component improvements (#113)
amrithvenkat Dec 18, 2023
91e451f
SW-4209 Change field from server to plugins.mrbeam for the firstBootA…
amrithvenkat Dec 22, 2023
6060452
SW-4224 SW-4246 precondition check for mrbeamplugin version and backu…
amrithvenkat Jan 2, 2024
04b15fd
SW-4263 temporary removal of cam folder from backup and restore (#116)
amrithvenkat Jan 9, 2024
d91e197
SW-4263 include cam folder except lens calibration file (#117)
amrithvenkat Jan 10, 2024
2d3bc69
update actions checkout version
amrithvenkat Jan 24, 2024
549bad7
use environment variable instead of secrets
amrithvenkat Jan 24, 2024
09ed556
SW-4269 handle migration of cam folder without errors (#119)
amrithvenkat Jan 26, 2024
f6376e9
SW-4356 Add migration-operator attribute into config.yaml (#120)
caglarkilimci Feb 2, 2024
aedcec5
SW-4370 add migration operator only to the config.yaml (#121)
amrithvenkat Feb 8, 2024
0daa2f1
SW-4391 split sig and image files (#122)
amrithvenkat Feb 16, 2024
5b4780a
SW-4389 Add precondition check for sd card size (#123)
amrithvenkat Feb 19, 2024
8c6b7bd
SW-4400 add colored progress for the leds (#125)
Josef-MrBeam Feb 19, 2024
ddd4a32
SW-4397 Add the defined led strip lighting and their progressive load…
Josef-MrBeam Feb 20, 2024
ad1467c
SW-4388 Add checks for restoring users.yaml file (#127)
caglarkilimci Feb 21, 2024
d2db395
SW-4410 Migration without one button press (#126)
Josef-MrBeam Feb 22, 2024
2abede8
SW-4388 Set config fields if the value is presented at the backed up …
caglarkilimci Feb 22, 2024
11b5662
SW-4399 define and implement a clear logging mechanism during the mig…
amrithvenkat Feb 28, 2024
4bcf4da
SW-4424 Redefine some colours on migration phase 1 (#130)
amrithvenkat Feb 29, 2024
c9a7fed
SW-4450 Add precondition check for sd card free space (#131)
amrithvenkat Mar 7, 2024
5aa9540
SW-4458 Modify state success LED colours (#132)
amrithvenkat Mar 12, 2024
88bbf3d
SW-4494 create migration operator on the fly (#133)
amrithvenkat Mar 19, 2024
44c81aa
SW-4494 Ensure the migrationoperator file is copied (#134)
amrithvenkat Mar 20, 2024
45d5a17
SW-4540 use correct command to check sd card size (#135)
amrithvenkat Apr 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
then
flavors='{"flavor":"alpha 2Q"}'
else
flavors='{"flavor":"2Q"},{"flavor":"2R"}'
flavors='{"flavor":"migrationOS"}'
fi
echo "::set-output name=matrix::{\"include\":[$flavors]}"
echo "matrix={\"include\":[$flavors]}" >> $GITHUB_OUTPUT

build:
needs: set_matrix
Expand Down Expand Up @@ -83,14 +83,14 @@ jobs:
END

- name: Checkout CustomPiOS
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: 'mrbeam/CustomPiOS'
path: CustomPiOS
ref: 'test_devpi_josef'

- name: Checkout Project Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: recursive
path: repository
Expand All @@ -115,11 +115,40 @@ jobs:
run: |
echo "OCTOPI_APTMIRROR=http://mirror.us.leaseweb.net/raspbian/raspbian" > repository/src/config.local

- name: Download the Beam OS 2 Image
uses: actions-hub/gcloud@master
env:
PROJECT_ID: devpi-310008
APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_DOWNLOAD }}
with:
args: cp "${{ vars.BEAMOS2_IMAGE }}" repository/src/image/
cli: gsutil

- name: Extract the Beam OS 2 Image
id: extract_the_image
run: |
# Set the image file
the_image=$(basename "${{ vars.BEAMOS2_IMAGE }}")
source_dir="repository/src/image"
echo "The Beam OS 2 Image: ${the_image}"
target_dir="repository/src/modules/beamos/filesystem/migration/home/pi/image"
target_name="beamos2.wic"
# Extract bz2 file into target_dir
tar -xjf ${source_dir}/${the_image} -C $target_dir
# Rename the extracted image to beamos2.wic[bz2, bmap] and remove other files
mv ${target_dir}/mrbeam-image-*.wic.bz2 ${target_dir}/${target_name}.bz2
mv ${target_dir}/mrbeam-image-*.wic.bmap ${target_dir}/${target_name}.bmap
rm ${target_dir}/mrbeam-*
echo "Placed the image in ${target_dir}/${target_name}.bz2 with bmap file"

- name: Build Image (MrBeam Variant)
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
sudo modprobe loop
cd repository/src
echo "export EXTRA_SSH_KEY='${{ secrets.SSH_BEAMOS01_RSA }}'" >> config
echo "export PERSONAL_ACCESS_TOKEN='${{ secrets.PERSONAL_ACCESS_TOKEN }}'" >> config
sudo bash -x ./build_dist $VARIANT ${{ matrix.flavor }}

- name: Copy output
Expand All @@ -142,7 +171,7 @@ jobs:
cp repository/src/workspace/*.img $IMAGE.img
fi

echo "::set-output name=image::$IMAGE"
echo "image=$IMAGE" >> $GITHUB_OUTPUT

# # artifact upload will take care of zipping for us
# - uses: actions/upload-artifact@v1
Expand All @@ -158,7 +187,7 @@ jobs:
- name: Create env variable for upload folder in gcloud bucket
run: |
# Use the last letter of the flavor for the directory name
echo "DIR=$(echo ${{ matrix.flavor }} | rev | cut -c 1)" >> $GITHUB_ENV
echo "DIR=$(echo ${{ matrix.flavor }})" >> $GITHUB_ENV
- uses: actions-hub/gcloud@master
env:
PROJECT_ID: devpi-310008
Expand Down
26 changes: 13 additions & 13 deletions src/modules/beamos/config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ TRUE_USER=pi
## Dependencies
[ -n "$BEAMOS_IOBEAM_REPO_BRANCH" ] || BEAMOS_IOBEAM_REPO_BRANCH=v1.3.1
[ -n "$BEAMOS_MRBHWINFO_REPO_BRANCH" ] || BEAMOS_MRBHWINFO_REPO_BRANCH=v1.0.0
[ -n "$BEAMOS_MRBEAMLED_REPO_BRANCH" ] || BEAMOS_MRBEAMLED_REPO_BRANCH=v1.0.0
[ -n "$BEAMOS_MRBEAMLED_REPO_BRANCH" ] || BEAMOS_MRBEAMLED_REPO_BRANCH=v2.1.0a0
[ -n "$BEAMOS_NETCONNECTD_REPO_BRANCH" ] || BEAMOS_NETCONNECTD_REPO_BRANCH=v1.0.0
[ -n "$BEAMOS_MRBEAMPLUGIN_DOCS_REPO_BRANCH" ] || BEAMOS_MRBEAMPLUGIN_DOCS_REPO_BRANCH=v1.1.0
## BeamOS-dependencies
Expand All @@ -25,7 +25,7 @@ TRUE_USER=pi
[ -n "$BEAMOS_NETCONNECTD_WIFI_REPO_BRANCH" ] || BEAMOS_NETCONNECTD_WIFI_REPO_BRANCH=master

# MrBeamPlugin
[ -n "$BEAMOS_INCLUDE_MRBEAMPLUGIN" ] || BEAMOS_INCLUDE_MRBEAMPLUGIN=yes
[ -n "$BEAMOS_INCLUDE_MRBEAMPLUGIN" ] || BEAMOS_INCLUDE_MRBEAMPLUGIN=no
# This uses the latest release as an archive
# [ -n "$BEAMOS_MRBEAMPLUGIN_ARCHIVE" ] || export BEAMOS_MRBEAMPLUGIN_ARCHIVE=$(wget -q -O - https://api.github.com/repos/mrbeam/MrBeamPlugin/releases/latest | grep "zipball_url" | cut -d : -f 2,3 | tr -d \" | tr -d ,)
[ -n "$BEAMOS_MRBEAMPLUGIN_ARCHIVE" ] || BEAMOS_MRBEAMPLUGIN_ARCHIVE=https://github.com/mrbeam/MrBeamPlugin/archive/$BEAMOS_MRBEAMPLUGIN_REPO_BRANCH.zip
Expand All @@ -38,13 +38,13 @@ TRUE_USER=pi
[ -n "$BEAMOS_MRBEAMPLUGIN_DOCS_REPO_BUILD" ] || BEAMOS_MRBEAMPLUGIN_DOCS_REPO_BUILD=https://github.com/mrbeam/MrBeamDoc.git

# OctoPrint-Camera
[ -n "$BEAMOS_INCLUDE_CAMERA" ] || BEAMOS_INCLUDE_CAMERA=yes
[ -n "$BEAMOS_INCLUDE_CAMERA" ] || BEAMOS_INCLUDE_CAMERA=no
[ -n "$BEAMOS_CAMERA_ARCHIVE" ] || BEAMOS_CAMERA_ARCHIVE=https://github.com/mrbeam/OctoPrint-Camera/archive/$BEAMOS_CAMERA_REPO_BRANCH.zip
[ -n "$BEAMOS_CAMERA_REPO_BUILD" ] || BEAMOS_CAMERA_REPO_BUILD=https://github.com/mrbeam/OctoPrint-Camera.git
[ -n "$BEAMOS_CAMERA_REPO_SHIP" ] || BEAMOS_CAMERA_REPO_SHIP=https://github.com/mrbeam/OctoPrint-Camera.git

# IOBeam
[ -n "$BEAMOS_INCLUDE_IOBEAM" ] || BEAMOS_INCLUDE_IOBEAM=yes
[ -n "$BEAMOS_INCLUDE_IOBEAM" ] || BEAMOS_INCLUDE_IOBEAM=no
[ -n "$BEAMOS_IOBEAM_ARCHIVE" ] || BEAMOS_IOBEAM_ARCHIVE=git+ssh://[email protected]/mrbeam/iobeam.git@$BEAMOS_IOBEAM_REPO_BRANCH
[ -n "$BEAMOS_IOBEAM_REPO_BUILD" ] || BEAMOS_IOBEAM_REPO_BUILD=git+ssh://[email protected]/mrbeam/iobeam.git
[ -n "$BEAMOS_IOBEAM_REPO_SHIP" ] || BEAMOS_IOBEAM_REPO_SHIP=git+ssh://[email protected]/mrbeam/iobeam.git
Expand All @@ -53,13 +53,13 @@ TRUE_USER=pi
[ -n "$BEAMOS_MRBHWINFO_REPO_SHIP" ] || BEAMOS_MRBHWINFO_REPO_SHIP=git+ssh://[email protected]/mrbeam/mrb_hw_info.git

[ -n "$BEAMOS_INCLUDE_MRBEAMLED" ] || BEAMOS_INCLUDE_MRBEAMLED=yes
[ -n "$BEAMOS_MRBEAMLED_ARCHIVE" ] || BEAMOS_MRBEAMLED_ARCHIVE=https://github.com/mrbeam/MrBeamLedStrips/archive/$BEAMOS_MRBEAMLED_REPO_BRANCH.zip
[ -n "$BEAMOS_MRBEAMLED_REPO_BUILD" ] || BEAMOS_MRBEAMLED_REPO_BUILD=https://github.com/mrbeam/MrBeamLedStrips.git
[ -n "$BEAMOS_MRBEAMLED_REPO_SHIP" ] || BEAMOS_MRBEAMLED_REPO_SHIP=https://github.com/mrbeam/MrBeamLedStrips.git
[ -n "$BEAMOS_MRBEAMLED_ARCHIVE" ] || BEAMOS_MRBEAMLED_ARCHIVE=git+https://${PERSONAL_ACCESS_TOKEN}@github.com/mrbeam/mrb3-led-strips.git@$BEAMOS_MRBEAMLED_REPO_BRANCH
[ -n "$BEAMOS_MRBEAMLED_REPO_BUILD" ] || BEAMOS_MRBEAMLED_REPO_BUILD=https://github.com/mrbeam/mrb3-led-strips.git
[ -n "$BEAMOS_MRBEAMLED_REPO_SHIP" ] || BEAMOS_MRBEAMLED_REPO_SHIP=https://github.com/mrbeam/mrb3-led-strips.git
[ -n "$BEAMOS_RPI_WS281X_ARCHIVE" ] || BEAMOS_RPI_WS281X_ARCHIVE=rpi-ws281x

# Netconnectd and Netconnectd plugin
[ -n "$BEAMOS_INCLUDE_NETCONNECTD" ] || BEAMOS_INCLUDE_NETCONNECTD=yes
[ -n "$BEAMOS_INCLUDE_NETCONNECTD" ] || BEAMOS_INCLUDE_NETCONNECTD=no
# Wifi package for netconnectd
[ -n "$BEAMOS_NETCONNECTD_WIFI_ARCHIVE" ] || BEAMOS_NETCONNECTD_WIFI_ARCHIVE=https://github.com/mrbeam/wifi/archive/$BEAMOS_NETCONNECTD_WIFI_REPO_BRANCH.zip
[ -n "$BEAMOS_NETCONNECTD_ARCHIVE" ] || BEAMOS_NETCONNECTD_ARCHIVE=https://github.com/mrbeam/netconnectd_mrbeam/archive/$BEAMOS_NETCONNECTD_REPO_BRANCH.zip
Expand All @@ -71,27 +71,27 @@ TRUE_USER=pi
[ -n "$BEAMOS_NETCONNECTD_PLUGIN_REPO_BUILD" ] || BEAMOS_NETCONNECTD_PLUGIN_REPO_BUILD=https://github.com/mrbeam/OctoPrint-Netconnectd.git
[ -n "$BEAMOS_NETCONNECTD_PLUGIN_REPO_SHIP" ] || BEAMOS_NETCONNECTD_PLUGIN_REPO_SHIP=https://github.com/mrbeam/OctoPrint-Netconnectd.git

[ -n "$BEAMOS_INCLUDE_FINDMYMRBEAM" ] || BEAMOS_INCLUDE_FINDMYMRBEAM=yes
[ -n "$BEAMOS_INCLUDE_FINDMYMRBEAM" ] || BEAMOS_INCLUDE_FINDMYMRBEAM=no
[ -n "$BEAMOS_FINDMYMRBEAM_ARCHIVE" ] || BEAMOS_FINDMYMRBEAM_ARCHIVE=https://github.com/mrbeam/OctoPrint-FindMyMrBeam/archive/$BEAMOS_FINDMYMRBEAM_REPO_BRANCH.zip
[ -n "$BEAMOS_FINDMYMRBEAM_REPO_BUILD" ] || BEAMOS_FINDMYMRBEAM_REPO_BUILD=https://github.com/mrbeam/OctoPrint-FindMyMrBeam.git
[ -n "$BEAMOS_FINDMYMRBEAM_REPO_SHIP" ] || BEAMOS_FINDMYMRBEAM_REPO_SHIP=https://github.com/mrbeam/OctoPrint-FindMyMrBeam.git

[ -n "$BEAMOS_INCLUDE_SHIELDFLASHER" ] || BEAMOS_INCLUDE_SHIELDFLASHER=yes
[ -n "$BEAMOS_INCLUDE_SHIELDFLASHER" ] || BEAMOS_INCLUDE_SHIELDFLASHER=no
[ -n "$BEAMOS_SHIELDFLASHER_ARCHIVE" ] || BEAMOS_SHIELDFLASHER_ARCHIVE=https://github.com/mrbeam/shield_flasher/archive/$BEAMOS_SHIELDFLASHER_REPO_BRANCH.zip
[ -n "$BEAMOS_SHIELDFLASHER_REPO_BUILD" ] || BEAMOS_SHIELDFLASHER_REPO_BUILD=https://github.com/mrbeam/shield_flasher.git
[ -n "$BEAMOS_SHIELDFLASHER_REPO_SHIP" ] || BEAMOS_SHIELDFLASHER_REPO_SHIP=https://github.com/mrbeam/shield_flasher.git

[ -n "$BEAMOS_INCLUDE_MOUNTMANAGER" ] || BEAMOS_INCLUDE_MOUNTMANAGER=yes
[ -n "$BEAMOS_INCLUDE_MOUNTMANAGER" ] || BEAMOS_INCLUDE_MOUNTMANAGER=no
[ -n "$BEAMOS_MOUNTMANAGER_ARCHIVE" ] || BEAMOS_MOUNTMANAGER_ARCHIVE=https://github.com/mrbeam/usb_mount_manager/archive/$BEAMOS_MOUNTMANAGER_REPO_BRANCH.zip
[ -n "$BEAMOS_MOUNTMANAGER_REPO_BUILD" ] || BEAMOS_MOUNTMANAGER_REPO_BUILD=git+ssh://[email protected]/mrbeam/usb_mount_manager.git
[ -n "$BEAMOS_MOUNTMANAGER_REPO_SHIP" ] || BEAMOS_MOUNTMANAGER_REPO_SHIP=git+ssh://[email protected]/mrbeam/usb_mount_manager.git

[ -n "$BEAMOS_INCLUDE_CHECK" ] || BEAMOS_INCLUDE_CHECK=yes
[ -n "$BEAMOS_INCLUDE_CHECK" ] || BEAMOS_INCLUDE_CHECK=no
[ -n "$BEAMOS_CHECK_ARCHIVE" ] || BEAMOS_CHECK_ARCHIVE=https://github.com/mrbeam/mrb_check/archive/$BEAMOS_CHECK_REPO_BRANCH.zip
[ -n "$BEAMOS_CHECK_REPO_BUILD" ] || BEAMOS_CHECK_REPO_BUILD=git+ssh://[email protected]:mrbeam/mrb_check.git
[ -n "$BEAMOS_CHECK_REPO_SHIP" ] || BEAMOS_CHECK_REPO_SHIP=git+ssh://[email protected]:mrbeam/mrb_check.git
### Misc

[ -n "$BEAMOS_DEV" ] || BEAMOS_DEV=yes
[ -n "$BEAMOS_DEV" ] || BEAMOS_DEV=no
[ -n "$BEAMOS_I2C_BAUDRATE" ] || BEAMOS_I2C_BAUDRATE=64000
[ -n "$BEAMOS_MODEL" ] || BEAMOS_MODEL=MRBEAM2_DC_S

This file was deleted.

37 changes: 0 additions & 37 deletions src/modules/beamos/filesystem/home/pi/.bash_history

This file was deleted.

79 changes: 0 additions & 79 deletions src/modules/beamos/filesystem/home/pi/.bashrc

This file was deleted.

54 changes: 0 additions & 54 deletions src/modules/beamos/filesystem/home/pi/.config/aliases

This file was deleted.

1 change: 0 additions & 1 deletion src/modules/beamos/filesystem/home/pi/.config/disclaimer

This file was deleted.

25 changes: 0 additions & 25 deletions src/modules/beamos/filesystem/home/pi/.config/htop/htoprc

This file was deleted.

Loading