...
|
...
Bundling
...
& registering AMI
It works the best in a machine w/ installed Java and some EC2 software. This is reasonable instruction: http://www.linuxconfig.org/Howto_CREATE_BUNDLE_UPLOAD_and_ACCESS_custom_Debian_AMI_using_ubuntu
It is written for Ubuntu 9.04 machine, so I selected this VM:
ami-2bfd1d42 binarymillenium/ec2/ubuntu/version2/image.manifest.xml
and added the following:
export JAVA_HOME=/usr/
next I added:
cd ~/aws
wget http://s3.amazonaws.com/ec2-downloads/ec2-ami-tools.zip
unzip -d /opt/ ec2-ami-tools.zip
export PATH=$PATH:/opt/ec2-api-tools-1.3-24159/bin/ (but version # was different)
export EC2_HOME=/opt/ec2-api-tools-1.3-24159/
Now I was able to test the following command does sth
ec2-register
I probably should also have set
export EC2_PRIVATE_KEY=~/.ec2/pk-K5AHLDNT3ZI28UIE6Q7CC3YZ4LIZ54K7.pem
export EC2_CERT=~/.ec2/cert-K5AHLDNYYZI2FUIE6R7CC3YJ4LIZ54K7.pem
export EC2_ACCNO=155678941235
export ACCESS_KEY=1WQ6FJKYHJMPTJ3QR6G2
export SECRET_KEY=VDYxRzosnDWvxrJ97QntVpsSUBAavGHE1QJELEyY
Below are steps leading to bundling & registering
- copy X.509 certificate
scp -i ~/XXXXAmazonKey.pem ~/pk-XXXXXXXX.pem ~/cert-YYYYYYC.pem root@ec2-174-129-63-11.compute-1.amazonaws.com:"/mnt/" - bundle external image
ec2-bundle-vol -d /mnt -k /mnt/pk-XXXXXXXX.pem -c /mnt/cert-YYYYYYYYY.pem -u nnnn-mmmm-kkkk -r i386 -p star-sl08b-image -v /bla_image --generate-fstab
- Uploading the AMI to Amazon S3
ec2-upload-bundle -b <your-s3-bucket> -m /mnt/sampleimage.manifest.xml -a <aws-access-key-id> -s <aws-secret-access-key>
- Register Image at EC2
ec2-register star-sl08b-s3-bucket/star-sl08b-image.manifest.xml