27 Commits

Author SHA1 Message Date
88f1ef5a87 Remove NFS package
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-01 10:51:51 +02:00
24aaf55e4b Add cloud-init VMware datasource
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-20 09:19:46 +02:00
297fb39202 Upgrade kubeadm apiVersion
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-19 12:38:09 +02:00
13b8e4c43d Upgrade K8s major version
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-05-19 12:17:34 +02:00
cc0f2bd683 Rebase OS version;Upgrade K8s minor version
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-19 12:11:01 +02:00
619923b2d4 Upgrade K8s version
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-18 20:18:09 +01:00
19628c3080 Remove custom ansible role (overwrite cloud-init datasource priority)
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-18 20:15:48 +01:00
e6c366a5be Remove redundant package installation
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-04 15:50:41 +01:00
12ae24f950 Disable unrelated dependency
Some checks failed
continuous-integration/drone/push Build is failing
2023-03-04 13:01:08 +01:00
b94b7a2916 Update versions
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-03-04 12:47:18 +01:00
652a5d25c9 Fix pause image tag
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-03 13:03:21 +01:00
8b30841fc4 Override cloud-init datasource list;Add package open-iscsi
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-03 09:59:03 +01:00
af4c3a1b08 Fix var reference; Revert file move
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 12:14:12 +01:00
51f36b921d Copy cloud-init files
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-03-02 12:06:54 +01:00
5d279e0e86 Downgrade OS
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-03-02 11:45:22 +01:00
567749e74d Unlock builder account;Revert debug user
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 11:42:39 +01:00
3b644541dd Add additional package;Force ovftool
All checks were successful
continuous-integration/drone/push Build is passing
2023-03-02 09:45:02 +01:00
d29e73a424 Move debug user creation
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-25 13:28:14 +01:00
ad38b34ce4 Copy subfolders
Some checks reported errors
continuous-integration/drone/push Build was killed
2023-02-25 12:52:37 +01:00
0a2cc82e2d Fix non-empty folder move
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-25 11:25:32 +01:00
e27b3f1f6f Revert output directory;Add sleep for debugging
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-25 10:48:18 +01:00
963930e04d Fix var reference
Some checks reported errors
continuous-integration/drone/push Build encountered an error
2023-02-24 21:35:14 +01:00
8463a257d6 Output directly to volume
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-24 17:23:44 +01:00
ad8df64b13 Fix fileglob
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-24 10:58:11 +01:00
d828b83e0b Debug working directory;Fix path
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-24 10:32:16 +01:00
139629a458 Move artifact to output volume;Add debug user
Some checks failed
continuous-integration/drone/push Build is failing
2023-02-24 09:39:50 +01:00
e220c2bc24 Destroy VM after build;Debug output
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-23 22:22:23 +01:00
13 changed files with 127 additions and 23 deletions

View File

@@ -6,9 +6,6 @@ volumes:
- name: output - name: output
claim: claim:
name: flexvolsmb-drone-output name: flexvolsmb-drone-output
- name: scratch
claim:
name: flexvolsmb-drone-scratch
steps: steps:
- name: Debugging information - name: Debugging information
@@ -22,12 +19,6 @@ steps:
image: bv11-cr01.bessems.eu/library/packer-extended image: bv11-cr01.bessems.eu/library/packer-extended
pull: always pull: always
commands: commands:
- |
apt-get update
- |
apt-get install -y \
curl \
make
- | - |
jq '.password="'"$VSPHERE_PASSWORD"'"' ./packer/ova/vsphere.json > /tmp/vsphere.json && \ jq '.password="'"$VSPHERE_PASSWORD"'"' ./packer/ova/vsphere.json > /tmp/vsphere.json && \
mv /tmp/vsphere.json ./packer/ova/vsphere.json mv /tmp/vsphere.json ./packer/ova/vsphere.json
@@ -35,9 +26,13 @@ steps:
make deps-ova make deps-ova
- | - |
make build-node-ova-vsphere-ubuntu-2204 make build-node-ova-vsphere-ubuntu-2204
- |
mv -fv ./output/**/*.ova /output
environment: environment:
VSPHERE_PASSWORD: VSPHERE_PASSWORD:
from_secret: vsphere_password from_secret: vsphere_password
IB_OVFTOOL: true
IB_OVFTOOL_ARGS: --allowExtraConfig
volumes: volumes:
- name: output - name: output
path: /output path: /output

