Set the necessary properties for Akka clustering to work in the controller
ShardingContainerPoolBalancer expects the controllers to be clustered
via Akka and we weren't doing that. Oops.
diff --git a/larger.env b/larger.env
index e330bd3..11a55fa 100644
--- a/larger.env
+++ b/larger.env
@@ -4,7 +4,7 @@
CONTROLLER_JAVA_OPTS=-Xmx1g
CONTROLLER_HA=TRUE
CONTROLLER_LOCALBOOKKEEPING=FALSE
-AKKA_CLUSTER_SEED_NODES=controller-0.controller controller-1.controller
+AKKA_CLUSTER_SEED_NODES=controller-0.controller:2551 controller-1.controller:2551
INVOKER_INSTANCES=3
INVOKER_MEMORY_REQUEST=2Gi
diff --git a/persistent-template.yml b/persistent-template.yml
index 5bfc818..26700d2 100644
--- a/persistent-template.yml
+++ b/persistent-template.yml
@@ -42,7 +42,7 @@
required: true
- name: AKKA_CLUSTER_SEED_NODES
description: Hostnames of akka seed nodes
- value: "controller-0.controller controller-1.controller"
+ value: "controller-0.controller:2551"
required: true
- name: INVOKER_INSTANCES
description: The desired number of invokers
@@ -615,11 +615,13 @@
containers:
- name: controller
imagePullPolicy: IfNotPresent
- image: controller:${OPENWHISK_VERSION}
- command: ["/bin/bash", "-c", "COMPONENT_NAME=$(hostname | cut -d'-' -f2) /init.sh `hostname | cut -d'-' -f2`"]
+ image: projectodd/controller:${OPENWHISK_VERSION}
+ command: ["/bin/bash", "-c", "COMPONENT_NAME=$(hostname | cut -d'-' -f2) CONFIG_akka_remote_netty_tcp_hostname=$(hostname).controller /init.sh `hostname | cut -d'-' -f2`"]
ports:
- name: controller
containerPort: 8080
+ - name: akka
+ containerPort: 2551
resources:
requests:
memory: ${CONTROLLER_MEMORY_REQUEST}
@@ -638,6 +640,12 @@
value: ${AKKA_CLUSTER_SEED_NODES}
- name: "CONFIG_akka_actor_provider"
value: "cluster"
+ - name: "CONFIG_akka_remote_netty_tcp_bindPort"
+ value: "2551"
+ - name: "CONFIG_akka_remote_netty_tcp_port"
+ value: "2551"
+ - name: "CONFIG_whisk_loadbalancer_invokerBusyThreshold"
+ value: "${INVOKER_MAX_CONTAINERS}"
# extra JVM arguments
- name: "JAVA_OPTS"
diff --git a/template.yml b/template.yml
index 69a79a0..97b2ad0 100644
--- a/template.yml
+++ b/template.yml
@@ -600,11 +600,13 @@
containers:
- name: controller
imagePullPolicy: IfNotPresent
- image: controller:${OPENWHISK_VERSION}
- command: ["/bin/bash", "-c", "COMPONENT_NAME=$(hostname | cut -d'-' -f2) /init.sh `hostname | cut -d'-' -f2`"]
+ image: projectodd/controller:${OPENWHISK_VERSION}
+ command: ["/bin/bash", "-c", "COMPONENT_NAME=$(hostname | cut -d'-' -f2) CONFIG_akka_remote_netty_tcp_hostname=$(hostname).controller /init.sh `hostname | cut -d'-' -f2`"]
ports:
- name: controller
containerPort: 8080
+ - name: akka
+ containerPort: 2551
resources:
requests:
memory: ${CONTROLLER_MEMORY_REQUEST}
@@ -623,6 +625,12 @@
value: ${AKKA_CLUSTER_SEED_NODES}
- name: "CONFIG_akka_actor_provider"
value: "cluster"
+ - name: "CONFIG_akka_remote_netty_tcp_bindPort"
+ value: "2551"
+ - name: "CONFIG_akka_remote_netty_tcp_port"
+ value: "2551"
+ - name: "CONFIG_whisk_loadbalancer_invokerBusyThreshold"
+ value: "${INVOKER_MAX_CONTAINERS}"
# extra JVM arguments
- name: "JAVA_OPTS"