🌳
pt0/klustersF/harv2demo/epSync.mjs
2import * as klusterCfg from "./common.mjs"
27const nodeHostname = 'harv2demoorng'
29const vwPinFiles = ['pt0/deployF/servicesF/vwLitestreamAI.mts', 'pt0/deployF/servicesF/vwRcloneAI.mts', 'pt0/deployF/servicesF/syncVaultWardenF.mts']
30const updateimg = async () => {
31 for (const ptRel of vwPinFiles) await doUpdateImgs({filePath: ptPathToAbsPath(toPtRelPath(ptRel))})
33updateimg.cliDescript = 'fetch latest vaultwarden/litestream/rclone tags and bump the pins'
35export default await eptClusterSync({
36 ...klusterCfg,
37 importMetaUrl: tsImportMetaUrl(import.meta.url),
38 extraActionsH: {vwrestore: vwRestoreAction({name: 'bitwarden'}), updateimg},
39 steps: {
40 k8sHarvSsh: () => k8sHarvSsh({nodeHostnames: ['harv2demoorng', 'harv2demothin']}),
41 k8sHarvDashboardPw: () => k8sHarvDashboardPw({nodeHostname}),
42 dlKubeConfig: () => dlKubeConfig({nodeHostname}),
43 k8sCertManager,
44 k8sCerts,
45 k8sCertsCattleSystem: () => k8sCerts({namespace: 'cattle-system'}),
46 k8sExtDns,
48 k8sUpdateKubeconfig,
49 k8sRegCache: () => k8sRegCache({regcacheHost: klusterCfg.regcacheHost, regcacheLanHost: klusterCfg.regcacheLanHost, sizeGb: 200}),
50 k8sDockerReg: () => k8sDockerReg({dockreg_host: klusterCfg.dockreg_host, dockLanHost: klusterCfg.dockLanHost}),
51 k8sHarvSyncCacertsToken: () => k8sHarvSyncCacertsToken({clusterTokenSecName}),
52 k8sFixHarvServerSnippet,
53 k8sHarvDashboardHn: () => k8sHarvDashboardHn({hostnameA: ['harvester-33c60d34.harv2lan.demokluster.com', 'harvester-33c60d34.harv2.demokluster.com']}),
54 k8sHarvExtIp,
55 k8sCnPg,
56 k8sMinio: () => k8sMinio({bucketHostname: 'miniooo.harv2.demokluster.com', sizeGb: 500}),
57 k8sMinioHetzback: () => k8sMinio({bucketHostname: 'hztxtzng-20510rm0iz0z0yr454c9u1s789a62w0t.harv2.demokluster.com', sizeGb: 150}), // derivedhn
58 k8sLonghornBackup: () => k8sLonghornBackup({bucket_name: 'longhorn-backup-harv2demo'}),
59 k8sVaultwarden: () => k8sVaultwarden({hostname: 'bitwarden5rpzws8dpl.bb.demokluster.com', withLitestream: true}),
60 k8sGitSsh: () => gitsshCtx.run({
61 name: 'harv2demo-gitssh',
62 repoName: 'ptrepo',
63 sshHostAlias: 'harv2demo-gitssh',
64 sshKeyPath: '~/.ssh/id_ed25519',
65 authorizedPubKeyPaths: ['~/.ssh/id_ed25519.pub', '~/.ssh/id_fw.pub'],
66 pvcStorClassName: 'monor-1replic-infrasc-anydisk',
67 gitsshHttpsHostname: 'gitssh.harv2.demokluster.com', // derivedhn
68 initRepos: ['ptrepo', 'mynotes', 'opencode-sessions'],
69 }, k8sGitSsh),
70 },
71})