Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
import groovy.json.JsonOutput | |
import groovy.json.JsonSlurper | |
//Simple example to show patching a container with new environment variables - need to have oc login before... :) | |
def dcToUpdate = "kie-app-postgresql" | |
def newEnvVars = [[name:"GROOVY_ROCKS", value: "true"], [name: "LOVE_OPENSHIFT", value: "of course"]] | |
def currentDC = new JsonSlurper().parseText(["oc", "get" , "dc" , dcToUpdate ,"-o" ,"json"].execute().text) | |
def containers = currentDC.spec.template.spec.containers | |
//add new env vars to container definition |
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23