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,510 points
33 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,810 points
4,888 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
• 42,410 points
58 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,510 points
31 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,510 points
74 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
215 views
0 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
1,505 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
48 views