Openjdk-infrastructure: Create missing Ansible playbooks - Mac OS

Created on 13 Feb 2018  路  17Comments  路  Source: AdoptOpenJDK/openjdk-infrastructure

Ref: #6

We currently don't have a playbooks for Mac OS

Its more important to get a playbook working on this platform first then we can work on incorporating it into the greater main playbooks

ansible help wanted

All 17 comments

I'm happy to work on this, I might request an extra mac to test the playbook on.

Not that the entire playbook is of use. But I found homebrew and a very few extras enabled me to compile on my macbook pro. "Testing the Playbook" section might be of value.

https://github.com/geerlingguy/mac-dev-playbook

From @jdekonin Please make sure curl is also included in the playbook as per #404.

As notes in https://github.com/eclipse/openj9/issues/3790 when running openjdk-tests there setup requirements on the system.

vi /etc/sysctl.conf
kern.sysv.shmmax=314572800
kern.sysv.shmall=76800

@cwillhelm Are you able to progress this? Any current blockers?

No current blockers other than some stuff that has to be done from the GUI. It's possible to script it using something like pyautogui, but that's kind of a hacky workaround. I also need a Mac for testing, unfortunately the one we are using is OSX 10.10, and can't be upgraded to 10.11 or beyond. Not sure how big of an impact that will have.

It's still a work in progress though, I'm putting everything in a single playbook file first, and will separate out the other aspects (like CPAN, Freemarker, etc) once it's confirmed to be working.

Out existing machines at adoptopenjdk are all 10.10 so that version is fine by me for the purposes of this ;-)
Which things need to be installed via the GUI?

Please provide updates in this work item since sharing a log of what we've tried and got working / failed to get working is always useful. We do of course have the work in https://github.com/AdoptOpenJDK/openjdk-infrastructure/pull/219/files to base from.

For the GUI stuff,

System Preferences -> Sharing

    Turn On Screen Sharing, allow access for Adminstrators (default)
    Turn On Remote Login, allow access for Adminstrators (default)

System Preferences -> Sharing

    Turn On Remote Login, allow access for jenkins

test it out
ssh jenkins@machine name

I'll keep you posted about what has and hasn't worked soon, just making a fresh image of this mac for testing.

Very alpha version has been written, hasn't been tested yet. Will throw it towards a machine when I get the chance.

@cwillhelm Can you create a PR with what you've got, prefixed with [WIP] so we know it's incomplete? Would be best to have it in github even if it's not yet complete :-)

@sxa555 done, very rough -- it's currently about half functional (figuring out some HTTPS issues @ line 268)

https://blog.bearandgiraffe.com/ansible-github-and-a-failed-to-validate-the-ssl-certificate-story-a8a10ea17512

There's some weird issues specifically related to Ansible, Git, Python, and MacOS that causes certificates issues with Github (since they reject TLS 1.1 connections). Based on my findings and these fixes (which apply to MacOS 10.12+) we may have to mirror the jdk files to a different repository in order to properly download them on MacOS 10.10. I'm going to do some investigation to see if this _does_ in fact work on 10.12+, but in the meantime that's the current blocker on where we are at with the playbook.

I tried the solutions in the above link, as well as some other ones on the internet and did not have any success.

Hmmm that surprises me a little since the build machines at adoptopenjdk are all 10.10 and they do currently manage to pull frmo git without problems.

https://github.com/eclipse/openj9/issues/4375 requests changes to the requirements on an OSX install. Setting umask to 0002 and /etc/sysctl.conf values for
kern.sysv.shmmax=125839605760
kern.sysv.shmall=30722560

I attempted to use launchctl config system umask 002 or launchctl config user umask 002 as per apple documentation, but that didn't work for me. I made the change within the jenkins user .bashrc umask 0002 which did work.

Taken from discussion with @cwillhelm, pmset -a sleep 0 might be of use in stopping the mac from going to sleep and becoming disabled in jenkins.

@gdams Ref the work you did to set up a 10.12 box for https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/711, what needed to be done manually over and above the playbook execution? I know you mentioned the extra boot JDK but I'm guessing there was probably more manual steps required? Would be good to have the current state documented here.

playbook merged

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sxa picture sxa  路  3Comments

aahlenst picture aahlenst  路  6Comments

sxa picture sxa  路  3Comments

LongyuZhang picture LongyuZhang  路  4Comments

piyush286 picture piyush286  路  5Comments