Yes, it's the goal. admin:clone is available since Karaf 2.2.4 or so.
Regards
JB
On 05/16/2012 12:03 PM, Christian Schneider wrote:
I think the clone command might be good enough.
So you could
>instance:create template
.. add the configurations necessary
>instance:clone instance1
That might already be good enough.
Christian
Am 16.05.2012 11:56, schrieb Jean-Baptiste Onofré:
Just a reminder.
The purpose of child instance is to create:
- atomic instances
- isolated from others instances (including the root one)
That's why an child instance (at creation) doesn't inherit from the
root one (it's a "embedded" bootstrap).
We introduced the clone command to create child instance from another
one instead of creating from scratch.
We can enhance the clone command to use the root instance, but the
create command should create an "isolated" instance IMHO.
More over, I started to work on the profile support.
instance:profile will apply a change set to an instance
(profile:create could generate the profile starting from a given
instance).
We have a Jira about the profile support and an explanation about what
I propose.
Regards
JB
On 05/16/2012 11:48 AM, Christian Schneider wrote:
Another way would be to use the org.ops4j.pax.url.mvn.cfg from the root
instance. I think the maven settings are typically global and will not
change from instance to instance.
What do you think?
Christian
Am 16.05.2012 11:26, schrieb Ulhas Bhole (OS):
Hi Christian,
I have came across the same issue you mentioned about the child
instances not having full set of maven repos. I think the approach you
mentioned of using template is a good idea. I always felt it reduces
the benefit of having child instance command greatly if it can't be
used straight a way to deploy bundles that you otherwise can directly
deploy from maven repo in parent instance.
Regards,
Ulhas Bhole
On 15 May 2012, at 20:49, Christian Schneider wrote:
Hi Jamie,
this is a quick fix to get the instance commands working again. I
wonder why I did not see the test failure. Will investigate this
tomorrow.
The reason why I added the ssh feature is that the feature config we
copy from the assembly only contains the config feature but we need
ssh as this is how
we detect if an instance is running.
The more general question is what we want to use as a base for new
instances. Should it be the karaf minimal distro, should it be the
karaf standard distro or the
currently installed karaf? I am also not sure what the best solution
is so I did the minimal change that makes the instance commands work
again.
Another possible problem is the maven repos config. Currently we copy
this from the assembly at build time. So if the user adds his company
repo to the root instance we will not have it
in child instances by default.
Any ideas how we should solve this? It thought about a dir with a
kind of template for child instances but I am not sure about it. We
could also have the best practice of adding a child instance,
configuring it by hand and then clone it for further children.
Christian
Am 15.05.2012 19:52, schrieb Jamie G.:
I'm not sure on this check in.
When I build trunk I get:
Failed tests:
testHandleFeatures(org.apache.karaf.instance.core.internal.InstanceServiceImplTest):
expected:<abc,def,test> but was:<abc,def,ssh,test>
Which can be resolved by updating
trunk/instance/core/src/test/java/org/apache/karaf/instance/core/internal/InstanceServiceImplTest.java
to include ssh in the expects assertion.
- assertEquals("abc,def,test", p2.get("featuresBoot"));
+ assertEquals("abc,def,ssh,test", p2.get("featuresBoot"));
That being said, is there a special reason for using
Collections.singletonList to add ssh? What if we want to add more to
the list down the road?
-Jamie
On Tue, May 15, 2012 at 9:06 AM,<[email protected]> wrote:
Author: cschneider
Date: Tue May 15 11:36:19 2012
New Revision: 1338657
URL: http://svn.apache.org/viewvc?rev=1338657&view=rev
Log:
KARAF-1206 Adding ssh feature so the instance starts correctly again
Modified:
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
Modified:
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
URL:
http://svn.apache.org/viewvc/karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java?rev=1338657&r1=1338656&r2=1338657&view=diff
==============================================================================
---
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
(original)
+++
karaf/trunk/instance/core/src/main/java/org/apache/karaf/instance/core/internal/InstanceServiceImpl.java
Tue May 15 11:36:19 2012
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -233,7 +234,7 @@ public class InstanceServiceImpl impleme
void addFeaturesFromSettings(File featuresCfg, InstanceSettings
settings) throws IOException {
Properties p = loadStorage(featuresCfg);
-
+ appendToPropList(p, "featuresBoot",
Collections.singletonList("ssh"));
appendToPropList(p, "featuresBoot", settings.getFeatures());
appendToPropList(p, "featuresRepositories",
settings.getFeatureURLs());
saveStorage(p, featuresCfg, "Features Configuration");
--
Christian Schneider
http://www.liquid-reality.de
Open Source Architect
Talend Application Integration Division http://www.talend.com
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com