Skip to content

Latest commit

 

History

History
72 lines (54 loc) · 1.82 KB

README.md

File metadata and controls

72 lines (54 loc) · 1.82 KB

cockpit-update

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.

Getting and building the source

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

Installing

Yocto recipe

The plugin is packaged on SEAPATH Yocto and available by default on the test image.

Ansible

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