This is a Cockpit plugin to deploy a SWupdate on SEAPATH Yocto.
Features of the plugin:
- Fetch swu file
- Perform the update
- Display the status of the update (before and after reboot)
- Display the active slot
Options available to get the swu file:
- Upload from client
- Download from url
This plugin requires administrative access.
This React project uses npm as package manager.
The first build of the plugin requires to run the following command that will install the dependencies defined in the package.json. It will also build the sources on the directory /dist.
npm run init
To rebuild the project, the script build.js can be used using:
npm run build
The build files and the dependencies can be removed using:
npm run clean
The plugin is packaged on SEAPATH Yocto and available by default on the test image.
To install this Cockpit plugin, the build sources located in the /dist directory must be copied to /usr/share/cockpit/cockpit-update
.
The installation can be verified by looking at the list of Cockpit packages given by cockpit-bridge --packages
.
The following ansible playbook can also be used:
---
- name: cockpit plugins installation
hosts:
- cluster_machines
become: true
vars:
cockpit_plugin_path: "/usr/share/cockpit"
tasks:
- name: Check if cockpit is installed
command: which cockpit-bridge
register: cockpit_status
- name: Install plugin
ansible.builtin.copy:
src: dist_directory/
dest: "{{ cockpit_plugin_path }}/cockpit-update"
mode: '644'
owner: root
when: cockpit_status.rc == 0