-
Notifications
You must be signed in to change notification settings - Fork 2
Create deployment Release including configuration for larger installations
When preparing for a large mass-deployment, a firmware for automatic configuration upon firstboot is desired.
For this, you need to the following:
We assume you have two remotes configured for the site repo.
-
origin
as the freifunk-darmstadt repository -
fork
as your own fork of the site
For all steps, you need to be in the root-directory of your site-ffda
repository.
In order to checkout the latest tag, you need to fetch the current tags available in the origin
repository.
git fetch origin --tags
Checkout the release you want to auto-deploy. This is usually the latest release but you can use any commit on the tree. This should only be done if there is a good reason to do so, one case being the necessity of a bugfix which was introduced after the tag.
git checkout x.y.z
After you've checked out the release-tag, you have to create a branch to prepare the deployment-release on.
The branch-name shall follow the following schema:
deployment-<tag>-<location>
One example for a deployment release using the version 3.0.5
at the location hh36
would be deployment-3.0.5-hh36
.
To create this branch, execute:
git checkout -b <branchname>
If you are building a Firmware based on Release 3.0.5, you first need the update of the GitHub release action and extend the build-script to work with these special releases.
# ci: build: update softprops/action-gh-release: v1 -> v2 (#58)
git cherry-pick -x eda181a9b785fe56cbadcbcf4ec891eccf55d598
# build-meta: support build of deployment tags (#94)
git cherry-pick 5025da4167b695f404c7f7425ed3f270aabb4c9f
The following commit is required (as of 08/24) for a Firmware to accomplish the following:
- Disable WiFi-Mesh
- Skip setup-mode
- Enable wired-mesh on all ports
- Enable SSH-Manager for
ffda
key-group
# site: prepare for mass-installation
git cherry-pick -x b6bf948083b1ea78924595f6879b2b057beaebdb
The previous commits do not take care of the following:
- Enable SSH-Manager for
refugees
key-group - Set default-domain
- Set custom default node-name
For adding the refugees
key-group to the default ssh-manager key-group, cherry pick this commit:
# site: enable refugees ssh key-group
git cherry-pick -x 72058289459c81e462f34246e48085be24ecec05
You might want to set the default-domain as well as default hostname prefix. To do this, you can make these changes. If you are unsure how to do so, see this commit: https://github.com/freifunk-darmstadt/site-ffda/commit/497eb873c62a6c2d4fb417e364a54ba758536bfe
(change hostname_prefix, default_domain see commit above as example)
In order to get a first set of images, you can now push the branch to GitHub. This will trigger the pipeline and create image-artifacts.
git push -u origin <branchname>
If you want to push to your own branch in order to create images for yourself, you need to change the remote from origin
to fork
.
Caution
The images resulting from this step will not have the Autoupdater enabled! You can use these Images to test if the resulting settings match your expectations. However, you still need to create a tag in order to enable the autoupdater.
Images are Downloaded after the CI completed them. You can find the Jobs here.
The creation of a tag take care, autoupdate is turned on and the Version is permanently store in the github releases.
After you've successfully tested your image, create a tag so a Release on GitHub is created that stores the resulting images indefinitely.
ToDo: We should create a script for this.
A tag should follow the following convention: <root-version>-<date>-<deployment-location>
For our previous example, when building on the 08. August 2024
from the root-version 3.0.5
and the target-location hh36
, our tag-name would be 3.0.5-20240808-hh36
.
To create this tag, execute
git tag <tag-name>
To push the tag, execute:
git push -u origin <tag-name>
After the build-pipeline succeeded, the images can be found on the releases page.