Compare commits
3 Commits
71e9957122
...
6568acf541
Author | SHA1 | Date | |
---|---|---|---|
6568acf541 | |||
092ce5eabc | |||
a785e57126 |
@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: dind-rootless
|
runs-on: dind-rootless
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: yamllint
|
- name: yamllint
|
||||||
uses: bewuethr/yamllint-action@v1
|
uses: bewuethr/yamllint-action@v1
|
||||||
with:
|
with:
|
||||||
@ -20,7 +20,7 @@ jobs:
|
|||||||
version: ${{ steps.sem_rel.outputs.version }}
|
version: ${{ steps.sem_rel.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
@ -55,13 +55,18 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
build_image:
|
build_image:
|
||||||
name: Container image
|
name: Kubernetes Bootstrap Appliance
|
||||||
container: catthehacker/ubuntu:act-latest
|
container: catthehacker/ubuntu:act-latest
|
||||||
runs-on: dind-rootless
|
runs-on: dind-rootless
|
||||||
needs: [semrel_dryrun, linting]
|
needs: [semrel_dryrun, linting]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
- name: Parse Kubernetes version
|
||||||
|
uses: mikefarah/yq@master
|
||||||
|
id: get_k8sversion
|
||||||
|
with:
|
||||||
|
cmd: yq '.components.clusterapi.workload.version.k8s' ansible/vars/metacluster.yml
|
||||||
- name: Setup `packer`
|
- name: Setup `packer`
|
||||||
uses: hashicorp/setup-packer@main
|
uses: hashicorp/setup-packer@main
|
||||||
id: setup
|
id: setup
|
||||||
@ -70,21 +75,21 @@ jobs:
|
|||||||
- name: Run `packer init`
|
- name: Run `packer init`
|
||||||
id: init
|
id: init
|
||||||
run: packer init -upgrade ./packer
|
run: packer init -upgrade ./packer
|
||||||
# - name: Run `packer validate`
|
- name: Run `packer validate`
|
||||||
# id: validate
|
id: validate
|
||||||
# run: |
|
run: |
|
||||||
# packer validate \
|
packer validate \
|
||||||
# -only=vsphere-iso.bootstrap \
|
-only=vsphere-iso.bootstrap \
|
||||||
# -var vm_name=${DRONE_BUILD_NUMBER}-${DRONE_COMMIT_SHA:0:10}-$(openssl rand -hex 3) \
|
-var vm_name=${{ gitea.job }}-${{ gitea.sha:0:10 }}-$(openssl rand -hex 3) \
|
||||||
# -var docker_username=$${DOCKER_USERNAME} \
|
-var docker_username=${{ secrets.DOCKER_USERNAME }} \
|
||||||
# -var docker_password=$${DOCKER_PASSWORD} \
|
-var docker_password=${{ secrets.DOCKER_PASSWORD }} \
|
||||||
# -var repo_username=$${REPO_USERNAME} \
|
-var repo_username=${{ secrets.REPO_USERNAME }} \
|
||||||
# -var repo_password=$${REPO_PASSWORD} \
|
-var repo_password=${{ secrets.REPO_PASSWORD }} \
|
||||||
# -var ssh_password=$${SSH_PASSWORD} \
|
-var ssh_password=${{ secrets.SSH_PASSWORD }} \
|
||||||
# -var vsphere_password=$${VSPHERE_PASSWORD} \
|
-var hv_password=${{ secrets.HV_PASSWORD }} \
|
||||||
# -var k8s_version=$K8S_VERSION \
|
-var k8s_version=${{ steps.get_k8sversion.outputs.result }} \
|
||||||
# -var appliance_version=$APPLIANCE_VERSION \
|
-var appliance_version=${{ needs.semrel_dryrun.outputs.version }} \
|
||||||
# ./packer
|
./packer
|
||||||
# - name: Build Artifact
|
# - name: Build Artifact
|
||||||
# run: packer build -color=false -on-error=abort ./image.pkr.hcl
|
# run: packer build -color=false -on-error=abort ./image.pkr.hcl
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
source "vsphere-iso" "ubuntu" {
|
source "vsphere-iso" "ubuntu" {
|
||||||
vcenter_server = var.vcenter_server
|
vcenter_server = var.hv_fqdn
|
||||||
username = var.vsphere_username
|
username = var.hv_username
|
||||||
password = var.vsphere_password
|
password = var.hv_password
|
||||||
insecure_connection = "true"
|
insecure_connection = "true"
|
||||||
|
|
||||||
datacenter = var.vsphere_datacenter
|
datacenter = var.hv_datacenter
|
||||||
cluster = var.vsphere_cluster
|
cluster = var.hv_cluster
|
||||||
host = var.vsphere_host
|
host = var.hv_host
|
||||||
folder = var.vsphere_folder
|
folder = var.hv_folder
|
||||||
datastore = var.vsphere_datastore
|
datastore = var.hv_datastore
|
||||||
|
|
||||||
guest_os_type = "ubuntu64Guest"
|
guest_os_type = "ubuntu64Guest"
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ source "vsphere-iso" "ubuntu" {
|
|||||||
RAM = 8192
|
RAM = 8192
|
||||||
|
|
||||||
network_adapters {
|
network_adapters {
|
||||||
network = var.vsphere_network
|
network = var.hv_network
|
||||||
network_card = "vmxnet3"
|
network_card = "vmxnet3"
|
||||||
}
|
}
|
||||||
storage {
|
storage {
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
variable "vcenter_server" {}
|
variable "hv_fqdn" {}
|
||||||
variable "vsphere_username" {}
|
variable "hv_username" {}
|
||||||
variable "vsphere_password" {
|
variable "hv_password" {
|
||||||
sensitive = true
|
sensitive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "vsphere_host" {}
|
variable "hv_host" {}
|
||||||
variable "vsphere_datacenter" {}
|
variable "hv_datacenter" {}
|
||||||
variable "vsphere_cluster" {}
|
variable "hv_cluster" {}
|
||||||
|
|
||||||
variable "vsphere_templatefolder" {}
|
variable "hv_templatefolder" {}
|
||||||
variable "vsphere_folder" {}
|
variable "hv_folder" {}
|
||||||
variable "vsphere_datastore" {}
|
variable "hv_datastore" {}
|
||||||
variable "vsphere_network" {}
|
variable "hv_network" {}
|
||||||
|
|
||||||
variable "vm_name" {}
|
variable "vm_name" {}
|
||||||
variable "ssh_password" {
|
variable "ssh_password" {
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
vcenter_server = "bv11-vc.bessems.lan"
|
hv_fqdn = "lab-vc-01.bessems.lan"
|
||||||
vsphere_username = "administrator@vsphere.local"
|
hv_username = "administrator@vsphere.local"
|
||||||
vsphere_datacenter = "DeSchakel"
|
hv_datacenter = "4/55-Clydebank-Rd"
|
||||||
vsphere_cluster = "Cluster.01"
|
hv_cluster = "Cluster.01"
|
||||||
vsphere_host = "bv11-esx02.bessems.lan"
|
hv_host = "lab-esx-02.bessems.lan"
|
||||||
vsphere_datastore = "ESX02.SSD02"
|
hv_datastore = "ESX02.SSD02"
|
||||||
vsphere_folder = "/Packer"
|
hv_folder = "/Packer"
|
||||||
vsphere_templatefolder = "/Templates"
|
hv_templatefolder = "/Templates"
|
||||||
vsphere_network = "LAN"
|
hv_network = "LAN"
|
||||||
|
Reference in New Issue
Block a user