Skip to content

Commit

Permalink
Merge pull request #273 from girder/ansible-update
Browse files Browse the repository at this point in the history
Update ansible script
  • Loading branch information
manthey authored Feb 6, 2023
2 parents 773e7a5 + e850d01 commit cfddee7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
52 changes: 30 additions & 22 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,39 @@
celery_environment: "{{ django_vars }}"
tasks:
- name: Install swcc
pip:
name: swcc
- name: Download shapeworks studio
get_url:
url: https://github.com/SCIInstitute/ShapeWorks/releases/download/v6.2.1/ShapeWorks-v6.2.1-linux.zip
dest: /tmp/shapeworks.zip
- name: Install unzip
apt:
name: unzip
pip:
name: /home/ubuntu/celery_project/swcc
editable: true
virtualenv: /opt/celery
become: true
become_user: root
- name: Unarchive shapeworks studio
unarchive:
src: /tmp/shapeworks.zip
dest: /tmp/
remote_src: yes
- name: Install shapeworks prerequisites
apt:
name:
- curl
- gcc
- libc6-dev
- libgl1-mesa-glx
- libglib2.0-0
- libpq-dev
- libqt5core5a
- libxt6
- unzip
state: present
install_recommends: no
become: true
become_user: root
- name: Install shapeworks studio into /opt/shapeworks
copy:
src: /tmp/ShapeWorks-v6.2.1-linux/bin
dest: /opt/shapeworks
owner: celery
group: celery
remote_src: yes
- name: Download shapeworks studio
ansible.builtin.shell: |
export url=$(curl -s https://api.github.com/repos/SCIInstitute/ShapeWorks/releases | grep -o "http.*dev-linux.*.gz");
curl -L -o /tmp/shapeworks.tgz $url
mkdir -p /opt/shapeworks
rm -rf /opt/shapeworks
mkdir /opt/shapeworks
tar -zxvf /tmp/shapeworks.tgz -C /opt/shapeworks --strip-components 1
rm /tmp/shapeworks.tgz
cp -r /opt/shapeworks/bin/* /usr/local/bin/.
cp -nr /opt/shapeworks/lib/* /usr/local/lib/.
become: true
become_user: root
# This is required because composed_configurations attempts to create the staticfiles directory in the python installation directory while being imported.
Expand All @@ -57,9 +65,9 @@
state: present
key: "{{ item }}"
with_items:
- "{{ lookup('file', 'shapeworks-worker.pub') }}"
- "{{ lookup('file', 'anne.pub') }}"
- "{{ lookup('file', 'shapeworks.pub') }}"
- "{{ lookup('file', 'shapeworks-worker.pub') }}"
- name: Restart celery service to pick up any changes
systemd:
state: restarted
Expand Down
10 changes: 1 addition & 9 deletions ansible/shapeworks-worker.pub
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq/ZrgnJc036vdC8jPiVM
MAKwrmVIRw0tomu5QUDLr3ZlsYLhdHXkAcPdUHEJtIhVYwcXS/aO8UfmgbLjfLKS
vdOLx73joBq1mxO8AfGkTG2sKM/Ahu7VSyKTULFm2xEenkz6du+1MBgWFiAHnOLD
NZ6IvTG2MDOtwWFskGMoWW3YwQM77HijQT6C1sMOxluJthb5lQcn0yiT0n1CFI4d
PJ1oxfpbLbndp54OGWUsctLEr/X5VKzm5gGwu9vA4+skYLfwvzqChEYV/3APJqmu
Jjgicsb/beMBt84IVTqntIWW8pNX24PLA1+GMZZGslGJHoYf1zAld7piT5Forip8
qwIDAQAB
-----END PUBLIC KEY-----
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCr9muCclzTfq90LyM+JUwwArCuZUhHDS2ia7lBQMuvdmWxguF0deQBw91QcQm0iFVjBxdL9o7xR+aBsuN8spK904vHveOgGrWbE7wB8aRMbawoz8CG7tVLIpNQsWbbER6eTPp277UwGBYWIAec4sM1noi9MbYwM63BYWyQYyhZbdjBAzvseKNBPoLWww7GW4m2FvmVByfTKJPSfUIUjh08nWjF+lstud2nng4ZZSxy0sSv9flUrObmAbC728Dj6yRgt/C/OoKERhX/cA8mqa4mOCJyxv9t4wG3zghVOqe0hZbyk1fbg8sDX4YxlkayUYkehh/XMCV3umJPkWiuKnyr

0 comments on commit cfddee7

Please sign in to comment.