dwmkerr / terraform-aws-openshift

Create infrastructure with Terraform and AWS, install OpenShift. Party!
http://www.dwmkerr.com/get-up-and-running-with-openshift-on-aws
MIT License
170 stars 174 forks source link

Stopping and starting the EC2 instances (master and nodes) #31

Open ribeaud opened 6 years ago

ribeaud commented 6 years ago

Hi,

This is more a question than an issue.

Can I shutdown/start the EC2 instances without any bad surprise? What are the consequences I should be aware of? Of course, I could try on my own but I've already got some projects on my OpenShift installation.

I am asking because of following concern: OpenShift installation done by this project generates monthly costs of around 500$. There are periods of time where we're NOT using the installation and, to save some money, we would like to stop the EC2 instances.

Is that recommendable? Many thanks and cheers,

christian

dwmkerr commented 6 years ago

Hi @ribeaud,

Thanks for reaching out. I've been doing some research and I think there's a good chance this is risky. All OpenShift data I assume is kept in the same store as for Kubernetes, which means the etcd cluster. The docs for backing it up and restoring make it seem like a reasonably involved process.

However, you might be able to get away with it by snapshotting the master node, then re-creating it, but this would require some experimentation.

Another approach is to script everything you need for the environment, for example scripting the creation of the namespace, then scripting the creation of some users, then using yml files for all of your services, deployment configs etc, or use something like Helm (which works with OS 3.6 onwards).

Would the later two approaches work? Otherwise I can take a look into spinning up a new cluster to test some options for the first approach.

ribeaud commented 6 years ago

Hi,

Thanks for the feedback and the hints. I think as well, this is risky. I will try to snapshot the master node and have a look at Helm.

Regards,

christian

dwmkerr commented 6 years ago

Cool, let me know how it goes, if it works I'll update the docs!

devnv13 commented 6 years ago

@dwmkerr, Exactly as mentioned by @ribeaud, we are doing POC and I've installed 3.9v successfully and it's up and running and we were able to login web UI. However, after shutdown and bring up, found that, unable to access Origin console URL https://master-node-public-IP:8443 with some error like firewall issue. I've checked inside master node, all services up and running and even getting nodes/pods information, but URL is not working. It should work because all private IPs remain same. Appreciate if you can do the needful to get rid of it.

Regards, Vasu