Updated Branches: refs/heads/karaf-2.x 16e338047 -> f17a8624a
[KARAF-2646] Include all files in created instances Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f17a8624 Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f17a8624 Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f17a8624 Branch: refs/heads/karaf-2.x Commit: f17a8624a50060653b62d861564aa061c87e5322 Parents: 16e3380 Author: Jean-Baptiste Onofré <[email protected]> Authored: Fri Dec 27 08:39:15 2013 +0100 Committer: Jean-Baptiste Onofré <[email protected]> Committed: Fri Dec 27 08:39:15 2013 +0100 ---------------------------------------------------------------------- admin/core/pom.xml | 3 +- .../karaf/admin/internal/AdminServiceImpl.java | 19 +++++++++-- .../admin/etc/org.apache.karaf.management.cfg | 12 ++++++- .../karaf/admin/etc/org.apache.karaf.shell.cfg | 20 +++++++---- .../apache/karaf/admin/etc/system.properties | 35 ++++++++++++-------- .../text/etc/org.apache.karaf.management.cfg | 3 ++ 6 files changed, 66 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/f17a8624/admin/core/pom.xml ---------------------------------------------------------------------- diff --git a/admin/core/pom.xml b/admin/core/pom.xml index 0f3df76..2cfdec4 100644 --- a/admin/core/pom.xml +++ b/admin/core/pom.xml @@ -131,9 +131,10 @@ <resource> <directory>../../assemblies/apache-karaf/src/main/distribution/text/etc/</directory> <includes> + <include>*.policy</include> <include>*.properties</include> <include>*.cfg</include> - <include>authorized_keys</include> + <include>shell.init.script</include> </includes> <excludes> <exclude>org.apache.karaf.shell.cfg</exclude> http://git-wip-us.apache.org/repos/asf/karaf/blob/f17a8624/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java ---------------------------------------------------------------------- diff --git a/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java b/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java index 7f63fea..7f230f6 100644 --- a/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java +++ b/admin/core/src/main/java/org/apache/karaf/admin/internal/AdminServiceImpl.java @@ -264,18 +264,31 @@ public class AdminServiceImpl implements AdminService { mkdir(karafBase, "deploy"); mkdir(karafBase, "data"); + copyResourceToDir(karafBase, "etc/all.policy", true); copyResourceToDir(karafBase, "etc/config.properties", true); - copyResourceToDir(karafBase, "etc/jre.properties", true); copyResourceToDir(karafBase, "etc/custom.properties", true); copyResourceToDir(karafBase, "etc/java.util.logging.properties", true); + copyResourceToDir(karafBase, "etc/jmx.acl.cfg", true); + copyResourceToDir(karafBase, "etc/jmx.acl.java.lang.Memory.cfg", true); + copyResourceToDir(karafBase, "etc/jmx.acl.org.apache.karaf.bundle.cfg", true); + copyResourceToDir(karafBase, "etc/jmx.acl.org.apache.karaf.config.cfg", true); + copyResourceToDir(karafBase, "etc/jmx.acl.org.apache.karaf.security.jmx.cfg", true); + copyResourceToDir(karafBase, "etc/jmx.acl.osgi.compendium.cm.cfg", true); + copyResourceToDir(karafBase, "etc/jre.properties", true); + copyResourceToDir(karafBase, "etc/keys.properties", true); copyResourceToDir(karafBase, "etc/org.apache.felix.fileinstall-deploy.cfg", true); - copyResourceToDir(karafBase, "etc/org.apache.karaf.log.cfg", true); copyResourceToDir(karafBase, FEATURES_CFG, true); + copyResourceToDir(karafBase, "etc/org.apache.karaf.features.obr.cfg", true); + copyResourceToDir(karafBase, "etc/org.apache.karaf.features.repos.cfg", true); + copyResourceToDir(karafBase, "etc/org.apache.karaf.jaas.cfg", true); + copyResourceToDir(karafBase, "etc/org.apache.karaf.kar.cfg", true); + copyResourceToDir(karafBase, "etc/org.apache.karaf.log.cfg", true); copyResourceToDir(karafBase, "etc/org.ops4j.pax.logging.cfg", true); copyResourceToDir(karafBase, "etc/org.ops4j.pax.url.mvn.cfg", true); + copyResourceToDir(karafBase, "etc/shell.init.script", true); copyResourceToDir(karafBase, "etc/startup.properties", true); + copyResourceToDir(karafBase, "etc/system.properties", true); copyResourceToDir(karafBase, "etc/users.properties", true); - copyResourceToDir(karafBase, "etc/keys.properties", true); HashMap<String, String> props = new HashMap<String, String>(); props.put("${SUBST-KARAF-NAME}", name); http://git-wip-us.apache.org/repos/asf/karaf/blob/f17a8624/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.management.cfg ---------------------------------------------------------------------- diff --git a/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.management.cfg b/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.management.cfg index 57b2957..2b4854e 100644 --- a/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.management.cfg +++ b/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.management.cfg @@ -27,11 +27,21 @@ rmiRegistryPort = ${SUBST-RMI-REGISTRY-PORT} # +# Host for RMI registry +# +rmiRegistryHost = 0.0.0.0 + +# # Port number for RMI server connection # rmiServerPort = ${SUBST-RMI-SERVER-PORT} # +# Host for RMI server +# +rmiServerHost = 0.0.0.0 + +# # Name of the JAAS realm used for authentication # jmxRealm = karaf @@ -39,7 +49,7 @@ jmxRealm = karaf # # The service URL for the JMXConnectorServer # -serviceUrl = service:jmx:rmi://0.0.0.0:${rmiServerPort}/jndi/rmi://0.0.0.0:${rmiRegistryPort}/karaf-${karaf.name} +serviceUrl = service:jmx:rmi://${rmiServerHost}:${rmiServerPort}/jndi/rmi://${rmiRegistryHost}:${rmiRegistryPort}/karaf-${karaf.name} # # Whether any threads started for the JMXConnectorServer should be started as daemon threads http://git-wip-us.apache.org/repos/asf/karaf/blob/f17a8624/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.shell.cfg ---------------------------------------------------------------------- diff --git a/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.shell.cfg b/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.shell.cfg index d94bbfd..859804d 100644 --- a/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.shell.cfg +++ b/admin/core/src/main/resources/org/apache/karaf/admin/etc/org.apache.karaf.shell.cfg @@ -24,33 +24,39 @@ # # Via sshPort and sshHost you define the address you can login into Karaf. # -sshPort=${SUBST-SSH-PORT} -sshHost=0.0.0.0 +sshPort = ${SUBST-SSH-PORT} +sshHost = 0.0.0.0 + +# +# The sshIdleTimeout defines the inactivity timeout to logout the SSH session. +# The sshIdleTimeout is in milliseconds, and the default is set to 30 minutes. +# +sshIdleTimeout = 1800000 # # sshRealm defines which JAAS domain to use for password authentication. # -sshRealm=karaf +sshRealm = karaf # # The location of the hostKey file defines where the private/public key of the server # is located. If no file is at the defined location it will be ignored. # -hostKey=${karaf.base}/etc/host.key +hostKey = ${karaf.etc}/host.key # # Role name used for SSH access authorization # If not set, this defaults to the ${karaf.admin.role} configured in etc/system.properties # -# sshRole=admin +# sshRole = admin # # Self defined key size in 1024, 2048, 3072, or 4096 # If not set, this defaults to 1024. # -# keySize=1024 +# keySize = 1024 # # Specify host key algorithm, defaults to DSA # -# algorithm=DSA +# algorithm = DSA http://git-wip-us.apache.org/repos/asf/karaf/blob/f17a8624/admin/core/src/main/resources/org/apache/karaf/admin/etc/system.properties ---------------------------------------------------------------------- diff --git a/admin/core/src/main/resources/org/apache/karaf/admin/etc/system.properties b/admin/core/src/main/resources/org/apache/karaf/admin/etc/system.properties index 459e0a1..6af98d5 100644 --- a/admin/core/src/main/resources/org/apache/karaf/admin/etc/system.properties +++ b/admin/core/src/main/resources/org/apache/karaf/admin/etc/system.properties @@ -28,32 +28,32 @@ # is not fully available. # To change log levels, please refer to the org.ops4j.pax.logging.cfg file # instead. -org.ops4j.pax.logging.DefaultServiceLog.level=ERROR +org.ops4j.pax.logging.DefaultServiceLog.level = ERROR # # Name of this Karaf instance. # -karaf.name=${SUBST-KARAF-NAME} +karaf.name = ${SUBST-KARAF-NAME} # # Default repository where bundles will be loaded from before using # other Maven repositories. For the full Maven configuration, see # the org.ops4j.pax.url.mvn.cfg file. # -karaf.default.repository=system +karaf.default.repository = system # # Location of a shell script that will be run when starting a shell # session. This script can be used to create aliases and define # additional commands. # -karaf.shell.init.script=${karaf.home}/etc/shell.init.script +karaf.shell.init.script = ${karaf.etc}/shell.init.script # # Sets the maximum size of the shell command history. If not set, # defaults to 500 entries. Setting to 0 will disable history. # -# karaf.shell.history.maxSize=0 +# karaf.shell.history.maxSize = 0 # # Default role name used for console authorization (JMX, SSH and WEB) @@ -67,40 +67,47 @@ karaf.shell.init.script=${karaf.home}/etc/shell.init.script # Note that this value can be overriden using the various ConfigAdmin # configurations for JMX, SSH or the WebConsole. # -karaf.admin.role=admin +karaf.admin.role = admin # # Set this empty property to avoid errors when validating xml documents. # -xml.catalog.files= +xml.catalog.files = # # Suppress the bell in the console when hitting backspace too many times # for example # -jline.nobell=true +jline.nobell = true # # Deletes the entire karaf.data directory at every start # -karaf.clean.all=false +karaf.clean.all = false # # Deletes the karaf.data/cache directory at every start # -karaf.clean.cache=false +karaf.clean.cache = false # # ServiceMix specs options # -org.apache.servicemix.specs.debug=false -org.apache.servicemix.specs.timeout=100 +org.apache.servicemix.specs.debug = false +org.apache.servicemix.specs.timeout = 100 # # Settings for the OSGi 4.3 Weaving # By default, we will not weave any classes. Change this setting to include classes # that you application needs to have woven. # -org.apache.aries.proxy.weaving.enabled=none +org.apache.aries.proxy.weaving.enabled = none # Classes not to weave - Aries default + Xerces which is known to have issues. -org.apache.aries.proxy.weaving.disabled=org.objectweb.asm.*,org.slf4j.*,org.apache.log4j.*,javax.*,org.apache.xerces.* +org.apache.aries.proxy.weaving.disabled = org.objectweb.asm.*,org.slf4j.*,org.apache.log4j.*,javax.*,org.apache.xerces.* + +# +# Security properties +# +#java.security.policy=${karaf.home}/etc/all.policy +#org.osgi.framework.security=osgi +#org.osgi.framework.trust.repositories=${karaf.home}/etc/trustStore.ks http://git-wip-us.apache.org/repos/asf/karaf/blob/f17a8624/assemblies/apache-karaf/src/main/distribution/text/etc/org.apache.karaf.management.cfg ---------------------------------------------------------------------- diff --git a/assemblies/apache-karaf/src/main/distribution/text/etc/org.apache.karaf.management.cfg b/assemblies/apache-karaf/src/main/distribution/text/etc/org.apache.karaf.management.cfg index e010917..16a0c08 100644 --- a/assemblies/apache-karaf/src/main/distribution/text/etc/org.apache.karaf.management.cfg +++ b/assemblies/apache-karaf/src/main/distribution/text/etc/org.apache.karaf.management.cfg @@ -36,6 +36,9 @@ rmiRegistryHost = 0.0.0.0 # rmiServerPort = 44444 +# +# Host for RMI server +# rmiServerHost = 0.0.0.0 #
