-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using generateString in all scripts that deploy a machine #3822
base: development
Are you sure you want to change the base?
Conversation
issue isn't just for scripts that deploy a VM, please update PR title and scripts accordingly . I'd do a global search for 'name' in scripts and add generateString() for matches |
I'm not sure what scripts exactly you want me to change, so can you please provide me with the scripts? |
for example:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also what about storing the random string and reuse it in the file, instead of generating 2 or 3 random strings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
network name is randomized
the name we want to be randomized is the network.name
for example
tfgrid-sdk-ts/packages/grid_client/scripts/applications/nextcloud.ts
Lines 70 to 76 in d36709c
const vms: MachinesModel = { | |
name, | |
network: { | |
name: "wedtest", | |
ip_range: "10.249.0.0/16", | |
}, | |
machines: [ |
we suggest to make it random; and keep it with the generatedstring before
name = 'net${name}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Mayar!
@@ -44,7 +44,7 @@ async function cancel(client, vms, gw) { | |||
} | |||
|
|||
async function main() { | |||
const name = "giteainstance"; | |||
const name = "gt" + generateString(8); | |||
const networkName = "giteanetwork"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the sake of consistency, use a random network name here too
@@ -23,7 +24,7 @@ const hexMessage = message | |||
.split("") | |||
.map((letter, i) => message.charCodeAt(i).toString(16)) | |||
.join(""); | |||
const name = "testAcc"; | |||
const name = generateString(10); | |||
|
|||
async function main() { | |||
const account: AlgorandAccountCreateModel = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use random name for account creation and deletion
@@ -26,7 +26,8 @@ async function deleteWorker(client, worker) { | |||
} | |||
|
|||
async function main() { | |||
const name = "testk8s"; | |||
const name = "k8s" + generateString(8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment for the user to change the name to an existing cluster name so he can add the worker to it
@@ -24,7 +24,7 @@ async function cancel(client, zdb) { | |||
} | |||
|
|||
async function main() { | |||
const name = "tttzdbs"; | |||
const name = "zdb" + generateString(8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use this name as the zdb instance name to have a unique contract hash
const name = "wed2710t1"; | ||
const name = "vm" + generateString(8); | ||
const networName = `net${name}`; | ||
|
||
const grid3 = await getClient(`vm/${name}`); | ||
|
||
const qsfs_name = "wed2710q1"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't we use generate string for qsfs_name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use generateString for name in line 7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we use generateString for qsfs_name?
Description
Using generateString in all scripts that deploy a machine
Related Issues
Tested Scenarios
To consider
Preliminary Checks:
UI Checks:
Code Quality Checks:
Testing Checklist
General Checklist