-
Notifications
You must be signed in to change notification settings - Fork 12
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
testflinger-yaml-generator: add provision parameters for oem_autoinstall connector #76
testflinger-yaml-generator: add provision parameters for oem_autoinstall connector #76
Conversation
f326c30
to
2fd8b53
Compare
hi @seankingyang , could you help to review please? |
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.
Thanks for this great changing, and there are some suggestions at below
@@ -326,6 +343,15 @@ def parse_input_arg(): | |||
help='The provision image. \ | |||
ie, desktop-22-04-2-uefi. \ | |||
If didn\'t set this mean no provision') | |||
opt_args.add_argument('--provisionToken', default="", type=str, | |||
help='File with username and token for image \ | |||
URL auth') |
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.
Could add more detail in the help and give the sample on it?
ie File with username and token for Jenkins image url auth, and it will be the yaml format.
ie. [$JENKINS_USERNAME]\n token = $JENKINS_API_TOKEN
URL auth') | ||
opt_args.add_argument('--provisionUserData', default="", type=str, | ||
help='user-data file for autoinstall and cloud-init \ | ||
provisioning') |
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.
Could you give the sample file or the link to let us know how to write it?
Add the help info This argument is MUST required if deploy the image using the autoinstall image (ie. 24.04 image)
provisioning') | ||
opt_args.add_argument('--provisionAuthKeys', default="", type=str, | ||
help='authorized_keys file to add in provisioned \ | ||
system') |
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.
Could you give the sample file or the link to let us know how to write it?
change the help info to ssh authorized_keys file to add in provisioned system
@seankingyang Thank you for the feedback. I've updated as requested. |
Expand tf-yaml-generator to support oem_autoinstall device connector in 24.04.
It adds 3 more parameters + attachments in the provision stage of job.yaml. These parameters are optional, so if args not added, then no changes to original behavior and templates.
Sample provisioning data for 24.04:
Test:
generate with original args:
./testflinger_yaml_generator.py -c 202405-33980 -o prov.yaml --LpID artur-at-work --provisionImage http://10.131.60.220:8080/job/somerville-noble-oem-24.04a/lastSuccessfulBuild/artifact/out/somerville-noble-oem-24.04a-20240820-71.iso
./testflinger_yaml_generator.py -c 202405-33980 -o prov-url.yaml --LpID artur-at-work --provisionType url --provisionImage http://10.131.60.220:8080/job/somerville-noble-oem-24.04a/lastSuccessfulBuild/artifact/out/somerville-noble-oem-24.04a-20240820-71.iso
generate with new args:
./testflinger_yaml_generator.py -c 202405-33980 -o prov-new.yaml --LpID artur-at-work --provisionType url --provisionImage http://10.131.60.220:8080/job/somerville-noble-oem-24.04a/lastSuccessfulBuild/artifact/out/somerville-noble-oem-24.04a-20240820-71.iso --provisionToken ~/testflinger/test-yaml/jenkins-token.txt --provisionAuthKeys ~/testflinger/test-yaml/authorized_keys --provisionUserData ~/testflinger/test-yaml/user-data
Sample prov-new.yaml
Closes: https://warthogs.atlassian.net/browse/OEX86-412