Git Product home page Git Product logo

cockpit-composer's Introduction

Cockpit Composer

codecov

The web interface for on-premises Image Builder!

Image Builder generates custom images suitable for deploying systems or uploading to the cloud. It integrates into Cockpit as a frontend for osbuild.

Install from official repositories

Cockpit Composer can be installed on RHEL and Fedora systems using:

    $ dnf install cockpit-composer

Make sure to install/enable Cockpit with:

    $ systemctl enable --now cockpit.socket

Install from source code

First download the code from Github:

    $ git clone https://github.com/osbuild/cockpit-composer.git
    $ cd cockpit-composer/

Install on MacOS (using a VM)

Running cockpit-composer on MacOS requires running a Fedora/CentOS/RHEL VM.

This installation focuses on a visual install. There are many tools to create a VM on Mac but the following steps are focused on the open source VM host UTM. Other VM tools should work similarly.

  1. Create/download an installer .iso. Using hosted Image Builder is a great way to create this installer with cockpit-composer and dependencies already installed.

  2. Select Create a New Virtual Machine.

  3. Assuming the installer is for ARM/AArch64 Virtualize is the best selection. But UTM can also Emulate x86_64. Select whichever is best for your system.

  4. Select your installer as the Boot ISO Image.

  5. Edit the VM settings but the defaults should be fine.

  6. Make sure the VM's network is set to bridged so that you can access it from your host machine.

  7. Click through installer steps.

  8. If your image was not preinstalled with cockpit-composer follow the instructions in the Install from official repositories section.

  9. Inside the running VM get the IP address. The command ip a will show the network settings and will include the IP to access the VM.

  10. In a browser, on the host machine, navigate to port 9090 on the VM's IP address. i.e. https://192.168.178.00:9090/

  11. Login and access Image Builder in Cockpit.

Development instructions

It's easy to set up your local machine to develop on Cockpit Composer.

Install the development dependencies

On Fedora or Red Hat Enterprise Linux:

    $ dnf install osbuild-composer cockpit
    $ systemctl start osbuild-composer
  • Cockpit Composer uses Node.js during development. Node.js is not used at runtime. To make changes on Cockpit you'll want to install Node.js, NPM.
    $ dnf install nodejs npm
  • In order to build an rpm, rpm-build is required
    $ dnf install rpm-build

Build and run

  • To build Cockpit Composer, run:
    $ make build

This will create a public directory which can be sym-linked into Cockpit as a plugin:

    $ mkdir -p ~/.local/share/cockpit
    $ ln -s $(pwd)/public ~/.local/share/cockpit/composer

Now you can log into Cockpit Composer on your local machine at the following address. Use the same user and password that you used to log into your local user account.

https://localhost:9090/composer

Cockpit Composer can also be built in watch mode so that it will rebuild on code changes without having to manually rerun make build. This can be done using:

    npm ci
    npm run watch

Style linters

We use eslint and prettier to enforce code style. To run the linters, run:

    $ npm run lint
    $ npm run prettier

Any auto fixable errors can be corrected with:

    $ npm run format

Build rpm

    $ make rpm

Run integration test

Run test without visually seeing what the browser is doing:

    $ make check

To learn more about testing see our testing docs.

Cockpit API

To keep Cockpit Composer working with Cockpit API all code should follow the following rules.

  • All urls in the html and javascript need to use relative paths.
  • All requests to the API should be made using utils.apiFetch. Any non API fetch requests must use credentials: 'same-origin' so that cookies are included with those ajax requests.
  • Use hashes for navigation within the SPA so that cockpit can keep the top level location display up to date.

Automated maintenance

It is important to keep the NPM modules up to date, to keep up with security updates and bug fixes. This is done automatically by Dependabot. which is run daily.

Similarly, translations are refreshed automatically by Weblate.

License

This source code is licensed under the MIT license found in the LICENSE.txt file.


Made with โ™ฅ by the OSBuild team, Welder team, Cockpit team, and contributors

cockpit-composer's People

Contributors

jkozol avatar jgiardino avatar henrywang avatar dependabot[bot] avatar martinpitt avatar cockpituous avatar atodorov avatar larskarlitski avatar dashea avatar kkoukiou avatar bcl avatar marusak avatar lucasgarfield avatar weblate avatar jelly avatar ondrejbudai avatar regexowl avatar allisonkarlitskaya avatar mvollmer avatar stefwalter avatar teg avatar croissanne avatar andreasn avatar clumens avatar wgwoods avatar petervo avatar ochosi avatar alansill avatar chloenayon avatar evan-goode avatar

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.