🌳
pt0/opencodeF/k8sF/eptThrowawayOssAI.mjs
1import fs from 'fs'
2import { execSync } from 'child_process'
8export const ossThrowawayCodeservName = 'test-codeserv-peat'
9export const ossThrowawayHostname = 'test-codeserv-oss.hetzn1.demokluster.com' // derivedhn
11export const eptThrowawayOss = async ({klusterCfg, ocwBaseCfg, wcDomain, testCodeservHostname = undefined, ep}) => {
12 const sshKeyPath = ocwBaseCfg.sshKeyPath.replace('~', envHome)
13 if (!fs.existsSync(sshKeyPath)) {
14 console.log(`Generating SSH key: ${sshKeyPath}`)
15 execSync(`ssh-keygen -t ed25519 -f "${sshKeyPath}" -N "" -C "${klusterCfg.cluster_name}-gitssh"`, {stdio: 'pipe'})
16 }
19 klusterCfg,
20 ep,
21 wcDomain,
22 repoName: ossRepoName,
23 ...ocwBaseCfg,
24 getLocalRepoPath: getOrBuildOssGitWorkingDir,
25 testCodeservName: ossThrowawayCodeservName,
26 testCodeservHostname,
27 testGitsshName: 'test-gitssh-peat',
28 gitsshNodePortNo: 30024,
29 gitsshSizeGb: 40,
30 codeservSizeGb: 40,
31 })