When using FullMetalUpdate, you may require to work on multiple targets and deploy OSes or containers on them. In this document, we will go though the steps required to add a new target on Hawkbit and be able to deploy images on any of them.
-
Go to the cloud directory where Hawkbit is launched (
fullmetalupdate-cloud-demo
) -
Edit
ConfigureServer.sh
and make the following changes :- copy the first paragraph of the file, beginning with
# Set up a target...
, and paste it right afterwards - change
securityToken
,controllerId
andname
. For the last two, pick whatever you want. For the token, also pick whatever you want, or you can generate a token usingdate | md5sum
, assuming you're on Linux
- copy the first paragraph of the file, beginning with
-
Exit, and execute
./ConfigureServer.sh
(the server needs to be running) -
You should see a new target pop up on Hawkbit. Cross-check that the credentials you typed at the last step are correct in the information panel of the target
There are two ways to make your change on Hawkbit take effect or the target :
-
(Recommended) Configure the new credentials from the build directory. These changes will be permanent though all the next updates of your target
-
Configure the new credentials on the target directly
If you already deployed your target, we recommend to go thourhg both ways.
Before proceeding further, close any instanciation of the build-yocto docker (any
./Startbuild.sh bash *
).
-
Go to your Yocto directory (
fullmetalupdate-yocto-demo
) -
Edit the
config.cfg.sample
and make the following changes :fill in
hawkbit_target_name
andhawkbit_auth_token
using what you have previously defined (controllerId
andsecurityToken
) -
Exit, and execute
bash ConfigureBuild.sh
-
Execute
./Startbuild.sh fullmetalupdate-os
. It should build the fullmetalupdate client again. Then you can flash the new image to your target, which will contain the new credentials -
After starting the target, you should see your device's IP in the target's information panel
Note : these changes will be permanent only if you made the changes on the build system as described in the last section. Otherwise, the following changes will be lost on the next OS update.
If you have already deployed your target and have remote access to it, please follow these steps :
-
Remount
/usr
as read-write by executing:mount -o remount,rw /usr
-
Edit the configuration file by executing
vi /usr/fullmetalupdate/rauc_hawkbit/config.cfg
-
Fill in
hawkbit_target_name
andhawkbit_auth_token
using what you have previously defined (controllerId
andsecurityToken
) -
Restart the FullMetalUpdate client by executing
systemctl restart fullmetalupdate
-
You should see your device's IP in the target's information panel