void writeApplicationPackage(ApplicationPackage app) {
            try {
                writeUserDefs(app);
                writeSomeOf(app);
                writeSchemas(app);
                writeUserIncludeDirs(app, app.getUserIncludeDirs());
                writeMetadata(app.getMetaData());
            } catch (Exception e) {
                throw new IllegalStateException("Unable to write vespa model to config server(s) " + System.getProperty("configsources") + "\n" +
                                                "Please ensure that config server is started " +
                                                "and check the vespa log for configserver errors. ", e);
            }
        }
Writes def files and user config into ZK.

@param app the application package to feed to zookeeper
configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ZooKeeperDeployer.java