Commit d75b1c58 authored by Gonzalo S Nido's avatar Gonzalo S Nido
parents 6d3e24cc 88b30f67
#!/bin/bash
resourceGroupName="FOR-NEURO-SYSMED-SHARED-STORAGE"
storageAccountName="forneurosysmedimport"
containerName="tsd-import1"
user="gsnido"
ramdisk="/mnt/blobfusetmp"
mountpoint="/home/${user}/tsd-import"
# Login to azure
az login
az account set --subscription FOR-NEURO-SYSMED-SHARED
# This command assumes you have logged in with az login
httpEndpoint=$(az storage account show \
--resource-group $resourceGroupName
--name $storageAccountName
--query "primaryEndpoints.file" | tr -d '"')
smbPath=$(echo $httpEndpoint | cut -c7-$(expr length $httpEndpoint))
fileHost=$(echo $smbPath | tr -d "/")
# Test connection
echo "Testing connection..."
nc -zvw3 $fileHost 445
if [ ! -d ${ramdisk} ]; then
exit "Ramdisk needs to exit and be mounted"
fi
if [ ! -d $mountpoint ]; then
mkdir -p $mountpoint
fi
# Mount via blobfuse
echo "Mounting..."
sudo blobfuse $mountpoint --tmp-path=${ramdisk} \
--config-file=/home/$user/fuse_connection.cfg -o attr_timeout=240 \
-o entry_timeout=240 -o negative_timeout=120 -o umask=137 -o allow_other \
-o uid=1000 -o gid=1000
# UNMOUNT:
# fusermount -u $mountpoint
#!/bin/bash
echo "#### Updating Ubuntu dist..."
sudo apt update && sudo apt -y upgrade
echo "#### Installing some Ubuntu packages..."
sudo apt -y install unzip build-essential libncurses5-dev zlib1g-dev libbz2-dev liblzma-dev p7zip-full pigz neovim
echo "#### Installing configs..."
cd ~
git clone https://git.app.uib.no/gni042/configs.git
cd configs
bash INSTALL.sh
cd ~
echo "Installing R..."
sudo apt -y install r-base
sudo apt -y install libcurl4-openssl-dev libxml2-dev
wget https://packages.microsoft.com/config/ubuntu/14.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt -y install blobfuse cifs-utils
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment