Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Ansible Playbook for Deploying to macOS #67

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

cailafinn
Copy link
Collaborator

@cailafinn cailafinn commented Feb 8, 2023

Also adds some documentation to fill in the gaps that can't be completed by Ansible.

Testing

  1. Follow the instructions in the documentation added in the PR. This will be a test of those instructions as much as the playbook.

Resolves #62

@perenon
Copy link

perenon commented May 23, 2023

Hi, we spent some time with @eurydice76 to test this PR on a local machine. This machine is pretty old (OS stuck on Monterrey).

First, to run ansible, we had to set up a SSH key pair between the account running ansible and the mantidbuilder account. It was mandatory and never worked otherwise.

Then, the homebrew configuration was strange (flawed), so the installation of git and java11 through ansible was not working. We had to modify the ownership of many folders on our machine, and install git and java11 manually on the mantidbuilder account. We also added the path to java11 on the .zshrc of the mantidbuilder account.

Based on that, we struggled with the ILL specificity: the proxy.
We had to modify jenkins-node/mantid-builder-macos/ansible/jenkins-agent.yml:

+ environment:
+   http_proxy: proxy.ill.fr:8888
+   https_proxy: proxy.ill.fr:8888
+   all_proxy: proxy.ill.fr:8888
+   HTTP_PROXY: proxy.ill.fr:8888
+   HTTPS_PROXY: proxy.ill.fr:8888
+   ALL_PROXY: proxy.ill.fr:8888

jenkins-node/mantid-builder-macos/ansible/roles/agent/tasks/check-connection.sh:

-$HOME/jenkins-slave.sh $AGENT_NAME $AGENT_SECRET &
+$HOME/jenkins-slave.sh $AGENT_NAME $AGENT_SECRET proxy.ill.fr 8888 &

jenkins-node/mantid-builder-macos/ansible/roles/agent/tasks/main.yml:

-    job: "$HOME/jenkins-slave.sh {{ agent_name }} {{ agent_secret }}"
+    job: "$HOME/jenkins-slave.sh {{ agent_name }} {{ agent_secret }} proxy.ill.fr 8888"

The check-connection script is failing, as long as the jenkins-slave one, with an error claiming the "provided port is not reachable". Apparently, the proxy parameters are not applied by the agent.jar code, since it tries to reach directly the builds.mantidproject.org website.

@MialLewis
Copy link
Collaborator

MialLewis commented Jun 23, 2023 via email

@MialLewis
Copy link
Collaborator

MialLewis commented Dec 22, 2023

I've used this several times and it works well and has been used to set up both of our M1 macs. Since my last use the following dependencies have been added to our Mac runners and need to be included in the script:

  • brew install node
  • brew install graphicsmagick imagemagick (These are supposed to give us a cool mantid custom DMG icon but it doesn't seem to work, maybe look into why on a slow friday!)
  • npm install --global create-dmg

Martyn pointed out that as is node based, we could use bun in place of npm and node and get improved performance, but this is not how it's currently done on the M1s.

EDIT: This is likely why we aren't getting the icon: sindresorhus/create-dmg#42 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate ansible script for OSX setup
4 participants