Overview
The Cockpit Starter Kit is a scaffolding tool for a Cockpit module. It provides the necessary dependencies and offers a convenient way to develop and test Cockpit modules.
Features
- Scaffolds a Cockpit module
- Manages development dependencies
- Provides a build process for distribution
Installation
To install the Cockpit Starter Kit, follow these steps:
- If you are using Debian or Ubuntu, run the following command to install the development dependencies:
$ apt-get install build-essential git libssl-dev rpm python2 python2-devel python2-setuptools python3-pexpect python3-pexpect python3-ptyprocess python3-pytest python3-pytest-cov python3-pytest-mock python3-pytest-xdist python3-pytest-localserver python3-pytest-sugar python3-pytest-timeout python3-wheel python3-sphinx python3-docutils npm libffi-dev libjpeg-dev -y
- If you are using Fedora, run the following command to install the development dependencies:
$ dnf install openssl-devel rpm-build python2-devel python3 python3-devel python3-setuptools python3-pexpect python3-ptyprocess python3-pytest python3-pytest-cov python3-pytest-mock python3-pytest-xdist python3-pytest-freezegun python2-pytest-localserver python3-pytest-localserver python3-pytest-flake8 python3-wheel python3-sphinx python3-docutils npm python3-libcomps libffi-devel libjpeg-devel -y
- Clone the Cockpit Starter Kit repository and navigate to the directory:
$ git clone https://github.com/cockpit-project/cockpit-starter-kit.git
$ cd cockpit-starter-kit
- Build the source code into the
dist/directory:
$ make
- Install the package in
/usr/local/share/cockpit/:
$ make install
- Set
NODE_ENV=productionto minify and compress the source files in production mode:
$ export NODE_ENV=production
- Run the Cockpit page in your browser to see the changes:
$ make devel-install
- If you want to uninstall the locally installed version, run the following command:
$ make devel-uninstall
Summary
The Cockpit Starter Kit is a helpful tool for developers looking to create Cockpit modules. It simplifies the installation process and provides a convenient way to manage dependencies and build the module. By following the installation guide, developers can quickly set up a development environment and start working on their Cockpit module.