Open cailafinn opened 1 year ago
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.
Thanks Remi, I will forward this and cc you in.
From: Remi Perenon @.> Sent: 23 May 2023 15:02 To: mantidproject/dockerfiles @.> Cc: Lewis, Mial (STFC,RAL,ISIS) @.>; Assign @.> Subject: Re: [mantidproject/dockerfiles] Create Ansible Playbook for Deploying to macOS (PR #67)
Hi, we spent some time with @eurydice76https://github.com/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.orghttps://builds.mantidproject.org website.
— Reply to this email directly, view it on GitHubhttps://github.com/mantidproject/dockerfiles/pull/67#issuecomment-1559452674, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWZQ65U4R5L5ZD6RNR65W33XHS7PJANCNFSM6AAAAAAUVTDGQE. You are receiving this because you were assigned.Message ID: @.**@.>>
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: https://github.com/sindresorhus/create-dmg/issues/42#issuecomment-826788797
Also adds some documentation to fill in the gaps that can't be completed by Ansible.
Testing
Resolves #62