Giter VIP home page Giter VIP logo

ib's Introduction

ib

ib is a command line client for Red Hat's Image Builder. A hosted service that lets you build customized operating system images for various architectures and in various output formats.

API

To use ib you need an offline token which requires you to have a Red Hat Subscription. A free developer subscription gives you access.

To obtain an offline token you visit the Red Hat API Tokens page and store it in your environment under the name REDHAT_OFFLINE_TOKEN.

If you forget to do so then ib will tell you the same.

Examples

This example builds a CentOS Stream 9 QCOW image for the x86 architecture and writes it to a file called image.qcow.

€ ib c -a x86_64 -d centos-9 -t guest-image -o image.qcow
queued 968d1756-9121-47cb-8f27-3582639206aa
waiting ........................
downloading 968d1756-9121-47cb-8f27-3582639206aa

If you wish for a bit more control then the queuing, status, and downloading steps can be performed separately with the ib c q, ib c s, and ib c d commands. Check their -help for any arguments you might need.

If you want to list available distributions you use ib i d, if you want to know which architectures support which image types you can use ib i a -d centos-9.

The images you download can be customized in various ways:

Packages

Installing additional packages is done through -p argument which takes a comma-separated list of package names:

€ ib c -a x86_64 -d centos-9 -t guest-image -p nginx,tmux -o image.qcow

ib's People

Contributors

supakeen avatar

Watchers

 avatar

ib's Issues

Actual error handling

ib currently doesn't handle errrors, in many cases returning empty values or just continuing on invalid data. It should handle errors.

Add a RPM Specfile

It'd be useful to package ib for downstreams in the upstream repository. Let's set up a .spec file initially.

Wrap `net/http` to automatically refresh token

Currently ib uses a pretty naive and dirty way of refreshing access tokens. It tries to do a request before it starts using any authenticated endpoint; if this fails then the token is refreshed.

Instead there should be a separate function to perform requests which re-authenticates when the token is invalid and retries the request.

User Customizations

Support the user customizations of the Image Builder API in the ib c and ib c q commands.

Compose Pruning

Add a command ib c x to automatically prune all composes in expired state.

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.