OpenStack VM setup
# Instance Boot Source : SLC6 Server
# don't forget to create and select a key pair
################## First we'll create a partition on the ephemeral storage
ssh root@name-of-instance
fdisk /dev/vda
u # switch to other untis
n # new partition
p # primary
3 $ number 3
<Enter> <Enter> # Select defaults
w # Write and exit
reboot
################### Now we'll go on with the setup
ssh root@name-of-instance
mkfs.ext4 /dev/vda3
mkdir /data
mount /dev/vda3 /data
############ Now lets make us an afs ############
export USERNAME=kostams
# That gets you kerberos
yum -y install krb5-workstation krb5-libs krb5-auth-dialog
# That gets you afs
yum -y install openafs-client openafs-server openafs-krb5 kernel-module-openafs
cat > /etc/krb5.conf << EOF
[libdefaults]
default_realm = CERN.CH
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
[realms]
CERN.CH = {
default_domain = cern.ch
kdc = cerndc.cern.ch
}
[domain_realm]
cern.ch = CERN.CH
.cern.ch = CERN.CH
EOF
kinit $USERNAME@CERN.CH
service afs start
aklog
export AFSHOME=/afs/cern.ch/user/${USERNAME:0:1}/$USERNAME
############################ To get you some EOS:
yum -y install compat-readline5.x86_64 openssl098e.x86_64 fuse-libs.x86_64
# this group is for AMS
export GROUP=va
. /afs/cern.ch/project/eos/installation/0.3.15/etc/setup.sh
mkdir -p $AFSHOME/eos
eosmount $AFSHOME/eos
################ Finally - CVMFS2 ###################
# Add the source
cd /etc/yum.repos.d/
wget http://cvmrepo.web.cern.ch/cvmrepo/yum/cernvm.repo
# Add the key
cd /etc/pki/rpm-gpg/
wget http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM
yum -y install cvmfs.x86_64
##########################
# https://twiki.cern.ch/twiki/bin/view/CvmFS/ClientSetupCERN
cat > /etc/cvmfs/default.local << EOF
CVMFS_HTTP_PROXY="http://ca-proxy.cern.ch:3128;http://ca-proxy1.cern.ch:3128|http://ca-proxy2.cern.ch:3128|http://ca-proxy3.cern.ch:3128|http://ca-proxy4.cern.ch:3128|http://ca-proxy5.cern.ch:3128"
CVMFS_REPOSITORIES=ams
EOF
echo 'CVMFS_SERVER_URL="http://cvmfs-stratum-one.cern.ch/opt/@org@"' > /etc/cvmfs/config.d/ams.cern.ch.local
cvmfs_config setup
cvmfs_config chksetup
service autofs start
cvmfs_config probe
################## Finally for amssoft we need these guys
yum -y install xrootd-libs.x86_64 xrootd-client.x86_64 castor-lib.x86_64 xrootd-compat-client-libs.x86_64
yum -y install git screen gcc-c++.x86_64