diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-publisher-config.xml.j2 b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-publisher-config.xml.j2
new file mode 100644
index 0000000000..d8a0413ec8
--- /dev/null
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/conf_templates/templates/repository/conf/etc/webapp-publisher-config.xml.j2
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ {% if webapp_publisher_configs.host is defined %}
+ {{webapp_publisher_configs.host}}
+ {% else %}
+ https://${iot.core.host}:${iot.core.https.port}
+ {% endif %}
+
+
+ {% if webapp_publisher_configs.publish_api is defined %}
+ {{webapp_publisher_configs.publish_api}}
+ {% else %}
+ true
+ {% endif %}
+
+
+ {% if webapp_publisher_configs.enable_update_api is defined %}
+ {{webapp_publisher_configs.enable_update_api}}
+ {% else %}
+ true
+ {% endif %}
+
+
+
+ default
+ {% if webapp_publisher_configs.profiles is defined %}
+ {%- for profile in webapp_publisher_configs.profiles -%}
+ {{profile}}
+ {% endfor %}
+ {% endif %}
+
+
\ No newline at end of file
diff --git a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf
index 3d6782a96f..8b5d94e410 100644
--- a/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf
+++ b/features/apimgt-extensions/org.wso2.carbon.apimgt.webapp.publisher.feature/src/main/resources/p2.inf
@@ -1,2 +1,3 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.webapp.publisher_${feature.version}/conf/webapp-publisher-config.xml,target:${installFolder}/../../conf/etc/webapp-publisher-config.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.apimgt.webapp.publisher_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/application-mgt.xml.j2 b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/application-mgt.xml.j2
new file mode 100644
index 0000000000..8774964271
--- /dev/null
+++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/application-mgt.xml.j2
@@ -0,0 +1,231 @@
+
+
+
+
+
+ jdbc/APPM_DS
+
+
+
+ {% if application_mgt_conf.extension.application_manager is defined %}
+ {{application_mgt_conf.extension.application_manager}}
+ {% else %}
+ org.wso2.carbon.device.application.mgt.core.impl.ApplicationManagerImpl
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.review_manager is defined %}
+ {{application_mgt_conf.extension.review_manager}}
+ {% else %}
+ org.wso2.carbon.device.application.mgt.core.impl.ReviewManagerImpl
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.life_cycle_state_manager is defined %}
+ {{application_mgt_conf.extension.life_cycle_state_manager}}
+ {% else %}
+ org.wso2.carbon.device.application.mgt.core.lifecycle.LifecycleStateManager
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.subscription_manager is defined %}
+ {{application_mgt_conf.extension.subscription_manager}}
+ {% else %}
+ org.wso2.carbon.device.application.mgt.core.impl.SubscriptionManagerImpl
+ {% endif %}
+
+
+ {% if application_mgt_conf.extension.application_storage_manager is defined %}
+ {{application_mgt_conf.extension.application_storage_manager}}
+ {% if application_mgt_conf.extension.application_storage_manager.parameter_options is defined %}
+
+ {% for property_name,property_value in application_mgt_conf.extension.application_storage_manager.parameter_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+ {% endif %}
+ {% else %}
+ org.wso2.carbon.device.application.mgt.core.impl.ApplicationStorageManagerImpl
+
+ repository/resources/apps/
+ 6
+
+ {% endif %}
+
+
+
+
+
+
+
+
+
+ true
+ true
+ true
+ /app-mgt/life-cycle/application/create
+
+ In-Review
+
+
+
+ /app-mgt/life-cycle/application/review
+
+ Rejected
+ Approved
+ Created
+
+
+
+ /app-mgt/life-cycle/application/approve
+
+ In-Review
+ Published
+
+
+
+ true
+ /app-mgt/life-cycle/application/reject
+
+ In-Review
+
+
+
+ true
+ /app-mgt/life-cycle/application/publish
+
+ Blocked
+ Deprecated
+
+
+
+ /app-mgt/life-cycle/application/block
+
+ Published
+ Deprecated
+
+
+
+ /app-mgt/life-cycle/application/deprecate
+
+ Published
+ Retired
+
+
+
+ true
+ /app-mgt/life-cycle/application/retire
+
+
+
+
+ EMM
+ IoT
+ Art & Design
+ Auto & Vehicles
+ Beauty
+ Books & Reference
+ Business
+ Comics
+ Communications
+ Dating
+ Education
+ Entertainment
+ Events
+ Finance
+ Food & Drink
+ Health & Fitness
+ House & Home
+ Libraries & Demo
+ Lifestyle
+ Maps & Navigation
+ Medical
+ Music & Audio
+ News & Magazines
+ Parenting
+ Personalization
+ Photography
+ Productivity
+ Shopping
+ Social
+ Sports
+ Tools
+ Travel & Local
+ Video Players & Editors
+ Weather
+ GooglePlaySyncedApp
+ {% if application_mgt_conf.app_categories is defined %}
+ {%- for app_category in application_mgt_conf.app_categories -%}
+ {{app_category}}
+ {% endfor %}
+ {% endif %}
+
+
+
+ {% if application_mgt_conf.rating_conf.min_rating_value is defined %}
+ {{application_mgt_conf.rating_conf.min_rating_value}}
+ {% else %}
+ 1
+ {% endif %}
+ {% if application_mgt_conf.rating_conf.max_rating_value is defined %}
+ {{application_mgt_conf.rating_conf.max_rating_value}}
+ {% else %}
+ 10
+ {% endif %}
+
+
+
+ {% if application_mgt_conf.mdm_conf.artifact_download_protocol is defined %}
+ {{application_mgt_conf.mdm_conf.artifact_download_protocol}}
+ {% else %}
+ http
+ {% endif %}
+
+ {% if application_mgt_conf.mdm_conf.artifact_download_endpoint is defined %}
+ {{application_mgt_conf.mdm_conf.artifact_download_endpoint}}
+ {% else %}
+ /api/application-mgt/v1.0/artifact
+ {% endif %}
+
+
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/application-mgt-datasources.xml.j2 b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/application-mgt-datasources.xml.j2
new file mode 100644
index 0000000000..a25faf6511
--- /dev/null
+++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/application-mgt-datasources.xml.j2
@@ -0,0 +1,59 @@
+
+
+
+
+ org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
+
+
+
+
+
+ APPM_DS
+ The datasource used for CDM Application Management
+
+ jdbc/APPM_DS
+
+
+
+ {% if database.app_mgt is defined %}
+ {{database.app_mgt.url}}
+ {{database.app_mgt.username}}
+ {{database.app_mgt.password}}
+ {{database.app_mgt.driver}}
+ {{database.app_mgt.validationQuery}}
+ {% for property_name,property_value in database.app_mgt.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:h2:./repository/database/WSO2DM_APPM_DB;DB_CLOSE_ON_EXIT=FALSE
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+
+
diff --git a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf
index 1a8247162f..360d6ef9f9 100644
--- a/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf
+++ b/features/application-mgt/org.wso2.carbon.device.application.mgt.server.feature/src/main/resources/p2.inf
@@ -3,6 +3,7 @@ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../featur
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/conf/application-mgt.xml,target:${installFolder}/../../conf/application-mgt.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/conf/datasources/application-mgt-datasources.xml,target:${installFolder}/../../conf/datasources/application-mgt-datasources.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/dbscripts/cdm/application-mgt,target:${installFolder}/../../../dbscripts/cdm/application-mgt,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.application.mgt.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/application-mgt-datasources.xml);\
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/certificate-config.xml.j2 b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/certificate-config.xml.j2
new file mode 100755
index 0000000000..2ffad144e2
--- /dev/null
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/conf_templates/templates/repository/conf/certificate-config.xml.j2
@@ -0,0 +1,47 @@
+
+
+
+ {% if certificate_conf.certificate_keystore is defined %}
+
+ {{certificate_conf.certificate_keystore.location}}
+
+ {{certificate_conf.certificate_keystore.type}}
+
+ {{certificate_conf.certificate_keystore.password}}
+
+ {{certificate_conf.certificate_keystore.cacert_alias}}
+
+ {{certificate_conf.certificate_keystore.cacert_password}}
+
+ {{certificate_conf.certificate_keystore.racert_alias}}
+
+ {{certificate_conf.certificate_keystore.racert_password}}
+ {% else %}
+
+ ${carbon.home}/repository/resources/security/wso2certs.jks
+
+ JKS
+
+ wso2carbon
+
+ cacert
+
+ cacert
+
+ racert
+
+ racert
+ {% endif %}
+
+
+
+
+
+
+ jdbc/DM_DS
+
+
+
+
+ 10
+
\ No newline at end of file
diff --git a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
index ef6d64fc87..345f751daa 100644
--- a/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
+++ b/features/certificate-mgt/org.wso2.carbon.certificate.mgt.server.feature/src/main/resources/p2.inf
@@ -1,4 +1,5 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf/wso2certs.jks,target:${installFolder}/../../resources/security/wso2certs.jks,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf/certificate-config.xml,target:${installFolder}/../../conf/certificate-config.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/dbscripts/,target:${installFolder}/../../../dbscripts,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.certificate.mgt.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2
new file mode 100644
index 0000000000..214ad3f8a8
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/cdm-config.xml.j2
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+ jdbc/DM_DS
+
+
+
+
+ {% if device_mgt_conf.push_notification_conf is defined %}
+ {{device_mgt_conf.push_notification_conf.scheduler_batch_size}}
+ {{device_mgt_conf.push_notification_conf.scheduler_batch_delay_mills}}
+ {{device_mgt_conf.push_notification_conf.scheduler_task_initial_delay}}
+ {{device_mgt_conf.push_notification_conf.scheduler_task_enabled}}
+ {% else %}
+ 1000
+ 60000
+ 60000
+ true
+ {% endif %}
+
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.fcm.FCMBasedPushNotificationProvider
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.mqtt.MQTTBasedPushNotificationProvider
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.http.HTTPBasedPushNotificationProvider
+ org.wso2.carbon.device.mgt.extensions.push.notification.provider.xmpp.XMPPBasedPushNotificationProvider
+ {% if device_mgt_conf.push_notification_conf.push_notification_providers is defined %}
+ {%- for push_notification_provider in device_mgt_conf.push_notification_conf.push_notification_providers -%}
+ {{push_notification_provider}}
+ {% endfor %}
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.pull_notification_conf is defined %}
+ {{device_mgt_conf.pull_notification_conf.enabled}}
+ {% else %}
+ false
+ {% endif %}
+
+
+ {% if device_mgt_conf.identity_conf is defined %}
+ {{device_mgt_conf.identity_conf.server_url}}
+ {{device_mgt_conf.identity_conf.admin_username}}
+ {{device_mgt_conf.identity_conf.admin_password}}
+ {% else %}
+ https://localhost:9443
+ admin
+ admin
+ {% endif %}
+
+
+ {% if device_mgt_conf.key_manager_conf is defined %}
+ {{device_mgt_conf.key_manager_conf.server_url}}
+ {{device_mgt_conf.key_manager_conf.admin_username}}
+ {{device_mgt_conf.key_manager_conf.admin_password}}
+ {% else %}
+ https://localhost:9443
+ admin
+ admin
+ {% endif %}
+
+
+ {% if device_mgt_conf.policy_conf is defined %}
+ {{device_mgt_conf.policy_conf.monitoring_class}}
+ {{device_mgt_conf.policy_conf.monitoring_enable}}
+ {{device_mgt_conf.policy_conf.monitoring_frequency}}
+ {{device_mgt_conf.policy_conf.max_retries}}
+ {{device_mgt_conf.policy_conf.min_retries_to_mark_unreachable}}
+ {{device_mgt_conf.policy_conf.min_retries-to_mark_inactive}}
+
+
+
+ {{device_mgt_conf.policy_conf.policy.evaluation_point}}
+ {{device_mgt_conf.policy_conf.cache_enable}}
+ {% else %}
+ org.wso2.carbon.policy.mgt
+ true
+ 60000
+ 5
+ 8
+ 20
+
+
+
+ Simple
+ true
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.pagination_conf is defined %}
+ {{device_mgt_conf.pagination_conf.device_list_page_size}}
+ {{device_mgt_conf.pagination_conf.group_list_page_size}}
+ {{device_mgt_conf.pagination_conf.notification_list_page_size}}
+ {{device_mgt_conf.pagination_conf.activity_list_page_size}}
+ {{device_mgt_conf.pagination_conf.operation_list_page_size}}
+ {{device_mgt_conf.pagination_conf.topic_list_page_size}}
+ {{device_mgt_conf.pagination_conf.metadata_list_page_size}}
+ {% else %}
+ 20
+ 20
+ 20
+ 20
+ 20
+ 20
+ 20
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.device_status_task_config is defined %}
+ {{device_mgt_conf.device_status_task_config.enable}}
+ {% else %}
+ true
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.device_cache_conf is defined %}
+ {{device_mgt_conf.device_cache_conf.enable}}
+ {{device_mgt_conf.device_cache_conf.expiry_time}}
+
+ {{device_mgt_conf.device_cache_conf.capacity}}
+ {% else %}
+ true
+ 600
+
+ 10000
+ {% endif %}
+
+
+ {% if device_mgt_conf.geo_fence_cache_conf is defined %}
+ {{device_mgt_conf.geo_fence_cache_conf.enable}}
+ {{device_mgt_conf.geo_fence_cache_conf.expiry_time}}
+ {{device_mgt_conf.geo_fence_cache_conf.capacity}}
+ {% else %}
+ true
+ 600
+ 10000
+ {% endif %}
+
+
+ {% if device_mgt_conf.event_operation_task_conf is defined %}
+ {{device_mgt_conf.event_operation_task_conf.enable}}
+ {% else %}
+ true
+ {% endif %}
+
+
+ {% if device_mgt_conf.certificate_cache_conf is defined %}
+ {{device_mgt_conf.certificate_cache_conf.enable}}
+ {{device_mgt_conf.certificate_cache_conf.expiry_time}}
+ {% else %}
+ true
+ 86400
+ {% endif %}
+
+
+
+
+ jdbc/DM_ARCHIVAL_DS
+
+
+
+ {% if device_mgt_conf.archival_conf.archival_task is defined %}
+ {{device_mgt_conf.archival_conf.archival_task.enabled}}
+ {{device_mgt_conf.archival_conf.archival_task.archival_pending_operations}}
+
+ DM_DB
+ ARCHIVAL_DB
+
+ {{device_mgt_conf.archival_conf.archival_task.task_class}}
+
+ {{device_mgt_conf.archival_conf.archival_task.cron_expression}}
+
+ {{device_mgt_conf.archival_conf.archival_task.retention_period}}
+ {{device_mgt_conf.archival_conf.archival_task.execution_batch_size}}
+
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.enabled}}
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.task_class}}
+
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.cron_expression}}
+
+ {{device_mgt_conf.archival_conf.archival_task.purging_task.retention_period}}
+
+ {% else %}
+ false
+ false
+
+ DM_DB
+ ARCHIVAL_DB
+
+ org.wso2.carbon.device.mgt.core.task.impl.ArchivalTask
+
+ 0 0 0 1/1 * ? *
+
+ 30
+ 1000
+
+ false
+ org.wso2.carbon.device.mgt.core.task.impl.ArchivedDataDeletionTask
+
+ 0 0 3 1/1 * ? *
+
+ 365
+
+ {% endif %}
+
+
+
+ {% if device_mgt_conf.geo_location_conf is defined %}
+ {{device_mgt_conf.geo_location_conf.enabled}}
+ {% else %}
+ false
+ {% endif %}
+
+
+ false
+ false
+
+ false
+
+
+
+
+ *
+
+
+
+
+
+ {% if device_mgt_conf.remote_session_conf is defined %}
+ {{device_mgt_conf.remote_session_conf.enabled}}
+ {{device_mgt_conf.remote_session_conf.remote_session_server_url}}
+ {{device_mgt_conf.remote_session_conf.max_http_connection_per_host}}
+ {{device_mgt_conf.remote_session_conf.max_total_http_connections}}
+ {{device_mgt_conf.remote_session_conf.max_messages_per_second}}
+ {{device_mgt_conf.remote_session_conf.session_idle_timeout}}
+ {{device_mgt_conf.remote_session_conf.max_message_buffer.size}}
+ {% else %}
+ true
+ ws://localhost:9763
+ 2
+ 100
+ 20
+ 15
+ 640
+ {% endif %}
+
+ {% if device_mgt_conf.default_groups_conf is defined %}
+ {{device_mgt_conf.default_groups_conf}}
+ {% else %}
+ BYOD,COPE
+ {% endif %}
+
+ {% if device_mgt_conf.enrolement_notification_conf is defined %}
+ {{device_mgt_conf.enrolement_notification_conf.enabled}}
+ {{device_mgt_conf.enrolement_notification_conf.notify_through_extension}}
+ {{device_mgt_conf.enrolement_notification_conf.extension_class}}
+ {{device_mgt_conf.enrolement_notification_conf.notify_internal_host}}
+ {% else %}
+ false
+ false
+ org.wso2.carbon.device.mgt.common.enrollment.notification.EnrollmentNotifier
+ http://localhost:8280
+ {% endif %}
+
+
+ {% if device_mgt_conf.default_roles is defined %}
+ {{device_mgt_conf.default_roles.enabled}}
+ {% else %}
+ false
+ {% endif %}
+
+
+ test_role
+
+ /permission/admin/Login
+
+
+
+
+
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2
new file mode 100755
index 0000000000..e9105a8d3e
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/cdm-datasources.xml.j2
@@ -0,0 +1,87 @@
+
+
+
+
+ org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
+
+
+
+ DM_DS
+ The datasource used for CDM
+
+ jdbc/DM_DS
+
+
+
+ {% if database.device_mgt is defined %}
+ {{database.device_mgt.url}}
+ {{database.device_mgt.username}}
+ {{database.device_mgt.password}}
+ {{database.device_mgt.driver}}
+ {{database.device_mgt.validationQuery}}
+ {% for property_name,property_value in database.device_mgt.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:h2:./repository/database/WSO2DM_DB;DB_CLOSE_ON_EXIT=FALSE;AUTO_SERVER=TRUE;LOCK_TIMEOUT=60000
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+ DM_ARCHIVAL_DS
+ The archival datasource used for CDM
+
+ jdbc/DM_ARCHIVAL_DS
+
+
+
+ {% if database.device_mgt_archival is defined %}
+ {{database.device_mgt_archival.url}}
+ {{database.device_mgt_archival.username}}
+ {{database.device_mgt_archival.password}}
+ {{database.device_mgt_archival.driver}}
+ {{database.device_mgt_archival.validationQuery}}
+ {% for property_name,property_value in database.device_mgt_archival.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:h2:./repository/database/WSO2DM_ARCHIVAL_DS;DB_CLOSE_ON_EXIT=FALSE
+ wso2carbon
+ wso2carbon
+ org.h2.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/license-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/license-config.xml.j2
new file mode 100644
index 0000000000..ab2e462b42
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/license-config.xml.j2
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+ wso2
+ android
+ 1.0.0
+ 1.0.0
+ 01-01-2014
+ 31-12-2035
+
+
+
+ wso2
+ ios
+ 1.0.0
+ 1.0.0
+ 01-01-2014
+ 31-12-2035
+
+
+
+ wso2
+ windows
+ 1.0.0
+ 1.0.0
+ 01-01-2014
+ 31-12-2035
+
+
+ {% if license_conf.licenses is defined %}
+ {%- for license in license_conf.licenses -%}
+
+ {{license.provider}}
+ {{license.name}}
+ {{license.version}}
+ {{license.language}}
+ {{license.valid_from}}
+ {{license.valid-to}}
+ {{license.text}}
+
+ {% endfor %}
+ {% endif %}
+
+
\ No newline at end of file
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/mdm-ui-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/mdm-ui-config.xml.j2
new file mode 100644
index 0000000000..64ccc89949
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/mdm-ui-config.xml.j2
@@ -0,0 +1,211 @@
+
+
+
+
+ {% if mdm_ui_conf.enable_oauth is defined %}
+ {{mdm_ui_conf.enable_oauth}}
+ {% else %}
+ true
+ {% endif %}
+ {% if mdm_ui_conf.enable_sso is defined %}
+ {{mdm_ui_conf.enable_sso}}
+ {% else %}
+ false
+ {% endif %}
+
+
+ application_management
+ device_management
+ subscription_management
+ review_management
+ {% if mdm_ui_conf.app_registration.tags is defined %}
+ {%- for tag in mdm_ui_conf.app_registration.tags -%}
+ {{tag}}
+ {% endfor %}
+ {% endif %}
+
+ {% if mdm_ui_conf.app_registration.allow_to_all_domains is defined %}
+ {{mdm_ui_conf.app_registration.allow_to_all_domains}}
+ {% else %}
+ true
+ {% endif %}
+
+
+ perm:app:review:view
+ perm:app:review:update
+ perm:app:publisher:view
+ perm:app:publisher:update
+ perm:app:store:view
+ perm:app:subscription:install
+ perm:app:subscription:uninstall
+ perm:admin:app:review:update
+ perm:admin:app:review:view
+ perm:admin:app:publisher:update
+ perm:admin:app:review:update
+ perm:admin:app:subscription:view
+ perm:device-types:types
+ perm:enterprise:modify
+ perm:enterprise:view
+ perm:android-work:customer
+ perm:android-work:admin
+ perm:application-command:modify
+ perm:sign-csr
+ perm:admin:devices:view
+ perm:admin:topics:view
+ perm:roles:add
+ perm:roles:add-users
+ perm:roles:update
+ perm:roles:permissions
+ perm:roles:details
+ perm:roles:view
+ perm:roles:create-combined-role
+ perm:roles:delete
+ perm:dashboard:vulnerabilities
+ perm:dashboard:non-compliant-count
+ perm:dashboard:non-compliant
+ perm:dashboard:by-groups
+ perm:dashboard:device-counts
+ perm:dashboard:feature-non-compliant
+ perm:dashboard:count-overview
+ perm:dashboard:filtered-count
+ perm:dashboard:details
+ perm:get-activity
+ perm:devices:delete
+ perm:devices:applications
+ perm:devices:effective-policy
+ perm:devices:compliance-data
+ perm:devices:features
+ perm:devices:operations
+ perm:devices:search
+ perm:devices:details
+ perm:devices:update
+ perm:devices:view
+ perm:view-configuration
+ perm:manage-configuration
+ perm:policies:remove
+ perm:policies:priorities
+ perm:policies:deactivate
+ perm:policies:get-policy-details
+ perm:policies:manage
+ perm:policies:activate
+ perm:policies:update
+ perm:policies:changes
+ perm:policies:get-details
+ perm:users:add
+ perm:users:details
+ perm:users:count
+ perm:users:delete
+ perm:users:roles
+ perm:users:user-details
+ perm:users:credentials
+ perm:users:search
+ perm:users:is-exist
+ perm:users:update
+ perm:users:send-invitation
+ perm:admin-users:view
+ perm:admin:devices:update-enrollment
+ perm:groups:devices
+ perm:groups:update
+ perm:groups:add
+ perm:groups:device
+ perm:groups:devices-count
+ perm:groups:remove
+ perm:groups:groups
+ perm:groups:groups-view
+ perm:groups:share
+ perm:groups:count
+ perm:groups:roles
+ perm:groups:devices-remove
+ perm:groups:devices-add
+ perm:groups:assign
+ perm:device-types:configs
+ perm:device-types:features
+ perm:device-types:types
+ perm:applications:install
+ perm:applications:uninstall
+ perm:admin-groups:count
+ perm:admin-groups:view
+ perm:admin-groups:add
+ perm:notifications:mark-checked
+ perm:notifications:view
+ perm:admin:certificates:delete
+ perm:admin:certificates:details
+ perm:admin:certificates:view
+ perm:admin:certificates:add
+ perm:admin:certificates:verify
+ perm:admin
+ perm:devicetype:deployment
+ perm:device-types:events
+ perm:device-types:events:view
+ perm:admin:device-type
+ perm:admin:device-type:view
+ perm:admin:device-type:configs
+ perm:device:enroll
+ perm:geo-service:analytics-view
+ perm:geo-service:alerts-manage
+ appm:read
+ perm:devices:permanent-delete
+ perm:android:manage-configuration
+ perm:android:view-configuration
+ perm:user:permission-view
+ perm:ios:view-configuration
+ perm:ios:manage-configuration
+ perm:ios:dep-view
+ perm:ios:dep-add
+ perm:windows:view-configuration
+ perm:windows:manage-configuration
+ perm:android:lock-devices
+ perm:android:unlock-devices
+ perm:android:location
+ perm:android:clear-password
+ perm:android:control-camera
+ perm:android:enterprise-wipe
+ perm:android:wipe
+ perm:android:ring
+ perm:android:applications
+ perm:android:reboot
+ perm:android:change-LockTask
+ perm:android:mute
+ perm:android:configure-display-message
+ perm:android:send-app-restrictions
+ perm:android:file-transfer
+ perm:android:set-webclip
+ perm:android:set-password-policy
+ perm:android:change-lock-code
+ perm:android:upgrade-firmware
+ perm:android:send-notification
+ perm:geo-service:geo-fence
+ perm:metadata:view
+ perm:metadata:create
+ perm:metadata:update
+ {% if mdm_ui_conf.scopes is defined %}
+ {%- for scope in mdm_ui_conf.scopes -%}
+ {{scope}}
+ {% endfor %}
+ {% endif %}
+
+
+ {% if mdm_ui_conf.sso_conf is defined %}
+ {{mdm_ui_conf.sso_conf.issuer}}
+ {% else %}
+ device-mgt
+ {% endif %}
+
+
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/remote-appmanager-config.xml.j2 b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/remote-appmanager-config.xml.j2
new file mode 100644
index 0000000000..5f752a4983
--- /dev/null
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/conf_templates/templates/repository/conf/remote-appmanager-config.xml.j2
@@ -0,0 +1,32 @@
+
+
+
+
+ {% if app_management_conf is defined %}
+ {{app_management_conf.enable}}
+ {{app_management_conf.app_manager_url}}
+ {{app_management_conf.consumer_key}}
+ {{app_management_conf.consumer_secret}}
+ {% else %}
+ true
+ http:/www.google.com
+ http:/www.google.com
+ http:/www.google.com
+ {% endif %}
+
diff --git a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf
index d373520aa0..5ebad17202 100644
--- a/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf
+++ b/features/device-mgt/org.wso2.carbon.device.mgt.basics.feature/src/main/resources/p2.inf
@@ -8,5 +8,4 @@ org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../featur
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/rxts/license.rxt,target:${installFolder}/../../../repository/resources/rxts/license.rxt,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.mkdir(path:${installFolder}/../../../repository/resources/email-templates);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/email/templates,target:${installFolder}/../../../repository/resources/email-templates,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/apis/admin--OAuth2TokenManagement.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--OAuth2TokenManagement.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/apis/admin--UserManagementValidateUser.xml,target:${installFolder}/../../deployment/server/synapse-configs/default/api/admin--UserManagementValidateUser.xml,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.device.mgt.basics_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/heart-beat-datasources.xml.j2 b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/heart-beat-datasources.xml.j2
new file mode 100644
index 0000000000..524f28c42a
--- /dev/null
+++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/datasources/heart-beat-datasources.xml.j2
@@ -0,0 +1,57 @@
+
+
+
+ org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader
+
+
+
+ HeartBeat_DS
+ The datasource Server Heart Beat
+
+ jdbc/HeartBeat_DS
+
+
+
+ {% if database.heart_beat is defined %}
+ {{database.heart_beat.url}}
+ {{database.heart_beat.username}}
+ {{database.heart_beat.password}}
+ {{database.heart_beat.driver}}
+ {{database.heart_beat.validationQuery}}
+ {% for property_name,property_value in database.heart_beat.pool_options.items() %}
+ <{{property_name}}>{{property_value}}{{property_name}}>
+ {% endfor %}
+ {% else %}
+ jdbc:mysql://localhost:3306/heart_beat
+ root
+ root
+ com.mysql.jdbc.Driver
+ 50
+ 60000
+ true
+ SELECT 1
+ 30000
+ {% endif %}
+
+
+
+
+
+
diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/heart-beat-config.xml.j2 b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/heart-beat-config.xml.j2
new file mode 100644
index 0000000000..8d2776fc38
--- /dev/null
+++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/conf_templates/templates/repository/conf/heart-beat-config.xml.j2
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+ jdbc/HeartBeat_DS
+
+
+ {% if heart_beat_beacon_conf is defined %}
+ {{heart_beat_beacon_conf.enable}}
+ {{heart_beat_beacon_conf.notifier_initial_delay_in_seconds}}
+ {{heart_beat_beacon_conf.notifier_frequency_in_seconds}}
+ {{heart_beat_beacon_conf.time_skew_in_seconds}}
+ {{heart_beat_beacon_conf.sever_timeout_interval_in_seconds}}
+ {% else %}
+ false
+ 30
+ 300
+ 5
+ 600
+ {% endif %}
+
diff --git a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf
index 6add373677..55584ad49a 100644
--- a/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf
+++ b/features/heartbeat-management/io.entgra.server.heart.beat.feature/src/main/resources/p2.inf
@@ -2,6 +2,7 @@ instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/datasources/,target:${installFolder}/../../conf/datasources/,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/conf/heart-beat-config.xml,target:${installFolder}/../../conf/heart-beat-config.xml,overwrite:true);\
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/dbscripts/heart-beat/,target:${installFolder}/../../../dbscripts/heart-beat,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.server.heart.beat_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
instructions.unconfigure = \
org.eclipse.equinox.p2.touchpoint.natives.remove(path:${installFolder}/../../conf/datasources/heart-beat-datasources.xml);\
diff --git a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf_templates/templates/repository/conf/email-sender-config.xml.j2 b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf_templates/templates/repository/conf/email-sender-config.xml.j2
new file mode 100644
index 0000000000..f59e8fbf53
--- /dev/null
+++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/conf_templates/templates/repository/conf/email-sender-config.xml.j2
@@ -0,0 +1,38 @@
+
+
+
+ {% if email_sender_conf is defined %}
+ {{email_sender_conf.min_threads}}
+
+ {{email_sender_conf.max_threads}}
+
+ {{email_sender_conf.keep_alive_duration}}
+
+ {{email_sender_conf.thread_queue_capacity}}
+ {% else %}
+ 8
+
+ 100
+
+ 20
+
+ 1000
+ {% endif %}
+
+
diff --git a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf
index d4dadf6a1e..03d6cc09f9 100644
--- a/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf
+++ b/features/transport-mgt/email-sender/org.wso2.carbon.email.sender.feature/src/main/resources/p2.inf
@@ -1,3 +1,4 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/conf/email-sender-config.xml,target:${installFolder}/../../conf/etc/email-sender-config.xml,overwrite:true);\
-org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/email/templates,target:${installFolder}/../../../repository/resources/email-templates,overwrite:true);\
\ No newline at end of file
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/email/templates,target:${installFolder}/../../../repository/resources/email-templates,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/org.wso2.carbon.email.sender_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf_templates/templates/repository/conf/sms-config.xml.j2 b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf_templates/templates/repository/conf/sms-config.xml.j2
new file mode 100644
index 0000000000..7f8cd7359b
--- /dev/null
+++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/conf_templates/templates/repository/conf/sms-config.xml.j2
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+ sample
+ +94
+ 160
+
+
+ {% if sms_conf.gateways is defined %}
+ {%- for gateway in sms_conf.gateways -%}
+
+
+ sample
+ +94
+ 160
+ {% for property_name,property_value in gateway.properties_options.items() %}
+ {{property_value}}
+ {% endfor %}
+
+
+ {% endfor %}
+ {% endif %}
+
+
diff --git a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf
index af486db59b..958e75d3ab 100644
--- a/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf
+++ b/features/transport-mgt/sms-handler/io.entgra.transport.mgt.sms.handler.server.feature/src/main/resources/p2.inf
@@ -1,4 +1,5 @@
instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.transport.mgt.sms.handler.server_${feature.version}/conf/sms-config.xml,target:${installFolder}/../../conf/sms-config.xml,overwrite:true);\
+org.eclipse.equinox.p2.touchpoint.natives.copy(source:${installFolder}/../features/io.entgra.transport.mgt.sms.handler.server_${feature.version}/conf_templates/,target:${installFolder}/../../resources/conf/,overwrite:true);\
instructions.unconfigure = \