in src/index.ts [196:223]
createBrowserResource(options: IResourceDefinitionProps, image: string) {
// Env parameters configured to connect back to selenium hub when new nodes gets added
var service = this.createService({
resource: options,
env: {
HUB_PORT_4444_TCP_ADDR: options.loadBalancer.loadBalancerDnsName,
HUB_PORT_4444_TCP_PORT: '4444',
NODE_MAX_INSTANCES: this.seleniumNodeMaxInstances.toString(),
NODE_MAX_SESSION: this.seleniumNodeMaxSessions.toString(),
SE_OPTS: '-debug',
shm_size: '512',
},
image: image+':'+this.seleniumVersion,
entryPoint: ['sh', '-c'],
command: ["PRIVATE=$(curl -s http://169.254.170.2/v2/metadata | jq -r '.Containers[0].Networks[0].IPv4Addresses[0]') ; export REMOTE_HOST=\"http://$PRIVATE:5555\"; export SE_OPTS=\"-host $PRIVATE -port 5555\" ; /opt/bin/entry_point.sh"],
});
// Create autoscaling policy
this.createScalingPolicy({
clusterName: options.cluster.clusterName,
serviceName: service.serviceName,
identifier: options.identifier,
stack: options.stack,
minInstances: options.minInstances,
maxInstances: options.maxInstances
});
}