Has anybody tried creating AWS AMI(image) using saltstack.
I tried using it was able to create new instance from existing AMIs but how to create image using salt-cloud?
Also attempted by using boto_ec2 but its give error that Module 'boto_ec2' is not available.
You can do that in 2 steps:
You can see all saltstack ec2 commands at https://docs.saltstack.com/en/latest/ref/clouds/all/salt.cloud.clouds.ec2.html
create the snapshots : create_snapshot
salt-cloud -f create_snapshot my-ec2-config volume_id=vol-351d8826 salt-cloud -f create_snapshot my-ec2-config volume_id=vol-351d8826 \\ description="My Snapshot Description"
create the AMI : register_image
This command creates an ami from a snapshot
salt-cloud -f register_image my-ec2-config ami_name=my_ami \
description="my description" root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.