You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by sjcorbett <gi...@git.apache.org> on 2014/06/23 14:14:49 UTC

[GitHub] incubator-brooklyn pull request: Server pool entity

GitHub user sjcorbett opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/6

    Server pool entity

    See comments on https://github.com/brooklyncentral/brooklyn/pull/1480

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sjcorbett/incubator-brooklyn feature/server-pool

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/6.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6
    
----
commit f45e58fab648659da2182d6792abd1d6b7f6c709
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-06-17T13:11:53Z

    Server pool entity

commit 12bdea9c13c24e7546a919c5343e0becf7d27f5c
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-06-18T17:15:00Z

    Adds MachineEntity class for use in server pools

commit 3eb9f4dc06dbfd140e8e67b0bcf90ff9ec350cd3
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-06-19T13:27:06Z

    Server pool tests use EmptySoftwareProcesses as the pool member spec

commit 45f076a80425f0baa66c295eaacd70249d92495a
Author: Andrew Kennedy <an...@cloudsoftcorp.com>
Date:   2014-06-19T22:26:55Z

    Update MachineEntity with attributes class from Docker

commit 0acbc5a54e9c1c9be65a01a4ed36530d4f383bb8
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date:   2014-06-20T13:37:24Z

    Addresses server pool review comments

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Server pool entity

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/6#discussion_r14073455
  
    --- Diff: software/base/src/main/java/brooklyn/entity/machine/MachineAttributes.java ---
    @@ -0,0 +1,83 @@
    +/*
    + * Copyright 2014 by Cloudsoft Corporation Limited
    --- End diff --
    
    Not copyright cloudsoft. We'll use the header described in http://www.apache.org/legal/src-headers.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Server pool entity

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/6#discussion_r14073494
  
    --- Diff: software/base/src/main/java/brooklyn/entity/machine/MachineEntityImpl.java ---
    @@ -0,0 +1,155 @@
    +package brooklyn.entity.machine;
    +
    +import java.util.List;
    +import java.util.concurrent.TimeoutException;
    +
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +import brooklyn.entity.basic.EmptySoftwareProcessDriver;
    +import brooklyn.entity.basic.SoftwareProcessImpl;
    +import brooklyn.entity.software.SshEffectorTasks;
    +import brooklyn.event.feed.ssh.SshFeed;
    +import brooklyn.event.feed.ssh.SshPollConfig;
    +import brooklyn.event.feed.ssh.SshPollValue;
    +import brooklyn.location.basic.Machines;
    +import brooklyn.location.basic.SshMachineLocation;
    +import brooklyn.util.exceptions.Exceptions;
    +import brooklyn.util.task.DynamicTasks;
    +import brooklyn.util.task.system.ProcessTaskWrapper;
    +import brooklyn.util.text.Strings;
    +import brooklyn.util.time.Duration;
    +
    +import com.google.common.base.Function;
    +import com.google.common.base.Functions;
    +import com.google.common.base.Splitter;
    +
    +public class MachineEntityImpl extends SoftwareProcessImpl implements MachineEntity {
    +
    +    private static final Logger LOG = LoggerFactory.getLogger(MachineEntityImpl.class);
    +
    +    static {
    +    	MachineAttributes.init();
    +    }
    +
    +    private transient SshFeed sensorFeed;
    +
    +    @Override
    +    public void init() {
    +        LOG.info("Starting server pool machine with id {}", getId());
    +    }
    +
    +    @Override
    +    protected void connectSensors() {
    +        super.connectSensors();
    +        connectServiceUpIsRunning();
    +
    +        // Sensors linux-specific
    +        if (!getMachine().getMachineDetails().getOsDetails().isLinux()) return;
    +
    +        sensorFeed = SshFeed.builder()
    +                .entity(this)
    +                .period(Duration.THIRTY_SECONDS)
    +                .poll(new SshPollConfig<Double>(LOAD_AVERAGE)
    +                		.command("uptime")
    --- End diff --
    
    Strange indents - uses tabs


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Server pool entity

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/6#issuecomment-46857461
  
    Merged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Server pool entity

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/6#issuecomment-46851979
  
    +1 will merge


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Server pool entity

Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/6


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---