update
This commit is contained in:
16
kubespray/test-infra/vagrant-docker/Dockerfile
Normal file
16
kubespray/test-infra/vagrant-docker/Dockerfile
Normal 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
|
||||
24
kubespray/test-infra/vagrant-docker/README.md
Normal file
24
kubespray/test-infra/vagrant-docker/README.md
Normal 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
|
||||
```
|
||||
13
kubespray/test-infra/vagrant-docker/build.sh
Executable file
13
kubespray/test-infra/vagrant-docker/build.sh
Executable 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"
|
||||
Reference in New Issue
Block a user