brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zaid Mohsin <zaid.moh...@cloudsoftcorp.com>
Subject Opening up port ranges in Brooklyn
Date Mon, 06 Oct 2014 14:08:23 GMT
Hi,
I’ve been trying to open a range of ports in the configuration (e.g. open up ports on Ec2
security groups), but could not know how exactly? There is an example of this in CouchbaseNodeImpl:

   @Override
    protected Collection<Integer> getRequiredOpenPorts() {
        // TODO this creates a huge list of inbound ports; much better to define on a security
group using range syntax!
        int erlangRangeStart = getConfig(NODE_DATA_EXCHANGE_PORT_RANGE_START).iterator().next();
        int erlangRangeEnd = getConfig(NODE_DATA_EXCHANGE_PORT_RANGE_END).iterator().next();

        Set<Integer> newPorts = MutableSet.<Integer>copyOf(super.getRequiredOpenPorts());
        newPorts.remove(erlangRangeStart);
        newPorts.remove(erlangRangeEnd);
        for (int i = erlangRangeStart; i <= erlangRangeEnd; i++)
            newPorts.add(i);
        return newPorts;
    }


but when I tried it in my entity, it didn’t work. Any thoughts?

Regards

Mime
View raw message