Environment delete in hybrid: is it supposed to delete cassandra?

The command to delete an environment is listed here:

https://cloud.google.com/apigee/docs/hybrid/v1.3/environment-delete

apigeectl delete -f prod-delete.yaml --env=prod --datastore

At least on my installation, this seems to delete cassandra as well. Is this intended? The subsequent apigeectl apply for the remaining environment does not restore cassandra.

0 5 535
5 REPLIES 5

Not applicable

Yes, as clearly mentioned in the document, it deletes the components in the prod-delete.yaml. Then 6 to 11 steps you need to follow, where the cassandra will get recreated.

So if cassandra is intended to be deleted whenever you want to remove one environment, I think this causes several problems.

1. The command to "recreate the deleted elements" doesn't seem to touch cassandra, because it specifies an environment:

apigeectl apply -f original-overrides.yaml --env=test

2. Deleting cassandra removes all of the developers, developer apps, api products, etc. for all environments, not only the deleted one. That doesn't seem ideal.

3. I have had trouble getting the system to come back up once cassandra is uninstalled (even running a general apply first to recreate cassandra) , it keeps waiting for cms provisioning to be complete. I've had to completely delete the apigee installation and reinstall.

If you will see the original yaml file will have the Cassandra information. But, I don't expect the other environment data will get deleted. It could be only one environment data.

I am not sure, but I can suggest to try the delete yaml file without cassandra info once.

Former Community Member
Not applicable

I apologize the documentation mislead you. `--datastore` should not have been added. We will improve the documentation ASAP.

Here are the recommended steps

1) Remove the environment from environment groups

2) Test removing the runtime components for the env

apigeectl delete -f overrides.yaml --env=prod --dry-run=true

3) Run the command to actually remove the runtime components for the env

apigeectl delete -f overrides.yaml --env=prod

4) Delete the control plane entity

5) Clean up overrides.yaml (i.e., remove all references to the deleted env)

Ah, thanks! The document went out of it's way to say to leave the cassandra description in the .yaml file which is why I was confused whether the cassandra deletion was intentional or if I was missing something by not including --datastore.