Created
July 9, 2019 04:57
-
-
Save carlochess/8f91f61dd2dd458c1467bb867da53983 to your computer and use it in GitHub Desktop.
HTCondor docker centos 7
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
config.vm.box = "centos/7" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "4098" | |
end | |
config.vm.provision "shell", inline: <<-SHELL | |
sudo passwd root | |
sudo setenforce 0 | |
sudo systemctl stop firewalld | |
sudo systemctl disable firewalld | |
cd /etc/yum.repos.d/ | |
sudo wget https://research.cs.wisc.edu/htcondor/yum/repo.d/htcondor-stable-rhel7.repo | |
wget http://research.cs.wisc.edu/htcondor/yum/RPM-GPG-KEY-HTCondor | |
rpm --import RPM-GPG-KEY-HTCondor | |
sudo yum install -y epel-release | |
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - | |
sudo yum install -y condor condor-python nano docker-io | |
cat | sudo tee /etc/condor/config.d/condor_config.local <<-EOF | |
DOCKER = /usr/bin/docker | |
QUEUE_ALL_USERS_TRUSTED = TRUE | |
SCHEDD_ARGS = -p 8080 | |
ALLOW_READ = * | |
ALLOW_WRITE = * | |
HOSTALLOW_READ = * | |
HOSTALLOW_WRITE = * | |
ALLOW_NEGOTIATOR = * | |
ALLOW_ADMINISTRATOR = * | |
COLLECTOR_DEBUG = D_FULLDEBUG | |
NEGOTIATOR_DEBUG = D_FULLDEBUG | |
MATCH_DEBUG = D_FULLDEBUG | |
SCHEDD_DEBUG = D_FULLDEBUG | |
START = TRUE | |
TRUST_UID_DOMAIN = TRUE | |
USE_SHARED_PORT=FALSE | |
NETWORK_INTERFACE = 127.0.0.1 | |
EOF | |
cat | sudo tee /home/vagrant/sub.sub <<-EOF | |
universe = docker | |
docker_image = debian | |
executable = /bin/cat | |
arguments = /etc/hosts | |
should_transfer_files = YES | |
when_to_transfer_output = ON_EXIT | |
output = out.$(Process) | |
error = err.$(Process) | |
log = log.$(Process) | |
request_memory = 100M | |
queue 1 | |
EOF | |
chown vagrant:vagrant /home/vagrant/sub.sub | |
sudo groupadd docker | |
sudo gpasswd -a ${USER} docker | |
sudo gpasswd -a condor docker | |
sudo gpasswd -a vagrant docker | |
newgrp docker | |
sudo service docker restart | |
sudo service condor restart | |
sleep 30 | |
ps -ef | grep condor | |
condor_reconfig | |
condor_status -l | grep -i docker | |
condor_status -const HasDocker | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment