Git Product home page Git Product logo

cockpit-tukit's Introduction

Cockpit Transactional Update

Cockpit module for Transactional Updates.

Installing

make install compiles and installs the package in /usr/share/cockpit/. The convenience targets srpm and rpm build the source and binary rpms, respectively. Both of these make use of the dist target, which is used to generate the distribution tarball. In production mode, source files are automatically minified and compressed. Set NODE_ENV=production if you want to duplicate this behavior.

For development, you usually want to run your module straight out of the git tree. To do that, link that to the location were cockpit-bridge looks for packages:

mkdir -p ~/.local/share/cockpit
ln -s `pwd`/dist ~/.local/share/cockpit/cockpit-tukit

After changing the code and running make again, reload the Cockpit page in your browser.

You can also use watch mode to automatically update the webpack on every code change with

$ npm run watch

or

$ make watch

When developing against a virtual machine, webpack can also automatically upload the code changes by setting the RSYNC environment variable to the remote hostname.

$ RSYNC=c make watch

Running eslint

Cockpit Transactional Update uses ESLint to automatically check JavaScript code style in .js and .jsx files.

The linter is executed within every build as a webpack preloader.

For developer convenience, the ESLint can be started explicitly by:

$ npm run eslint

Violations of some rules can be fixed automatically by:

$ npm run eslint:fix

Rules configuration can be found in the .eslintrc.json file.

Running tests locally

Run make check to build an RPM, install it into a standard Cockpit test VM (centos-8-stream by default), and run the test/check-application integration test on it. This uses Cockpit's Chrome DevTools Protocol based browser tests, through a Python API abstraction. Note that this API is not guaranteed to be stable, so if you run into failures and don't want to adjust tests, consider checking out Cockpit's test/common from a tag instead of main (see the test/common target in Makefile).

After the test VM is prepared, you can manually run the test without rebuilding the VM, possibly with extra options for tracing and halting on test failures (for interactive debugging):

TEST_OS=centos-8-stream test/check-application -tvs

You can also run the test against a different Cockpit image, for example:

TEST_OS=fedora-34 make check

Acknowledgments

cockpit-tukit's People

Contributors

belphegor-belbel avatar bittin avatar calmeidadeoliveira avatar djz88 avatar janzerebecki avatar lunarequest avatar norwayfun avatar nykseli avatar rsimai avatar skazi0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cockpit-tukit's Issues

Add button to set currently active booted snapshot as default.

I would be nice if there is a UI button to set the current snapshot as the default one like it is possible with transactional-update rollback.
Unbenannt

Further a warning message, before an update happens, would be nice when your current active snapshot is not the default one and the update gets applied on the default one. So that you aware of it ๐Ÿ˜‰

Support for non-transactional systems

I'm testing Cockpit in the two images of ALP currently available - the transactional and the non-transactional one.

Nothing prevents the user from installing cockpit-tukit in a non-transactional instance of ALP. According to my experiments, if you do so and then play a bit with the cockpit-tukit interface (for example, clicking the "refresh" button), the system gets somehow messed up. All subsequent changes done to the system get lost on next reboot.

I feel the whole situation is avoidable. It would be nice if cockpit-tukit would detect that it's running in a non-transactional system and then it would display some adequate message and basically do nothing else, instead of fiddling with tukitd which apparently can easily go wild when used in a non-transactional system.

node_modules/.bin/webpack: not found

Installed with:

โžœ  cockpit-tukit git:(master) โœ— gcl https://github.com/openSUSE/cockpit-tukit.git              
โžœ  cockpit-tukit git:(master) โœ— cb              
โžœ  ~ rm -rf cockpit-tukit 
โžœ  ~ gcl https://github.com/openSUSE/cockpit-tukit.git
cd cockpit-tukit
make
sudo make install
Cloning into 'cockpit-tukit'...
remote: Enumerating objects: 265, done.
remote: Counting objects: 100% (265/265), done.
remote: Compressing objects: 100% (169/169), done.
remote: Total 265 (delta 164), reused 188 (delta 91), pack-reused 0
Receiving objects: 100% (265/265), 200.17 KiB | 3.23 MiB/s, done.
Resolving deltas: 100% (164/164), done.
flock Makefile sh -ec '\
    git fetch --depth=1 https://github.com/cockpit-project/cockpit.git 251.3; \
    git checkout --force FETCH_HEAD -- pkg/lib; \
    git reset -- pkg/lib'
remote: Enumerating objects: 1404, done.
remote: Counting objects: 100% (1404/1404), done.
remote: Compressing objects: 100% (1277/1277), done.
remote: Total 1404 (delta 237), reused 463 (delta 36), pack-reused 0
Receiving objects: 100% (1404/1404), 6.91 MiB | 11.85 MiB/s, done.
Resolving deltas: 100% (237/237), done.
From https://github.com/cockpit-project/cockpit
 * tag               251.3      -> FETCH_HEAD
mv pkg/lib src/ && rmdir -p pkg
NODE_ENV=production node_modules/.bin/webpack
/bin/sh: 1: node_modules/.bin/webpack: not found
make: *** [Makefile:60: dist/manifest.json] Error 127

Tried to install webpack as suggested on webpack's site:

โžœ  cockpit-tukit git:(master) npm install --save-dev webpack                                 
npm WARN deprecated [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
npm WARN deprecated [email protected]: core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.

added 71 packages, and audited 72 packages in 8s

40 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
โžœ  cockpit-tukit git:(master) โœ— make
NODE_ENV=production node_modules/.bin/webpack
/bin/sh: 1: node_modules/.bin/webpack: not found
make: *** [Makefile:60: dist/manifest.json] Error 127

Fails to build

Currently there is a fail to build with current cockpit version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.