Skip to content

Commit

Permalink
Adds optional fedora atomic registry disk image
Browse files Browse the repository at this point in the history
This image is almost 1gb, so I did not include it in the normal
vagrant flow. Instead, if you want to test this image you'll need
to run the following.

make vagrant-sync-optional
cluster/kubeclt create -f cluster/vm-atomic.yaml

Signed-off-by: David Vossel <[email protected]>
  • Loading branch information
davidvossel committed Jul 28, 2017
1 parent 22fc398 commit 2557de1
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ vagrant-sync-config:
vagrant-sync-build: build
./cluster/vagrant/sync_build.sh

vagrant-sync-optional:
./cluster/vagrant/sync_build.sh 'build optional'

vagrant-deploy: vagrant-sync-config vagrant-sync-build
export KUBECTL="cluster/kubectl.sh --core" && ./cluster/deploy.sh

Expand Down
2 changes: 1 addition & 1 deletion cluster/vagrant/sync_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ make all DOCKER_TAG=devel

for VM in `vagrant status | grep -v "^The Libvirt domain is running." | grep running | cut -d " " -f1`; do
vagrant rsync $VM # if you do not use NFS
vagrant ssh $VM -c "cd /vagrant && export DOCKER_TAG=devel && sudo -E hack/build-docker.sh"
vagrant ssh $VM -c "cd /vagrant && export DOCKER_TAG=devel && sudo -E hack/build-docker.sh $@"
done

28 changes: 28 additions & 0 deletions cluster/vm-atomic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
metadata:
name: atomic-ephemeral
apiVersion: kubevirt.io/v1alpha1
kind: VM
spec:
domain:
devices:
disks:
- type: ContainerRegistryDisk:v1alpha
source:
name: kubevirt/fedora-atomic-registry-disk-demo:devel
target:
dev: vda
interfaces:
- source:
network: default
type: network
memory:
unit: MB
value: 1024
os:
type:
os: hvm
type: qemu
cloudInit:
type: configDisk
userDataBase64: I2Nsb3VkLWNvbmZpZwpwYXNzd29yZDogYXRvbWljCnNzaF9wd2F1dGg6IFRydWUKY2hwYXNzd2Q6IHsgZXhwaXJlOiBGYWxzZSB9Cg==
configDiskTarget: vdb
2 changes: 2 additions & 0 deletions hack/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ fi

if [ $# -eq 0 ]; then
args=$docker_images
elif [ "$1" = "optional" ]; then
args=$optional_docker_images
else
args=$@
fi
Expand Down
1 change: 1 addition & 0 deletions hack/config-default.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
binaries="cmd/virt-controller cmd/virt-launcher cmd/virt-handler cmd/virt-api cmd/virtctl cmd/virt-manifest"
docker_images="cmd/virt-controller cmd/virt-launcher cmd/virt-handler cmd/virt-api cmd/virt-manifest images/haproxy images/iscsi-demo-target-tgtd images/vm-killer images/libvirt-kubevirt images/spice-proxy cmd/virt-migrator cmd/registry-disk-v1alpha images/cirros-registry-disk-demo"
optional_docker_images="images/fedora-atomic-registry-disk-demo"
docker_prefix=kubevirt
docker_tag=${DOCKER_TAG:-latest}
manifest_templates="`ls manifests/*.in`"
Expand Down
24 changes: 24 additions & 0 deletions images/fedora-atomic-registry-disk-demo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# This file is part of the kubevirt project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2017 Red Hat, Inc.
#

FROM kubevirt/registry-disk-v1alpha:devel

MAINTAINER "David Vossel" \<[email protected]\>

# Add fedora atomic disk image
RUN curl -g -L https://download.fedoraproject.org/pub/alt/atomic/stable/Fedora-Atomic-26-20170723.0/CloudImages/x86_64/images/Fedora-Atomic-26-20170723.0.x86_64.qcow2 > /disk/atomic.qcow2

0 comments on commit 2557de1

Please sign in to comment.