1
0
mirror of https://github.com/rancher/os.git synced 2025-07-18 17:11:04 +00:00

Merge pull request #3 from mudler/master

Cleanup after integrating changes into cOS
This commit is contained in:
Darren Shepherd 2021-07-12 10:46:33 -07:00 committed by GitHub
commit e38bab4144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 19 additions and 54 deletions

View File

@ -1,20 +1,23 @@
ARG LUET_VERSION=0.16.7
FROM quay.io/luet/base:$LUET_VERSION AS luet
FROM registry.suse.com/suse/sle15:15.3 AS base
# Copy luet from the official images
COPY --from=luet /usr/bin/luet /usr/bin/luet
ARG ARCH=amd64
ENV ARCH=${ARCH}
ENV LUET_VERSION 0.16.7
RUN zypper rm -y container-suseconnect
RUN zypper ar --priority=200 http://download.opensuse.org/distribution/leap/15.3/repo/oss repo-oss
RUN zypper --no-gpg-checks ref
COPY files/etc/luet/luet.yaml /etc/luet/luet.yaml
RUN zypper in -y curl
RUN curl -sfL -o /usr/bin/luet https://github.com/mudler/luet/releases/download/${LUET_VERSION}/luet-${LUET_VERSION}-linux-${ARCH} && \
chmod +x /usr/bin/luet
FROM base as tools
RUN zypper in -y docker squashfs xorriso
ENV LUET_NOLOCK=true
RUN zypper in -y squashfs xorriso
COPY tools /
RUN luet install -y repository/luet repository/mocaccino-repository-index
RUN luet install -y extension/makeiso
RUN luet install -y toolchain/luet-makeiso
FROM base
RUN zypper in -y \
@ -72,9 +75,6 @@ RUN zypper in -y \
vim \
which
RUN curl -L https://github.com/rancher/rancherd/releases/download/v0.0.1-alpha05/rancherd-${ARCH} > /usr/bin/rancherd && \
chmod +x /usr/bin/rancherd
ARG CACHEBUST
RUN luet install -y \
toolchain/yip \
@ -86,7 +86,8 @@ RUN luet install -y \
selinux/k3s \
selinux/rancher \
utils/k9s \
utils/nerdctl
utils/nerdctl \
utils/rancherd
COPY files/ /
RUN mkinitrd

View File

@ -1,6 +1,6 @@
.DEFAULT_GOAL := iso
REPO=ibuildthecloud/test
LABEL=latest
REPO?=ibuildthecloud/test
LABEL?=latest
IMAGE=${REPO}:${LABEL}
TOOLS=${IMAGE}-tools
@ -21,10 +21,10 @@ tools:
docker build -t ${TOOLS} --target tools .
.PHONY: iso
iso: tools build
iso: tools
mkdir -p build
rm -f build/iso-container
docker run -v /var/run:/var/run -it --cidfile=build/iso-container ${TOOLS} makeiso ${IMAGE}
docker run -it --cidfile=build/iso-container ${TOOLS} makeiso ${IMAGE}
docker cp $$(cat build/iso-container):/output.iso build/output.iso
docker rm -fv $$(cat build/iso-container)
rm -f build/iso-container

View File

@ -10,5 +10,5 @@ stages:
network:
- name: "Cloud providers datasources"
datasource:
providers: ["aws", "gcp", "cdrom"]
providers: ["aws", "gcp", "cdrom", "openstack"]
path: "/oem"

View File

@ -1,15 +0,0 @@
#!/bin/bash
set -x -e
if [ "$FORCE" != "true" ]; then
if diff /etc/os-release /host/etc/os-release >/dev/null; then
echo Update to date with
cat /etc/os-release
exit 0
fi
fi
mount --rbind /host/dev /dev
mount --rbind /host/run /run
bash -x cos-upgrade --directory /
nsenter -i -m -t 1 -- reboot
exit 1

View File

@ -1,9 +0,0 @@
name: "mocaccino-repository-index"
description: "MocaccinoOS Repository Index"
type: "http"
enable: true
cached: true
priority: 1
urls:
- "https://raw.githubusercontent.com/mocaccinoOS/repository-index/gh-pages"
- "https://get.mocaccino.org/mocaccino-repository-index"

View File

@ -1,6 +1,4 @@
packages:
rootfs:
- iso/rootfs
uefi:
- live/systemd-boot
- live/boot

View File

@ -1,2 +0,0 @@
image: "{{.Values.image}}"
unpack: true

View File

@ -1,3 +0,0 @@
name: "rootfs"
category: "iso"
version: "0"

View File

@ -1 +0,0 @@
image: "${IMAGE}"

View File

@ -10,11 +10,7 @@ if [ -z "$IMAGE" ]; then
fi
cd /iso
cat > values.yaml << EOF
image: "$IMAGE"
EOF
luet build --values values.yaml iso/rootfs
luet create-repo
luet-makeiso iso.yaml --local /iso/build
luet-makeiso iso.yaml --image "$IMAGE"
cp distro*iso /output.iso