Skip to content

ansible: add role to install Linux perf on Ubuntu - #1321

Merged
maclover7 merged 5 commits into
nodejs:masterfrom
mmarchini:ansible-linux-perf
Jun 9, 2018
Merged

maclover7 merged 5 commits into
nodejs:masterfrom
mmarchini:ansible-linux-perf

Conversation

@mmarchini

Copy link
Copy Markdown
Contributor

Ansible role to install Linux perf on Ubuntu by cloning the Linux source
code and building tools/perf to avoid Kernel mismatch errors.

I wasn't sure which playbook should call this role, so I'm submitting only
the role for now.

Tested on Ubuntu 16.04 from DigitalOcean.

Ref: #1274

Ansible role to install Linux perf on Ubuntu by cloning the Linux source
code and building tools/perf to avoid Kernel mismatch errors.

Ref: nodejs#1274
maclover7

This comment was marked as off-topic.

@LucaLanziani

Copy link
Copy Markdown
Contributor

Nice work, just a couple of comments in the PR and a couple of questions for the team to understand how to write those roles in the future (@mmarchini sorry if I'm using your code as example):

  1. should we write the roles assuming they are running as privileged user? (eg. setting the become: true from the outside)
  2. should we check for presence of perf at the start or should we just run the role every time? Assuming that the run is idempotent (like this seems to be)

@mmarchini

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestions! I updated the PR with them.

should we write the roles assuming they are running as privileged user?

I think so, at least looking at ansible.cfg and inventory.yml this seems to be true for most machines.

should we check for presence of perf at the start or should we just run the role every time?

The role will check if perf exists in /usr/local/bin/perf (i.e., if perf was installed by this role).

Which machine(s) should this be running on?

At least Ubuntu 16.04 machines used by stress-single-test. We might want to install perf on other machines later.

@mhdawson

mhdawson commented Jun 7, 2018

Copy link
Copy Markdown
Member

@jBarz since you did a bunch of ansible work for PPC/s390 could you take a look as well.

@maclover7

Copy link
Copy Markdown
Contributor

should we write the roles assuming they are running as privileged user? (eg. setting the become: true from the outside)

Yes

should we check for presence of perf at the start or should we just run the role every time? Assuming that the run is idempotent (like this seems to be)

To be honest, probably best to always run the code. That's essentially what the rest of the roles do

maclover7

This comment was marked as off-topic.

LucaLanziani

This comment was marked as off-topic.

Matheus Marchini added 2 commits June 8, 2018 15:45
Install Linux perf on Ubuntu 16.04 machines through
jenkins/worker/create playbook.

Ref: nodejs#1274
@mmarchini
mmarchini force-pushed the ansible-linux-perf branch from 0a77993 to 14819eb Compare June 8, 2018 22:48
@mmarchini

Copy link
Copy Markdown
Contributor Author

@maclover7 @LucaLanziani done!

maclover7

This comment was marked as off-topic.

@maclover7
maclover7 merged commit a5d5962 into nodejs:master Jun 9, 2018
@maclover7

Copy link
Copy Markdown
Contributor

Landed in a5d5962

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants