vmware-archive / terraforming-aws

Templates to deploy PCF and PKS
Apache License 2.0
64 stars 91 forks source link

Problems with opsmgr being handled by terraform #66

Closed aegershman closed 5 years ago

aegershman commented 6 years ago

Opsmgr comes packaged as an AMI defined within terraform.

But when it comes time to upgrade the version of opsmgr, things get tricky. You have to...

  1. backup your opsmgr installation to something like s3
  2. find out the opsmgr AMI corresponding to your IaaS
  3. update/run the terraform to use that AMI
  4. re-import your opsmgr installation

This is a stateful operation; terraform doesn't know anything about what's actually running on the EC2 instance. It'll gladly blow it away and replace it with a new EC2 instance without any regard for running processes, persistent volumes, etc. So I, as an operator, am responsible for maintaining/backing up/restoring the state of opsmgr. This sounds like something BOSH is designed to do.

The pcf-pipelines project dealt with upgrading opsmgr by doing some funky stuff with cliaas to replace the VM. But even that wouldn't work if your VPC was managed by terraform. If you update the opsmgr VM without terraform being aware of it, the next time terraform runs it will replace your new opsmgr VM with the old AMI.

I'm curious if there's a medium/long-term solution to this problem. Specifically: does Pivotal have any plans to refactor opsmgr into a BOSH-managed resource rather than a terraform-managed resource?

Thanks for your time, I appreciate it!

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

aegershman commented 5 years ago

Closing this as I imagine Pivotal is aware of the problems presented here && that it's a pretty complicated problem. I just wanted to point it out. Thanks!

nwmahoney commented 5 years ago

Sorry your issue slipped through the cracks. We are working on some solutions for upgrading Ops Manager. There are some open questions, but the Ops Manager VM won't be handled by Terraform. We added a variable to skip creation of the Ops Manager VM to support this.

aegershman commented 5 years ago

No worries at all. I just wanted to point it out. Thanks for your time.