brooklyn-server git commit: Revert semantics of reinitAll in BrooklynInitialization
Repository: brooklyn-server Updated Branches: refs/heads/master f554e61fe -> 4388cbe58 Revert semantics of reinitAll in BrooklynInitialization Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/4388cbe5 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/4388cbe5 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/4388cbe5 Branch: refs/heads/master Commit: 4388cbe580a57d092b5e99ac3209c2fa9076757f Parents: f554e61 Author: Andrew Donald KennedyAuthored: Wed Jun 22 16:44:44 2016 -0700 Committer: Andrew Donald Kennedy Committed: Wed Jun 22 16:44:44 2016 -0700 -- .../apache/brooklyn/core/internal/BrooklynInitialization.java | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/4388cbe5/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynInitialization.java -- diff --git a/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynInitialization.java b/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynInitialization.java index c7bc9b7..bcbde05 100644 --- a/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynInitialization.java +++ b/core/src/main/java/org/apache/brooklyn/core/internal/BrooklynInitialization.java @@ -73,10 +73,9 @@ public class BrooklynInitialization { @SuppressWarnings("deprecation") public synchronized static void reinitAll() { -if (done.compareAndSet(true, false)) { -org.apache.brooklyn.util.core.BrooklynLanguageExtensions.reinit(); -initAll(); -} +done.set(false); +org.apache.brooklyn.util.core.BrooklynLanguageExtensions.reinit(); +initAll(); } }
brooklyn-server git commit: Revert semantics of prepareForMasterUse in FileBasedObjectStore
Repository: brooklyn-server Updated Branches: refs/heads/master cbec083b1 -> f554e61fe Revert semantics of prepareForMasterUse in FileBasedObjectStore Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/f554e61f Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/f554e61f Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/f554e61f Branch: refs/heads/master Commit: f554e61fe622dcb3b05197246c11393891b5f67c Parents: cbec083 Author: Andrew Donald KennedyAuthored: Wed Jun 22 16:42:28 2016 -0700 Committer: Andrew Donald Kennedy Committed: Wed Jun 22 16:42:28 2016 -0700 -- .../core/mgmt/persist/FileBasedObjectStore.java | 33 ++-- 1 file changed, 16 insertions(+), 17 deletions(-) -- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/f554e61f/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/FileBasedObjectStore.java -- diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/FileBasedObjectStore.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/FileBasedObjectStore.java index e5fb831..9e6621a 100644 --- a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/FileBasedObjectStore.java +++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/FileBasedObjectStore.java @@ -33,18 +33,9 @@ import java.util.Date; import java.util.List; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicBoolean; import javax.annotation.Nullable; -import org.apache.brooklyn.api.mgmt.ManagementContext; -import org.apache.brooklyn.api.mgmt.ha.HighAvailabilityMode; -import org.apache.brooklyn.core.server.BrooklynServerConfig; -import org.apache.brooklyn.util.exceptions.Exceptions; -import org.apache.brooklyn.util.exceptions.FatalConfigurationRuntimeException; -import org.apache.brooklyn.util.io.FileUtil; -import org.apache.brooklyn.util.os.Os; -import org.apache.brooklyn.util.os.Os.DeletionResult; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,9 +47,15 @@ import com.google.common.collect.ImmutableList; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; -/** - * @author Andrea Turli - */ +import org.apache.brooklyn.api.mgmt.ManagementContext; +import org.apache.brooklyn.api.mgmt.ha.HighAvailabilityMode; +import org.apache.brooklyn.core.server.BrooklynServerConfig; +import org.apache.brooklyn.util.exceptions.Exceptions; +import org.apache.brooklyn.util.exceptions.FatalConfigurationRuntimeException; +import org.apache.brooklyn.util.io.FileUtil; +import org.apache.brooklyn.util.os.Os; +import org.apache.brooklyn.util.os.Os.DeletionResult; + public class FileBasedObjectStore implements PersistenceObjectStore { private static final Logger log = LoggerFactory.getLogger(FileBasedObjectStore.class); @@ -72,7 +69,7 @@ public class FileBasedObjectStore implements PersistenceObjectStore { private ManagementContext mgmt; private boolean prepared = false; private boolean deferredBackupNeeded = false; -private AtomicBoolean doneFirstContentiousWrite = new AtomicBoolean(false); +private boolean doneFirstContentiousWrite = false; /** * @param basedir @@ -92,9 +89,10 @@ public class FileBasedObjectStore implements PersistenceObjectStore { public File getBaseDir() { return basedir; } - -public void prepareForMasterUse() { -if (doneFirstContentiousWrite.getAndSet(true)) return; + +@Override +public synchronized void prepareForMasterUse() { +if (doneFirstContentiousWrite) return; try { if (deferredBackupNeeded) { // defer backup and path creation until first write @@ -105,11 +103,12 @@ public class FileBasedObjectStore implements PersistenceObjectStore { deferredBackupNeeded = false; } +doneFirstContentiousWrite = true; } catch (Exception e) { throw Exceptions.propagate(e); } } - + @Override public void createSubPath(String subPath) { if (!prepared) throw new IllegalStateException("Not yet prepared: "+this);
[2/2] brooklyn-server git commit: Closing #203
Closing #203 * github/pr/203: Fix usage of AtomicBooleas CAS idiom Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/cbec083b Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/cbec083b Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/cbec083b Branch: refs/heads/master Commit: cbec083b19433129afc7589b5b5112d34df3cd49 Parents: af4576d 08432be Author: Andrew Donald KennedyAuthored: Wed Jun 22 16:35:28 2016 -0700 Committer: Andrew Donald Kennedy Committed: Wed Jun 22 16:35:28 2016 -0700 -- .../core/internal/BrooklynInitialization.java | 23 +++-- .../brooklyn/core/location/PortRanges.java | 21 +--- .../mgmt/internal/LocalManagementContext.java | 36 +--- .../core/mgmt/persist/FileBasedObjectStore.java | 26 ++ .../brooklyn/entity/java/JavaAppUtils.java | 31 +++-- 5 files changed, 61 insertions(+), 76 deletions(-) --
[2/5] brooklyn-server git commit: Moved sensor feed for machine metrics to an EntityInitializer
Moved sensor feed for machine metrics to an EntityInitializer - Refactor MachineEntity to use new initializer - Configure enrichers for memory deltas - Update FeedSupport in AbstractEntity - Fix typos in AutoScalerPolicy Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/cc6c2a95 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/cc6c2a95 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/cc6c2a95 Branch: refs/heads/master Commit: cc6c2a952f35b9bc6cd317e021f8369344fce759 Parents: 7e54dfd Author: Andrew Donald KennedyAuthored: Thu Jun 16 08:12:45 2016 +0100 Committer: Andrew Donald Kennedy Committed: Wed Jun 22 12:56:36 2016 -0700 -- .../brooklyn/core/entity/AbstractEntity.java| 50 -- .../brooklyn/core/entity/EntityInternal.java| 19 ++- .../policy/autoscaling/AutoScalerPolicy.java| 4 +- .../entity/machine/AddMachineMetrics.java | 155 +++ .../entity/machine/MachineAttributes.java | 1 + .../brooklyn/entity/machine/MachineEntity.java | 8 - .../entity/machine/MachineEntityImpl.java | 97 ++-- .../software/base/SoftwareProcessImpl.java | 66 .../machine/MachineEntityEc2LiveTest.java | 12 +- 9 files changed, 255 insertions(+), 157 deletions(-) -- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/cc6c2a95/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java -- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java index e38343e..9c6cfcf 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java @@ -221,7 +221,7 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E private Collection policiesInternal = Lists.newCopyOnWriteArrayList(); private Collection enrichersInternal = Lists.newCopyOnWriteArrayList(); -Collection feeds = Lists.newCopyOnWriteArrayList(); +private Collection feedsInternal = Lists.newCopyOnWriteArrayList(); // FIXME we do not currently support changing parents, but to implement a cluster that can shrink we need to support at least // orphaning (i.e. removing ownership). This flag notes if the entity has previously had a parent, and if an attempt is made to @@ -249,6 +249,8 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E private final BasicGroupSupport groups = new BasicGroupSupport(); +private final BasicFeedSupport feeds = new BasicFeedSupport(); + /** * The config values of this entity. Updating this map should be done * via getConfig/setConfig. @@ -1664,9 +1666,8 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E * {@link BasicPolicySupport}. */ @Beta -// TODO revert to private when config() is reverted to return SensorSupportInternal public class BasicPolicySupport implements PolicySupportInternal { - + @Override public Iterator iterator() { return asList().iterator(); @@ -1692,11 +1693,11 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E LOG.debug("Removing "+old+" when adding "+policy+" to "+AbstractEntity.this); remove(old); } - + CatalogUtils.setCatalogItemIdOnAddition(AbstractEntity.this, policy); policiesInternal.add((AbstractPolicy)policy); ((AbstractPolicy)policy).setEntity(AbstractEntity.this); - + getManagementSupport().getEntityChangeListener().onPolicyAdded(policy); sensors().emit(AbstractEntity.POLICY_ADDED, new PolicyDescriptor(policy)); } @@ -1707,19 +1708,19 @@ public abstract class AbstractEntity extends AbstractBrooklynObject implements E add(policy); return policy; } - + @Override public boolean remove(Policy policy) { ((AbstractPolicy)policy).destroy(); boolean changed = policiesInternal.remove(policy); - + if (changed) { getManagementSupport().getEntityChangeListener().onPolicyRemoved(policy); sensors().emit(AbstractEntity.POLICY_REMOVED, new PolicyDescriptor(policy)); } return changed; } - + @Override public boolean removeAllPolicies() {
[4/5] brooklyn-server git commit: Changes based on review comments for machine metrics
Changes based on review comments for machine metrics - Move metrics enricher creation to init method of MachineEntity - Enqueue parallel task to stop process and feeds - Add helper method to create Task from Callable - Updated tests to check children of parallel stopping task Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/2d99fd4a Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/2d99fd4a Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/2d99fd4a Branch: refs/heads/master Commit: 2d99fd4add5fd3f8eb1dedecfe5d314193203ec2 Parents: aff1144 Author: Andrew Donald KennedyAuthored: Mon Jun 20 07:20:33 2016 -0700 Committer: Andrew Donald Kennedy Committed: Wed Jun 22 13:34:10 2016 -0700 -- .../brooklyn/core/entity/AbstractEntity.java| 33 + .../brooklyn/core/entity/EntityInternal.java| 6 +-- .../brooklyn/util/core/task/DynamicTasks.java | 4 +- .../apache/brooklyn/util/core/task/Tasks.java | 10 - .../entity/machine/MachineEntityImpl.java | 23 +++- .../software/base/SoftwareProcessImpl.java | 1 - .../MachineLifecycleEffectorTasks.java | 7 ++-- .../base/SoftwareProcessEntityTest.java | 39 +++- 8 files changed, 70 insertions(+), 53 deletions(-) -- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/2d99fd4a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java -- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java index 9c6cfcf..42919a6 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java @@ -27,6 +27,22 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.annotations.Beta; +import com.google.common.base.Function; +import com.google.common.base.Objects; +import com.google.common.base.Objects.ToStringHelper; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + import org.apache.brooklyn.api.effector.Effector; import org.apache.brooklyn.api.entity.Application; import org.apache.brooklyn.api.entity.Entity; @@ -100,21 +116,6 @@ import org.apache.brooklyn.util.core.task.DeferredSupplier; import org.apache.brooklyn.util.guava.Maybe; import org.apache.brooklyn.util.javalang.Equals; import org.apache.brooklyn.util.text.Strings; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.annotations.Beta; -import com.google.common.base.Function; -import com.google.common.base.Objects; -import com.google.common.base.Objects.ToStringHelper; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.common.collect.Sets; /** * Default {@link Entity} implementation, which should be extended whenever implementing an entity. @@ -144,7 +145,7 @@ import com.google.common.collect.Sets; * The legacy (pre 0.5) mechanism for creating entities is for others to call the constructor directly. * This is now deprecated. */ -public abstract class AbstractEntity extends AbstractBrooklynObject implements EntityLocal, EntityInternal { +public abstract class AbstractEntity extends AbstractBrooklynObject implements EntityInternal { private static final Logger LOG = LoggerFactory.getLogger(AbstractEntity.class); http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/2d99fd4a/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java -- diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java b/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java index 933390f..1f627ac 100644 --- a/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java +++ b/core/src/main/java/org/apache/brooklyn/core/entity/EntityInternal.java @@
[1/5] brooklyn-server git commit: Stop feeds when stopping software process
Repository: brooklyn-server Updated Branches: refs/heads/master 99d073f62 -> af4576d09 Stop feeds when stopping software process Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/aff11448 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/aff11448 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/aff11448 Branch: refs/heads/master Commit: aff1144845df3daca948f67b7fbff1352a490686 Parents: cc6c2a9 Author: Andrew Donald KennedyAuthored: Sun Jun 19 08:06:24 2016 -0700 Committer: Andrew Donald Kennedy Committed: Wed Jun 22 12:56:36 2016 -0700 -- .../MachineLifecycleEffectorTasks.java | 44 +--- 1 file changed, 29 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/aff11448/software/base/src/main/java/org/apache/brooklyn/entity/software/base/lifecycle/MachineLifecycleEffectorTasks.java -- diff --git a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/lifecycle/MachineLifecycleEffectorTasks.java b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/lifecycle/MachineLifecycleEffectorTasks.java index 4fb403d..8b1de62 100644 --- a/software/base/src/main/java/org/apache/brooklyn/entity/software/base/lifecycle/MachineLifecycleEffectorTasks.java +++ b/software/base/src/main/java/org/apache/brooklyn/entity/software/base/lifecycle/MachineLifecycleEffectorTasks.java @@ -28,15 +28,26 @@ import java.util.concurrent.Callable; import javax.annotation.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.common.annotations.Beta; +import com.google.common.base.Preconditions; +import com.google.common.base.Supplier; +import com.google.common.base.Suppliers; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Iterables; + import org.apache.brooklyn.api.effector.Effector; import org.apache.brooklyn.api.entity.Entity; import org.apache.brooklyn.api.location.Location; import org.apache.brooklyn.api.location.MachineLocation; import org.apache.brooklyn.api.location.MachineManagementMixins; +import org.apache.brooklyn.api.location.MachineManagementMixins.SuspendsMachines; import org.apache.brooklyn.api.location.MachineProvisioningLocation; import org.apache.brooklyn.api.location.NoMachinesAvailableException; -import org.apache.brooklyn.api.location.MachineManagementMixins.SuspendsMachines; import org.apache.brooklyn.api.mgmt.Task; +import org.apache.brooklyn.api.sensor.Feed; import org.apache.brooklyn.config.ConfigKey; import org.apache.brooklyn.core.config.ConfigKeys; import org.apache.brooklyn.core.config.Sanitizer; @@ -62,24 +73,14 @@ import org.apache.brooklyn.entity.machine.MachineInitTasks; import org.apache.brooklyn.entity.machine.ProvidesProvisioningFlags; import org.apache.brooklyn.entity.software.base.SoftwareProcess; import org.apache.brooklyn.entity.software.base.SoftwareProcess.RestartSoftwareParameters; -import org.apache.brooklyn.entity.software.base.SoftwareProcess.StopSoftwareParameters; import org.apache.brooklyn.entity.software.base.SoftwareProcess.RestartSoftwareParameters.RestartMachineMode; +import org.apache.brooklyn.entity.software.base.SoftwareProcess.StopSoftwareParameters; import org.apache.brooklyn.entity.software.base.SoftwareProcess.StopSoftwareParameters.StopMode; import org.apache.brooklyn.entity.stock.EffectorStartableImpl.StartParameters; -import org.apache.brooklyn.util.collections.MutableSet; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.annotations.Beta; -import com.google.common.base.Preconditions; -import com.google.common.base.Supplier; -import com.google.common.base.Suppliers; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.Iterables; - import org.apache.brooklyn.location.localhost.LocalhostMachineProvisioningLocation; import org.apache.brooklyn.location.ssh.SshMachineLocation; import org.apache.brooklyn.util.collections.MutableMap; +import org.apache.brooklyn.util.collections.MutableSet; import org.apache.brooklyn.util.core.config.ConfigBag; import org.apache.brooklyn.util.core.task.DynamicTasks; import org.apache.brooklyn.util.core.task.Tasks; @@ -709,9 +710,11 @@ public abstract class MachineLifecycleEffectorTasks { DynamicTasks.queue("pre-stop", new PreStopCustomTask()); Maybe machine = Machines.findUniqueMachineLocation(entity().getLocations()); -Task stoppingProcess = null; +Task stoppingProcess = null; if (canStop(stopProcessMode, entity())) { -
[2/3] brooklyn-docs git commit: Address review comments
Address review comments Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/f6e1f4a4 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/f6e1f4a4 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/f6e1f4a4 Branch: refs/heads/master Commit: f6e1f4a4403251a272999036cee22b8eede7ee54 Parents: 07101c4 Author: Richard DownerAuthored: Tue Jun 21 12:14:35 2016 +0100 Committer: Richard Downer Committed: Tue Jun 21 12:14:35 2016 +0100 -- guide/ops/requirements.md | 30 +-- guide/ops/starting-stopping-monitoring.md | 33 +++--- 2 files changed, 43 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/f6e1f4a4/guide/ops/requirements.md -- diff --git a/guide/ops/requirements.md b/guide/ops/requirements.md index d7b7c55..86a186a 100644 --- a/guide/ops/requirements.md +++ b/guide/ops/requirements.md @@ -23,22 +23,24 @@ any binaries for custom blueprints/integrations. There are three main consumers of disk space: -* **Static files**: these are the Apache Brooklyn files themselves, plus - binaries for custom blueprints and integrations added to the `lib` directory. +* **Static files**: these are the Apache Brooklyn distribution with its own + dependencies, plus binaries for custom blueprints and integrations added to + the `lib` directory. Note that Brooklyn requires that Java is installed which + you may have to consider when calculating disk space requirements. * **Persisted state**: when using [Persistence](persistence/index.html) -- which is a prerequisite for [High Availability](high-availability.html) -- Brooklyn will save data to a store location. Items in the persisted state include metadata about the Brooklyn servers, catalog items, and metadata about all running applications and entities. -* **Log files**: Brooklyn writes detailed log files by default to its own - installation directory. This can be reconfigured to change the destination - files, and increase or decrease the detail of the logs. See the - [Logging](logging.html) page for more details. - +* **Log files**: Brooklyn writes info and debug log files. By default, these are + written to the local filesystem. This can be reconfigured to set the + destination and to increase or decrease the detail in the logs. See the + [Logging](logging.html) section for more details. The Apache Brooklyn distribution itself, when unpacked, consumes approximately -75MB of disk space. The space consumed by additional binaries for custom -blueprints and integrations is application-specific. +75MB of disk space. This includes everything needed to run Brooklyn except for a +Java VM. The space consumed by additional binaries for custom blueprints and +integrations is application-specific. Persisted state, excluding catalog data, is relatively small, starting at approximately 300KB for a clean, idle Brooklyn server. Deploying blueprints will @@ -50,17 +52,21 @@ Log data can be a large consumer of disk space. By default Brooklyn generates two logfiles, one which logs notable information only, and another which logs at a debug level. Each logfile rotates when it hits a size of 100MB; a maximum of 10 log files are retained for each type. The two logging streams combined, -therefore, can consume up to 2GB of disk space. In the default configuration +therefore, can consume up to 2GB of disk space. + +In the default configuration of Brooklyn's `.tar.gz` and `.zip` distributions, logs are saved to the Brooklyn installation directory. You will most likely want to [reconfigure Brooklyn's logging](logging.html) to save logs to a location -elsewhere, and to rotate logs according to your organisation's policy. +elsewhere. In the `.rpm` and `.deb` packaging, logging files will be located +under `/var/log`. You can further reconfiguring the logging detail level and log +rotation according to your organisation's policy. ## Supported Operating Systems The recommended operating system is CentOS 6.x or RedHat 6.x. -Brooklyn has also been tested on Ubuntu 12.04 and OS X. +Brooklyn has also been tested on Ubuntu 14.04 and OS X. ## Software Requirements http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/f6e1f4a4/guide/ops/starting-stopping-monitoring.md -- diff --git a/guide/ops/starting-stopping-monitoring.md b/guide/ops/starting-stopping-monitoring.md index 6dee806..ffd9084 100644 --- a/guide/ops/starting-stopping-monitoring.md +++ b/guide/ops/starting-stopping-monitoring.md @@ -7,8 +7,21 @@ layout:
[3/3] brooklyn-docs git commit: This closes #79
This closes #79 Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/3b93cf9d Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/3b93cf9d Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/3b93cf9d Branch: refs/heads/master Commit: 3b93cf9d85b412ea24414386073a2adb7a79c021 Parents: 4cfb123 f6e1f4a Author: Aled SageAuthored: Wed Jun 22 20:57:26 2016 +0100 Committer: Aled Sage Committed: Wed Jun 22 20:57:26 2016 +0100 -- guide/ops/index.md| 1 + guide/ops/requirements.md | 45 +- guide/ops/starting-stopping-monitoring.md | 83 ++ 3 files changed, 128 insertions(+), 1 deletion(-) --
[1/2] brooklyn-server git commit: TestSshCommand checks all assertions rather than throwing first
Repository: brooklyn-server Updated Branches: refs/heads/master 004c6c1f0 -> 99d073f62 TestSshCommand checks all assertions rather than throwing first Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/c6266dde Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/c6266dde Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/c6266dde Branch: refs/heads/master Commit: c6266dde407756b93a06e037928371bd30f944ca Parents: 004c6c1 Author: Sam CorbettAuthored: Wed Jun 22 10:22:28 2016 +0100 Committer: Sam Corbett Committed: Wed Jun 22 10:22:28 2016 +0100 -- .../brooklyn/test/framework/TestFrameworkAssertions.java| 9 + .../apache/brooklyn/test/framework/TestSshCommandImpl.java | 8 +--- 2 files changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c6266dde/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java -- diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java index bc358f8..7f1406c 100644 --- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java +++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestFrameworkAssertions.java @@ -155,6 +155,15 @@ public class TestFrameworkAssertions { } } +public static void checkActualAgainstAssertions(AssertionSupport support, +Map assertions, String target, T actual) { +try { +checkActualAgainstAssertions(assertions, target, actual); +} catch (Throwable t) { +support.fail(t); +} +} + public static void checkActualAgainstAssertions(Map assertions, String target, T actual) { for (Map.Entry assertion : assertions.entrySet()) { http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/c6266dde/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSshCommandImpl.java -- diff --git a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSshCommandImpl.java b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSshCommandImpl.java index 3d2ae02..c65f4f9 100644 --- a/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSshCommandImpl.java +++ b/test-framework/src/main/java/org/apache/brooklyn/test/framework/TestSshCommandImpl.java @@ -197,15 +197,17 @@ public class TestSshCommandImpl extends TargetableTestComponentImpl implements T LOG.debug("{}, Result is {}\nwith output [\n{}\n] and error [\n{}\n]", new Object[] { this, result.getExitCode(), shorten(result.getStdout()), shorten(result.getStderr()) }); +TestFrameworkAssertions.AssertionSupport support = new TestFrameworkAssertions.AssertionSupport(); for (Map assertion : exitCodeAssertions()) { -checkActualAgainstAssertions(assertion, "exit code", result.getExitCode()); +checkActualAgainstAssertions(support, assertion, "exit code", result.getExitCode()); } for (Map assertion : getAssertions(this, ASSERT_OUT)) { -checkActualAgainstAssertions(assertion, "stdout", result.getStdout()); +checkActualAgainstAssertions(support, assertion, "stdout", result.getStdout()); } for (Map assertion : getAssertions(this, ASSERT_ERR)) { -checkActualAgainstAssertions(assertion, "stderr", result.getStderr()); +checkActualAgainstAssertions(support, assertion, "stderr", result.getStderr()); } +support.validate(); } private Result executeDownloadedScript(SshMachineLocation machineLocation, String url, String scriptPath, Map env) {
[2/2] brooklyn-server git commit: This closes #213
This closes #213 TestSshCommand checks all assertions rather than throwing first Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/99d073f6 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/99d073f6 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/99d073f6 Branch: refs/heads/master Commit: 99d073f620a8186b3e896dd9ce8fecb2dab5d0a9 Parents: 004c6c1 c6266dd Author: Sam CorbettAuthored: Wed Jun 22 11:24:51 2016 +0100 Committer: Sam Corbett Committed: Wed Jun 22 11:24:51 2016 +0100 -- .../brooklyn/test/framework/TestFrameworkAssertions.java| 9 + .../apache/brooklyn/test/framework/TestSshCommandImpl.java | 8 +--- 2 files changed, 14 insertions(+), 3 deletions(-) --