container: Add unstable distribution

Related freedombox-team/infrastructure!38

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Joseph Nuthalapati 2020-07-07 07:41:38 +05:30 committed by Veiko Aasa
parent 572479068f
commit 2773c4737e
No known key found for this signature in database
GPG Key ID: 478539CAE680674E

View File

@ -133,6 +133,9 @@ URLS = {
'amd64/stable/freedombox-stable-free_buster_all-amd64.img.xz',
'testing': 'https://ftp.freedombox.org/pub/freedombox/hardware/'
'amd64/testing/freedombox-testing-free_latest_all-amd64.img.xz',
'unstable':
'https://ftp.freedombox.org/pub/freedombox/hardware/'
'amd64/nightly/freedombox-unstable-free_dailydebian_all-amd64.img.xz',
}
TRUSTED_KEYS = ['013D86D8BA32EAB4A6691BF85D4153D6FE188FC8']
@ -176,37 +179,39 @@ def parse_arguments():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers(dest='subcommand', help='Sub command')
distributions = list(URLS.keys())
# Up
subparser = subparsers.add_parser('up', help='Bring up the container')
subparser.add_argument(
'--distribution', choices=['stable', 'testing'], default='testing',
'--distribution', choices=distributions, default='testing',
help='Distribution of the image to download and setup')
subparser.add_argument('--image-size', default='8G',
help='Disk image size to resize to after download')
# ssh
subparser = subparsers.add_parser('ssh', help='SSH into the container')
subparser.add_argument('--distribution', choices=['stable', 'testing'],
subparser.add_argument('--distribution', choices=distributions,
default='testing',
help='Distribution of the container to SSH into')
# Stop
subparser = subparsers.add_parser('stop', help='Stop the container')
subparser.add_argument('--distribution', choices=['stable', 'testing'],
subparser.add_argument('--distribution', choices=distributions,
default='testing',
help='Distribution of the container to stop')
# Destroy
subparser = subparsers.add_parser('destroy',
help='Destroy the container image')
subparser.add_argument('--distribution', choices=['stable', 'testing'],
subparser.add_argument('--distribution', choices=distributions,
default='testing',
help='Distribution of the image to delete')
# Update
subparser = subparsers.add_parser(
'update', help='Update the container image to the latest version')
subparser.add_argument('--distribution', choices=['stable', 'testing'],
subparser.add_argument('--distribution', choices=distributions,
default='testing',
help='Distribution of the image to update')