Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: opennebula-context-voidlinux-0.0.2
@ 2024-01-06 10:33 brodriguez-opennebula
  2024-01-06 11:34 ` [PR PATCH] [Updated] " brodriguez-opennebula
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: brodriguez-opennebula @ 2024-01-06 10:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2389 bytes --]

There is a new pull request by brodriguez-opennebula against master on the void-packages repository

https://github.com/brodriguez-opennebula/void-packages opennebula-context-voidlinux
https://github.com/void-linux/void-packages/pull/48089

New package: opennebula-context-voidlinux-0.0.2
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->

#### Local build testing
- I built this PR locally for my native architecture, x86_64-musl

#### Comments

This is a clean up and custom rewrite of the [OpenNebula](https://opennebula.io/) [contextualization scripts](https://github.com/OpenNebula/addon-context-linux) that provide contextualization in a guest system for an image. In this case the original package is not being used because it was created with "main" distributions in mind (redhat-alike, debian-alike).

Contextualization in OpenNebula tries to keep it simple (it doesn't want to be cloud-init). Everytime the context of the VM is changed, an ISO is generated and loaded into the VM. A `udev` rule then restarts the service, which in its turn runs the scripts that reconfigure the system. 

OpenNebula tries to be distribution agnostic so most scripts are written in shell (I know it goes against the rules), but they provide added value. The package also provides the ruby-written `onegate` command that gathers information about different elements running in a virtual infrastructure.

Its dependencies would be:
- `jq` is used to parse some `iproute2` commands
- `curl` for reporting that the VM is ready
- `ruby` for onegate (script that gathers information from the virtualization system)
- `qemu-ga`, the qemu guest agent for the VM

Thank you

A patch file from https://github.com/void-linux/void-packages/pull/48089.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-opennebula-context-voidlinux-48089.patch --]
[-- Type: text/x-diff, Size: 2592 bytes --]

From b004a37f419202071117a1aa050ef9790531af7e Mon Sep 17 00:00:00 2001
From: Bruno Rodriguez <brodriguez@opennebula.io>
Date: Sat, 6 Jan 2024 11:04:59 +0100
Subject: [PATCH] New package: opennebula-context-voidlinux-0.0.2

---
 .../opennebula-context-voidlinux/INSTALL.msg  | 15 +++++++++
 srcpkgs/opennebula-context-voidlinux/template | 31 +++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/INSTALL.msg
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/INSTALL.msg b/srcpkgs/opennebula-context-voidlinux/INSTALL.msg
new file mode 100644
index 0000000000000..8297f6f1a27cf
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/INSTALL.msg
@@ -0,0 +1,15 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+To enable opennebula contextualization in a clean installation:
+
+- Enable service `one-contextd`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Enable service `qemu-ga`:
+  # ln -s /etc/sv/one-contextd /var/service
+
+- Execute onesysprep
+
+Contextualized network config is stored in `/etc/network_config`
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..1ce7a134a6f27
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,31 @@
+# Template file for 'opennebula-context'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+short_desc="Contextualization scripts for opennebula"
+depends="curl jq qemu-ga ruby"
+maintainer="brodriguez <brodriguez@opennebula.io>"
+license="Apache-2.0"
+homepage="https://github.com/brodriguez-opennebula/opennebula-context-voidlinux"
+distfiles="${homepage}/archive/refs/tags/${version}.tar.gz"
+checksum=d5f46e318fb1d01cf70d2868bf3528646021d4e6f12440955853a38a747b4314 
+
+do_build() {
+    make install
+}
+
+do_install() {
+    vinstall /usr/bin/onesysprep 540 /usr/bin
+    vinstall /usr/bin/growpart 540 /usr/bin
+    vinstall /usr/bin/one-contextd 540 /usr/bin
+    vinstall /usr/bin/onegate.rb 540 /usr/bin
+    vinstall /usr/bin/onegate 540 /usr/bin
+
+    vmkdir /etc/one-context.d 
+    vcopy /etc/one-context.d/* /etc/one-context.d 
+    vinstall /usr/lib/udev/rules.d/65-context.rules 0444 usr/lib/udev/rules.d/
+    vinstall /etc/sv/one-contextd/run 0544 etc/sv/one-contextd
+    vinstall /etc/sv/one-contextd/log/run 0544 etc/sv/one-contextd/log
+}
+

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-09 13:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-06 10:33 [PR PATCH] New package: opennebula-context-voidlinux-0.0.2 brodriguez-opennebula
2024-01-06 11:34 ` [PR PATCH] [Updated] " brodriguez-opennebula
2024-01-06 20:04 ` ahesford
2024-01-07 10:17 ` [PR PATCH] [Updated] " brodriguez-opennebula
2024-01-07 10:25 ` brodriguez-opennebula
2024-01-07 10:27 ` brodriguez-opennebula
2024-01-07 10:30 ` [PR PATCH] [Updated] " brodriguez-opennebula
2024-01-07 10:32 ` brodriguez-opennebula
2024-01-07 18:51 ` brodriguez-opennebula
2024-01-09 10:57 ` brodriguez-opennebula
2024-04-09  1:45 ` github-actions
2024-04-09  8:13 ` brodriguez-opennebula
2024-04-09 13:31 ` [PR PATCH] [Updated] " brodriguez-opennebula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).