-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the VIR1_BACKUP wiki!
Lifecycle Policy for Snapshot and AMI PoC
Your development team will have the goal of archiving an existing infrastructure, both for legal and practical reasons. Example of features to develop:
- Archive all instances of a vpc.
- Extract images for import into vm ware.
- Perform a backup rotation (beyond a certain duration, delete the backup).
- Delete a whole vpc.
By default, a test should not exceed 5000 ms. When the test exceeds 5000 ms, an exception is thrown: "Timeout - Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout."
To solve this error, you must increase the time.
test("test", async () => {
...
}, 10000)
Find instance from an AMI
We have not found a direct way provided by AWS to find the source of an AMI.
The solution was to store the ID of the instance in a "source" tag for our AMI. In this way it is possible to apply a filter by indicating the instance ID
Side effect
During the process of creating an AMI, a snapshot is automatically taken by AWS. On deleting an AMI with "DeregisterImageCommand", the AMI is deleted but not the snapshot linked to it.
Create multiple snapshot
We failed to create several snapshots during the tests because of an error generated during the creation of a second one. Here is the Error : SnapshotCreationPerVolumeRateExceeded
Side effect A test is not valid because it has no more snapshots to delete
Possible soulution
- Changed the type of volume that currently does not allow to create several snapshots simultaneously.Deduction based on the reading of this documentation : ConcurrentSnapshotLimitExceeded
- Imposed an interval of 15 seconds between each creation to be sure that the previous snapshot is not in creation anymore. Deduction based on the reading of the same documentation than the first solution : ConcurrentSnapshotLimitExceeded
- Used the create-snapshots function to create multiple snapshots at once
The VIR1_CORE package is currently only implemented in AMIHelper and InstanceHelper. The Exists method and the logger are well used
At the moment we do not have a sufficiently complex sequence to justify the use of a sequence diagram.