Arkdep migrations
Through migrations Arkdep is capable of performing major configuration updates to the system without user intervention.
Migrations can be made for both major and minor config changes, to ensure a user does not skip a migration they should be the last update provided for a variant, eg. arkanelinux
. Once a migration is completed you should switch the user over to a new branch such as arkanelinux-v2
by changing repo_default_image
in the /arkdep/config
file.
Arkdep deploy
If arkdep deploy
detects the presence of a migration script in a downloaded tarball it will trigger special migration specific behavior and not do a deployment. All it will do when this happens is to extract migration.sh
and source the file. It will then expect the migration script to perform all the work.
Arkdep-build configuration
Migration images are build using arkdep-build
just like normal images, they are unique in that they trigger special migration specific behavior in both arkdep-build
and arkdep deploy
.
File structure
Note that the migration.sh
file and migration
directory will get a unique random ID prepended to the filename before they are written in to a tarball to avoid file conflicts during extraction.
migration.sh
This is the only file which Arkdep will extract when a migration is run, other files will remain in the tarball and have to be manually extracted when needed.
The migration shell script is expected by Arkdep to do all the actual work in a migration. It will have access to all the same information Arkdep utilizes for normal image deployments.
Variable | Explanation | ${data[0]} |
The image name, eg. aabbcc123 |
---|---|
${data[1]} |
The tarball compression method, eg. zst |
${data[2]} |
Image SHA checksum |
$arkdep_dir |
Arkdep's location on the filesystem, eg. /arkdep |
$arkdep_boot |
The boot directory location on the filesystem, eg. /boot |