Skip to content

Commit

Permalink
chore: remove more unused artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Marcy <homelab@glenn4u.com>
  • Loading branch information
gmarcy committed Jul 29, 2024
1 parent b3dd750 commit e9a6e67
Show file tree
Hide file tree
Showing 130 changed files with 633 additions and 4,920 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/docs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
tasktag=task_prepare_cluster
taskname=$(echo ${tasktag} | tr '_' '-')
for distro in k8s kid; do
for distro in k8s; do
ansible-playbook-grapher -t ${tasktag} --skip-tags omit_from_grapher -e kubeinit_cluster_distro=${distro} -e kubeinit_cluster_distro_role=kubeinit_${distro} kubeinit/playbook.yml --include-role-tasks -o docs/src/static/playbook_${distro}_${tasktag} --save-dot-file
sed -e ':again;$!N;$!b again; s/subgraph "Play #[12]:[^"]*"{[^}]*}//g' -e 's/"Play #3: [^"]*"/"'${taskname}'"/g' -e 's/shape=box/shape=octagon/g' -e 's/#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]/#000000/g' -e 's/ style=filled / /' docs/src/static/playbook_${distro}_${tasktag}.dot | dot -Tsvg > docs/src/static/playbook_${distro}_${tasktag}.svg
cat << EOF >> docs/src/playbook_diagrams.rst
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
tasktag=task_deploy_cluster
taskname=$(echo ${tasktag} | tr '_' '-')
for distro in k8s kid; do
for distro in k8s; do
ansible-playbook-grapher -t ${tasktag} --skip-tags omit_from_grapher -e kubeinit_cluster_distro=${distro} -e kubeinit_cluster_distro_role=kubeinit_${distro} kubeinit/playbook.yml --include-role-tasks -o docs/src/static/playbook_${distro}_${tasktag} --save-dot-file
sed -e ':again;$!N;$!b again; s/subgraph "Play #[12]:[^"]*"{[^}]*}//g' -e 's/"Play #3: [^"]*"/"'${taskname}'"/g' -e 's/shape=box/shape=octagon/g' -e 's/#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]/#000000/g' -e 's/ style=filled / /' docs/src/static/playbook_${distro}_${tasktag}.dot | dot -Tsvg > docs/src/static/playbook_${distro}_${tasktag}.svg
cat << EOF >> docs/src/playbook_diagrams.rst
Expand Down Expand Up @@ -241,8 +241,7 @@ jobs:
EOF
sed -e '/^juju-controller/d' \
-e '/^hypervisor-04/d' \
sed -e '/^hypervisor-04/d' \
-e '/^\[controller_nodes\]$/ acontroller-01 target=hypervisor-01\ncontroller-02 target=hypervisor-02\ncontroller-03 target=hypervisor-03' \
-e '/^\[compute_nodes\]$/ acompute-01 target=hypervisor-01\ncompute-02 target=hypervisor-02' \
-e '/^service /s/ / target=hypervisor-01 /' \
Expand Down
8 changes: 2 additions & 6 deletions ci/container_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,11 @@ declare -a container_images=(
"library registry 2"
"library httpd 2.4"
"library debian 11"
"library ubuntu focal"
"library debian 12"
"library ubuntu jammy"
"library ubuntu noble"
"internetsystemsconsortium bind9 9.18"
"sonatype nexus3 3.30.0"
"nginxinc nginx-unprivileged latest"
"flannel flannel-cni-plugin v1.1.2"
"flannel flannel v0.21.4"
"flannel flannel v0.21.5"
"flannel flannel v0.22.0"
)

retry() {
Expand Down
14 changes: 3 additions & 11 deletions ci/kubeinit_ci_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,10 @@ def get_periodic_jobs_labels(cluster_type='all', distro='all'):
"k8s-libvirt-1-1-1-h",
"k8s-libvirt-1-0-1-h"]

kid_configs = ["kid-libvirt-3-1-1-h",
"kid-libvirt-3-0-2-h",
"kid-libvirt-1-1-1-h",
"kid-libvirt-1-0-1-h"]

