Encapsulated installing services in custom def