GithubHelp home page GithubHelp logo

helpers's Introduction

Helper scripts, some are related to Copr build system maintenance.

Generating copr images

The copr-image script is basically a generic way to modify a qcow2 image by using a ansible playbook. It downloads the given qcow2 image, prepares it with virt-sysprep, starts a VM using that image and executes the playbook against the VM. Once that is done, a new qcow2 image is generated from that VM, and the image is minimized.

Something like this could be implemented in virt-sysprep directly: https://bugzilla.redhat.com/show_bug.cgi?id=1954513

Quick HOWTO:

$ cat /etc/eimg/eimg.sh
# configure where to execute playbook from, and the playbook name
EIMG_COPR_PLAYBOOK_DIR=/home/praiskup/rh/projects/rhcopr/pagure/vm-provisioning
EIMG_COPR_PLAYBOOK=local-image-update.yml
$ copr-image https://download.fedoraproject.org/pub/fedora/linux/releases/34/Cloud/x86_64/images/Fedora-Cloud-Base-34-1.2.x86_64.qcow2
...
++ date -I
+ qemu-img convert -f qcow2 /tmp/wip-image-DZ4Fg.qcow2 -c -O qcow2 -o compat=0.10 /tmp/praiskup-eimg-hspElc/eimg-fixed-2021-04-28.qcow2
+ cleanup
+ rm -rf /tmp/wip-image-DZ4Fg.qcow2

... you can see that the final qcow image is on /tmp/praiskup-eimg-hspElc/eimg-fixed-2021-04-28.qcow2.

CI/CD of this project

Builds from the main branch are in copr repo.

Last build: last build

helpers's People

Contributors

praiskup avatar nikromen avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

nikromen

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.