-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/sh | ||
|
||
# Tested/supported box names: | ||
# - centos/7 | ||
# - ubuntu/bionic64 | ||
BOXNAME=ubuntu/bionic64 | ||
|
||
# Amount of memory for VM (MB) | ||
MEMORY=2048 | ||
|
||
# Amount of diskspace for VM | ||
# The minimum value for the CentOS/7 image is approximately 41 GB. | ||
# The minimum value for the Ubuntu/Bionic64 image is approximately 11 GB | ||
DISKSPACE="41GB" | ||
|
||
# Version of iRODS to use | ||
IRODS_VERSION="4.2.10" | ||
|
||
# URL of the signing key of the iRODS apt repository | ||
APT_IRODS_REPO_SIGNING_KEY_LOC=https://packages.irods.org/irods-signing-key.asc | ||
|
||
# Parameters of the iRODS apt repository. As of 2 July 2019, the distribution | ||
# for Ubuntu 18.04 servers (bionic) needs to be set to Ubuntu 16.04 (xenial), | ||
# since packages for Ubuntu 18.04 aren't available yet. | ||
APT_IRODS_REPO_URL=https://packages.irods.org/apt/ | ||
APT_IRODS_REPO_ARCHITECTURE=amd64 | ||
APT_IRODS_REPO_DISTRIBUTION=xenial | ||
APT_IRODS_REPO_COMPONENT=main | ||
|
||
# Packages to be installed (separated by whitespace). | ||
# Dependencies do not have to be listed. They are resolved by the script | ||
APT_GEN_PACKAGES="cmake make gcc apache2 apache2-dev rpm libssl-dev" | ||
APT_IRODS_PACKAGES="irods-runtime irods-dev" | ||
|
||
# Parameters of Yum repository | ||
YUM_IRODS_REPO_SIGNING_KEY_LOC=https://packages.irods.org/irods-signing-key.asc | ||
YUM_REPO_FILE_LOC=https://packages.irods.org/renci-irods.yum.repo | ||
YUM_GEN_PACKAGES="git vim cmake make gcc httpd rpmdevtools openssl-libs openssl-devel httpd-devel" | ||
YUM_IRODS_PACKAGES="irods-runtime irods-devel" | ||
|
||
# Hostnames and IP addresses | ||
PROVIDER_IP=192.168.2.3 | ||
PROVIDER_HOSTNAME=davrods-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Vagrant.configure("2") do |config| | ||
|
||
config.env.enable | ||
|
||
# Workaround for Vagrant issue with TTY errors - copied from | ||
# https://superuser.com/questions/1160025/how-to-solve-ttyname-failed-inappropriate-ioctl-for-device-in-vagrant | ||
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" | ||
|
||
config.disksize.size = ENV['DISKSPACE'] | ||
|
||
config.vm.define "dev" do |dev| | ||
dev.vm.box = ENV['BOXNAME'] | ||
dev.vm.provider "virtualbox" do |v| | ||
v.memory = ENV['MEMORY'] | ||
# Synchronize clock in one step if difference is more than 1000 ms / 1s | ||
# Copied from https://stackoverflow.com/questions/19490652/how-to-sync-time-on-host-wake-up-within-virtualbox | ||
v.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ] | ||
end | ||
dev.vm.provision "file", source: ".env", destination: "/tmp/irods-test.env" | ||
dev.vm.provision :shell, :path => 'install-davrods-build-env.sh', :args => "/tmp/irods-test.env" | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
# shellcheck disable=SC1090 | ||
|
||
set -e | ||
set -o pipefail | ||
set -u | ||
|
||
export DEBIAN_FRONTEND=noninteractive | ||
|
||
SETTINGSFILE=${1:-./local-repo.env} | ||
|
||
if [ -f "$SETTINGSFILE" ] | ||
then source "$SETTINGSFILE" | ||
else echo "Error: settings file $SETTINGSFILE not found." && exit 1 | ||
fi | ||
|
||
if [ -f /etc/centos-release ] | ||
then | ||
|
||
echo "Installing DavRODS build environment on CentOS." | ||
|
||
echo "Installing dependencies ..." | ||
sudo yum -y install wget epel-release yum-plugin-versionlock | ||
|
||
echo "Adding iRODS repository ..." | ||
sudo rpm --import https://packages.irods.org/irods-signing-key.asc | ||
wget -qO - https://packages.irods.org/renci-irods.yum.repo | sudo tee /etc/yum.repos.d/renci-irods.yum.repo | ||
|
||
for package in $YUM_IRODS_PACKAGES | ||
do echo "Installing package $package and its dependencies" | ||
sudo yum -y install "$package-${IRODS_VERSION}" | ||
sudo yum versionlock "$package" | ||
done | ||
|
||
for package in $YUM_GEN_PACKAGES | ||
do echo "Installing package $package and its dependencies" | ||
sudo yum -y install "$package" | ||
done | ||
|
||
elif lsb_release -i | grep -q Ubuntu | ||
then | ||
|
||
echo "Installing DavRODS build environment on Ubuntu." | ||
|
||
echo "Installing dependencies ..." | ||
sudo apt-get -y install aptitude | ||
|
||
echo "Downloading and installing iRODS repository signing key ..." | ||
wget -qO - "$APT_IRODS_REPO_SIGNING_KEY_LOC" | sudo apt-key add - | ||
|
||
echo "Adding iRODS repository ..." | ||
cat << ENDAPTREPO | sudo tee /etc/apt/sources.list.d/irods.list | ||
deb [arch=${APT_IRODS_REPO_ARCHITECTURE}] $APT_IRODS_REPO_URL $APT_IRODS_REPO_DISTRIBUTION $APT_IRODS_REPO_COMPONENT | ||
ENDAPTREPO | ||
sudo apt-get update | ||
|
||
for package in $APT_IRODS_PACKAGES | ||
do echo "Installing package $package and its dependencies" | ||
sudo apt-get -y install "$package=${IRODS_VERSION}" | ||
sudo aptitude hold "$package" | ||
done | ||
|
||
for package in $APT_GEN_PACKAGES | ||
do echo "Installing package $package and its dependencies" | ||
sudo apt-get -y install "$package" | ||
done | ||
|
||
else | ||
echo "Error: install script is not suitable for this box." | ||
|
||
fi | ||
|
||
git clone https://github.com/UtrechtUniversity/davrods.git | ||
mkdir davrods/build | ||
chown -R vagrant:vagrant davrods |