View File

@@ -81,7 +81,7 @@ deps-osc:
hack/ensure-packer.sh hack/ensure-packer.sh
hack/ensure-goss.sh hack/ensure-goss.sh
packer plugins install github.com/outscale/outscale packer plugins install github.com/outscale/outscale
.PHONY: deps-gce .PHONY: deps-gce
deps-gce: ## Installs/checks dependencies for GCE builds deps-gce: ## Installs/checks dependencies for GCE builds
deps-gce: deps-gce:
@@ -93,7 +93,7 @@ deps-gce:
deps-ova: ## Installs/checks dependencies for OVA builds deps-ova: ## Installs/checks dependencies for OVA builds
deps-ova: deps-ova:
hack/ensure-ansible.sh hack/ensure-ansible.sh
hack/ensure-ansible-windows.sh : hack/ensure-ansible-windows.sh
hack/ensure-packer.sh hack/ensure-packer.sh
hack/ensure-goss.sh hack/ensure-goss.sh
hack/ensure-ovftool.sh hack/ensure-ovftool.sh
@@ -494,7 +494,7 @@ $(OCI_VALIDATE_TARGETS): deps-oci
packer validate $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/oci/$(subst validate-oci-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/oci/packer.json packer validate $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/oci/$(subst validate-oci-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/oci/packer.json
.PHONY: $(OSC_BUILD_TARGETS) .PHONY: $(OSC_BUILD_TARGETS)
$(OSC_BUILD_TARGETS): deps-osc $(OSC_BUILD_TARGETS): deps-osc
packer build $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/outscale/$(subst build-osc-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/outscale/packer.json packer build $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/outscale/$(subst build-osc-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/outscale/packer.json
.PHONY: $(OSC_VALIDATE_TARGETS) .PHONY: $(OSC_VALIDATE_TARGETS)

View File

@@ -1,11 +1,11 @@
apiVersion: kubeadm.k8s.io/v1beta2 apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration kind: ClusterConfiguration
imageRepository: {{ kubernetes_container_registry }} imageRepository: {{ kubernetes_container_registry }}
kubernetesVersion: {{ kubernetes_semver }} kubernetesVersion: {{ kubernetes_semver }}
dns: dns:
imageRepository: {{ kubernetes_container_registry }}/coredns imageRepository: {{ kubernetes_container_registry }}/coredns
--- ---
apiVersion: kubeadm.k8s.io/v1beta2 apiVersion: kubeadm.k8s.io/v1beta3
kind: InitConfiguration kind: InitConfiguration
nodeRegistration: nodeRegistration:
criSocket: {{ containerd_cri_socket }} criSocket: {{ containerd_cri_socket }}

View File

@@ -43,3 +43,11 @@
- { src: files/etc/networkd-dispatcher/routable.d/20-chrony.j2, dest: /etc/networkd-dispatcher/routable.d/20-chrony } - { src: files/etc/networkd-dispatcher/routable.d/20-chrony.j2, dest: /etc/networkd-dispatcher/routable.d/20-chrony }
- { src: files/etc/networkd-dispatcher/off.d/20-chrony.j2, dest: /etc/networkd-dispatcher/off.d/20-chrony } - { src: files/etc/networkd-dispatcher/off.d/20-chrony.j2, dest: /etc/networkd-dispatcher/off.d/20-chrony }
- { src: files/etc/networkd-dispatcher/no-carrier.d/20-chrony.j2, dest: /etc/networkd-dispatcher/no-carrier.d/20-chrony } - { src: files/etc/networkd-dispatcher/no-carrier.d/20-chrony.j2, dest: /etc/networkd-dispatcher/no-carrier.d/20-chrony }
- name: Create cloud-init datasource config file
copy:
dest: /etc/cloud/ds-identify.cfg
force: true
content: |
datasource: VMware
when: ansible_distribution_version is version('22.04', '>=')

View File

@@ -93,3 +93,15 @@
file: file:
state: absent state: absent
path: /etc/udev/rules.d/70-persistent-net.rules path: /etc/udev/rules.d/70-persistent-net.rules
- name: Remove subiquity disable cloud-init networking config
file:
path: /etc/cloud/cloud.cfg.d/subiquity-disable-cloudinit-networking.cfg
state: absent
when: ansible_distribution_version is version('22.04', '>=')
- name: Remove 99-installer.cfg which sets the cloud-init datasource to None
file:
path: /etc/cloud/cloud.cfg.d/99-installer.cfg
state: absent
when: ansible_distribution_version is version('22.04', '>=')

View File

@@ -2,8 +2,8 @@
"additional_executables": "false", "additional_executables": "false",
"additional_executables_destination_path": "", "additional_executables_destination_path": "",
"additional_executables_list": "", "additional_executables_list": "",
"additional_registry_images": "false", "additional_registry_images": "true",
"additional_registry_images_list": "", "additional_registry_images_list": "ghcr.io/kube-vip/kube-vip:v0.5.5",
"additional_url_images": "false", "additional_url_images": "false",
"additional_url_images_list": "", "additional_url_images_list": "",
"load_additional_components": "false" "load_additional_components": "false"

View File

@@ -1,7 +1,7 @@
{ {
"build_target": "virt", "build_target": "virt",
"disable_public_repos": "false", "disable_public_repos": "false",
"extra_debs": "", "extra_debs": "open-iscsi",
"extra_repos": "", "extra_repos": "",
"extra_rpms": "", "extra_rpms": "",
"firstboot_custom_roles_post": "", "firstboot_custom_roles_post": "",

View File

@@ -8,16 +8,16 @@
"kubernetes_container_registry": "registry.k8s.io", "kubernetes_container_registry": "registry.k8s.io",
"kubernetes_deb_gpg_key": "https://packages.cloud.google.com/apt/doc/apt-key.gpg", "kubernetes_deb_gpg_key": "https://packages.cloud.google.com/apt/doc/apt-key.gpg",
"kubernetes_deb_repo": "\"https://apt.kubernetes.io/ kubernetes-xenial\"", "kubernetes_deb_repo": "\"https://apt.kubernetes.io/ kubernetes-xenial\"",
"kubernetes_deb_version": "1.23.15-00", "kubernetes_deb_version": "1.27.1-00",
"kubernetes_http_source": "https://dl.k8s.io/release", "kubernetes_http_source": "https://dl.k8s.io/release",
"kubernetes_load_additional_imgs": "false", "kubernetes_load_additional_imgs": "false",
"kubernetes_rpm_gpg_check": "True", "kubernetes_rpm_gpg_check": "True",
"kubernetes_rpm_gpg_key": "\"https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg\"", "kubernetes_rpm_gpg_key": "\"https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg\"",
"kubernetes_rpm_repo": "https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{user `kubernetes_rpm_repo_arch`}}", "kubernetes_rpm_repo": "https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{user `kubernetes_rpm_repo_arch`}}",
"kubernetes_rpm_repo_arch": "x86_64", "kubernetes_rpm_repo_arch": "x86_64",
"kubernetes_rpm_version": "1.23.15-0", "kubernetes_rpm_version": "1.27.1-0",
"kubernetes_semver": "v1.23.15", "kubernetes_semver": "v1.27.1",
"kubernetes_series": "v1.23", "kubernetes_series": "v1.27",
"kubernetes_source_type": "pkg", "kubernetes_source_type": "pkg",
"systemd_prefix": "/usr/lib/systemd", "systemd_prefix": "/usr/lib/systemd",
"sysusr_prefix": "/usr", "sysusr_prefix": "/usr",

View File

@@ -0,0 +1,87 @@
#cloud-config
# Copyright 2022 The Kubernetes Authors.
#
# 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.
# For more information on how autoinstall is configured, please refer to
# https://ubuntu.com/server/docs/install/autoinstall-reference
autoinstall:
version: 1
# Disable ssh server during installation, otherwise packer tries to connect and exceed max attempts
early-commands:
- systemctl stop ssh
# Configure the locale
locale: en_US.UTF-8
keyboard:
layout: us
# Create a single-partition with no swap space. Kubernetes
# really dislikes the idea of anyone else managing memory.
# For more information on how partitioning is configured,
# please refer to https://curtin.readthedocs.io/en/latest/topics/storage.html.
storage:
config:
- type: disk
id: disk-0
size: largest
grub_device: true
preserve: false
ptable: msdos
wipe: superblock
- type: partition
id: partition-0
device: disk-0
size: -1
number: 1
preserve: false
flag: boot
- type: format
id: format-0
volume: partition-0
fstype: ext4
preserve: false
- type: mount
id: mount-0
device: format-0
path: /
updates: 'all'
ssh:
install-server: true
allow-pw: true
# Customize the list of packages installed.
packages:
- open-vm-tools
# Create the default user.
# Ensures the "builder" user doesn't require a password to use sudo.
user-data:
users:
- name: builder
# openssl passwd -6 -stdin <<< builder
passwd: $6$xyz$UtXVazU08Q5b8AW.TJ3MPYZglyXa3Ttf2RCel8MCUPlEYO1evWxeWBhZ2QqivU/Ij4tqYAxMCqc2ujEM4dMSe1
groups: [adm, cdrom, dip, plugdev, lxd, sudo]
lock-passwd: false
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
# This command runs after all other steps; it:
# 1. Disables swapfiles
# 2. Removes the existing swapfile
# 3. Removes the swapfile entry from /etc/fstab
# 4. Cleans up any packages that are no longer required
# 5. Removes the cached list of packages
late-commands:
- swapoff -a
- rm -f /swapfile
- sed -ri '/\sswap\s/s/^#?/#/' /etc/fstab
- apt-get purge --auto-remove -y
- rm -rf /var/lib/apt/lists/*

View File

@@ -195,6 +195,7 @@
"cpu_cores": "{{user `cpu_cores`}}", "cpu_cores": "{{user `cpu_cores`}}",
"datacenter": "{{user `datacenter`}}", "datacenter": "{{user `datacenter`}}",
"datastore": "{{user `datastore`}}", "datastore": "{{user `datastore`}}",
"destroy": true,
"disk_controller_type": "{{user `disk_controller_type`}}", "disk_controller_type": "{{user `disk_controller_type`}}",
"export": { "export": {
"force": true, "force": true,

View File

@@ -4,6 +4,7 @@
"boot_disable_ipv6": "0", "boot_disable_ipv6": "0",
"boot_media_path": "/media/HTTP", "boot_media_path": "/media/HTTP",
"build_name": "ubuntu-2004", "build_name": "ubuntu-2004",
"cd_file_path": "./packer/ova/linux/{{user `distro_name`}}/http/{{user `distro_version`}}",
"distro_arch": "amd64", "distro_arch": "amd64",
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "20.04", "distro_version": "20.04",

View File

@@ -8,9 +8,9 @@
"distro_name": "ubuntu", "distro_name": "ubuntu",
"distro_version": "22.04", "distro_version": "22.04",
"guest_os_type": "ubuntu-64", "guest_os_type": "ubuntu-64",
"iso_checksum": "10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb", "iso_checksum": "5e38b55d57d94ff029719342357325ed3bda38fa80054f9330dc789cd2d43931",
"iso_checksum_type": "sha256", "iso_checksum_type": "sha256",
"iso_url": "https://releases.ubuntu.com/22.04/ubuntu-22.04.1-live-server-amd64.iso", "iso_url": "https://releases.ubuntu.com/jammy/ubuntu-22.04.2-live-server-amd64.iso",
"os_display_name": "Ubuntu 22.04", "os_display_name": "Ubuntu 22.04",
"shutdown_command": "shutdown -P now", "shutdown_command": "shutdown -P now",
"vsphere_guest_os_type": "ubuntu64Guest" "vsphere_guest_os_type": "ubuntu64Guest"