Member since
02-15-2017
6
Posts
0
Kudos Received
0
Solutions
03-01-2017
10:04 PM
Thanks @fschneider! I was doing role based credentials and I was able to get around with error, but I had to put the access keys in the profile file. If I don't do it, I always get the error. From my previous steps I realized I forgot to add policy for the user Thanks & Regards Atul Aggarwal
... View more
02-28-2017
08:59 PM
thanks @fschneider! I am trying to follow the steps you gave. It is almost what I did for role based credentials, except I didnt have assigned user the assume role policy. But I think hortonworks S3 is not working from past couple of hours for me to try it again after the recommendations. This is giving me internal error. curl -Ls s3.amazonaws.com/public-repo-1.hortonworks.com/HDP/cloudbreak/cloudbreak-deployer_1.6.3_$(uname)_x86_64.tgz I will try when this will start working. Thanks & Regards,
Atul Aggarwal
... View more
02-28-2017
06:58 AM
Hi, I am trying to do something very basic in cloudbreak and am keep getting this error and hence I am wondering if someone can point me in right direction. I am trying to add credentials in cloudbreak for cluster provisioning. So far I have done is that I have created a aws instance for cloudbreak with user x in aws Created a IAM user=cloudbreak and IAM role (role definition below) and created instance profile for IAM role. Assign the instance profile to the cloudbreak instance Setted up cloudbreak following the documentations on the instance from #1 Now I want to add credential in cloudbreak with roleArn as what I created in #2 and I have added aws_access_key and aws_secret_key of user from #2 to the environment and in the Profile file. Ran cbd generate and cbd start afterwards from cbd shell/web ui when I try to add credentials as mentioned in CBD shell command below. But I keep getting the error that key and secret environment variables not set. I have verified that cbd environment show command does list them correctly. Also I tried overwriting docker-compose.yml to set those variables explicitly in cloudbreak/environment section. But when I do cbd kill and cbd start, it force me to run cbd regenerate and if I do that then I lose what I set explicitly This is how my role looks like
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Principal": {
"AWS": "${aws_iam_user.cloudbreak.arn}"
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "provision-ambari"
}
}
}
]
}
CBD Shell Command
credential create --AWS --name cloudbreak --roleArn "arn:aws:iam::xxxx:role/cloudbreak-access" --accessKey xxxxx --secretKey "xxxxxx" --sshKeyString "xxxxx" --publicInAccount true
Command failed java.lang.RuntimeException: Failed to verify the credential: Could not verify credential [credential: 'cloudbreak'], detailed message: The 'AWS_ACCESS_KEY_ID' and 'AWS_SECRET_ACCESS_KEY' environment variables must be set or an instance profile role should be available. I have been stuck on this for few days now. Any help around this will be really appreciated. Thanks & Regards, Atul Aggarwal
... View more
Labels:
- Labels:
-
Hortonworks Cloudbreak
02-15-2017
05:54 PM
Woohoo! thanks @khorvath!
... View more
02-15-2017
12:54 AM
Hi, I am trying to understand REST Api for cloudbreak and I am trying to list stacks I created on cloudbreak using the API call. But it always giving me 404 not found. This is how I get the token (ref: https://community.hortonworks.com/questions/26536/cloudbreak-rest-api-usage.html): curl -iX POST -H "accept: application/x-www-form-urlencoded" -d 'credentials={"username":"admin@example.com","password":"cloudbreak"}' "http://localhost:8089/oauth/authorize?response_type=token&client_id=cloudbreak_shell&scope.0=openid&source=login&redirect_uri=http://cloudbreak.shell" Once I have token I am trying to get list of stacks as curl -vvv -X GET -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" http://localhost:8080/api/v1/stacks/3 * About to connect() to localhost port 8080 (#0) * Trying ::1... * Connected to localhost (::1) port 8080 (#0) > GET /api/v1/stacks/3 HTTP/1.1 > User-Agent: curl/7.29.0 > Host: localhost:8080 > Accept: */* > Authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiJhMDRiZmYyOWY0YzQ0NGYzYWFlNGNlNjI2NzYyMjBiNCIsInN1YiI6ImIxMzk1NDU3LWNlYjYtNDZlMC1hOWZlLTU2NGE3NTU0N2RhMSIsInNjb3BlIjpbImNsb3VkYnJlYWsubmV0d29ya3MucmVhZCIsImNsb3VkYnJlYWsudXNhZ2VzLnVzZXIiLCJjbG91ZGJyZWFrLnJlY2lwZXMiLCJjbG91ZGJyZWFrLnVzYWdlcy5nbG9iYWwiLCJvcGVuaWQiLCJjbG91ZG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uIiwiemlkIjoidWFhIiwiYXVkIjpbImNsb3VkYnJlYWtfc2hlbGwiLCJjbG91ZGJyZWFrLnJlY2lwZXMiLCJvcGVuaWQiLCJjbG91ZGJyZWFrIiwiY2xvdWRicmVhay5wbGF0Zm9ybXMiLCJwYXNzd29yZCIsImNsb3VkYnJlYWsuYmx1ZXByaW50cyIsImNsb3VkYnJlYWsudGVtcGxhdGVzIiwiY2xvdWRicmVhay5uZXR3b3JrcyIsImNsb3VkYnJlYWsuc3NzZGNvbmZpZ3MiLCJjbG91ZGJyZWFrLnVzYWdlcyIsImNsb3VkYnJlYWsuc2VjdXJpdHlncm91cHMiLCJjbG91ZGJyZWFrLnN0YWNrcyIsImNsb3VkYnJlYWsuY3JlZGVudGlhbHMiXX0.ZH_ejvtJZZ21QqbJrByrfggozhOOBh3LxfPxbtC_iuM&expires_in > Content-Type: application/json > < HTTP/1.1 404 Not Found < Server: Apache-Coyote/1.1 < Content-Length: 0 < Date: Wed, 15 Feb 2017 00:51:22 GMT < * Connection #0 to host localhost left intact from shell I can see the stack as cloudbreak-shell>stack list ID INFO -- ----------- 3 cloudbreak2 Any Pointers on this will be really helpful. Thanks Atul Aggarwal
... View more
Labels:
- Labels:
-
Hortonworks Cloudbreak