Skip to content

Commit 27ce1cf

Browse files
committed
Merge branch 'release/4.2.8'
2 parents af0fd5e + 38dabaa commit 27ce1cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+268
-49
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ language: shell
88

99
env:
1010
jobs:
11+
- MOLECULE_SCENARIO_NAME="ubuntu-20.04"
1112
- MOLECULE_SCENARIO_NAME="ubuntu-19.10"
1213
- MOLECULE_SCENARIO_NAME="ubuntu-18.04"
13-
- MOLECULE_SCENARIO_NAME="ubuntu-16.04"
1414
- MOLECULE_SCENARIO_NAME="centos-8"
1515
- MOLECULE_SCENARIO_NAME="centos-7"
1616
- MOLECULE_SCENARIO_NAME="suse-15"
1717

1818
jobs:
1919
allow_failures:
20+
- env: MOLECULE_SCENARIO_NAME="ubuntu-20.04"
2021
- env: MOLECULE_SCENARIO_NAME="ubuntu-19.10"
21-
- env: MOLECULE_SCENARIO_NAME="ubuntu-16.04"
2222
- env: MOLECULE_SCENARIO_NAME="centos-8"
2323
- env: MOLECULE_SCENARIO_NAME="centos-7"
2424
- env: MOLECULE_SCENARIO_NAME="suse-15"

CHANGELOG.md

+3-1

molecule/default/Dockerfile.j2

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# (c) Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
FROM ubuntu:18.04
16+
17+
ENV LANG "en_US.utf8"
18+
ENV LC_ALL "en_US.utf8"
19+
ENV SHELL "/bin/bash"
20+
ENV TZ "UTC"
21+
22+
# Hotfix for systemd
23+
RUN set -ex \
24+
&& apt-get update \
25+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y systemd \
26+
&& ln -fs /lib/systemd/systemd /usr/sbin/init \
27+
&& find /lib/systemd/system/sysinit.target.wants/ -name "systemd-tmpfiles-setup.service" -delete \
28+
&& rm -f /lib/systemd/system/multi-user.target.wants/* \
29+
&& rm -f /etc/systemd/system/*.wants/* \
30+
&& rm -f /lib/systemd/system/local-fs.target.wants/* \
31+
&& rm -f /lib/systemd/system/sockets.target.wants/*udev* \
32+
&& rm -f /lib/systemd/system/sockets.target.wants/*initctl* \
33+
&& rm -f /lib/systemd/system/basic.target.wants/* \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
# Hotfix for en_US.utf8 locale
37+
RUN set -ex \
38+
&& apt-get update \
39+
&& DEBIAN_FRONTEND=noninteractive apt-get install -y locales \
40+
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
41+
&& rm -rf /var/lib/apt/lists/*

molecule/default/create.yml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
3+
# (c) Wong Hoi Sing Edison <[email protected]>
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
- hosts: localhost
18+
connection: local
19+
remote_user: root
20+
become: true
21+
gather_facts: false
22+
tasks:
23+
- name: copy template
24+
template:
25+
src: "{{ molecule_scenario_directory }}/{{ item.dockerfile }}"
26+
dest: "{{ molecule_ephemeral_directory }}/Dockerfile-{{ item.name }}"
27+
loop_control:
28+
label: "{{ item.name }}"
29+
loop: "{{ molecule_yml.platforms }}"
30+
when: item.dockerfile is defined
31+
32+
- name: docker build
33+
docker_image:
34+
name: "{{ molecule_ephemeral_directory | regex_replace('^.*/([^/]*/[^/]*)$', '\\1') }}:{{ item.name }}"
35+
source: "build"
36+
build:
37+
path: "{{ molecule_ephemeral_directory }}"
38+
dockerfile: "{{ molecule_ephemeral_directory }}/Dockerfile-{{ item.name }}"
39+
loop_control:
40+
label: "{{ item.name }}"
41+
loop: "{{ molecule_yml.platforms }}"
42+
when: item.dockerfile is defined
43+
44+
- name: docker pull
45+
docker_image:
46+
name: "{{ item.image }}"
47+
source: "pull"
48+
loop_control:
49+
label: "{{ item.name }}"
50+
loop: "{{ molecule_yml.platforms }}"
51+
when: item.dockerfile is not defined
52+
53+
- name: docker tag
54+
docker_image:
55+
name: "{{ item.image }}"
56+
repository: "{{ molecule_ephemeral_directory | regex_replace('^.*/([^/]*/[^/]*)$', '\\1') }}:{{ item.name }}"
57+
source: "local"
58+
force_tag: true
59+
loop: "{{ molecule_yml.platforms }}"
60+
when: item.dockerfile is not defined
61+
62+
- name: docker run
63+
docker_container:
64+
name: "{{ item.name }}"
65+
hostname: "{{ item.name }}"
66+
image: "{{ molecule_ephemeral_directory | regex_replace('^.*/([^/]*/[^/]*)$', '\\1') }}:{{ item.name }}"
67+
entrypoint: "{{ item.entrypoint | default('') }}"
68+
command: "{{ item.command | default('bash -c \"sleep infinity\"') }}"
69+
privileged: "{{ item.privileged | default(omit) }}"
70+
tty: "{{ item.tty | default(omit) }}"
71+
volumes: "{{ item.volumes | default(omit) }}"
72+
env: "{{ item.env | default(omit) }}"
73+
state: "started"
74+
loop_control:
75+
label: "{{ item.name }}"
76+
loop: "{{ molecule_yml.platforms }}"

