Github messages for voidlinux
 help / color / mirror / Atom feed
From: brodriguez-opennebula <brodriguez-opennebula@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: opennebula-context-voidlinux-0.0.2
Date: Sun, 07 Jan 2024 11:30:32 +0100	[thread overview]
Message-ID: <20240107103032.Lu2QYXZfII4qV6ZaJKR_ttmVdwXU4SOBNhTyjBznDyk@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48089@inbox.vuxu.org>

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

There is an updated 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: 3347 bytes --]

From 897001f19ffc70349a4a8fa91723a207123e51c2 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

---
 .../files/README.voidlinux                    | 35 +++++++++++++++++++
 srcpkgs/opennebula-context-voidlinux/template | 30 ++++++++++++++++
 2 files changed, 65 insertions(+)
 create mode 100644 srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
 create mode 100644 srcpkgs/opennebula-context-voidlinux/template

diff --git a/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
new file mode 100644
index 0000000000000..c6b58bde6e575
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/files/README.voidlinux
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+# OpenNebula contextualization package
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+This package provides the necessary scripts to configure automatically 
+the system via OpenNebula contextualization.
+
+To enable it 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
+
+After this, use the image for a template.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
+
+NETWORKING NOTES
+
+For other distributions OpenNebula does rely on it (i.e. networkd, 
+NetworkManager, etc.). 
+
+As Void linux gives you freedom to choose the way you want to 
+configure your network and OpenNebula likes to keep things simple, 
+this contextualization package will generate just the necessary 
+iproute2 commands to configure it. 
+
+This contextualized network config is stored in `/etc/network_config`
+and will be regenerated every time the context changes.
+
+# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
diff --git a/srcpkgs/opennebula-context-voidlinux/template b/srcpkgs/opennebula-context-voidlinux/template
new file mode 100644
index 0000000000000..fdd69b73508d4
--- /dev/null
+++ b/srcpkgs/opennebula-context-voidlinux/template
@@ -0,0 +1,30 @@
+# Template file for 'opennebula-context-voidlinux'
+pkgname=opennebula-context-voidlinux
+version=0.0.2
+revision=1
+build_style=gnu-makefile
+depends="curl jq qemu-ga ruby"
+short_desc="Contextualization scripts for opennebula"
+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
+}

  parent reply	other threads:[~2024-01-07 10:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-06 10:33 [PR PATCH] " 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 ` brodriguez-opennebula [this message]
2024-01-07 10:32 ` [PR PATCH] [Updated] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240107103032.Lu2QYXZfII4qV6ZaJKR_ttmVdwXU4SOBNhTyjBznDyk@z \
    --to=brodriguez-opennebula@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).