From e3506a32084c4f31c0b82e42a04a4c7303b02aac Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Fri, 25 Dec 2020 15:13:54 +0100 Subject: [PATCH] Use base image from devbaseimgs.yunohost.org --- README.md | 15 +++++++++++---- lib/lxc.sh | 2 +- package_check.sh | 4 +++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bb6241c..afe5055 100644 --- a/README.md +++ b/README.md @@ -67,14 +67,21 @@ able to run `lxc` commands without sudo... You can check this with the command to propagate (sigh)) Then you shall initialize LXD which will ask you a bunch of question. Usually -answering the default (just pressing enter) to all questions is fine. +answering the default (just pressing enter) to all questions is fine - EXCEPT +for the size of the default storage it'll create (the default is 5G but you may +want 10 or 20G for heavy usage ?). ```bash -sudo lxd init +lxd init ``` -You can keep the default answer to all question EXCEPT the size of the default -storage it'll create (default is 5G but you probably want 10 instead ... or 20 for heavy usage) +The base images for tests are centralized on `devbaseimgs.yunohost.org` and we'll download them from there to speed things up: + +```bash +lxc remote add yunohost https://devbaseimgs.yunohost.org --public +``` + +(At the time this README is written, fingerprint is d9ae6e76c374e3c58c3c20a881cffe7435809adb3b222ec393805f5bd01bb522 ) Then you can : diff --git a/lib/lxc.sh b/lib/lxc.sh index 5bb289c..67b2119 100644 --- a/lib/lxc.sh +++ b/lib/lxc.sh @@ -6,7 +6,7 @@ LXC_CREATE () { lxc image list $LXC_BASE | grep -q -w $LXC_BASE || log_critical "The base image $LXC_BASE doesn't exist yet. Consider using the build_base_lxc.sh to create it first" - lxc launch $LXC_BASE $LXC_NAME || clean_exit 1 + lxc launch yunohost:$LXC_BASE $LXC_NAME || clean_exit 1 lxc config set "$LXC_NAME" security.nesting true _LXC_START_AND_WAIT $LXC_NAME set_witness_files diff --git a/package_check.sh b/package_check.sh index 0883fa8..6508ecc 100755 --- a/package_check.sh +++ b/package_check.sh @@ -9,9 +9,11 @@ print_help() { cat << EOF Usage: package_check.sh [OPTION]... PACKAGE_TO_CHECK - -r, --rebuild (Re)Build the base container -b, --branch=BRANCH Specify a branch to check. -i, --interactive Wait for the user to continue before each remove. + -r, --rebuild (Re)Build the base container + (N.B.: you're not supposed to use this option, images + are supposed to be fetch from devbaseimgs.yunohost.org automatically) -h, --help Display this help EOF exit 0