molecule/default/destroy.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
3+
# (c) Wong Hoi Sing Edison <[email protected]>
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
- hosts: localhost
18+
connection: local
19+
remote_user: root
20+
become: true
21+
gather_facts: false
22+
tasks:
23+
- name: docker rm
24+
docker_container:
25+
name: "{{ item.name }}"
26+
state: "absent"
27+
loop_control:
28+
label: "{{ item.name }}"
29+
loop: "{{ molecule_yml.platforms }}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../defaults/main.yml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
3+
# (c) Wong Hoi Sing Edison <[email protected]>
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.

molecule/default/molecule.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
3+
# (c) Wong Hoi Sing Edison <[email protected]>
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
driver:
18+
name: docker
19+
platforms:
20+
- name: ${MOLECULE_INSTANCE_NAME}-1
21+
dockerfile: Dockerfile.j2
22+
privileged: true
23+
volumes:
24+
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
25+
entrypoint: init
26+
command: "bash -c 'sleep infinity'"
27+
tty: True
28+
env:
29+
container: docker
30+
lint: |
31+
set -ex
32+
yamllint .
33+
ansible-lint
34+
flake8
35+
dependency:
36+
name: galaxy
37+
options:
38+
role-file: ansible-role-requirements.yml
39+
roles-path: ${ANSIBLE_ROLES_PATH}
40+
ignore-errors: true
41+
provisioner:
42+
name: ansible
43+
env:
44+
ANSIBLE_ROLES_PATH: ${ANSIBLE_ROLES_PATH}
45+
config_options:
46+
defaults:
47+
forks: 20
48+
ssh_connection:
49+
pipelining: true
50+
ssh_args: -o ControlMaster=auto -o ControlPersist=600s
51+
inventory:
52+
links:
53+
group_vars: group_vars
54+
verifier:
55+
name: ansible

molecule/ubuntu-16.04/molecule.yml renamed to molecule/ubuntu-20.04/molecule.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ driver:
2020
name: libvirt
2121
platforms:
2222
- name: ${MOLECULE_INSTANCE_NAME}-1
23-
box: generic/ubuntu1604
23+
box: generic/ubuntu2004
2424
cpu: 2
2525
memory: 2048
2626
interfaces:
File renamed without changes.
File renamed without changes.

roles/cni_plugins

roles/kubeadm

roles/kubectl

roles/kubelet

roles/kubernetes_csi_rbd

roles/kubernetes_flannel

roles/kubernetes_metallb

roles/kubernetes_weave

0 commit comments

Comments
 (0)