Skip to content

Commit

Permalink
Merge branch 'release/20210718.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
hswong3i committed Jul 18, 2021
2 parents 4a46cd6 + 0bda38c commit 4649384
Show file tree
Hide file tree
Showing 40 changed files with 88 additions and 63 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

### Major Changes

- Upgrade minimal Ansible community package support to 4.1.0
## 20210718.1.1 - 2021-07-18

### Major Changes

- Upgrade minimal Ansible community package support to 4.2.0
- Support Kubernetes 1.21
- Support Kubernetes 1.20
- Support Kubernetes 1.19
Expand All @@ -13,5 +17,8 @@
## 1.19.3-4alvistack1 - 2020-10-23

- Ubuntu 18.04/20.04 based
- Base box running by [Vagrant Libvirt Provider](https://github.com/vagrant-libvirt/vagrant-libvirt)
- Provision by [Ansible](https://www.ansible.com/) and [Molecule Vagrant Plugin](https://github.com/ansible-community/molecule-vagrant)
- Base box running by [Vagrant Libvirt
Provider](https://github.com/vagrant-libvirt/vagrant-libvirt)
- Provision by [Ansible](https://www.ansible.com/) and [Molecule
Vagrant
Plugin](https://github.com/ansible-community/molecule-vagrant)
42 changes: 30 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Vagrant Box Packaging for Kubernetes

[![Gitlab pipeline status](https://img.shields.io/gitlab/pipeline/alvistack/vagrant-kubernetes/master)](https://gitlab.com/alvistack/vagrant-kubernetes/-/pipelines)
[![GitHub release](https://img.shields.io/github/release/alvistack/vagrant-kubernetes.svg)](https://github.com/alvistack/vagrant-kubernetes/releases)
[![GitHub license](https://img.shields.io/github/license/alvistack/vagrant-kubernetes.svg)](https://github.com/alvistack/vagrant-kubernetes/blob/master/LICENSE)
\-[![Vagrant Box download](https://img.shields.io/badge/dynamic/json?label=alvistack%2Fkubernetes-1.21&query=%24.boxes%5B%3A1%5D.downloads&url=https%3A%2F%2Fapp.vagrantup.com%2Fapi%2Fv1%2Fsearch%3Fq%3Dalvistack%2Fkubernetes-1.21)](https://app.vagrantup.com/alvistack/boxes/kubernetes-1.21)

Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.
[![Gitlab pipeline
status](https://img.shields.io/gitlab/pipeline/alvistack/vagrant-kubernetes/master)](https://gitlab.com/alvistack/vagrant-kubernetes/-/pipelines)
[![GitHub
release](https://img.shields.io/github/release/alvistack/vagrant-kubernetes.svg)](https://github.com/alvistack/vagrant-kubernetes/releases)
[![GitHub
license](https://img.shields.io/github/license/alvistack/vagrant-kubernetes.svg)](https://github.com/alvistack/vagrant-kubernetes/blob/master/LICENSE)
-[![Vagrant Box
download](https://img.shields.io/badge/dynamic/json?label=alvistack%2Fkubernetes-1.21&query=%24.boxes%5B%3A1%5D.downloads&url=https%3A%2F%2Fapp.vagrantup.com%2Fapi%2Fv1%2Fsearch%3Fq%3Dalvistack%2Fkubernetes-1.21)](https://app.vagrantup.com/alvistack/boxes/kubernetes-1.21)

Kubernetes (K8s) is an open-source system for automating deployment,
scaling, and management of containerized applications.

Learn more about Kubernetes: <https://kubernetes.io/>

Expand All @@ -21,14 +26,20 @@ Learn more about Kubernetes: <https://kubernetes.io/>
## Overview

- Packaging with [Packer](https://www.packer.io/)
- Support [Vagrant](https://www.vagrantup.com/) as default [Kubernetes custom executor](https://docs.gitlab.com/runner/executors/README.html)
- Support [Libvirt](https://libvirt.org/) with [vagrant-libvirt](https://github.com/vagrant-libvirt/vagrant-libvirt)
- Support [Vagrant](https://www.vagrantup.com/) as default [Kubernetes
custom
executor](https://docs.gitlab.com/runner/executors/README.html)
- Support [Libvirt](https://libvirt.org/) with
[vagrant-libvirt](https://github.com/vagrant-libvirt/vagrant-libvirt)
- Support [VirtualBox](https://www.virtualbox.org/)
- Support [Docker](https://www.docker.com/)

### Quick Start

Once you have [Vagrant](https://www.vagrantup.com/docs/installation) and [VirtaulBox](https://www.virtualbox.org/) installed, run the following commands under your [project directory](https://learn.hashicorp.com/tutorials/vagrant/getting-started-project-setup?in=vagrant/getting-started):
Once you have [Vagrant](https://www.vagrantup.com/docs/installation) and
[VirtaulBox](https://www.virtualbox.org/) installed, run the following
commands under your [project
directory](https://learn.hashicorp.com/tutorials/vagrant/getting-started-project-setup?in=vagrant/getting-started):

# Initialize Vagrant
vagrant init alvistack/kubernetes-1.21
Expand All @@ -46,16 +57,23 @@ Once you have [Vagrant](https://www.vagrantup.com/docs/installation) and [Virtau

### `YYYYMMDD.Y.Z`

Release tags could be find from [GitHub Release](https://github.com/alvistack/vagrant-kubernetes/releases) of this repository. Thus using these tags will ensure you are running the most up to date stable version of this image.
Release tags could be find from [GitHub
Release](https://github.com/alvistack/vagrant-kubernetes/releases) of
this repository. Thus using these tags will ensure you are running the
most up to date stable version of this image.

### `YYYYMMDD.0.0`

Version tags ended with `.0.0` are rolling release rebuild by [GitLab pipeline](https://gitlab.com/alvistack/vagrant-kubernetes/-/pipelines) in weekly basis. Thus using these tags will ensure you are running the latest packages provided by the base image project.
Version tags ended with `.0.0` are rolling release rebuild by [GitLab
pipeline](https://gitlab.com/alvistack/vagrant-kubernetes/-/pipelines)
in weekly basis. Thus using these tags will ensure you are running the
latest packages provided by the base image project.

## License

- Code released under [Apache License 2.0](LICENSE)
- Docs released under [CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)
- Docs released under [CC
BY 4.0](http://creativecommons.org/licenses/by/4.0/)

## Author Information

Expand Down
2 changes: 1 addition & 1 deletion packer/libvirt-1.20/group_vars/all/99-packer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

kubernetes_release: "v1.20"
kubernetes_release: "1.20"
2 changes: 1 addition & 1 deletion packer/libvirt-1.20/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"/casper/vmlinuz <wait5>",
"initrd=/casper/initrd <wait5>",
"autoinstall quiet fsck.mode=skip <wait5>",
"net.ifnames=0 biosdevname=0 <wait5>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>",
"ds=nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ <wait5>",
"---<enter>"
],
Expand Down
4 changes: 2 additions & 2 deletions packer/libvirt-1.20/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ autoinstall:
ssh-keygen -A; \
systemctl enable ssh.service; \
sed -ie "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=\"0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
update-grub; \
update-initramfs -c -k all; \
apt-get -y purge snapd; \
Expand Down
2 changes: 1 addition & 1 deletion packer/libvirt-1.21/group_vars/all/99-packer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

kubernetes_release: "v1.21"
kubernetes_release: "1.21"
2 changes: 1 addition & 1 deletion packer/libvirt-1.21/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"/casper/vmlinuz <wait5>",
"initrd=/casper/initrd <wait5>",
"autoinstall quiet fsck.mode=skip <wait5>",
"net.ifnames=0 biosdevname=0 <wait5>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>",
"ds=nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ <wait5>",
"---<enter>"
],
Expand Down
4 changes: 2 additions & 2 deletions packer/libvirt-1.21/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ autoinstall:
ssh-keygen -A; \
systemctl enable ssh.service; \
sed -ie "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=\"0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
update-grub; \
update-initramfs -c -k all; \
apt-get -y purge snapd; \
Expand Down
2 changes: 1 addition & 1 deletion packer/virtualbox-1.20/group_vars/all/99-packer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

kubernetes_release: "v1.20"
kubernetes_release: "1.20"
2 changes: 1 addition & 1 deletion packer/virtualbox-1.20/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"/casper/vmlinuz <wait5>",
"initrd=/casper/initrd <wait5>",
"autoinstall quiet fsck.mode=skip <wait5>",
"net.ifnames=0 biosdevname=0 <wait5>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>",
"ds=nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ <wait5>",
"---<enter>"
],
Expand Down
4 changes: 2 additions & 2 deletions packer/virtualbox-1.20/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ autoinstall:
ssh-keygen -A; \
systemctl enable ssh.service; \
sed -ie "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=\"0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
update-grub; \
update-initramfs -c -k all; \
apt-get -y purge snapd; \
Expand Down
2 changes: 1 addition & 1 deletion packer/virtualbox-1.21/group_vars/all/99-packer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

kubernetes_release: "v1.21"
kubernetes_release: "1.21"
2 changes: 1 addition & 1 deletion packer/virtualbox-1.21/packer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"/casper/vmlinuz <wait5>",
"initrd=/casper/initrd <wait5>",
"autoinstall quiet fsck.mode=skip <wait5>",
"net.ifnames=0 biosdevname=0 <wait5>",
"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0 <wait5>",
"ds=nocloud-net;s=http://{{.HTTPIP}}:{{.HTTPPort}}/ <wait5>",
"---<enter>"
],
Expand Down
4 changes: 2 additions & 2 deletions packer/virtualbox-1.21/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ autoinstall:
ssh-keygen -A; \
systemctl enable ssh.service; \
sed -ie "s/^GRUB_DEFAULT=.*/GRUB_DEFAULT=\"0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
sed -ie "s/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT=\"net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0\"/g" /etc/default/grub; \
update-grub; \
update-initramfs -c -k all; \
apt-get -y purge snapd; \
Expand Down
4 changes: 2 additions & 2 deletions playbooks/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@

- name: include role
include_role:
name: kubeadm
name: kubelet

- name: include role
include_role:
name: kubelet
name: kubeadm

- name: include role
include_role:
Expand Down
6 changes: 3 additions & 3 deletions playbooks/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
- name: fedora | yum install *.rpm
raw: |
set -eu
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-dnf-plugin-versionlock python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
when: ansible_distribution | lower == "fedora"
changed_when: false
failed_when: false
Expand All @@ -111,7 +111,7 @@
raw: |
set -eu
yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-dnf-plugin-versionlock python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "8"
changed_when: false
failed_when: false
Expand All @@ -121,7 +121,7 @@
set -eu
subscription-manager repos --enable=rhel-7-server-optional-rpms || echo $?
yum install -y http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel python36-cryptography python36-netaddr rsync shadow-utils sudo tar unzip util-linux xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-devel python3-jmespath python3-libselinux python3-lxml python3-pip python3-setuptools python3-virtualenv python3-wheel python36-cryptography python36-netaddr rsync shadow-utils sudo tar unzip util-linux xz yum-plugin-versionlock yum-utils zip
when: ansible_os_family | lower == "redhat" and ansible_distribution_major_version | lower == "7"
changed_when: false
failed_when: false
Expand Down
4 changes: 2 additions & 2 deletions playbooks/tasks/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
state: "present"
loop:
- { option: "GRUB_DEFAULT", value: "0" }
- { option: "GRUB_CMDLINE_LINUX", value: "net.ifnames=0 biosdevname=0" }
- { option: "GRUB_CMDLINE_LINUX_DEFAULT", value: "net.ifnames=0 biosdevname=0" }
- { option: "GRUB_CMDLINE_LINUX", value: "net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0" }
- { option: "GRUB_CMDLINE_LINUX_DEFAULT", value: "net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0" }

- name: update-grub
command: update-grub
Expand Down
4 changes: 2 additions & 2 deletions playbooks/tasks/redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
state: "present"
loop:
- { option: "GRUB_DEFAULT", value: "0" }
- { option: "GRUB_CMDLINE_LINUX", value: "net.ifnames=0 biosdevname=0" }
- { option: "GRUB_CMDLINE_LINUX_DEFAULT", value: "net.ifnames=0 biosdevname=0" }
- { option: "GRUB_CMDLINE_LINUX", value: "net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0" }
- { option: "GRUB_CMDLINE_LINUX_DEFAULT", value: "net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0" }

- name: grub2-mkconfig -o /boot/grub2/grub.cfg
command: grub2-mkconfig -o /boot/grub2/grub.cfg
Expand Down
4 changes: 2 additions & 2 deletions playbooks/tasks/suse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
state: "present"
loop:
- { option: "GRUB_DEFAULT", value: "0" }
- { option: "GRUB_CMDLINE_LINUX", value: "net.ifnames=0 biosdevname=0" }
- { option: "GRUB_CMDLINE_LINUX_DEFAULT", value: "net.ifnames=0 biosdevname=0" }
- { option: "GRUB_CMDLINE_LINUX", value: "net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0" }
- { option: "GRUB_CMDLINE_LINUX_DEFAULT", value: "net.ifnames=0 biosdevname=0 systemd.unified_cgroup_hierarchy=0" }

- name: grub2-mkconfig -o /boot/grub2/grub.cfg
command: grub2-mkconfig -o /boot/grub2/grub.cfg
Expand Down
2 changes: 1 addition & 1 deletion roles/ansible
2 changes: 1 addition & 1 deletion roles/cloud_init
2 changes: 1 addition & 1 deletion roles/conmon
2 changes: 1 addition & 1 deletion roles/containers_common
2 changes: 1 addition & 1 deletion roles/crun
2 changes: 1 addition & 1 deletion roles/etcd
2 changes: 1 addition & 1 deletion roles/fuse_overlayfs
2 changes: 1 addition & 1 deletion roles/kernel
2 changes: 1 addition & 1 deletion roles/kube_master
2 changes: 1 addition & 1 deletion roles/kubeadm
2 changes: 1 addition & 1 deletion roles/kubectl
2 changes: 1 addition & 1 deletion roles/kubelet
2 changes: 1 addition & 1 deletion roles/locales
2 changes: 1 addition & 1 deletion roles/python
2 changes: 1 addition & 1 deletion roles/sshd
2 changes: 1 addition & 1 deletion roles/timezone
2 changes: 1 addition & 1 deletion scripts/bootstrap-ansible.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi
if [ -x "$(command -v yum)" ]; then
yum makecache
yum update -y
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
yum install -y bzip2 ca-certificates curl gcc gnupg2 gzip iproute procps-ng python3 python3-cryptography python3-devel python3-dnf-plugin-versionlock python3-jmespath python3-libselinux python3-lxml python3-netaddr python3-pip python3-setuptools python3-virtualenv python3-wheel sudo tar unzip xz yum-utils zip
fi

# Prepare Zypper dependencies
Expand Down

0 comments on commit 4649384

Please sign in to comment.