From a3d855e84ab6cdc43b7cbdb49f49815bb570b587 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Thu, 21 Mar 2024 15:46:01 +0000 Subject: [PATCH 1/3] delete obsolete CentOS 6 files --- centos/centos-6.json | 53 ------------------------ centos/httpdir/centos-6.cfg | 27 ------------ centos/provisioners/cloud-init-6.patch | 12 ------ centos/provisioners/network-centos6.yaml | 29 ------------- 4 files changed, 121 deletions(-) delete mode 100644 centos/centos-6.json delete mode 100644 centos/httpdir/centos-6.cfg delete mode 100644 centos/provisioners/cloud-init-6.patch delete mode 100644 centos/provisioners/network-centos6.yaml diff --git a/centos/centos-6.json b/centos/centos-6.json deleted file mode 100644 index a1254be..0000000 --- a/centos/centos-6.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "builders": [ - { - "boot_command": [ - "", - " linux ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos-6.cfg", - "" - ], - "disk_size": 8000, - "format": "ova", - "guest_os_type": "RedHat_64", - "http_directory": "httpdir", - "http_port_max": 8550, - "http_port_min": 8500, - "iso_checksum": "sha256:56f7b078a3b443095ba006cdc85319c691251cda98c5d73d12ef6db7aff6b4c1", - "iso_url": "http://mirror.tedra.es/CentOS/6.10/isos/x86_64/CentOS-6.10-x86_64-netinstall.iso", - "shutdown_command": "shutdown -h now", - "ssh_password": "rootpassword", - "ssh_timeout": "90m", - "ssh_username": "root", - "type": "virtualbox-iso", - "vboxmanage": [ - [ - "modifyvm", - "{{.Name}}", - "--memory", - "1024" - ] - ], - "vm_name": "centos.6-2020.07.08" - } - ], - "provisioners": [ - { - "playbook_file": "provisioners/init.yaml", - "type": "ansible" - }, - { - "expect_disconnect": true, - "inline": [ - "reboot \u0026", - "sleep 5s" - ], - "type": "shell" - }, - { - "pause_before": "30s", - "playbook_file": "provisioners/config.yaml", - "type": "ansible" - } - ] -} - diff --git a/centos/httpdir/centos-6.cfg b/centos/httpdir/centos-6.cfg deleted file mode 100644 index 97f78e2..0000000 --- a/centos/httpdir/centos-6.cfg +++ /dev/null @@ -1,27 +0,0 @@ -install -url --url=http://mirror.nextlayer.at/centos/6/os/x86_64/ -lang en_US.UTF-8 -keyboard us -network --device=eth0 --bootproto dhcp --onboot=yes --noipv6 -rootpw rootpassword -firewall --enable --ssh -authconfig --enableshadow --passalgo=sha512 -selinux --disabled -timezone UTC -bootloader --location=mbr -text -skipx -zerombr -clearpart --all --initlabel -part / --size=1 --grow --fstype ext4 -auth --useshadow --enablemd5 -firstboot --disabled -reboot -%packages --nobase -@core -openssh-clients -openssh-server -%end -%post -/usr/bin/yum -y install sudo -%end diff --git a/centos/provisioners/cloud-init-6.patch b/centos/provisioners/cloud-init-6.patch deleted file mode 100644 index 2762e30..0000000 --- a/centos/provisioners/cloud-init-6.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- DataSourceOpenNebula.py 2014-10-31 11:57:41.000000000 +0000 -+++ DataSourceOpenNebula.py.orig 2015-06-17 11:02:47.134757659 +0000 -@@ -288,7 +288,7 @@ - - - def switch_user_cmd(user): -- return ['runuser', '-u', user, '--'] -+ return ['sudo', '-u', user] - - def parse_shell_config(content, keylist=None, bash=None, asuser=None, - switch_user_cb=None): - diff --git a/centos/provisioners/network-centos6.yaml b/centos/provisioners/network-centos6.yaml deleted file mode 100644 index 55a76c5..0000000 --- a/centos/provisioners/network-centos6.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: Remove hardware address from configuration files - lineinfile: - path: "{{ item }}" - state: absent - regexp: '^(HWADDR|UUID)' - with_fileglob: - - "/etc/sysconfig/network-scripts/ifcfg-eth*" - -- name: Remove udev rules - file: - path: "{{ item }}" - state: absent - with_fileglob: - - /etc/udev/rules.d/70-persistent-net.rules - - /etc/udev/rules.d/70-persistent-cd.rules - -- name: enable network service - service: - name: network - state: started - enabled: yes - -- name: adjust /sysconfig/network - blockinfile: - path: /etc/sysconfig/network - block: | - NOZEROCONF=yes - NETWORKING=yes From 307bc8340258289b728861f30a9126aa322fc7e4 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Thu, 21 Mar 2024 15:49:03 +0000 Subject: [PATCH 2/3] remove old centos config --- centos/provisioners/cloud-init.yaml | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/centos/provisioners/cloud-init.yaml b/centos/provisioners/cloud-init.yaml index 1de8edf..4761a88 100644 --- a/centos/provisioners/cloud-init.yaml +++ b/centos/provisioners/cloud-init.yaml @@ -10,26 +10,6 @@ name: [cloud-init, cloud-utils-growpart] state: latest -- name: extra packages for centos 6 - yum: - name: [dracut-modules-growroot, patch, parted] - state: latest - when: ansible_distribution_major_version == "6" - -- name: copy cloud-init patch - copy: - src: cloud-init-6.patch - dest: /tmp/cloud-init.patch - -- name: patch cloud-init - shell: | - pushd /usr/lib/python2.6/site-packages/cloudinit/sources - patch < /tmp/cloud-init.patch - rm /tmp/cloud-init.patch - popd - python -c "import cloudinit.sources.DataSourceOpenNebula" - when: ansible_distribution_major_version == "6" - - name: Create fedcloud config copy: content: | @@ -40,12 +20,6 @@ # Regenerate keys ssh_deletekeys: True ssh_genkeytypes: ['rsa', 'dsa'] - - # In OpenNebula, use network based datasource, - # so that it can successfully resolve IPv4 based hostname - datasource: - OpenNebula: - dsmode: net dest: /etc/cloud/cloud.cfg.d/01_fedcloud.cfg - name: enable service From 1e960fa610d4ef08ad840ed2857609818e2969f2 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Fri, 22 Mar 2024 13:38:38 +0000 Subject: [PATCH 3/3] Update CentOS 8 Stream image --- centos/appdb/centos-8.yaml | 8 ++++---- centos/centos-8.json | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/centos/appdb/centos-8.yaml b/centos/appdb/centos-8.yaml index 5c0200a..3bee946 100644 --- a/centos/appdb/centos-8.yaml +++ b/centos/appdb/centos-8.yaml @@ -1,10 +1,10 @@ --- appdb: - version: 2023.10.24 - expireson: 6 + version: 2024.03.22 + expireson: 3 notes: Regular update - url: https://api.cloud.ifca.es:8080/swift/v1/egi_endorsed_vas/centos.8-2023.10.24.ova - sha512: "cd70f34928a3b80059bc0dd52d93497c5ef29000dd0b1b5e51f0ef7e372f8f72c47fcfe740a76dedf16fd32487a430fb189c175019616ed2be3d39dcfb4d4279" + url: https://api.cloud.ifca.es:8080/swift/v1/egi_endorsed_vas/centos.8-2024.03.22.ova + sha512: "d61dc56adb240a6a855985a673cd7b8545af38254f3bec2caf0fe434c9541a20dce887154c77cbce9d6f8eccc3796d9aa95679f11602aa3ba51236f78cee6e7c" arch: x86_64 os: family: Linux diff --git a/centos/centos-8.json b/centos/centos-8.json index 5075df1..aebf105 100644 --- a/centos/centos-8.json +++ b/centos/centos-8.json @@ -17,7 +17,7 @@ "http_directory": "httpdir", "http_port_max": 8550, "http_port_min": 8500, - "iso_checksum": "sha256:34177ca225bc1105be7df6b46fa3a16445ea2d5b869125611bbb7fc0ed7207ac", + "iso_checksum": "sha256:7b4689d1ba47c916db43d16aa6badb1f001c4ad3efc26c88202d9401c3037faf", "iso_url": "http://ftp.wrz.de/pub/CentOS/8-stream/isos/x86_64/CentOS-Stream-8-x86_64-latest-boot.iso", "memory": 1024, "shutdown_command": "shutdown -h now", @@ -29,7 +29,7 @@ "qemuargs": [ [ "-cpu", "host" ] ], - "vm_name": "centos.8-2023.10.24" + "vm_name": "centos.8-2024.03.22" } ], "provisioners": [