forked from sig_core/toolkit
Modify all Configs and add image puller
* Add livemap and imagemap to configs * Add cloud image puller to iso_utils (part 1) * Simplify color logging (potential prep for colorlog)
This commit is contained in:
parent
6946b737fc
commit
b54447571b
@ -72,6 +72,19 @@
|
|||||||
- 'lorax-templates-rhel'
|
- 'lorax-templates-rhel'
|
||||||
- 'lorax-templates-generic'
|
- 'lorax-templates-generic'
|
||||||
- 'xorriso'
|
- 'xorriso'
|
||||||
|
cloudimages:
|
||||||
|
- EC2
|
||||||
|
- GenericCloud
|
||||||
|
livemap:
|
||||||
|
git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
|
||||||
|
branch: 'r9'
|
||||||
|
ksentry:
|
||||||
|
- rocky-live-workstation.ks
|
||||||
|
- rocky-live-workstation-lite.ks
|
||||||
|
- rocky-live-xfce.ks
|
||||||
|
- rocky-live-kde.ks
|
||||||
|
allowed_arches:
|
||||||
|
- x86_64
|
||||||
repoclosure_map:
|
repoclosure_map:
|
||||||
arches:
|
arches:
|
||||||
x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch'
|
x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch'
|
||||||
|
@ -75,6 +75,16 @@
|
|||||||
cloudimages:
|
cloudimages:
|
||||||
- EC2
|
- EC2
|
||||||
- GenericCloud
|
- GenericCloud
|
||||||
|
livemap:
|
||||||
|
git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
|
||||||
|
branch: 'r9-beta'
|
||||||
|
ksentry:
|
||||||
|
- rocky-live-workstation.ks
|
||||||
|
- rocky-live-workstation-lite.ks
|
||||||
|
- rocky-live-xfce.ks
|
||||||
|
- rocky-live-kde.ks
|
||||||
|
allowed_arches:
|
||||||
|
- x86_64
|
||||||
repoclosure_map:
|
repoclosure_map:
|
||||||
arches:
|
arches:
|
||||||
x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch'
|
x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch'
|
||||||
|
@ -72,6 +72,19 @@
|
|||||||
- 'lorax-templates-rhel'
|
- 'lorax-templates-rhel'
|
||||||
- 'lorax-templates-generic'
|
- 'lorax-templates-generic'
|
||||||
- 'xorriso'
|
- 'xorriso'
|
||||||
|
cloudimages:
|
||||||
|
- EC2
|
||||||
|
- GenericCloud
|
||||||
|
livemap:
|
||||||
|
git_repo: 'https://git.resf.org/sig_core/kickstarts.git'
|
||||||
|
branch: 'r9lh'
|
||||||
|
ksentry:
|
||||||
|
- rocky-live-workstation.ks
|
||||||
|
- rocky-live-workstation-lite.ks
|
||||||
|
- rocky-live-xfce.ks
|
||||||
|
- rocky-live-kde.ks
|
||||||
|
allowed_arches:
|
||||||
|
- x86_64
|
||||||
repoclosure_map:
|
repoclosure_map:
|
||||||
arches:
|
arches:
|
||||||
x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch'
|
x86_64: '--forcearch=x86_64 --arch=x86_64 --arch=athlon --arch=i686 --arch=i586 --arch=i486 --arch=i386 --arch=noarch'
|
||||||
|
33
iso/empanadas/empanadas/scripts/pull_cloud_image.py
Executable file
33
iso/empanadas/empanadas/scripts/pull_cloud_image.py
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
# builds ISO's
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
from empanadas.common import *
|
||||||
|
from empanadas.util import Checks
|
||||||
|
from empanadas.util import IsoBuild
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="ISO Artifact Builder")
|
||||||
|
|
||||||
|
parser.add_argument('--release', type=str, help="Major Release Version", required=True)
|
||||||
|
parser.add_argument('--s3', action='store_true', help="Release Candidate")
|
||||||
|
parser.add_argument('--arch', type=str, help="Architecture")
|
||||||
|
parser.add_argument('--local-compose', action='store_true', help="Compose Directory is Here")
|
||||||
|
parser.add_argument('--force-download', action='store_true', help="Force a download")
|
||||||
|
parser.add_argument('--logger', type=str)
|
||||||
|
results = parser.parse_args()
|
||||||
|
rlvars = rldict[results.release]
|
||||||
|
major = rlvars['major']
|
||||||
|
|
||||||
|
a = IsoBuild(
|
||||||
|
rlvars,
|
||||||
|
config,
|
||||||
|
major=major,
|
||||||
|
s3=results.s3,
|
||||||
|
arch=results.arch,
|
||||||
|
force_download=results.force_download,
|
||||||
|
compose_dir_is_here=results.local_compose,
|
||||||
|
logger=results.logger,
|
||||||
|
)
|
||||||
|
|
||||||
|
def run():
|
||||||
|
a.run_pull_generic_images()
|
@ -1566,6 +1566,47 @@ class IsoBuild:
|
|||||||
self.log
|
self.log
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if not len(latest_artifacts) > 0:
|
||||||
|
self.log.warn(Color.WARN + 'No images found.')
|
||||||
|
continue
|
||||||
|
|
||||||
|
self.log.info(Color.INFO + 'Downloading requested artifacts')
|
||||||
|
for arch in arches_to_unpack:
|
||||||
|
image_arch_dir = os.path.join(
|
||||||
|
self.image_work_dir,
|
||||||
|
arch
|
||||||
|
)
|
||||||
|
|
||||||
|
source_path = latest_artifacts[arch]
|
||||||
|
drop_name = source_path.split('/')[-1]
|
||||||
|
full_drop = '{}/{}'.format(
|
||||||
|
image_arch_dir,
|
||||||
|
drop_name
|
||||||
|
)
|
||||||
|
|
||||||
|
if not os.path.exists(image_arch_dir):
|
||||||
|
os.makedirs(image_arch_dir, exist_ok=True)
|
||||||
|
|
||||||
|
self.log.info('Downloading artifact for ' + Color.BOLD + arch + Color.END)
|
||||||
|
if self.s3:
|
||||||
|
Shared.s3_download_artifacts(
|
||||||
|
self.force_download,
|
||||||
|
self.s3_bucket,
|
||||||
|
source_path,
|
||||||
|
full_drop,
|
||||||
|
self.log
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
Shared.reqs_download_artifacts(
|
||||||
|
self.force_download,
|
||||||
|
self.s3_bucket_url,
|
||||||
|
source_path,
|
||||||
|
full_drop,
|
||||||
|
self.log
|
||||||
|
)
|
||||||
|
|
||||||
|
self.log.info(Color.INFO + 'Image download phase completed')
|
||||||
|
|
||||||
|
|
||||||
def run_build_live_iso(self):
|
def run_build_live_iso(self):
|
||||||
"""
|
"""
|
||||||
|
@ -540,6 +540,7 @@ class Shared:
|
|||||||
if arch in y:
|
if arch in y:
|
||||||
temps.append(y)
|
temps.append(y)
|
||||||
temps.sort(reverse=True)
|
temps.sort(reverse=True)
|
||||||
|
if len(temps) > 0:
|
||||||
data[arch] = temps[0]
|
data[arch] = temps[0]
|
||||||
|
|
||||||
return data
|
return data
|
||||||
@ -594,6 +595,7 @@ class Shared:
|
|||||||
if arch in y:
|
if arch in y:
|
||||||
temps.append(y)
|
temps.append(y)
|
||||||
temps.sort(reverse=True)
|
temps.sort(reverse=True)
|
||||||
|
if len(temps) > 0:
|
||||||
data[arch] = temps[0]
|
data[arch] = temps[0]
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
@ -31,6 +31,7 @@ pull-unpack-tree = "empanadas.scripts.pull_unpack_tree:run"
|
|||||||
launch-builds = "empanadas.scripts.launch_builds:run"
|
launch-builds = "empanadas.scripts.launch_builds:run"
|
||||||
build-image = "empanadas.scripts.build_image:run"
|
build-image = "empanadas.scripts.build_image:run"
|
||||||
finalize_compose = "empanadas.scripts.finalize_compose:run"
|
finalize_compose = "empanadas.scripts.finalize_compose:run"
|
||||||
|
pull-cloud-image = "empanadas.scripts.pull_cloud_image:run"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["poetry-core>=1.0.0"]
|
requires = ["poetry-core>=1.0.0"]
|
||||||
|
Loading…
Reference in New Issue
Block a user