This commit is contained in:
havelight-ee
2023-05-30 14:44:26 +09:00
parent 9a3174deef
commit 4c32a7239d
2598 changed files with 164595 additions and 487 deletions

View File

@@ -0,0 +1,16 @@
# Docker image published at quay.io/kubespray/vagrant
ARG KUBESPRAY_VERSION
FROM quay.io/kubespray/kubespray:${KUBESPRAY_VERSION}
ENV VAGRANT_VERSION=2.2.19
ENV VAGRANT_DEFAULT_PROVIDER=libvirt
ENV VAGRANT_ANSIBLE_TAGS=facts
RUN apt-get update && apt-get install -y wget libvirt-dev openssh-client rsync git
# Install Vagrant
RUN wget https://releases.hashicorp.com/vagrant/${VAGRANT_VERSION}/vagrant_${VAGRANT_VERSION}_x86_64.deb && \
dpkg -i vagrant_${VAGRANT_VERSION}_x86_64.deb && \
rm vagrant_${VAGRANT_VERSION}_x86_64.deb && \
vagrant plugin install vagrant-libvirt

View File

@@ -0,0 +1,24 @@
# vagrant docker image
This image is used for the vagrant CI jobs. It is using the libvirt driver.
## Usage
```console
$ docker run --net host --rm -it -v /var/run/libvirt/libvirt-sock:/var/run/libvirt/libvirt-sock quay.io/kubespray/vagrant
$ vagrant up
Bringing machine 'k8s-1' up with 'libvirt' provider...
Bringing machine 'k8s-2' up with 'libvirt' provider...
Bringing machine 'k8s-3' up with 'libvirt' provider...
[...]
```
## Cache
You can set `/root/kubespray_cache` as a volume to keep cache between runs.
## Building
```shell
./build.sh v2.12.5
```

View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -euo pipefail
if [ "$#" -ne 1 ]; then
echo "Usage: $0 tag" >&2
exit 1
fi
VERSION="$1"
IMG="quay.io/kubespray/vagrant:${VERSION}"
docker build . --build-arg "KUBESPRAY_VERSION=${VERSION}" --tag "$IMG"
docker push "$IMG"