Giter Site home page Giter Site logo

benschlueter / delegatio Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 21.17 MB

Delegatio is a framework that can be used to create isolated remote environments on a local machine. It currently supports Libvirt for Infrastructure and Kubernetes for container management.

License: GNU Affero General Public License v3.0

Go 98.73% Shell 0.94% CMake 0.33%
ctf kubernetes libvirt

delegatio's Introduction

  • ๐Ÿ”ญ Iโ€™m currently a PhD student in the SECTRS Group
  • I've worked / I am working with the following languages: Golang, C, C++, eBPF, VHDL, Python

delegatio's People

Contributors

3u13r avatar benschlueter avatar dependabot[bot] avatar nirusu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

nirusu

delegatio's Issues

Wait until crio is ready

Sometimes the bootstrapper is faster than crio, resulting in a failed installation. Wait for crio-service to be ready before marking a node a ready.

Unittest

  • provide better abstraction for the Kubernetes related code (i.e. create Interfaces)
  • abstract QEMU c binding to make the code testable
  • test the internal packages

Refactor the CLI

  • switch to Cobra
  • split create infra, install Kubernetes, and initialize Kubernetes into 3 cli subcommands
  • generate config files for each subcommand

Libvirt image issues

Errors during bootstrap the qemu instaces through libvirt

> ./cli --path=../images/image.qcow2 --type=qcow2
2022-12-09T18:29:40.288+0100	INFO	cli/main.go:44	starting delegatio cli	{"version": "2.0.0"}
2022-12-09T18:29:40.306+0100	INFO	qemu/create.go:20	creating storage pool
2022-12-09T18:29:40.320+0100	INFO	qemu/create.go:46	creating base storage image
2022-12-09T18:29:40.363+0100	INFO	qemu/create.go:54	uploading image to libvirt
2022-12-09T18:29:41.255+0100	INFO	qemu/util.go:69	image upload successful	{"image size": 1656160256, "transferred bytes": 1656750080}
2022-12-09T18:29:41.255+0100	INFO	qemu/create.go:87	creating network
2022-12-09T18:29:41.443+0100	INFO	qemu/create.go:72	creating storage volume 'boot'
2022-12-09T18:29:41.444+0100	INFO	qemu/create.go:72	creating storage volume 'boot'
2022-12-09T18:29:41.444+0100	INFO	qemu/create.go:72	creating storage volume 'boot'
2022-12-09T18:29:41.443+0100	INFO	qemu/qemu.go:62	registered Callback	{"fd": 0}
2022-12-09T18:29:41.490+0100	INFO	qemu/create.go:108	creating domain
2022-12-09T18:29:41.497+0100	INFO	qemu/create.go:108	creating domain
2022-12-09T18:29:41.497+0100	INFO	qemu/create.go:108	creating domain
2022-12-09T18:29:42.499+0100	INFO	qemu/qemu.go:56	qemu guest agent changed state	{"state": 2, "name": "delegatio-2"}
2022-12-09T18:29:42.499+0100	INFO	qemu/qemu.go:56	qemu guest agent changed state	{"state": 2, "name": "delegatio-0"}
2022-12-09T18:29:42.575+0100	PANIC	qemu/qemu.go:116	error spawning qemu instances	{"error": "error creating libvirt domain: virError(Code=1, Domain=10, Message='internal error: process exited while connecting to monitor: 2022-12-09T17:29:42.400659Z qemu-system-x86_64: -blockdev {\"node-name\":\"libvirt-1-format\",\"read-only\":false,\"driver\":\"qcow2\",\"file\":\"libvirt-1-storage\",\"backing\":\"libvirt-2-format\"}: Failed to get \"write\" lock\nIs another process using the image [/var/lib/libvirt/images/delegatio-1]?')"}
github.com/benschlueter/delegatio/qemu.(*LibvirtInstance).BootstrapKubernetes.func1
	/home/bschlueter/University/Github/delegatio/qemu/qemu.go:116
panic: error spawning qemu instances

goroutine 38 [running]:
go.uber.org/zap/zapcore.CheckWriteAction.OnWrite(0x1?, 0x1?, {0x0?, 0x0?, 0xc0007f4aa0?})
	/home/bschlueter/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:198 +0x65
go.uber.org/zap/zapcore.(*CheckedEntry).Write(0xc00011e410, {0xc0007f0ac0, 0x1, 0x1})
	/home/bschlueter/go/pkg/mod/go.uber.org/[email protected]/zapcore/entry.go:264 +0x3ec
go.uber.org/zap.(*Logger).Panic(0x0?, {0xcff163?, 0x1?}, {0xc0007f0ac0, 0x1, 0x1})
	/home/bschlueter/go/pkg/mod/go.uber.org/[email protected]/logger.go:251 +0x59
github.com/benschlueter/delegatio/qemu.(*LibvirtInstance).BootstrapKubernetes.func1(0x0?)
	/home/bschlueter/University/Github/delegatio/qemu/qemu.go:116 +0x157
created by github.com/benschlueter/delegatio/qemu.(*LibvirtInstance).BootstrapKubernetes
	/home/bschlueter/University/Github/delegatio/qemu/qemu.go:114 +0x50

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.