diff --git a/_common/consumer-unattended-install.irods-4.3.template b/_common/consumer-unattended-install.irods-4.3.template index d237b4c..35c078a 100644 --- a/_common/consumer-unattended-install.irods-4.3.template +++ b/_common/consumer-unattended-install.irods-4.3.template @@ -89,7 +89,8 @@ "network": "info", "resource": "info", "rule_engine": "info", - "server": "info" + "server": "info", + "sql": "info" }, "match_hash_policy": "compatible", "negotiation_key": "$NEG_KEY", diff --git a/_common/install-irods-consumer.sh b/_common/install-irods-consumer.sh index f1a19d2..85b3cc9 100644 --- a/_common/install-irods-consumer.sh +++ b/_common/install-irods-consumer.sh @@ -164,11 +164,21 @@ then echo "Setting up iRODS 4.2 on consumer." elif [[ "$IRODS_VERSION" =~ ^4\.3\. ]] then echo "Setting up iRODS 4.3 on consumer." configure_consumer_4dot3 + sudo install -m 0644 -o root -g root /tmp/irods.logrotate /etc/logrotate.d/irods + sudo install -m 0644 -o root -g root /tmp/irods.rsyslog /etc/rsyslog.d/00-irods.conf + sudo mkdir /var/log/irods + sudo chown syslog:adm /var/log/irods + sudo systemctl restart rsyslog.service else echo "Configuring iRODS version $IRODS_VERSION has not been implemented." + exit 1 fi # Restart is needed for iRODS 4.2.9+ -sudo /etc/init.d/irods restart +if [[ "$IRODS_VERSION" =~ ^4\.2\. ]] +then sudo /etc/init.d/irods restart +else sudo systemctl restart irods +fi + echo "Consumer install script finished." diff --git a/_common/install-irods-provider.sh b/_common/install-irods-provider.sh index 921dbee..d16dc87 100644 --- a/_common/install-irods-provider.sh +++ b/_common/install-irods-provider.sh @@ -192,10 +192,19 @@ then echo "Setting up iRODS 4.2 on provider." elif [[ "$IRODS_VERSION" =~ ^4\.3\. ]] then echo "Setting up iRODS 4.3 on provider." configure_provider_4dot3 + sudo install -m 0644 -o root -g root /tmp/irods.logrotate /etc/logrotate.d/irods + sudo install -m 0644 -o root -g root /tmp/irods.rsyslog /etc/rsyslog.d/00-irods.conf + sudo mkdir /var/log/irods + sudo chown syslog:adm /var/log/irods + sudo systemctl restart rsyslog.service else echo "Configuring iRODS version $IRODS_VERSION has not been implemented." + exit 1 fi # Restart is needed for iRODS 4.2.9+ -sudo /etc/init.d/irods restart +if [[ "$IRODS_VERSION" =~ ^4\.2\. ]] +then sudo /etc/init.d/irods restart +else sudo systemctl restart irods +fi echo "Provider install script finished." diff --git a/_common/irods.logrotate b/_common/irods.logrotate new file mode 100644 index 0000000..21e9a0d --- /dev/null +++ b/_common/irods.logrotate @@ -0,0 +1,11 @@ +/var/log/irods/irods.log { + weekly + rotate 26 + copytruncate + delaycompress + compress + dateext + notifempty + missingok + su root root +} diff --git a/_common/irods.rsyslog b/_common/irods.rsyslog new file mode 100644 index 0000000..1060505 --- /dev/null +++ b/_common/irods.rsyslog @@ -0,0 +1,8 @@ +$FileCreateMode 0644 +$DirCreateMode 0755 +$Umask 0000 +$template irods_format,"%msg%\n" +:programname,startswith,"irodsServer" /var/log/irods/irods.log;irods_format +& stop +:programname,startswith,"irodsDelayServer" /var/log/irods/irods.log;irods_format +& stop diff --git a/_common/provider-unattended-install.irods-4.3.template b/_common/provider-unattended-install.irods-4.3.template index c8d707f..49eb617 100644 --- a/_common/provider-unattended-install.irods-4.3.template +++ b/_common/provider-unattended-install.irods-4.3.template @@ -91,7 +91,8 @@ "network": "info", "resource": "info", "rule_engine": "info", - "server": "info" + "server": "info", + "sql": "info" }, "match_hash_policy": "compatible", "negotiation_key": "$NEG_KEY", diff --git a/irods-provider-consumer/Vagrantfile b/irods-provider-consumer/Vagrantfile index 09bdb06..6d6dabe 100644 --- a/irods-provider-consumer/Vagrantfile +++ b/irods-provider-consumer/Vagrantfile @@ -19,6 +19,8 @@ Vagrant.configure("2") do |config| provider.vm.provision "file", source: ".env", destination: "/tmp/irods-test.env" provider.vm.provision "file", source: "../_common/common_functions.sh", destination: "/tmp/common_functions.sh" provider.vm.provision "file", source: "../_common/provider-unattended-install.irods-4.3.template", destination: "/tmp/provider-unattended-install.irods-4.3.template" + provider.vm.provision "file", source: "../_common/irods.rsyslog", destination: "/tmp/irods.rsyslog" + provider.vm.provision "file", source: "../_common/irods.logrotate", destination: "/tmp/irods.logrotate" provider.vm.provision :shell, :path => '../_common/update-ipv6-settings.sh', :args => "/tmp/irods-test.env" provider.vm.provision :shell, :path => '../_common/initialize-hosts-file.sh', :args => "/tmp/irods-test.env" provider.vm.provision :shell, :path => '../_common/initialize-network-settings.sh', :args => "/tmp/irods-test.env" @@ -37,6 +39,8 @@ Vagrant.configure("2") do |config| consumer.vm.provision "file", source: ".env", destination: "/tmp/irods-test.env" consumer.vm.provision "file", source: "../_common/common_functions.sh", destination: "/tmp/common_functions.sh" consumer.vm.provision "file", source: "../_common/consumer-unattended-install.irods-4.3.template", destination: "/tmp/consumer-unattended-install.irods-4.3.template" + consumer.vm.provision "file", source: "../_common/irods.rsyslog", destination: "/tmp/irods.rsyslog" + consumer.vm.provision "file", source: "../_common/irods.logrotate", destination: "/tmp/irods.logrotate" consumer.vm.provision :shell, :path => '../_common/update-ipv6-settings.sh', :args => "/tmp/irods-test.env" consumer.vm.provision :shell, :path => '../_common/initialize-hosts-file.sh' , :args => "/tmp/irods-test.env" consumer.vm.provision :shell, :path => '../_common/initialize-network-settings.sh', :args => "/tmp/irods-test.env" diff --git a/irods-single-server/Vagrantfile b/irods-single-server/Vagrantfile index 8c2798e..e58b2c4 100644 --- a/irods-single-server/Vagrantfile +++ b/irods-single-server/Vagrantfile @@ -19,6 +19,8 @@ Vagrant.configure("2") do |config| provider.vm.provision "file", source: ".env", destination: "/tmp/irods-test.env" provider.vm.provision "file", source: "../_common/common_functions.sh", destination: "/tmp/common_functions.sh" provider.vm.provision "file", source: "../_common/provider-unattended-install.irods-4.3.template", destination: "/tmp/provider-unattended-install.irods-4.3.template" + provider.vm.provision "file", source: "../_common/irods.rsyslog", destination: "/tmp/irods.rsyslog" + provider.vm.provision "file", source: "../_common/irods.logrotate", destination: "/tmp/irods.logrotate" provider.vm.provision :shell, :path => '../_common/update-ipv6-settings.sh', :args => "/tmp/irods-test.env" provider.vm.provision :shell, :path => '../_common/initialize-network-settings.sh', :args => "/tmp/irods-test.env" provider.vm.provision :shell, :path => '../_common/install-irods-provider.sh', :args => "/tmp/irods-test.env"