...
You may want to install software by using apt commands in Ubunut Linux environment. As described above, you can type a specific command such as "apt install parallel -y" in the cluster template as we do for installing GNU parallel in all cluster nodes. Using the custom commands in the cluster template is one way to install apt packages in all cluster nodes. If you want to install apt packages after your cluster is built, you can use the following script (https://github.com/astromsshin/cloud_ex/blob/main/tool_install_apt_packages_all_nodes.sh) which requires root permission.
Code Block | ||
---|---|---|
| ||
#!/bin/bash ### [IMPORTANT] # The root account/permission is required # for installation of software by using apt pacakges. # You should run this script in root account. # List packages. # You can search and check packages in https://packages.ubuntu.com/ # for Ubuntu distributions. pkgs=(astropy-utils python3-astropy python3-astropy-affiliated python3-astropy-healpix python3-astropy-helpers python3-sklearn python3-skimage python3-statsmodels python3-matplotlib zip) CLUSTERNAME="mycluster" MINIONLASTIND="14" echo "... install on ${CLUSTERNAME}-master" apt update -y for pkg in ${pkgs[@]} do apt install $pkg -y done for ind in $(seq 0 ${MINIONLASTIND}) do echo "... install on ${CLUSTERNAME}-minion-${ind}" ssh ${CLUSTERNAME}-minion-${ind} "apt update -y" for pkg in ${pkgs[@]} do ssh ${CLUSTERNAME}-minion-${ind} "apt install ${pkg} -y" done done |
...