redhat-developer / redhat-developer/mapt
[Feature] Allow deploying from a given AMI image
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 24
- Forks
- 36
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 8
Description
Would be nice to be able to deploy the CRC/SNC with a given AMI image ID, instead of letting mapt search from it.
I currently do this with this hacky code:
// Get AMI
amiID := os.Getenv("CUSTOM_AMI_ID")
var ami *ec2.LookupAmiResult
var err error
if amiID == "" {
logging.Info("CUSTOM_AMI_ID not set, searching for the right AMI in AWS ...")
ami, err = amiSVC.GetAMIByName(ctx,
fmt.Sprintf("%s*", amiName(r.version, r.arch)),
[]string{"self", amiOwner},
map[string]string{
"architecture": *r.arch})
if err != nil {
return err
}
} else {
ami = &ec2.LookupAmiResult{
Id: amiID, // Your custom AMI ID
}
}
which allows me to launch
CUSTOM_AMI_ID=ami-... out/mapt aws openshift-snc create ...
but that could be made more user-friendly
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the aws openshift-snc create entry point and trace the AMI lookup around amiSVC.GetAMIByName and amiName, using the issue's CUSTOM_AMI_ID example as context. Define and implement a user-facing way to supply an AMI ID while preserving the existing search behavior, then verify that deployment uses the supplied image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100