We’re looking to create an AMI that has our application installed on it, where the application is the Gravity cluster and our services running inside (so just a normal Gravity thing). Running the gravity install
command takes about 6-7 minutes to complete, as it has to set up the cluster, download our images, etc.
What would be ideal for us is if during the AMI building process, we could actually run gravity install
, get the cluster properly set up, and then freeze the AMI, so that new instantiations of it would just work with that installation and we could shave off that 6-7 minute startup cost (and since our application is not running at this point since we don’t have Kubernetes, it’s hard for us to even display an installation UI).
My questions are:
- Is there a way to “pre install” the Gravity cluster for an AMI? What are the risks?
- If there isn’t a way, is there a way to do some of the steps (e.g. get all the Docker images unpacked and loaded into the registry, etc) to reduce the 6-7 minute time?