diff --git a/cluster-setup/README.md b/cluster-setup/README.md index da9ee01e..ff46abc7 100644 --- a/cluster-setup/README.md +++ b/cluster-setup/README.md @@ -167,8 +167,27 @@ the "main" playbook, and will take longer to run. At this point, you should have a fresh, "empty" server, with Kive running. Several `systemd`-based background tasks that perform Kive cleanup and backups should also be -in place. If that's your goal, then you can stop here. The next steps restore data -from an old server. +in place. If that's your goal, then you can stop here. + +### Install FastTree + +Our Phylowatch service requires [FastTree] 2.1.9 to be installed on the cluster (at the time +of writing). This is an older version so the binaries are not directly available on the +FastTree website; rather, we must compile it from [the source code][FastTreeSourceCode]. +At the time of writing, the source code is available on their website, but if this ever +disappears, we maintain a vendored copy on macdatafile in the `Phylowatch` directory +as `FastTree-2.1.9.c`. + +[FastTree]: https://microbesonline.org/fasttree/ +[FastTreeSourceCode]: https://microbesonline.org/fasttree/FastTree-2.1.9.c + +Put this file into the `deployment` directory on the head node, and run the +`install_fasttree.yaml` playbook to compile and install FastTree. + +### Optional (but recommended): install smartmontools + +To install the `smartmontools` package, which provides `smartctl`, use the +`install_smartmontools.yaml` playbook (or simply install it using `apt`). ## Restore from an old system diff --git a/cluster-setup/deployment/install_fasttree.yaml b/cluster-setup/deployment/install_fasttree.yaml new file mode 100644 index 00000000..46d995b3 --- /dev/null +++ b/cluster-setup/deployment/install_fasttree.yaml @@ -0,0 +1,49 @@ +--- + +- hosts: head + become: true + tasks: + - name: make a directory to hold the source code + file: + path: /usr/local/src/FastTree-2.1.9 + owner: root + group: root + mode: '0755' + state: directory + + - name: copy FastTree source code to the host + copy: + src: FastTree-2.1.9.c + dest: /usr/local/src/FastTree-2.1.9/FastTree.c + owner: root + group: root + + - name: compile single-precision FastTree + command: + chdir: /usr/local/src/FastTree-2.1.9 + cmd: gcc -O3 -finline-functions -funroll-loops -Wall -o FastTree.single FastTree.c -lm + creates: FastTree.single + + - name: compile double-precision FastTree + command: + chdir: /usr/local/src/FastTree-2.1.9 + cmd: gcc -DUSE_DOUBLE -O3 -finline-functions -funroll-loops -Wall -o FastTree.double FastTree.c -lm + creates: FastTree.double + + - name: install FastTree.single + copy: + src: /usr/local/src/FastTree-2.1.9/FastTree.single + dest: /usr/local/bin/FastTree.single + mode: "0755" + + - name: install FastTree.double + copy: + src: /usr/local/src/FastTree-2.1.9/FastTree.double + dest: /usr/local/bin/FastTree.double + mode: "0755" + + - name: make an alias to FastTree.single + file: + src: /usr/local/bin/FastTree.single + path: /usr/local/bin/FastTree + state: link diff --git a/cluster-setup/deployment/install_smartmontools.yaml b/cluster-setup/deployment/install_smartmontools.yaml new file mode 100644 index 00000000..3d12a981 --- /dev/null +++ b/cluster-setup/deployment/install_smartmontools.yaml @@ -0,0 +1,9 @@ +--- + +- hosts: head + become: true + tasks: + - name: install smartmontools + apt: + name: + - smartmontools