initial import for Open Source 🎉
This commit is contained in:
parent
1898c361f3
commit
9c0dd3b722
2048 changed files with 218743 additions and 0 deletions
26
buildman/qemu-coreos/Dockerfile
Normal file
26
buildman/qemu-coreos/Dockerfile
Normal file
|
@ -0,0 +1,26 @@
|
|||
FROM debian
|
||||
|
||||
RUN apt-get clean && apt-get update && apt-get upgrade -y # 03APR2017
|
||||
RUN apt-get install -y \
|
||||
bzip2 \
|
||||
curl \
|
||||
openssh-client \
|
||||
qemu-kvm
|
||||
|
||||
ARG channel=stable
|
||||
ARG version=current
|
||||
|
||||
RUN echo "Downloading http://${channel}.release.core-os.net/amd64-usr/${version}/coreos_production_qemu_image.img.bz2"
|
||||
RUN curl -s -O http://${channel}.release.core-os.net/amd64-usr/${version}/coreos_production_qemu_image.img.bz2 && \
|
||||
bzip2 -d coreos_production_qemu_image.img.bz2
|
||||
|
||||
RUN apt-get remove -y curl bzip2 && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY start.sh /start.sh
|
||||
|
||||
LABEL com.coreos.channel ${channel}
|
||||
LABEL com.coreos.version ${version}
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/start.sh"]
|
5
buildman/qemu-coreos/README.md
Normal file
5
buildman/qemu-coreos/README.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Builder Image
|
||||
|
||||
```
|
||||
docker build --build-arg channel=stable --build-arg version=current -t quay.io/quay/quay-builder-qemu-coreos:staging .
|
||||
```
|
26
buildman/qemu-coreos/start.sh
Normal file
26
buildman/qemu-coreos/start.sh
Normal file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
VM_VOLUME_SIZE="${VM_VOLUME_SIZE:-32G}"
|
||||
VM_MEMORY="${VM_MEMORY:-4G}"
|
||||
|
||||
set -e
|
||||
set -x
|
||||
set -o nounset
|
||||
|
||||
mkdir -p /userdata/openstack/latest
|
||||
echo "${USERDATA}" > /userdata/openstack/latest/user_data
|
||||
|
||||
time qemu-img resize ./coreos_production_qemu_image.img "${VM_VOLUME_SIZE}"
|
||||
|
||||
qemu-system-x86_64 \
|
||||
-enable-kvm \
|
||||
-cpu host \
|
||||
-device virtio-9p-pci,fsdev=conf,mount_tag=config-2 \
|
||||
-nographic \
|
||||
-drive if=virtio,file=./coreos_production_qemu_image.img \
|
||||
-fsdev local,id=conf,security_model=none,readonly,path=/userdata \
|
||||
-m "${VM_MEMORY}" \
|
||||
-machine accel=kvm \
|
||||
-net nic,model=virtio \
|
||||
-net user,hostfwd=tcp::2222-:22 \
|
||||
-smp 2
|
Reference in a new issue