Skip to content
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

Improve AWS subcommands in ore, support AWS Pro downloading in cork, adjust LTS handling in plume #152

Merged
merged 5 commits into from
Dec 11, 2020

Conversation

pothos
Copy link
Member

@pothos pothos commented Dec 9, 2020

  • cmd/plume: Disable AMI creation for the LTS channel
    The AMIs were not published anyway and just used for testing.
  • cmd/cork: Support downloading AWS Pro images
    The AWS Pro images are a different OEM type with a _pro suffix.
  • cmd/ore: Delete existing snapshot when --force is used
    A mismatched snapshot name resulted in "ore aws upload --force" not
    really reuploading but just reusing the existing AMI.
    Use the correct snapshot name to ensure that --force works.
  • cmd/plume: Only build Azure Pro for LTS
  • cmd/ore: Add new "aws delete" command to remove an image
    An image uploaded by "ore aws upload" could only be deleted manually.
    Add a subcommand to delete the image again.

How to use

In conjunction with flatcar/scripts#106 and from Jenkins.

Testing done

Tested only uploading and deleting regular AWS images:

./cork download-image --cache-dir=/var/tmp --platform=aws --root=gs://flatcar-jenkins/stable/boards/amd64-usr/2605.9.0
./ore -d aws upload --region=eu-central-1 --ami-name=myami --ami-description="Custom Flatcar Test" --name=myimage --file=/var/tmp/flatcar_production_ami_vmdk_image.vmdk --bucket s3://flatcar-dev/myprefix/ --force
./ore -d aws delete --region=eu-central-1 --ami-name=myami --name=myimage --file=/var/tmp/flatcar_production_ami_vmdk_image.vmdk --bucket s3://flatcar-dev/myprefix/

The AMIs were not published anyway and just used for testing.
The AWS Pro images are a different OEM type with a _pro suffix.
@pothos pothos requested a review from a team December 9, 2020 15:30
Copy link
Member

@sayanchowdhury sayanchowdhury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 nitpick otherwise LGTM

@@ -349,7 +349,7 @@ func (a *API) deregisterImageIfExists(name string) error {
}

// Remove all uploaded data associated with an AMI, also in other given regions.
func (a *API) RemoveImage(name, s3BucketName, s3ObjectPath string, otherRegions []string) error {
func (a *API) RemoveImage(name, imageName, s3BucketName, s3ObjectPath string, otherRegions []string) error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to rename the name to amiName to make it more verbose.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, done

A mismatched snapshot name resulted in "ore aws upload --force" not
really reuploading but just reusing the existing AMI.
Use the correct snapshot name to ensure that --force works.
An image uploaded by "ore aws upload" could only be deleted manually.
Add a subcommand to delete the image again.
@pothos pothos merged commit 7285723 into flatcar-master Dec 11, 2020
@pothos pothos deleted the kai/lts-and-pro branch December 11, 2020 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants