Compare commits
No commits in common. "72daaf34a6b1e8b0de6c9353cb5ce7a78f13a838" and "c0793b39b1eb27f7f18e515bb58a28b71f15c5c9" have entirely different histories.
72daaf34a6
...
c0793b39b1
|
@ -26,13 +26,11 @@ mem=$(sed -E 's/^MemTotal: +([0-9]+) kB/\1/p;d' < /proc/meminfo)
|
|||
mempercore=$(((mem/1024-4096)/cores))
|
||||
|
||||
# install kata containers
|
||||
echo "Installing kata...."
|
||||
cid=$(docker run -d --runtime=runc -v /opt/kata:/opt/kata -v /var/run/dbus:/var/run/dbus -v /run/systemd:/run/systemd -v /etc/docker:/etc/docker -it katadocker/kata-deploy kata-deploy-docker install)
|
||||
# wait for finish
|
||||
while [ "$(docker container inspect -f '{{.State.Running}}' "$cid")" == "true" ]; do
|
||||
sleep 1
|
||||
done
|
||||
echo "Kata installed"
|
||||
|
||||
# update default container CPU and memory
|
||||
sed -i "s/default_vcpus = .*/default_vcpus = 2/g;s/default_memory = .*/default-memory = $mempercore/g" /opt/kata/share/defaults/kata-containers/configuration-qemu-virtiofs.toml
|
||||
|
|
|
@ -63,7 +63,9 @@ RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
|||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# travis2bash
|
||||
COPY travis2bash.sh /usr/local/bin
|
||||
COPY /usr/src/buildbot-scripts/travis2bash.sh /usr/local/bin
|
||||
|
||||
#RUN useradd -ms /bin/bash buildbot
|
||||
|
||||
RUN echo 'buildbot ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ trusty()
|
|||
|
||||
xml=$(mktemp)
|
||||
|
||||
virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
virt-install -r $mempercore --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
-n trusty_libvirt_"${hostname}_${id}" -w network=default --nographics \
|
||||
--disk path=/var/lib/libvirt/ephemeral/trusty_libvirt_"${hostname}_${id}".qcow2 \
|
||||
--disk path=/var/lib/libvirt/ephemeral/trusty_libvirt_"${hostname}_${id}".iso,device=cdrom \
|
||||
|
@ -39,7 +39,7 @@ xenial()
|
|||
|
||||
xml=$(mktemp)
|
||||
|
||||
virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
virt-install -r $mempercore --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
-n xenial_libvirt_"${hostname}_${id}" -w network=default --nographics \
|
||||
--disk path=/var/lib/libvirt/ephemeral/xenial_libvirt_"${hostname}_${id}".qcow2 \
|
||||
--disk path=/var/lib/libvirt/ephemeral/xenial_libvirt_"${hostname}_${id}".iso,device=cdrom \
|
||||
|
@ -65,7 +65,7 @@ bionic()
|
|||
|
||||
xml=$(mktemp)
|
||||
|
||||
virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
virt-install -r $mempercore --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
-n bionic_libvirt_"${hostname}_${id}" -w network=default --nographics \
|
||||
--disk path=/var/lib/libvirt/ephemeral/bionic_libvirt_"${hostname}_${id}".qcow2 \
|
||||
--disk path=/var/lib/libvirt/ephemeral/bionic_libvirt_"${hostname}_${id}".iso,device=cdrom \
|
||||
|
@ -91,7 +91,7 @@ focal()
|
|||
|
||||
xml=$(mktemp)
|
||||
|
||||
virt-install -r "$mempercore" --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
virt-install -r $mempercore --vcpus=2,maxvcpus=2,sockets=1,cores=1,threads=2 \
|
||||
-n focal_libvirt_"${hostname}_${id}" -w network=default --nographics \
|
||||
--disk path=/var/lib/libvirt/ephemeral/focal_libvirt_"${hostname}_${id}".qcow2 \
|
||||
--disk path=/var/lib/libvirt/ephemeral/focal_libvirt_"${hostname}_${id}".iso,device=cdrom \
|
||||
|
@ -111,7 +111,7 @@ elcapitan()
|
|||
local cores
|
||||
id="$1"
|
||||
|
||||
virsh undefine elcapitan_libvirt_"${hostname}_${id}"
|
||||
virsh undefine elcapitan_"${hostname}_${id}"
|
||||
|
||||
xml=$(mktemp)
|
||||
|
||||
|
@ -127,10 +127,10 @@ elcapitan()
|
|||
/var/lib/libvirt/ephemeral/enoch_rev2839_boot
|
||||
|
||||
sed -Ei "
|
||||
s#<name>.*<#<name>elcapitan_libvirt_${hostname}_${id}<#;
|
||||
s#<name>.*<#<name>elcapitan_${hostname}_${id}<#;
|
||||
s#<vcpu (.*)>[0-9]+#<vcpu \\1>$threads#;
|
||||
s#<topology (.*)cores='[0-9]+'#<topology \\1cores='$cores'#;
|
||||
s#<source file='(.*\\.qcow2)'#<source file='/var/lib/libvirt/ephemeral/elcapitan_libvirt_${hostname}_${id}.qcow2'#;
|
||||
s#<source file='(.*\\.qcow2)'#<source file='/var/lib/libvirt/ephemeral/elcapitan_${hostname}_${id}.qcow2'#;
|
||||
" "$xml"
|
||||
|
||||
virsh define "$xml"
|
||||
|
|
Loading…
Reference in New Issue
Block a user