Compare commits
1 Commits
Ubuntu2204
...
0c0ba1f88a
| Author | SHA1 | Date | |
|---|---|---|---|
| 0c0ba1f88a |
19
.drone.yml
19
.drone.yml
@@ -6,6 +6,9 @@ volumes:
|
||||
- name: output
|
||||
claim:
|
||||
name: flexvolsmb-drone-output
|
||||
- name: scratch
|
||||
claim:
|
||||
name: flexvolsmb-drone-scratch
|
||||
|
||||
steps:
|
||||
- name: Debugging information
|
||||
@@ -20,19 +23,23 @@ steps:
|
||||
pull: always
|
||||
commands:
|
||||
- |
|
||||
jq '.password="'"$VSPHERE_PASSWORD"'"' ./packer/ova/vsphere.json > /tmp/vsphere.json && \
|
||||
mv /tmp/vsphere.json ./packer/ova/vsphere.json
|
||||
apt-get update
|
||||
- |
|
||||
apt-get install -y \
|
||||
curl \
|
||||
make
|
||||
- |
|
||||
jq '.password="'"$VSPHERE_PASSWORD"'"' /drone/src/override.json > /tmp/json && \
|
||||
mv /tmp/json /drone/src/override.json
|
||||
- |
|
||||
make deps-ova
|
||||
- |
|
||||
make build-node-ova-vsphere-ubuntu-2204
|
||||
- |
|
||||
mv -fv ./output/**/*.ova /output
|
||||
environment:
|
||||
VSPHERE_PASSWORD:
|
||||
from_secret: vsphere_password
|
||||
IB_OVFTOOL: true
|
||||
IB_OVFTOOL_ARGS: --allowExtraConfig
|
||||
PACKER_VAR_FILES:
|
||||
/drone/src/override.json
|
||||
volumes:
|
||||
- name: output
|
||||
path: /output
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
name: Container & Helm chart
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
# linting:
|
||||
# name: Linting
|
||||
# runs-on: dind-rootless
|
||||
# steps:
|
||||
# - name: Check out repository code
|
||||
# uses: actions/checkout@v4
|
||||
# - name: yamllint
|
||||
# uses: bewuethr/yamllint-action@v1
|
||||
# with:
|
||||
# config-file: .yamllint.yaml
|
||||
|
||||
semrel_dryrun:
|
||||
name: Semantic Release (Dry-run)
|
||||
runs-on: dind-rootless
|
||||
outputs:
|
||||
version: ${{ steps.sem_rel.outputs.version }}
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm install \
|
||||
semantic-release \
|
||||
@semantic-release/commit-analyzer \
|
||||
@semantic-release/exec
|
||||
- name: Semantic Release (dry-run)
|
||||
id: sem_rel
|
||||
run: |
|
||||
npx semantic-release \
|
||||
--package @semantic-release/exec \
|
||||
--package semantic-release \
|
||||
--branches ${{ gitea.refname }} \
|
||||
--tag-format 'v${version}' \
|
||||
--dry-run \
|
||||
--plugins @semantic-release/commit-analyzer,@semantic-release/exec \
|
||||
--analyzeCommits @semantic-release/commit-analyzer \
|
||||
--verifyRelease @semantic-release/exec \
|
||||
--verifyReleaseCmd 'echo "version=${nextRelease.version}" >> $GITHUB_OUTPUT'
|
||||
env:
|
||||
GIT_CREDENTIALS: ${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_APIKEY }}
|
||||
- name: Assert semantic release output
|
||||
run: |
|
||||
[[ -z "${{ steps.sem_rel.outputs.version }}" ]] && {
|
||||
echo 'No release tag - exiting'; exit 1
|
||||
} || {
|
||||
echo 'Release tag set correctly: ${{ steps.sem_rel.outputs.version }}'; exit 0
|
||||
}
|
||||
|
||||
build_image:
|
||||
name: Cluster API node template
|
||||
# volumes:
|
||||
# - /data:/data
|
||||
# - /output:/output
|
||||
runs-on: dind
|
||||
# needs: [semrel_dryrun, linting]
|
||||
needs: semrel_dryrun
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: registry.k8s.io/scl-image-builder/cluster-node-image-builder-amd64:v0.1.29
|
||||
# options: --user root
|
||||
options: --volumes-from ${{ env.JOB_CONTAINER_NAME }} --rm
|
||||
run: |
|
||||
make deps-ova
|
||||
- name: Build node template
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: registry.k8s.io/scl-image-builder/cluster-node-image-builder-amd64:v0.1.29
|
||||
# options: --user root
|
||||
options: --volumes-from ${{ env.JOB_CONTAINER_NAME }} --rm
|
||||
run: |
|
||||
make build-node-ova-vsphere-ubuntu-2204
|
||||
# env:
|
||||
# PACKER_LOG: 1
|
||||
|
||||
# semrel:
|
||||
# name: Semantic Release
|
||||
# runs-on: dind-rootless
|
||||
# needs: [build_container, build_chart]
|
||||
# steps:
|
||||
# - name: Check out repository code
|
||||
# uses: actions/checkout@v3
|
||||
# - name: Setup Node
|
||||
# uses: actions/setup-node@v3
|
||||
# with:
|
||||
# node-version: 20
|
||||
# - name: Install dependencies
|
||||
# run: |
|
||||
# npm install \
|
||||
# semantic-release \
|
||||
# @semantic-release/changelog \
|
||||
# @semantic-release/commit-analyzer \
|
||||
# @semantic-release/git \
|
||||
# @semantic-release/release-notes-generator
|
||||
# - name: Semantic Release
|
||||
# run: |
|
||||
# npx semantic-release \
|
||||
# --branches ${{ gitea.refname }} \
|
||||
# --tag-format 'v${version}' \
|
||||
# --plugins @semantic-release/commit-analyzer,@semantic-release/release-notes-generator,@semantic-release/changelog,@semantic-release/git
|
||||
# env:
|
||||
# GIT_CREDENTIALS: ${{ secrets.GIT_USERNAME }}:${{ secrets.GIT_APIKEY }}
|
||||
2
Makefile
2
Makefile
@@ -93,7 +93,7 @@ deps-gce:
|
||||
deps-ova: ## Installs/checks dependencies for OVA builds
|
||||
deps-ova:
|
||||
hack/ensure-ansible.sh
|
||||
: hack/ensure-ansible-windows.sh
|
||||
hack/ensure-ansible-windows.sh
|
||||
hack/ensure-packer.sh
|
||||
hack/ensure-goss.sh
|
||||
hack/ensure-ovftool.sh
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
kind: ClusterConfiguration
|
||||
imageRepository: {{ kubernetes_container_registry }}
|
||||
kubernetesVersion: {{ kubernetes_semver }}
|
||||
dns:
|
||||
imageRepository: {{ kubernetes_container_registry }}/coredns
|
||||
---
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
kind: InitConfiguration
|
||||
nodeRegistration:
|
||||
criSocket: {{ containerd_cri_socket }}
|
||||
|
||||
@@ -43,11 +43,3 @@
|
||||
- { 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/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', '>=')
|
||||
|
||||
@@ -93,15 +93,3 @@
|
||||
file:
|
||||
state: absent
|
||||
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', '>=')
|
||||
|
||||
7
override.json
Normal file
7
override.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"boot_command_prefix": "c<wait>linux /casper/vmlinuz --- autoinstall quiet<enter><wait>initrd /casper/initrd<enter><wait>boot<enter>",
|
||||
"cd_file_path": "./packer/ova/linux/{{user `distro_name`}}/http/{{user `distro_version`}}",
|
||||
"cd_files": ["{{user `cd_file_path`}}/meta-data", "{{user `cd_file_path`}}/user-data"],
|
||||
"cd_label": "cidata",
|
||||
"floppy_dirs": null
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
"additional_executables": "false",
|
||||
"additional_executables_destination_path": "",
|
||||
"additional_executables_list": "",
|
||||
"additional_registry_images": "true",
|
||||
"additional_registry_images_list": "ghcr.io/kube-vip/kube-vip:v0.5.5",
|
||||
"additional_registry_images": "false",
|
||||
"additional_registry_images_list": "",
|
||||
"additional_url_images": "false",
|
||||
"additional_url_images_list": "",
|
||||
"load_additional_components": "false"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"build_target": "virt",
|
||||
"disable_public_repos": "false",
|
||||
"extra_debs": "nfs-common open-iscsi",
|
||||
"extra_debs": "",
|
||||
"extra_repos": "",
|
||||
"extra_rpms": "",
|
||||
"firstboot_custom_roles_post": "",
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
"kubernetes_container_registry": "registry.k8s.io",
|
||||
"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_version": "1.27.1-00",
|
||||
"kubernetes_deb_version": "1.23.15-00",
|
||||
"kubernetes_http_source": "https://dl.k8s.io/release",
|
||||
"kubernetes_load_additional_imgs": "false",
|
||||
"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_repo": "https://packages.cloud.google.com/yum/repos/kubernetes-el7-{{user `kubernetes_rpm_repo_arch`}}",
|
||||
"kubernetes_rpm_repo_arch": "x86_64",
|
||||
"kubernetes_rpm_version": "1.27.1-0",
|
||||
"kubernetes_semver": "v1.27.1",
|
||||
"kubernetes_series": "v1.27",
|
||||
"kubernetes_rpm_version": "1.23.15-0",
|
||||
"kubernetes_semver": "v1.23.15",
|
||||
"kubernetes_series": "v1.23",
|
||||
"kubernetes_source_type": "pkg",
|
||||
"systemd_prefix": "/usr/lib/systemd",
|
||||
"sysusr_prefix": "/usr",
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
#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/*
|
||||
@@ -188,14 +188,11 @@
|
||||
],
|
||||
"boot_wait": "{{user `boot_wait`}}",
|
||||
"cluster": "{{user `cluster`}}",
|
||||
"cd_files": ["{{user `cd_file_path`}}/meta-data", "{{user `cd_file_path`}}/user-data"],
|
||||
"cd_label": "cidata",
|
||||
"communicator": "ssh",
|
||||
"convert_to_template": "{{user `convert_to_template`}}",
|
||||
"cpu_cores": "{{user `cpu_cores`}}",
|
||||
"datacenter": "{{user `datacenter`}}",
|
||||
"datastore": "{{user `datastore`}}",
|
||||
"destroy": true,
|
||||
"disk_controller_type": "{{user `disk_controller_type`}}",
|
||||
"export": {
|
||||
"force": true,
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"boot_disable_ipv6": "0",
|
||||
"boot_media_path": "/media/HTTP",
|
||||
"build_name": "ubuntu-2004",
|
||||
"cd_file_path": "./packer/ova/linux/{{user `distro_name`}}/http/{{user `distro_version`}}",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "ubuntu",
|
||||
"distro_version": "20.04",
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"boot_command_prefix": "c<wait>linux /casper/vmlinuz --- autoinstall quiet<enter><wait>initrd /casper/initrd<enter><wait>boot<enter>",
|
||||
"boot_command_prefix": "c<wait>linux /casper/vmlinuz --- autoinstall ds='nocloud-net;s=http://{{ .HTTPIP }}:{{ .HTTPPort }}/22.04/'<enter><wait>initrd /casper/initrd<enter><wait>boot<enter>",
|
||||
"boot_disable_ipv6": "0",
|
||||
"boot_media_path": "/media/HTTP",
|
||||
"build_name": "ubuntu-2204",
|
||||
"cd_file_path": "./packer/ova/linux/{{user `distro_name`}}/http/{{user `distro_version`}}",
|
||||
"distro_arch": "amd64",
|
||||
"distro_name": "ubuntu",
|
||||
"distro_version": "22.04",
|
||||
"floppy_dirs": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||
"guest_os_type": "ubuntu-64",
|
||||
"iso_checksum": "a4acfda10b18da50e2ec50ccaf860d7f20b389df8765611142305c0e911d16fd",
|
||||
"iso_checksum": "10f19c5b2b8d6db711582e0e27f5116296c34fe4b313ba45f9b201a5007056cb",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "https://releases.ubuntu.com/jammy/ubuntu-22.04.3-live-server-amd64.iso",
|
||||
"iso_url": "https://releases.ubuntu.com/22.04/ubuntu-22.04.1-live-server-amd64.iso",
|
||||
"os_display_name": "Ubuntu 22.04",
|
||||
"shutdown_command": "shutdown -P now",
|
||||
"vsphere_guest_os_type": "ubuntu64Guest"
|
||||
|
||||
Reference in New Issue
Block a user