brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [6/9] incubator-brooklyn git commit: add nginx yaml sample, and prevent multiple feeds getting added
Date Mon, 15 Dec 2014 16:57:33 GMT
add nginx yaml sample, and prevent multiple feeds getting added


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/f287705d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/f287705d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/f287705d

Branch: refs/heads/master
Commit: f287705d5e075e9021414d08ce577ccaea157c2d
Parents: a952d6b
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Mon Dec 8 10:32:04 2014 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Fri Dec 12 13:54:55 2014 +0000

----------------------------------------------------------------------
 .../brooklyn/entity/proxy/nginx/NginxControllerImpl.java    | 4 ++--
 usage/launcher/src/test/resources/nginx.yaml                | 9 +++++++++
 usage/launcher/src/test/resources/web.yaml                  | 2 +-
 3 files changed, 12 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f287705d/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxControllerImpl.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxControllerImpl.java
b/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxControllerImpl.java
index ef5e99a..3c77fb7 100644
--- a/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxControllerImpl.java
+++ b/software/webapp/src/main/java/brooklyn/entity/proxy/nginx/NginxControllerImpl.java
@@ -109,7 +109,7 @@ public class NginxControllerImpl extends AbstractControllerImpl implements
Nginx
         ConfigToAttributes.apply(this);
 
         // "up" is defined as returning a valid HTTP response from nginx (including a 404
etc)
-        httpFeed = HttpFeed.builder()
+        httpFeed = addFeed(HttpFeed.builder()
                 .uniqueTag("nginx-poll")
                 .entity(this)
                 .period(getConfig(HTTP_POLL_PERIOD))
@@ -126,7 +126,7 @@ public class NginxControllerImpl extends AbstractControllerImpl implements
Nginx
                                     return actual != null && actual.size() == 1;
                                 }})
                         .setOnException(false))
-                .build();
+                .build());
         
         if (!Lifecycle.RUNNING.equals(getAttribute(SERVICE_STATE_ACTUAL))) {
             // TODO when updating the map, if it would change from empty to empty on a successful
run

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f287705d/usage/launcher/src/test/resources/nginx.yaml
----------------------------------------------------------------------
diff --git a/usage/launcher/src/test/resources/nginx.yaml b/usage/launcher/src/test/resources/nginx.yaml
new file mode 100644
index 0000000..47a846e
--- /dev/null
+++ b/usage/launcher/src/test/resources/nginx.yaml
@@ -0,0 +1,9 @@
+name: Sample Nginx on SSL
+location: localhost
+services:
+- type: brooklyn.entity.proxy.nginx.NginxController
+  ssl:
+    certificateDestination: /tmp/server.crt
+    keyDestination: /tmp/server.key
+  httpsPort: 8443+
+# normally also specify a group, pointing at a web app; or use controlled dynamic web app
cluster

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/f287705d/usage/launcher/src/test/resources/web.yaml
----------------------------------------------------------------------
diff --git a/usage/launcher/src/test/resources/web.yaml b/usage/launcher/src/test/resources/web.yaml
index ccebc15..00edf4e 100644
--- a/usage/launcher/src/test/resources/web.yaml
+++ b/usage/launcher/src/test/resources/web.yaml
@@ -16,7 +16,7 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-name: Storm Sample App
+name: Sample Web App
 services:
 - serviceType: brooklyn.entity.webapp.ControlledDynamicWebAppCluster
   name: Analytics Web App


Mime
View raw message