Skip to content

Commit

Permalink
Fix saltstack install, remove sudo from devel script
Browse files Browse the repository at this point in the history
  • Loading branch information
jwokaty committed Jan 23, 2025
1 parent 0831cbd commit bcf9af8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
47 changes: 24 additions & 23 deletions startup_bbs_standalone_devel.sh
Original file line number Diff line number Diff line change
@@ -1,53 +1,54 @@
#!/usr/bin/env bash

# Basic deps
sudo apt update -qq
sudo apt -y install curl git build-essential python3 python3-pip locales wget
apt update -qq
apt -y install curl git build-essential python3 python3-pip locales wget

# Set up saltstack

# https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/ubuntu.html
#https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/linux-deb.html

sudo curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2023.gpg https://repo.saltproject.io/salt/py3/ubuntu/22.04/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg arch=amd64] https://repo.saltproject.io/salt/py3/ubuntu/22.04/amd64/latest jammy main" | sudo tee /etc/apt/sources.list.d/salt.list
mkdir -p /etc/apt/keyrings
curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public | tee /etc/apt/keyrings/salt-archive-keyring.pgp
curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources | tee /etc/apt/sources.list.d/salt.sources

sudo apt-get -y update
sudo apt-get -y install salt-minion
sudo service salt-minion stop
sudo systemctl disable salt-minion
apt-get -y update
apt-get -y install salt-minion
service salt-minion stop
systemctl disable salt-minion

# Assumes the repository has already been cloned to the working directory
# cd ~
# git clone -b standalone https://github.com/Bioconductor/bioconductor_salt

# Set up bioconductor's saltstack
sudo cp -r bioconductor_salt/saltstack/salt /srv
sudo cp -r bioconductor_salt/saltstack/pillar /srv
sudo cp bioconductor_salt/saltstack/minion.d/minion.conf /etc/salt/minion
cp -r bioconductor_salt/saltstack/salt /srv
cp -r bioconductor_salt/saltstack/pillar /srv
cp bioconductor_salt/saltstack/minion.d/minion.conf /etc/salt/minion

sudo mv /srv/pillar/custom/devel_standalone.sls /srv/pillar/custom/init.sls
mv /srv/pillar/custom/devel_standalone.sls /srv/pillar/custom/init.sls

sudo salt-call --local state.highstate || true
salt-call --local state.highstate || true

# Find R path and check that it works
if ! /home/biocbuild/bbs-*/R/bin/R --version > /tmp/rver; then exit 1; fi

RPATH="$(echo /home/biocbuild/bbs-*/R/bin)"

echo "export PATH='$PATH:$RPATH'" | sudo tee -a /etc/profile
echo "export PATH='$PATH:$RPATH'" | sudo tee -a /etc/bash.bashrc
echo "export PATH='$PATH:$RPATH'" | tee -a /etc/profile
echo "export PATH='$PATH:$RPATH'" | tee -a /etc/bash.bashrc

echo "#!/bin/bash" | sudo tee /bbs_r_start
echo "$RPATH/R \"\$@\"" | sudo tee -a /bbs_r_start
echo "#!/bin/bash" | tee /bbs_r_start
echo "$RPATH/R \"\$@\"" | tee -a /bbs_r_start

sudo chown biocbuild /bbs_r_start
sudo chmod +x /bbs_r_start
chown biocbuild /bbs_r_start
chmod +x /bbs_r_start

sudo ln -s /home/biocbuild/bbs-*-bioc/R/bin/R /usr/bin/R
sudo ln -s /home/biocbuild/bbs-*-bioc/R/bin/Rscript /usr/bin/Rscript
ln -s /home/biocbuild/bbs-*-bioc/R/bin/R /usr/bin/R
ln -s /home/biocbuild/bbs-*-bioc/R/bin/Rscript /usr/bin/Rscript

# Cleanup
# rm -rf /srv /etc/salt
# sudo apt-get -y purge salt-minion
# apt-get -y purge salt-minion


7 changes: 4 additions & 3 deletions startup_bbs_standalone_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ sudo apt -y install curl git build-essential python3 python3-pip locales wget

# Set up saltstack

# https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/ubuntu.html
#https://docs.saltproject.io/salt/install-guide/en/latest/topics/install-by-operating-system/linux-deb.html

sudo curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2023.gpg https://repo.saltproject.io/salt/py3/ubuntu/22.04/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg arch=amd64] https://repo.saltproject.io/salt/py3/ubuntu/22.04/amd64/latest jammy main" | sudo tee /etc/apt/sources.list.d/salt.list
mkdir -p /etc/apt/keyrings
curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public | sudo tee /etc/apt/keyrings/salt-archive-keyring.pgp
curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.sources | sudo tee /etc/apt/sources.list.d/salt.sources

sudo apt-get -y update
sudo apt-get -y install salt-minion
Expand Down

0 comments on commit bcf9af8

Please sign in to comment.