Contact Us 1-800-596-4880

Uninstalling Runtime Fabric on VMs / Bare Metal

You can uninstall Runtime Fabric and completely delete your gravity cluster, or you can uninstall Runtime Fabric without deleting your gravity cluster.

Uninstall Runtime Fabric and Delete the Gravity Cluster

Perform this task to uninstall Runtime Fabric and completely remove the gravity cluster from your VMs.

Alternatively, you can perform the first two steps (delete all applications and the Runtime Fabric in Runtime Manager), and skip the remaining steps by re-imaging the VM disks.

To successfully complete this task, keep all nodes running and joined to the cluster.
  1. Using Runtime Manager, delete all Mule applications running on Runtime Fabric.

    Verify across all associated environments that you have removed all applications.

  2. Using Runtime Manager, delete the Runtime Fabric.

  3. On each Worker VM, run the following command and confirm by typing “yes” when prompted:

    sudo gravity leave --force
  4. Run gravity status on any other node until the node is no longer visible when running gravity status.

  5. On each Worker VM, run the following commands sequentially:

    sudo umount /var/lib/gravity/planet/etcd
    sudo umount /var/lib/gravity
    
    sudo rm -rf /opt/anypoint/runtimefabric /root/.gravity /home/rtf-user/.gravity /var/lib/gravity /tmp/gravity /tmp/gravity-wizard*
    
    sudo rm /etc/systemd/system/install-teleport-*.service /etc/systemd/system/install-planet-*.service /etc/systemd/system/shrink-*.service /etc/systemd/system/gravity__gravitational.io__teleport__*.service /etc/systemd/system/gravity__gravitational.io__planet-*.service
  6. Remove lines in the /etc/fstab file which are appended with the comment # Added by RTF.

  7. Restart the VM.

  8. Repeat steps 3 through 7 on each Controller VM.

  9. If the previous steps fail, perform a manual cleanup by running the following commands sequentially:

    sudo systemctl stop gravity__gravitational.io__planet-*.service
    sudo systemctl stop gravity__gravitational.io__teleport*.service
    
    sudo systemctl disable gravity__gravitational.io__teleport__2.4.7.service
    sudo systemctl disable gravity__gravitational.io__planet-master__5.0.8-1906.service
    
    sudo gravity system uninstall --confirm
    
    sudo umount /var/lib/gravity/planet/etcd
    sudo umount /var/lib/gravity
    
    sudo rm -rf /opt/anypoint/runtimefabric /root/.gravity /rtf-user/.gravity /var/lib/gravity /tmp/gravity /tmp/assets393106389 /tmp/gravity-wizard167466702

Uninstall Runtime Fabric Without Deleting the Gravity Cluster

You can uninstall Runtime Fabric but keep the Gravity cluster. This is useful in scenarios in which you want to reinstall Runtime Fabric in the same cluster. To do so, run the following commands on one of the controller nodes:

rtfctl uninstall --confirm
rtfctl install <activation_data>