How do I find OpsWorks deploy user in a recipe

0 votes

I have been trying to figure out, how to extract or find the name of the user who's performing the deployment of an app on a given OpsWorks stack. For example, in the "Deployments and Commands" section of a stack, the table there displays a history of various deployments with who the deploy user was... etc. I'd like to be able to capture that same user from within my recipe.

It doesn't look like it's something I can grab out of search(:aws_opsworks_app) databag (unless I'm mistaken). Or is there somewhere else I can get this information easily?

Can anyone help me with this query?

Thanks.

Jul 25, 2018 in DevOps Tools by Damon Salvatore
• 5,980 points
886 views

1 answer to this question.

0 votes

Here is a concept which you can follow:

Given below is an easier way to get it through search(:aws_opsworks_command) databag.

:aws_opsworks_command provides an iam_user_arn attribute which can be massaged to appear as the deployment user's IAM name. An example iam_user_arn string look like arn:aws:iam:555555:user/username

Example:

owc = search(:aws_opsworks_command).first
owc[:iam_user_arn].split(':').last
# => gets us "user/username"

Here is a link which you can follow for documentation purpose : https://docs.aws.amazon.com/opsworks/latest/userguide/data-bag-json-command.html

I hope that the above information would be helpful for you.

answered Jul 25, 2018 by Atul
• 10,240 points

Related Questions In DevOps Tools

+1 vote
3 answers

How do I check and export sonarqube analysis reports in embedded db?

Browse to sonarqube web instance to access ...READ MORE

answered Jul 2, 2018 in DevOps Tools by DareDev
• 6,890 points
28,326 views
0 votes
1 answer

How do I deploy to multiple servers using the same context root?

  If you're deploying to multiple servers ...READ MORE

answered Jul 2, 2018 in DevOps Tools by Kalgi
• 52,350 points
784 views
0 votes
1 answer

How do I manage code that *removes* users in chef?

No, I don't think this will prove ...READ MORE

answered Aug 6, 2018 in DevOps Tools by Damon Salvatore
• 5,980 points
646 views
0 votes
1 answer

How do I set maximum queue connection for nginx port in Windows?

Since increasing queue size did not fix your problem ...READ MORE

answered Aug 22, 2018 in DevOps Tools by Damon Salvatore
• 5,980 points
1,203 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
0 votes
1 answer

How do I run “ant update” in Hybris with only “Update Running System”?

Here is what you can try. You can ...READ MORE

answered Jul 10, 2018 in DevOps Tools by Atul
• 10,240 points
7,161 views
0 votes
1 answer

How do I update configuration of a Cassandra cluster ?

Here is a way through which you ...READ MORE

answered Jul 26, 2018 in DevOps Tools by Atul
• 10,240 points
653 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP