compress genericcloud and vagrant images by default

* add azure support
* use download.r.o url
pull/1/head
Neil Hanlon 1 month ago
parent 193c3f9b73
commit 1f94680924
Signed by: neil
GPG Key ID: 705BC21EC3C70F34
  1. 2
      iso/empanadas/Containerfile.imagefactory
  2. 8
      iso/empanadas/empanadas/scripts/build_image.py
  3. 2
      iso/empanadas/empanadas/templates/icicle/tdl.xml.tmpl

@ -57,7 +57,7 @@ RUN rm -rf /etc/yum.repos.d/*.repo /get_arch
RUN pip install awscli
ENV BRANCH r9
ARG BRANCH r9
RUN git clone https://git.resf.org/sig_core/kickstarts.git --branch $BRANCH /kickstarts
RUN pip install 'git+https://git.resf.org/sig_core/toolkit.git@devel#egg=empanadas&subdirectory=iso/empanadas'

@ -100,7 +100,7 @@ class ImageBuild:
]
if self.image_type in ["GenericCloud"]:
self.stage_commands = [
["qemu-img", "convert", "-f", "raw", "-O", "qcow2", lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.qcow2"]
["qemu-img", "convert", "-c", "-f", "raw", "-O", "qcow2", lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.qcow2"]
]
if self.image_type in ["EC2"]:
self.stage_commands = [
@ -120,7 +120,7 @@ class ImageBuild:
}
output = f"{_map[self.variant]}" #type: ignore
self.stage_commands = [
["qemu-img", "convert", "-f", "raw", "-O", output, lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.{output}"]
["qemu-img", "convert", "-c", "-f", "raw", "-O", output, lambda: f"{STORAGE_DIR}/{self.target_uuid}.body", f"{self.outdir}/{self.outname}.{output}"]
]
@ -174,7 +174,7 @@ class ImageBuild:
args = []
if self.image_type == "Container":
args = ["--parameter", "offline_icicle", "true"]
if self.image_type in ["GenericCloud", "EC2"]:
if self.image_type in ["GenericCloud", "EC2", "Vagrant", "Azure"]:
args = ["--parameter", "generate_icicle", "false"]
return args
@ -354,7 +354,7 @@ class ImageBuild:
log_lines("Command STDERR", stderr)
def fix_ks(self):
self.runCmd(["sed", "-i", f"s,$basearch,{self.architecture.name},", self.kickstart_arg[-1]])
self.runCmd(["sed", "-i", f"s,$basearch,{self.architecture.name},", self.kickstart_arg[-1]], search=False)
def render_kubernetes_job(self):
commands = [self.build_command(), self.package_command(), self.copy_command()]

@ -5,7 +5,7 @@
<version>{{minor}}</version>
<arch>{{architecture}}</arch>
<install type='url'>
<url>https://dl.rockylinux.org/stg/rocky/{{major}}/BaseOS/{{architecture}}/{{installdir}}</url>
<url>https://download.rockylinux.org/pub/rocky/{{major}}/BaseOS/{{architecture}}/{{installdir}}</url>
</install>
<icicle>
<extra_command>rpm -qa --qf '%{NAME},%{VERSION},%{RELEASE},%{ARCH},%{EPOCH},%{SIZE},%{SIGMD5},%{BUILDTIME}

Loading…
Cancel
Save