core/rails/app/models/tenant.rb
# to manage nodes, tenants need a root deployment
to manage nodes, tenants need a root deployment
to manage nodes tenants need a root deployment
def tenant_root_deployment
    Tenant.transaction do
      return true if root?
      system = Deployment.system
      Deployment.create!(
          name: "tenant-#{name.gsub(" ", "-")}-root", 
          description: "Created by system when tenant #{name} added",
          tenant_id: id,
          parent_id: system.id
          )
    end
  end
def tenant_root_deployment Tenant . transaction do return true if root? system = Deployment . system Deployment . create! ( name : "tenant-#{name.gsub(" ", "-")}-root" , description : "Created by system when tenant #{name} added" , tenant_id : id , parent_id : system . id ) end end
to manage nodes, tenants need a root deployment
to manage nodes tenants need a root deployment
# don't mess with system tenant # move all nodes to the system deployment