You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.
Hi,
I am new to SimianArmy, and my company required me to set the Janitor Monkey to shutting down the resources instead of terminating them so they can keep the data. I just merely edited some pieces of code in the AWSClient.java and InstanceJanitor.java so that it can stop the instance, and somehow it worked.
In the AWSClient.java:
@OverridepublicvoidterminateInstance(StringinstanceId) {
Validate.notEmpty(instanceId);
LOGGER.info(String.format("Stopping instance %s in region %s.", instanceId, region));
try {
ec2Client().stopInstances(newStopInstancesRequest(Arrays.asList(instanceId)));
} catch (AmazonServiceExceptione) {
if (e.getErrorCode().equals("InvalidInstanceID.NotFound")) {
thrownewNotFoundException("AWS instance " + instanceId + " not found", e);
}
throwe;
}
}
I wonder if there is any proper way to apply this method for all the resource types. Moreover, when I ran the Janitor Monkey again it also remarked the stopped instances for cleaning up. Can I implement the JM to ignore the stopped/inactive resources?
Many thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I am new to SimianArmy, and my company required me to set the Janitor Monkey to shutting down the resources instead of terminating them so they can keep the data. I just merely edited some pieces of code in the AWSClient.java and InstanceJanitor.java so that it can stop the instance, and somehow it worked.
In the AWSClient.java:
In the InstanceJanitor.java
I wonder if there is any proper way to apply this method for all the resource types. Moreover, when I ran the Janitor Monkey again it also remarked the stopped instances for cleaning up. Can I implement the JM to ignore the stopped/inactive resources?
Many thanks.
The text was updated successfully, but these errors were encountered: