ReleaseEngineering/How To/Work with Golden AMIs: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 27: Line 27:
== How it works ==
== How it works ==
=== Base AMI ===
=== Base AMI ===
Base AMIs are created by [http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/scripts/aws_create_ami.py http://hg.mozilla.org/build/cloud-][http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/scripts/aws_create_ami.py tools/file/6939b4d5aaf7/scripts/aws_create_ami.py] script manually and published in the corresponding config files, e.g. [http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/configs/bld-linux64#l6 http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/configs/bld-linux64#l6]. These AMIs are used as a base image for “golden” AMIs.
Base AMIs are created by [http://hg.mozilla.org/build/cloud-tools/file/default/scripts/aws_create_ami.py aws_create_ami.py] script manually and published in the corresponding config files, e.g. [http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/configs/bld-linux64#l6 configs/bld-linux64]. These AMIs are used as a base image for “golden” AMIs.


=== Golden AMI ===
=== Golden AMI ===
“Golden” AMIs are generated on aws-manager1 by multiple daily cronjobs, e.g. [http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l79 http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l79]
“Golden” AMIs are generated on aws-manager1 by multiple daily cronjobs, e.g. [http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l79 modules/aws_manager/manifests/cron.pp]


Instances used to generate “golden” AMIs use DNS to make puppet work and rely on proper DNS entries. To reduce possibility of IP collisions they live in a different subnet and require --ignore-subnet-check as a paramter.
Instances used to generate “golden” AMIs use DNS to make puppet work and rely on proper DNS entries. To reduce possibility of IP collisions they live in a different subnet and require --ignore-subnet-check as a paramter.
Line 36: Line 36:
If the process is stuck for some reason you need to terminate the instances and kill the process.
If the process is stuck for some reason you need to terminate the instances and kill the process.


The generated AMIs are published to [https://s3.amazonaws.com/mozilla-releng-amis/amis.json https://s3.amazonaws.com/mozilla-releng-amis/amis.json] by [http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/scripts/aws_publish_amis.py http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/scripts/aws_publish_amis.py] scheduled by [http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l65 http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l65]. The published file is used by running spot instances to determine available AMIs and if they are need to be terminated if the AMI is out of date.
The generated AMIs are published to [https://s3.amazonaws.com/mozilla-releng-amis/amis.json https://s3.amazonaws.com/mozilla-releng-amis/amis.json] by [http://hg.mozilla.org/build/cloud-tools/file/default/scripts/aws_publish_amis.py scripts/aws_publish_amis.py] scheduled by [http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l65 modules/aws_manager/manifests/cron.pp]. The published file is used by running spot instances to determine available AMIs and if they are need to be terminated if the AMI is out of date.


Once a day [http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/scripts/delete_old_spot_amis.py http://hg.mozilla.org/build/cloud-tools/file/6939b4d5aaf7/scripts/delete_old_spot_amis.py] scheduled at [http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l71 http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l71] deletes old AMIs leaving latest 10 AMIs.
Once a day [http://hg.mozilla.org/build/cloud-tools/file/default/scripts/delete_old_spot_amis.py scripts/delete_old_spot_amis.py] scheduled at [http://hg.mozilla.org/build/puppet/file/a09b4e59ae96/modules/aws_manager/manifests/cron.pp#l71 modules/aws_manager/manifests/cron.pp#l71] deletes old AMIs leaving latest 10 AMIs.


== Troubleshooting ==
== Troubleshooting ==
Confirmed users
3,104

edits

Navigation menu