Compare commits
45 Commits
0c0ba1f88a
...
Redhat8-K8
| Author | SHA1 | Date | |
|---|---|---|---|
| b340b4cdbc | |||
| f14096e1b4 | |||
| 5efe9a0540 | |||
| 7dfd5c9091 | |||
| 38bae64f01 | |||
| 39e0c0dae8 | |||
| 04119f3078 | |||
| b1cf73f482 | |||
| f0157db4c1 | |||
| 4979379c51 | |||
| 9588786c74 | |||
| 1be5714f67 | |||
| 4c5025fbd6 | |||
| 7f15853393 | |||
| bb0c1c5837 | |||
| 136226ce32 | |||
| 1c4858f0ad | |||
| dcfdca25a5 | |||
| ddacf57d4a | |||
| bc98e03c49 | |||
| 4b059cccdb | |||
| e9366081c9 | |||
| 59956a6971 | |||
| 619923b2d4 | |||
| 19628c3080 | |||
| e6c366a5be | |||
| 12ae24f950 | |||
| b94b7a2916 | |||
| 652a5d25c9 | |||
| 8b30841fc4 | |||
| af4c3a1b08 | |||
| 51f36b921d | |||
| 5d279e0e86 | |||
| 567749e74d | |||
| 3b644541dd | |||
| d29e73a424 | |||
| ad38b34ce4 | |||
| 0a2cc82e2d | |||
| e27b3f1f6f | |||
| 963930e04d | |||
| 8463a257d6 | |||
| ad8df64b13 | |||
| d828b83e0b | |||
| 139629a458 | |||
| e220c2bc24 |
23
.drone.yml
23
.drone.yml
@@ -22,20 +22,29 @@ 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
|
||||||
|
jq '.repo_username="'"$REPO_USERNAME"'" | .repo_password="'"$REPO_PASSWORD"'"' --null-input > /tmp/extra_vars.json
|
||||||
- |
|
- |
|
||||||
make deps-ova
|
make deps-ova
|
||||||
- |
|
- |
|
||||||
make build-node-ova-vsphere-ubuntu-2204
|
make build-node-ova-vsphere-rhel-8
|
||||||
|
- |
|
||||||
|
mv -fv ./output/**/*.ova /output
|
||||||
environment:
|
environment:
|
||||||
|
IB_OVFTOOL: true
|
||||||
|
IB_OVFTOOL_ARGS: --allowExtraConfig
|
||||||
|
PACKER_FLAGS: -on-error=ask
|
||||||
|
PACKER_VAR_FILES: /tmp/extra_vars.json
|
||||||
|
REPO_USERNAME:
|
||||||
|
from_secret: repo_username
|
||||||
|
REPO_PASSWORD:
|
||||||
|
from_secret: repo_password
|
||||||
|
RHSM_USER:
|
||||||
|
from_secret: rhsm_username
|
||||||
|
RHSM_PASS:
|
||||||
|
from_secret: rhsm_password
|
||||||
VSPHERE_PASSWORD:
|
VSPHERE_PASSWORD:
|
||||||
from_secret: vsphere_password
|
from_secret: vsphere_password
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -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)
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
"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": "true"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"disable_public_repos": "false",
|
"disable_public_repos": "false",
|
||||||
"extra_debs": "",
|
"extra_debs": "",
|
||||||
"extra_repos": "",
|
"extra_repos": "",
|
||||||
"extra_rpms": "",
|
"extra_rpms": "iscsi-initiator-utils ca-certificates",
|
||||||
"firstboot_custom_roles_post": "",
|
"firstboot_custom_roles_post": "",
|
||||||
"firstboot_custom_roles_pre": "",
|
"firstboot_custom_roles_pre": "",
|
||||||
"http_proxy": "",
|
"http_proxy": "",
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
"no_proxy": "",
|
"no_proxy": "",
|
||||||
"node_custom_roles_post": "",
|
"node_custom_roles_post": "",
|
||||||
"node_custom_roles_pre": "",
|
"node_custom_roles_pre": "",
|
||||||
"pause_image": "registry.k8s.io/pause:3.9",
|
"pause_image": "registry.k8s.io/pause:3.8",
|
||||||
"pip_conf_file": "",
|
"pip_conf_file": "",
|
||||||
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm",
|
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm",
|
||||||
"reenable_public_repos": "true",
|
"reenable_public_repos": "true",
|
||||||
|
|||||||
@@ -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.25.10-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.25.10-0",
|
||||||
"kubernetes_semver": "v1.23.15",
|
"kubernetes_semver": "v1.25.10",
|
||||||
"kubernetes_series": "v1.23",
|
"kubernetes_series": "v1.25",
|
||||||
"kubernetes_source_type": "pkg",
|
"kubernetes_source_type": "pkg",
|
||||||
"systemd_prefix": "/usr/lib/systemd",
|
"systemd_prefix": "/usr/lib/systemd",
|
||||||
"sysusr_prefix": "/usr",
|
"sysusr_prefix": "/usr",
|
||||||
|
|||||||
0
packer/ova/linux/ubuntu/http/20.04/meta-data
Normal file
0
packer/ova/linux/ubuntu/http/20.04/meta-data
Normal file
87
packer/ova/linux/ubuntu/http/20.04/user-data
Normal file
87
packer/ova/linux/ubuntu/http/20.04/user-data
Normal 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/*
|
||||||
@@ -188,13 +188,14 @@
|
|||||||
],
|
],
|
||||||
"boot_wait": "{{user `boot_wait`}}",
|
"boot_wait": "{{user `boot_wait`}}",
|
||||||
"cluster": "{{user `cluster`}}",
|
"cluster": "{{user `cluster`}}",
|
||||||
"cd_files": ["{{user `cd_file_path`}}/meta-data", "{{user `cd_file_path`}}/user-data"],
|
"cd_files": ["{{user `http_directory`}}"],
|
||||||
"cd_label": "cidata",
|
"cd_label": "OEMDRV",
|
||||||
"communicator": "ssh",
|
"communicator": "ssh",
|
||||||
"convert_to_template": "{{user `convert_to_template`}}",
|
"convert_to_template": "{{user `convert_to_template`}}",
|
||||||
"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,
|
||||||
@@ -220,7 +221,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"password": "{{user `password`}}",
|
"password": "{{user `password`}}",
|
||||||
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c 'usermod -L {{user `ssh_username`}} && {{user `shutdown_command`}}'",
|
"shutdown_command": "echo '{{user `ssh_password`}}' | sudo -S -E sh -c '{{user `shutdown_command`}}'",
|
||||||
"ssh_password": "{{user `ssh_password`}}",
|
"ssh_password": "{{user `ssh_password`}}",
|
||||||
"ssh_timeout": "4h",
|
"ssh_timeout": "4h",
|
||||||
"ssh_username": "{{user `ssh_username`}}",
|
"ssh_username": "{{user `ssh_username`}}",
|
||||||
@@ -358,7 +359,8 @@
|
|||||||
"--extra-vars",
|
"--extra-vars",
|
||||||
"{{user `ansible_user_vars`}}",
|
"{{user `ansible_user_vars`}}",
|
||||||
"--scp-extra-args",
|
"--scp-extra-args",
|
||||||
"{{user `ansible_scp_extra_args`}}"
|
"{{user `ansible_scp_extra_args`}}",
|
||||||
|
"-vvvvv"
|
||||||
],
|
],
|
||||||
"playbook_file": "./ansible/firstboot.yml",
|
"playbook_file": "./ansible/firstboot.yml",
|
||||||
"type": "ansible",
|
"type": "ansible",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"boot_command_prefix": "<up><tab> text inst.ks=",
|
"boot_command_prefix": "<up><tab> text inst.ks=",
|
||||||
"boot_command_suffix": "/8/ks.cfg<enter><wait>",
|
"boot_command_suffix": "packer/ova/linux/{{user `distro_name`}}/http/8/ks.cfg<enter><wait>",
|
||||||
"boot_media_path": "http://{{ .HTTPIP }}:{{ .HTTPPort }}",
|
"boot_media_path": "cdrom:",
|
||||||
"build_name": "rhel-8",
|
"build_name": "rhel-8",
|
||||||
"distro_arch": "amd64",
|
"distro_arch": "amd64",
|
||||||
"distro_name": "rhel",
|
"distro_name": "rhel",
|
||||||
@@ -9,9 +9,9 @@
|
|||||||
"epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8",
|
"epel_rpm_gpg_key": "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8",
|
||||||
"guest_os_type": "rhel8-64",
|
"guest_os_type": "rhel8-64",
|
||||||
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
"http_directory": "./packer/ova/linux/{{user `distro_name`}}/http/",
|
||||||
"iso_checksum": "48f955712454c32718dcde858dea5aca574376a1d7a4b0ed6908ac0b85597811",
|
"iso_checksum": "517ABCC67EE3B7212F57E180F5D30BE3E8269E7A99E127A3399B7935C7E00A09",
|
||||||
"iso_checksum_type": "sha256",
|
"iso_checksum_type": "sha256",
|
||||||
"iso_url": "file:///rhel-8.4-x86_64-dvd.iso",
|
"iso_url": "https://{{ user `repo_username` }}:{{ user `repo_password` }}@sn.itch.fyi/Repository/iso/Redhat/rhel-8.8-x86_64-dvd.iso",
|
||||||
"os_display_name": "RHEL 8",
|
"os_display_name": "RHEL 8",
|
||||||
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm",
|
"redhat_epel_rpm": "https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm",
|
||||||
"shutdown_command": "shutdown -P now",
|
"shutdown_command": "shutdown -P now",
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user