Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

cloudbreak shell process cmdfile output

Solved Go to solution

cloudbreak shell process cmdfile output

Does cloudbreak shell provide a mechanism for automation i.e on executing below -- is it possible to "echo" the response to stdout ?

java -jar /tmp/cloudbreak-shell.jar --sequenceiq.user=admin@example.com --sequenceiq.password=passowrd --identity.address=https://XX.XX.XX.XX/identity --cloudbreak.address=https://XX.XX.XX.XX --cert.validation=false --cmdfile /tmp/cmdfile

This is what I am trying to achieve via automation

1] Send cmdfile with "credential list" -- This should return me the list of credentials

2] If my credential is not present send another cmdfile for "credential create"

The problem here is when I am running cloudbreak-shell via --cmdfile , the response of command is not re-directed to the stdout so unable to go this route.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: cloudbreak shell process cmdfile output

Expert Contributor
@Santhosh B Gowda

echo "credential list " | java -jar cloudbreak-shell.jar --sequenceiq.user=${cloudbreak-user} --sequenceiq.password=${cloudbreak-passwrod} --identity.address=https://${cloudbreak-ip}/identity --cloudbreak.address=https://${cloudbreak-ip} --cert.validation=false >> /tmp/output.log

Br,

R

2 REPLIES 2

Re: cloudbreak shell process cmdfile output

Expert Contributor
@Santhosh B Gowda

echo "credential list " | java -jar cloudbreak-shell.jar --sequenceiq.user=${cloudbreak-user} --sequenceiq.password=${cloudbreak-passwrod} --identity.address=https://${cloudbreak-ip}/identity --cloudbreak.address=https://${cloudbreak-ip} --cert.validation=false >> /tmp/output.log

Br,

R

Re: cloudbreak shell process cmdfile output

@rdoktorics thanks , this works !

Don't have an account?
Coming from Hortonworks? Activate your account here