Skip to content

Linstor support #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -205,6 +205,44 @@ sudo ./scripts/create-installimg.sh \
8.3:testing install-8.3.testing.img
```

### 8.3 updates and linstor

The standalone linstor ISO requires extra packages from a separate
repository.

```
./scripts/mirror-repos.sh 8.3 ~/mirrors/xcpng

sudo ./scripts/create-installimg.sh \
--srcurl file://$HOME/mirrors/xcpng/8.3 \
--output install-8.3.img \
8.3:updates

./scripts/create-iso.sh \
--srcurl file://$HOME/mirrors/xcpng/8.3 \
--output xcp-ng-8.3.linstor.iso \
--extra-packages "xcp-ng-linstor" \
-V "XCP-NG_830_TEST" \
8.3:testing:linstor install-8.3.img
```

> [!NOTE]
>
> This example only pulls the latest version of the LINSTOR packages.
> To be suitable for update of a LINSTOR-enabled XCP-ng 8.2.1, it must
> *also* be provided with the version matching the 8.2.1 installation.

FIXME: the `linstor` overlay for now downloads the packages from the
server without going through a local mirror, and thus does not benefit
yet from the stability guaranties a local mirror offers. The
`linstor` repository can still be mirrored as follow, but
`configs/linstor/yum-repos.conf.tmpl` will have to be adjusted by hand
to use it:

```
./scripts/mirror-repos.sh https://repo.vates.tech/xcp-ng/8/8.3 ~/mirrors/xcpng-rvt
```

### tip of 8.2 (8.2 + updates)

```
1 change: 1 addition & 0 deletions configs/8.2/yumdl.conf.tmpl
Original file line number Diff line number Diff line change
@@ -4,3 +4,4 @@ basearch=@@RPMARCH@@
reposdir=@@YUMREPOSD@@
cachedir=@@CACHEDIR@@
persistdir=/dev/null
skip_missing_names_on_install=0
1 change: 1 addition & 0 deletions configs/8.3/yumdl.conf.tmpl
Original file line number Diff line number Diff line change
@@ -4,3 +4,4 @@ basearch=@@RPMARCH@@
reposdir=@@YUMREPOSD@@
cachedir=@@CACHEDIR@@
persistdir=/dev/null
skip_missing_names_on_install=0
6 changes: 6 additions & 0 deletions configs/linstor/yum-repos.conf.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[xcpng-linstor]
name=xcpng - linstor
baseurl=https://repo.vates.tech/xcp-ng/8/8.3/linstor/@@RPMARCH@@/
gpgkey=https://xcp-ng.org/RPM-GPG-KEY-xcpng
failovermethod=priority
skip_if_unavailable=False
10 changes: 9 additions & 1 deletion scripts/create-iso.sh
Original file line number Diff line number Diff line change
@@ -20,6 +20,8 @@ Options:
default: https://updates.xcp-ng.org/<MAJOR>/<DIST>
-D|--define-repo <NICK>!<URL>
add yum repo with name <NICK> and base URL <URL>
--extra-packages "<PACKAGE> [<PACKAGE> ...]"
include packages and their dependencies in repo
--efi-installer <mode> select how to build the GRUB EFI binary. Valid modes:
rpm: take prebuilt xenserver/grubx64.efi from rpm
mkimage: call mkimage to generate an EFI binary
@@ -36,6 +38,7 @@ FORCE_OVERWRITE=0
DOREPO=1
SIGNSCRIPT=
SRCURL=
EXTRA_PACKAGES=
declare -A CUSTOM_REPOS=()
RPMARCH="x86_64"
EFIMODE="rpm"
@@ -83,6 +86,11 @@ while [ $# -ge 1 ]; do
CUSTOM_REPOS["$nick"]="$url"
shift
;;
--extra-packages)
[ $# -ge 2 ] || die_usage "$1 needs an argument"
EXTRA_PACKAGES="$2"
shift
;;
--efi-installer)
[ $# -ge 2 ] || die_usage "$1 needs an argument"
case "$2" in
@@ -231,7 +239,7 @@ if [ $DOREPO = 1 ]; then

mkdir ${VERBOSE} "$ISODIR/Packages"

get_rpms --depends "$ISODIR/Packages" xcp-ng-deps kernel-alt
get_rpms --depends "$ISODIR/Packages" xcp-ng-deps kernel-alt ${EXTRA_PACKAGES}

createrepo_c ${VERBOSE} "$ISODIR"
if [ -n "$SIGNSCRIPT" ]; then
2 changes: 1 addition & 1 deletion scripts/mirror-repos.sh
Original file line number Diff line number Diff line change
@@ -26,5 +26,5 @@ command -v lftp >/dev/null || die "required tool not found: lftp"
lftp -c mirror \
--verbose \
--delete \
--exclude="/Source/|-debuginfo-|-devel[-_]|/xs-opam-repo|/ocaml|/golang|/java" \
--exclude="/Source/|-debuginfo-|-debug-|-devel[-_]|/xs-opam-repo|/ocaml|/golang" \
"$SRCURL" "$TARGET"