mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
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:
parent
572479068f
commit
2773c4737e
15
container
15
container
@ -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')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user