answers4aws / distami Goto Github PK
View Code? Open in Web Editor NEWDistribute an AMI by copying it to other AWS regions, and optionally making it public
Home Page: http://answersforaws.com/code/distami/
License: Other
Distribute an AMI by copying it to other AWS regions, and optionally making it public
Home Page: http://answersforaws.com/code/distami/
License: Other
would it possible to insert a flag that allows json to return? i had assumed the ami image copied would be the same id, but it changes in each region. i like to automatically log the ami image, thereby making a interface to spin up an ami image by using an abstracted id that would look up the ami image by region.
Currently, this only supports the default profile. Would be nice to specify an AWS profile credential
At the moment the CLI handler is hosting most of the actual execution logic while being tied to the CLI input. It'd be nice if the logic got moved somewhere separately to better accept arguments from other inputs without the need to rewrite most of the cli.py code.
Due to fact that on several places in the code "/dev/sda" is used, distami doesn't support the HVM images.
Add the ability to make AMIs and snapshots non-public - the opposite of what it does now.
The code to do this is already there, but not wired up in the CLI.
Hi,
Is it possible to add this new feature?
As this tool could let AMI be public, could it be available for AMI sharing between multiple accounts?
Besides, better to make it share or copy the AMI with the original tags,
As we know, the AMI ID is quite difficult to remember and to be tracked under the version control.
So I used "tags" to identify the version.
Thanks
Henry
There is most likely a bug in the implementation of sharing in CLI handler.
def copy(param_array):
---redacted---
copied_ami_id = distami.copy_to_region(to_region)
ami_cp = Distami(copied_ami_id, to_region)
---redacted---
if args.accounts:
distami.share_ami_with_accounts(args.accounts)
Here the copy() copies the original AMI to new AMI with copy_to_region and even creates a new Distami with name ami_cp for the new AMI ID, however the list line references again the distami object tied to original AMI ID. What's more there is no reference to sharing the snapshot.
Guess this should look like part about sharing in run() which handles the original AMI.
if args.accounts:
account_ids = args.accounts.split(',')
distami.share_ami_with_accounts(account_ids)
distami.share_snapshot_with_accounts(account_ids)
Will submit a patch later.
2016-08-16 02:35:12 [DEBUG] [distami.utils(44):get_ami] Found AMIs: [Image:ami-3616dc56]
Traceback (most recent call last):
File "/usr/local/bin/distami", line 9, in <module>
load_entry_point('distami==1.0.7', 'console_scripts', 'distami')()
File "/Library/Python/2.7/site-packages/distami/cli.py", line 100, in run
distami = Distami(args.ami_id, ami_region)
File "/Library/Python/2.7/site-packages/distami/core.py", line 48, in __init__
bdm = self._image.block_device_mapping[ami.root_device_name]
KeyError: u'/dev/sda1'
Once Issue #1 is done, take it a step further and reverse the entire process. Given an AMI, find all copies of it in all regions, and delete them all, along with their snapshots.
This one could be dangerous
With the latest version of Boto, get all regions returns govcloud as well, which commoners like me don't have access to. Filter it out of the list of regions to copy to
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.