if re.match(r"([a-z|0-9|\.]+-[a-z]+-[1-9]-[0-9]-[1-9]-[c|h],?)+", distro):
print("'kubeinit_ci_utils.py' ==> We are requesting specific job labels")
req_labels = set(distro.split(","))
all_labels = set(okd_configs + kid_configs + k8s_configs)
all_labels = set(okd_configs + k8s_configs)
if (req_labels.issubset(all_labels)):
print("'kubeinit_ci_utils.py' ==> The requested labels are defined correctly")
# We return the labels filtered by cluster_type, multinode or singlenode
Expand All @@ -360,15 +355,15 @@ def get_periodic_jobs_labels(cluster_type='all', distro='all'):
elif distro == 'random':
print("'kubeinit_ci_utils.py' ==> Returning 4 random scenarios to test")
# If the distro parameter is random we return 4 random distros to test
all_scenarios = okd_configs + kid_configs + k8s_configs
all_scenarios = okd_configs + k8s_configs
return_labels = random.sample(all_scenarios, 4)
# We return the labels filtered by cluster_type, multinode or singlenode
filtered_return = [lab for lab in return_labels if cluster_pattern.match(lab)]
print("'kubeinit_ci_utils.py' ==> " + str(filtered_return))
return filtered_return
elif distro == "all":
print("'kubeinit_ci_utils.py' ==> Appending all configs")
return_labels = okd_configs + kid_configs + k8s_configs
return_labels = okd_configs + k8s_configs
# We return the labels filtered by cluster_type, multinode or singlenode
filtered_return = [lab for lab in return_labels if cluster_pattern.match(lab)]
print("'kubeinit_ci_utils.py' ==> " + str(filtered_return))
Expand All @@ -378,9 +373,6 @@ def get_periodic_jobs_labels(cluster_type='all', distro='all'):
if 'okd' in distro and '.' not in distro:
print("'kubeinit_ci_utils.py' ==> Appending OKD configs")
configs = configs + okd_configs
if 'kid' in distro and '.' not in distro:
print("'kubeinit_ci_utils.py' ==> Appending KID configs")
configs = configs + kid_configs
if 'k8s' in distro and '.' not in distro:
print("'kubeinit_ci_utils.py' ==> Appending K8S configs")
configs = configs + k8s_configs
Expand Down
6 changes: 3 additions & 3 deletions ci/launch_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ def valid_labels_regex(arg_value, pat=re.compile(r"^all|random|([a-z|0-9|,|\.]+)
#
# launch_e2e.py --job_type=pr
# launch_e2e.py --job_type=pr --pr_id=154
# launch_e2e.py --job_type=periodic --job_label=eks-libvirt-3-0-1-h
# launch_e2e.py --job_type=periodic --job_label=eks-libvirt-3-0-1-h,cdk-libvirt-1-0-1-h
# launch_e2e.py --job_type=periodic --job_label=k8s-libvirt-3-0-1-h
# launch_e2e.py --job_type=periodic --job_label=k8s-libvirt-3-0-1-h,okd-libvirt-1-0-1-h
# launch_e2e.py --job_type=periodic --cluster_type=singlenode --job_label=random
# launch_e2e.py --job_type=periodic --cluster_type=singlenode --job_label=all
# launch_e2e.py --job_type=periodic --cluster_type=singlenode --job_label=okd
Expand Down Expand Up @@ -469,7 +469,7 @@ def valid_labels_regex(arg_value, pat=re.compile(r"^all|random|([a-z|0-9|,|\.]+)

if (args.job_label is not None and not re.match(r"([a-z|0-9|\.]+-[a-z]+-[1-9]-[0-9]-[1-9]-[c|h],?)+", args.job_label) and not re.match(r"([a-z|0-9|,|\.]+)?", args.job_label) and args.job_type != 'pr'):
print("'launch_e2e.py' ==> The third argument must be [periodic|pr]")
print("'launch_e2e.py' ==> periodic, can be periodic|periodic=okd,eks ...")
print("'launch_e2e.py' ==> periodic, can be periodic|periodic=okd,k8s ...")
print("'launch_e2e.py' ==> also the periodic job can trigger a specfic label like:")
print("'launch_e2e.py' ==> periodic=okd-libvirt-3-1-1-h")
sys.exit()
Expand Down
8 changes: 0 additions & 8 deletions ci/launch_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,6 @@ echo "(launch_e2e.sh) ==> Deploying the cluster ..."
FAILED="0"
KUBEINIT_SPEC=${KUBEINIT_SPEC//,/$'\n'}

# We enable having Windows compute nodes by default in the CI
# for the k8s-1-1-1 spec scenario
if [[ "$DISTRO" == "k8s" && "$MASTERS" == "1" && "$WORKERS" == "1" && "$HYPERVISORS" == "1" ]]; then
# For enabling Windows deployments use the cluster_nodes_spec like
# -e cluster_nodes_spec='[{"when_group":"compute_nodes","os":"windows"}]'
CLUSTER_NODES='[{"when_group":"compute_nodes","os":"windows"}]'
fi

# This conditional will never be true, this is kept as an example about
# How to wire in extra roles and variables in a deployment
if [[ "$DISTRO" == "okd" && "$MASTERS" == "1" && "$WORKERS" == "1" && "$HYPERVISORS" == "1" && "$HYPERVISORS" == "falsecondition" ]]; then
Expand Down
2 changes: 0 additions & 2 deletions ci/render_periodic_jobs_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def main():

if distro == 'okd':
distro = "Origin Distribution of K8s"
elif distro == 'kid':
distro = "KubeInit distro"
elif distro == 'k8s':
distro = "Vanilla K8s"
elif '.' in distro:
Expand Down
6 changes: 0 additions & 6 deletions docs/src/roles/role-kubeinit_apps.rst

This file was deleted.

Empty file modified docs/src/roles/role-kubeinit_dnsmasq.rst
100755 → 100644
Empty file.
6 changes: 0 additions & 6 deletions docs/src/roles/role-kubeinit_kid.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/src/roles/role-kubeinit_kubevirt.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/src/roles/role-kubeinit_nexus.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/src/roles/role-kubeinit_nfs.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/src/roles/role-kubeinit_openstack.rst

This file was deleted.

2 changes: 0 additions & 2 deletions kubeinit/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ tags:
- openshift
- origin
dependencies:
ansible.netcommon: '==5.1.1'
ansible.posix: '==1.5.4'
ansible.utils: '==2.10.3'
ansible.windows: '==1.14.0'
community.crypto: '==2.13.1'
community.general: '==7.0.1'
community.libvirt: '==1.2.0'
Expand Down
20 changes: 4 additions & 16 deletions kubeinit/group_vars/kubeinit_defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@ default_network_name: kimgtnet0
#
cluster_node_configurations_docsplaceholder: 'we should have a cluster_node_configuration main key'

cluster_node_distro:
cluster_node_default_distro:
k8s:
os: centos
kid:
os: debian
ocp:
os: coreos
okd:
os: coreos

cluster_node_os: "{{ hostvars['kubeinit-defaults'].cluster_node_distro[kubeinit_cluster_distro].os }}"

cluster_node_vcpus: 8
cluster_node_maxvcpus: 16

Expand All @@ -50,7 +46,7 @@ compute_node_target_order:
# -e cluster_nodes_spec='[{"when_group":"controller_nodes","disk"="35G"}]'
#
default_cluster_nodes_map_list:
- os: "{{ hostvars['kubeinit-defaults'].cluster_node_os }}"
- os: "{{ hostvars['kubeinit-defaults'].cluster_node_default_distro[kubeinit_cluster_distro].os }}"
- when_type: virtual
vcpus: "{{ cluster_node_vcpus }}"
maxvcpus: "{{ cluster_node_maxvcpus }}"
Expand All @@ -73,8 +69,6 @@ extra_node_maxvcpus: 16
extra_node_disk_size: 20G
extra_node_ram_size: 16777216

juju_controller_node_ram_size: 8388608

extra_node_target_order:
- hypervisor-02
- hypervisor-01
Expand All @@ -86,17 +80,13 @@ extra_node_target_order:
# -e extra_nodes_spec='[{"name":"nova-compute","when_distro":["okd"],"os":"centos"}]'
#
default_extra_nodes_map_list:
- os: "{{ hostvars['kubeinit-defaults'].cluster_node_os }}"
- os: "{{ hostvars['kubeinit-defaults'].cluster_node_default_distro[kubeinit_cluster_distro].os }}"
- when_type: virtual
vcpus: "{{ cluster_node_vcpus }}"
maxvcpus: "{{ cluster_node_maxvcpus }}"
- disk: "{{ extra_node_disk_size }}"
ram: "{{ extra_node_ram_size }}"
target_order: "{{ extra_node_target_order }}"
- when_distro:
- cdk
name: juju-controller
ram: "{{ juju_controller_node_ram_size }}"
- when_distro:
- ocp
- okd
Expand All @@ -120,15 +110,13 @@ service_node_target_order:
# -e service_nodes_spec='[{"services":["apache","bind","dnsmasq"]}]'
#
default_service_nodes_map_list:
- os: "{{ hostvars['kubeinit-defaults'].cluster_node_os }}"
- os: "{{ hostvars['kubeinit-defaults'].cluster_node_default_distro[kubeinit_cluster_distro].os }}"
services:
- bind
- dnsmasq
- haproxy
- apache
- registry
- apps
# - nexus
target_order: "{{ service_node_target_order }}"
- when_distro:
- ocp
Expand Down
5 changes: 1 addition & 4 deletions kubeinit/group_vars/kubeinit_facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ distro_facts:
k8s:
name: 'Vanilla CNCF Kubernetes'
role: kubeinit_k8s
kid:
name: 'Kubeinit distro (work-in-progress)'
role: kubeinit_kid
ocp:
name: 'Openshift Container Platform'
name: 'OpenShift Container Platform'
role: kubeinit_openshift
okd:
name: 'Origin Distribution of Kubernetes'
Expand Down
4 changes: 2 additions & 2 deletions kubeinit/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
hosts: localhost
become: false
gather_subset: "!all,network"
gather_facts: true
gather_facts: false
pre_tasks:
- name: Check if Ansible meets version requirements.
tags: task_gather_facts
Expand All @@ -43,7 +43,7 @@
hosts: kubeinit_hypervisors
become: false
gather_subset: "!all,network"
gather_facts: true
gather_facts: false
tasks:
- name: Skip play if playbook_terminated
ansible.builtin.meta: end_play
Expand Down
4 changes: 0 additions & 4 deletions kubeinit/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@

---
collections:
- name: ansible.netcommon
version: '5.1.1'
- name: ansible.posix
version: '1.5.4'
- name: ansible.utils
version: '2.10.3'
- name: ansible.windows
version: '1.14.0'
- name: community.crypto
version: '2.13.1'
- name: community.general
Expand Down
1 change: 1 addition & 0 deletions kubeinit/roles/kubeinit_apache/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
ansible.builtin.package:
state: present
name: "buildah"
use: "{{ hostvars[kubeinit_deployment_delegate]['ansible_facts']['pkg_mgr'] }}"

- name: Create a new working container image
ansible.builtin.command: buildah from --name {{ kubeinit_cluster_name }}-apache quay.io/kubeinit/httpd:2.4
Expand Down
3 changes: 0 additions & 3 deletions kubeinit/roles/kubeinit_apps/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions kubeinit/roles/kubeinit_apps/defaults/main.yml

This file was deleted.

Empty file.
15 changes: 0 additions & 15 deletions kubeinit/roles/kubeinit_apps/handlers/main.yml

This file was deleted.

Loading

0 comments on commit e9a6e67

Please sign in to comment.