Add invoker to already deployed OpenWhisk - openwhisk

I've an OpenWhisk instance running on my Ubuntu server.
How can I deploy a new invoker on another machine which will function as an invoker of the current system?

This is as simple as running another Invoker instance with a unique ID. Invokers register automatically with the controller via Kafka, the health topic. This is the Docker's cmd instruction you could use:
"cmd": "/bin/sh -c \"/invoker/bin/invoker `hostname | tr -dc '0-9'` >> /dev/stderr\""

Related

Creating a multi headnode hpc cluster

I have a HPC cluster where several webapps are installed in docker containers, the queue is managed using Torque. Every app submits job to the HPC cluster connecting to it through ssh and then running qsub: ssh user#cluster qsub bla blabla. There are shared folder for exchanging data.
I am not satisfied with this setup and I'd like to know if it is possible to have a masternode running on each docker and using qsub directly inside it without doing an ssh connection. I'd prefer to use torque but I am open to other solutions.
Torque permits multiple submission hosts.
The names or addresses of the hosts should be added to submit_hosts variable in Torque server configuration here is a relevant page from the manual.
qmgr -c 'set server submit_hosts = headnode'
qmgr -c 'set server submit_hosts += app1'
qmgr -c 'set server submit_hosts += app2'
Assuming app1 and app2 are domain names of the docker containers. You will need to configure name resolution.
For more details and other options see Torque manual.

Can I use named pipes inside containers?

I am trying to use named pipes for inter-process communication inside a docker container but am getting "not found" errors when trying to read/write. Does docker for windows support named pipes? The software's been released and I know it works fine in VMs. I just can't find anything saying yes or no that containers on windows support named pipes.
I've got an IIS application with a named pipe binding installed inside the container along with a client application also inside the container trying to communicate via net.pipe://localhost. My run command looks like this
docker run -it -m 2GB -p 80:80 --network External company/appserver
The error message is
The pipe endpoint 'net.pipe://localhost/WCFSvc/WCF.svc' could not be
found on your local machine
You can mount named pipes into Docker containers, but this only works on Windows Server 1709 and later. I put an example in my blog post: https://blog.docker.com/2017/09/docker-windows-server-1709/
docker run -d -p 8080:8080 -v \\.\pipe\docker_engine:\\.\pipe\docker_engine friism/jenkins

How can I push .Net Framework API to PCF?

I am trying to push my .Net Native API to Pivotal Cloud Foundry. Below is the command I am giving for pushing my API.
cf push API-Name -s windows2012R2 -b binary_buildpack -c "start" -m 1G -p C:/Path
While running it will say "No start command detected" but when I did -c ? it showed me that start was a command. Then when I look at the log file it will show me:
ERR Could not determine a start command. Use the -c flag to 'cf push' to specify a custom start command.
and at the end it will say:
ERR Failed to create container
"reason"=>"CRASHED", "exit_description"=>"failed to initialize container"
Am I running the command wrong or is there something I need to do to my API to make it compatible?
I figured out that I had to set the health check off and my app and all instances are started now.
cf set-health-check NAME none

how to check the Jboss (EAP 7) server running status via shell script

I have multiple jboss instance on a particular linux box . I don't want to grep the process id of jboss instance and listen port .Is there any work around from server.log or CLI command ?
In addition to the Panagiotis ChavariotiĀ“s answer, the status of the application component also can be checked with the commands which are handy.
To check if JBoss server is started:
$JBOSS_HOME/bin/jboss-cli.sh -c --commands="read-attribute server-state"
To check if application is started:
$JBOSS_HOME/bin/jboss-cli.sh -c --commands="cd deployment,cd myapp.war, read-attribute status"
example:
$JBOSS_HOME/bin/jboss-cli.sh -c
'/host=sandbox/server=server1:readattribute(name=server-state)'
Try the following CLI command:
$JBOSS_HOME/bin/jboss-cli.sh -c
'/host=<HOSTNAME>/server=<SERVERNAME>:readattribute(name=server-state)'

bluemix service creation timing out in DevOps Services

With Bluemix DevOps Services I want a deploy script that will always create a new service instance (for example I am deploying to QA stack).
My deploy script looks something like this:
echo "Deleting app ${CF_APP}"
cf delete "${CF_APP}" -f -r
if cf services | grep "Insights for Twitter-test" -q
then
echo "Twitter Service found, deleting in order to create a new one."
cf delete-service "Insights for Twitter-test" -f
else
echo "Twitter Service doesn't exist yet, will create new one."
fi
echo "Creating new service instance for Twitter"
cf create-service twitterinsights Free "Insights for Twitter-test"
echo "Pushing app ${CF_APP}"
cf push "${CF_APP}"
Everytime I run it, the service creation part times out:
Server error, status code: 504, error code: 10001, message: Service instance Insights for Twitter-test: The request to the service broker timed out: https://provision-broker.ng.bluemix.net/bmx/provisioning/brokers/832dfb83-50e9-42b5-9516-ac54ab1eeaf4/v2/service_instances/c3a42482-398c-4148-bacb-297c1f6670ef?accepts_incomplete=true&plan_id=a888c333-41b6-4384-97d1-f89d11d48be9&service_id=4176989f-0bf7-4cf2-987a-6a57320744d1
If I manually run this script with the CF CLI it works fine. Only in DevOps Services does the service creation time out.
For the moment I am not concerned with the fact that the Twitter service doesn't have any state, and that I might as well leave it. Imagine a database service instead, that I want to ensure has been create anew.
Any and all help is appreciated.

Resources