Set up Stratum 0 server
Setup a Stratum 0 server
Section titled “Setup a Stratum 0 server”Setup storage
Section titled “Setup storage”(Would object storage be better? See comment below under next iteration ideas.)
lsblk -lsudo mkfs.ext4 /dev/vdbsudo mkdir /storagesudo mount /dev/vdb /storage/ -t autosudo chown ec2-user /storage/sudo chmod a+rwx /storage/sudo vi /etc/fstab/dev/vdb /storage auto defaults,nofail 0 2Setup server
Section titled “Setup server”sudo yum install vim htop gcc git screensudo timedatectl set-timezone Australia/Brisbane
sudo yum install -y https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpmsudo yum install -y cvmfs cvmfs-server
sudo systemctl enable httpdsudo systemctl restart httpd
# sudo systemctl stop firewalld
# restore keys:sudo mkdir /etc/cvmfs/keys/incomingsudo chmod a+rwx /etc/cvmfs/keys/incomingcd connections/cvmfs_keys/scp neuro* ec2-user@203.101.226.164:/etc/cvmfs/keys/incomingsudo mv /etc/cvmfs/keys/incoming/* /etc/cvmfs/keys/
#backup keys:#mkdir cvmfs_keys#scp opc@158.101.127.61:/etc/cvmfs/keys/neuro* .
sudo cvmfs_server mkfs -o $USER neurodesk.ardc.edu.au
cd /storagesudo mkdir -p cvmfs-storage/srv/cd /srv/sudo mv cvmfs/ /storage/cvmfs-storage/srv/sudo ln -s /storage/cvmfs-storage/srv/cvmfs/
cd /var/spoolsudo mkdir /storage/spoolsudo mv cvmfs/ /storage/spool/sudo ln -s /storage/spool/cvmfs .
cvmfs_server transaction neurodesk.ardc.edu.au
cvmfs_server publish neurodesk.ardc.edu.ausudo vi /etc/cron.d/cvmfs_resign0 11 * * 1 root /usr/bin/cvmfs_server resign neurodesk.ardc.edu.aucat /etc/cvmfs/keys/neurodesk.ardc.edu.au.pubMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuV9JBs9uXBR83qUs7AiEnSQfvh6VCdNigVzOfRMol5cXsYq3cFy/Vn1Nt+7SGpDTQArQieZo4eWC9ww2oLq0vY1pWyAms3Y4i+IUmMbwNifDU4GQ1KN9u4zl9Peun2YQCLE7mjC0ZLQtLM7Q0Z8hNwP8jRJTN+u8mRKzkyxfSMLscVMKhm2pAwnT1zB9i3bzVV+FSnidXq8rnnzNHMgvtfqx1h0gVyTeodToeFeGG5vq69wGZlwEwBJWVRGzzr+a8dWNBFMJ1HxamrBEBW4PAxOKGHmQHTGbo+tdV/K6ZxZ2Ry+PVedNmbON/EPaGlI8Vd0fascACfByqqeUEhABdQIDAQAB-----END PUBLIC KEY-----Next iteration of this
Section titled “Next iteration of this”Use object storage?
Section titled “Use object storage?”- Current implementation uses block storage, but this makes increasing the volume size a bit more work.
- We couldn’t get object storage to work on Oracle as it assumes AWS S3. Try again on AWS.
Optimise settings for repositories for container images
Section titled “Optimise settings for repositories for container images”From the CVMFS documentation:
Repositories containing Linux container image contents (that is, container root file systems) should use overlayfs as a union file system and have the following configuration:
CVMFS_INCLUDE_XATTRS=trueCVMFS_VIRTUAL_DIR=trueExtended attributes of files, such as file capabilities and SELinux attributes, are recorded. And previous file system revisions can be accessed from the clients.
Currently not used
Section titled “Currently not used”We tested the DUCC tool in the beginning, but it was leading to too many Docker pulls and we therefore replaced it with our own script: https://github.com/neurodesk/neurocommand/blob/main/cvmfs/sync_containers_to_cvmfs.sh.
This is the old DUCC setup:
sudo yum install cvmfs-ducc.x86_64sudo -idnf install -y yum-utilsyum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repodnf install docker-ce docker-ce-cli containerd.iosystemctl enable dockersystemctl start dockerdocker versiondocker info
# leave root mode
sudo groupadd dockersudo usermod -aG docker $USERsudo chown root:docker /var/run/docker.socknewgrp docker
vi convert_appsjson_to_wishlist.shexport DUCC_DOCKER_REGISTRY_PASS=configure_secret_password_here_and_dont_push_to_githubcd neurodeskgit pull./gen_cvmfs_wishlist.shcvmfs_ducc convert recipe_neurodesk_auto.yamlcd ..
chmod +x convert_appsjson_to_wishlist.sh
git clone https://github.com/neurodesk/neurodesk/
# setup cron jobsudo vi /etc/cron.d/cvmfs_dockerpull*/5 * * * * opc cd ~ && bash /home/opc/convert_appsjson_to_wishlist.sh
#vi recipe.yaml
##version: 1#user: vnmd#cvmfs_repo: neurodesk.ardc.edu.au#output_format: '$(scheme)://$(registry)/vnmd/thin_$(image)'#input:#- 'https://registry.hub.docker.com/vnmd/tgvqsm_1.0.0:20210119'#- 'https://registry.hub.docker.com/vnmd/itksnap_3.8.0:20201208'
#cvmfs_ducc convert recipe_neurodesk.yaml#cvmfs_ducc convert recipe_unpacked.yaml