Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c40fc0caac |
No files matched your search
@@ -20,6 +20,45 @@
|
||||
"Bash(kubectl logs *)",
|
||||
"Bash(kubectl top *)",
|
||||
"Bash(kubectl config get-contexts *)",
|
||||
"Bash(git log *)",
|
||||
"Bash(git status *)",
|
||||
"Bash(git diff *)",
|
||||
"Bash(git show *)",
|
||||
"Bash(git grep *)",
|
||||
"Bash(git blame *)",
|
||||
"Bash(git ls-files *)",
|
||||
"Bash(git ls-tree *)",
|
||||
"Bash(git rev-parse *)",
|
||||
"Bash(git describe *)",
|
||||
"Bash(git shortlog *)",
|
||||
"Bash(git merge-base *)",
|
||||
"Bash(git reflog show *)",
|
||||
"Bash(git stash list *)",
|
||||
"Bash(git branch --list *)",
|
||||
"Bash(git branch -a *)",
|
||||
"Bash(git branch -v *)",
|
||||
"Bash(git tag --list *)",
|
||||
"Bash(git remote -v)",
|
||||
"Bash(git fetch *)",
|
||||
"Bash(pulumi about *)",
|
||||
"Bash(pulumi plugin ls *)",
|
||||
"Bash(kubectl api-resources *)",
|
||||
"Bash(kubectl api-versions *)",
|
||||
"Bash(kubectl explain *)",
|
||||
"Bash(kubectl version *)",
|
||||
"Bash(kubectl events *)",
|
||||
"Bash(kubectl cluster-info)",
|
||||
"Bash(kubectl auth can-i *)",
|
||||
"Bash(kubectl rollout status *)",
|
||||
"Bash(kubectl rollout history *)",
|
||||
"Bash(kubectl config current-context *)",
|
||||
"Bash(npm ls *)",
|
||||
"Bash(npm outdated *)",
|
||||
"Bash(ls *)",
|
||||
"Bash(pwd)",
|
||||
"Bash(wc *)",
|
||||
"Bash(which *)",
|
||||
"Bash(jq *)",
|
||||
"Bash(git add *)",
|
||||
"Bash(git switch *)",
|
||||
"Bash(.claude/scripts/gitea.sh GET *)",
|
||||
|
||||
@@ -25,8 +25,6 @@ const worker1Ip = config.requireSecret("worker1Ip");
|
||||
const worker2Ip = config.requireSecret("worker2Ip");
|
||||
const worker3Ip = config.requireSecret("worker3Ip");
|
||||
|
||||
const ansibleIp = config.requireSecret("ansibleIp");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// VM templates — one per node, cloned from the downloaded cloud image.
|
||||
// Templates are not started and have no cloud-init config; that is applied
|
||||
@@ -37,7 +35,6 @@ const templateSettings = {
|
||||
template: true,
|
||||
protection: true,
|
||||
started: false,
|
||||
operatingSystem: { type: "l26" },
|
||||
stopOnDestroy: true,
|
||||
scsiHardware: "virtio-scsi-pci",
|
||||
cdrom: { fileId: "none" },
|
||||
@@ -326,79 +323,6 @@ k3sVms.forEach((vmResource, i) => {
|
||||
);
|
||||
});
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Ansible control node — unprivileged LXC with a pfSense DHCP reservation.
|
||||
// The MAC is fixed so the reservation can exist before the container's first
|
||||
// boot; otherwise its first DHCP lease could come from the dynamic pool.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const ansibleHost = hostFor("pve-b550");
|
||||
const ansibleMac = "02:A5:1B:00:01:54";
|
||||
|
||||
const ansibleTemplate = new proxmox.download.File(
|
||||
"ubuntu-resolute-lxc-pve-b550",
|
||||
{
|
||||
nodeName: ansibleHost.nodeName,
|
||||
datastoreId: ansibleHost.isoStore,
|
||||
contentType: "vztmpl",
|
||||
fileName: "ubuntu-26.04-standard_26.04-1_amd64.tar.zst",
|
||||
url: "https://download.proxmox.com/images/system/ubuntu-26.04-standard_26.04-1_amd64.tar.zst",
|
||||
overwrite: false,
|
||||
overwriteUnmanaged: true,
|
||||
},
|
||||
{ provider: ansibleHost.provider },
|
||||
);
|
||||
|
||||
const ansibleDhcp = new pfsense.Dhcpv4Staticmapping(
|
||||
"ansible-dhcp",
|
||||
{
|
||||
interface: "lan",
|
||||
macAddress: ansibleMac,
|
||||
ipAddress: ansibleIp,
|
||||
hostname: "ansible",
|
||||
},
|
||||
{ provider: pfSenseProvider },
|
||||
);
|
||||
|
||||
new proxmox.ContainerLegacy( // NOSONAR typescript:S1848
|
||||
"ansible",
|
||||
{
|
||||
nodeName: ansibleHost.nodeName,
|
||||
description: "Ansible control node — managed by Pulumi",
|
||||
tags: ["ansible"],
|
||||
unprivileged: true,
|
||||
features: { nesting: true },
|
||||
operatingSystem: {
|
||||
templateFileId: ansibleTemplate.id,
|
||||
type: "ubuntu",
|
||||
},
|
||||
cpu: { cores: 1 },
|
||||
memory: { dedicated: 1024, swap: 0 },
|
||||
disk: { datastoreId: ansibleHost.dataStore, size: 8 },
|
||||
networkInterfaces: [
|
||||
{ name: "eth0", bridge: "vmbr0", macAddress: ansibleMac },
|
||||
],
|
||||
initialization: {
|
||||
hostname: "ansible",
|
||||
ipConfigs: [{ ipv4: { address: "dhcp" } }],
|
||||
userAccount: {
|
||||
keys: [
|
||||
pve1SshPublicKey.apply((k) => k.trim()),
|
||||
pve2SshPublicKey.apply((k) => k.trim()),
|
||||
pve3SshPublicKey.apply((k) => k.trim()),
|
||||
],
|
||||
},
|
||||
},
|
||||
started: true,
|
||||
startOnBoot: true,
|
||||
},
|
||||
{
|
||||
provider: ansibleHost.provider,
|
||||
dependsOn: ansibleDhcp,
|
||||
retainOnDelete: true,
|
||||
},
|
||||
);
|
||||
|
||||
export const vmIds = {
|
||||
master1: k3sVms[0].vmId,
|
||||
master2: k3sVms[1].vmId,
|
||||
|
||||
Reference in new issue
Block a user