private void writeConfigs(String dir, DocumentDatabase producer) throws IOException {
        var vsmFB = new VsmfieldsConfig.Builder();
        producer.getDerivedConfiguration().getVsmFields().getConfig(vsmFB);
        writeConfig(dir, VsmfieldsConfig.getDefName() + ".cfg", vsmFB.build());

        RankProfilesConfig.Builder rpcb = new RankProfilesConfig.Builder();
        producer.getConfig(rpcb);
        writeConfig(dir, RankProfilesConfig.getDefName() + ".cfg", rpcb.build());

        IndexschemaConfig.Builder iscb = new IndexschemaConfig.Builder();
        producer.getConfig(iscb);
        writeConfig(dir, IndexschemaConfig.getDefName() + ".cfg", iscb.build());

        AttributesConfig.Builder acb = new AttributesConfig.Builder();
        producer.getConfig(acb);
        writeConfig(dir, AttributesConfig.getDefName() + ".cfg", acb.build());

        RankingConstantsConfig.Builder rccb = new RankingConstantsConfig.Builder();
        producer.getConfig(rccb);
        writeConfig(dir, RankingConstantsConfig.getDefName() + ".cfg", rccb.build());

        RankingExpressionsConfig.Builder recb = new RankingExpressionsConfig.Builder();
        producer.getConfig(recb);
        writeConfig(dir, RankingExpressionsConfig.getDefName() + ".cfg", recb.build());

        OnnxModelsConfig.Builder omcb = new OnnxModelsConfig.Builder();
        producer.getConfig(omcb);
        writeConfig(dir, OnnxModelsConfig.getDefName() + ".cfg", omcb.build());

        ImportedFieldsConfig.Builder ifcb = new ImportedFieldsConfig.Builder();
        producer.getConfig(ifcb);
        writeConfig(dir, ImportedFieldsConfig.getDefName() + ".cfg", ifcb.build());
    }
Validates rank setup for all content clusters (rank-profiles, index-schema, attributes configs), validation is done
by running the binary 'vespa-verify-ranksetup-bin'

@author vegardh
config-model/src/main/java/com/yahoo/vespa/model/application/validation/RankSetupValidator.java