changeset 1582:f26dc3004b3f dockerise

A currently-failing attempt to get this setup working on Centos 7. Stalling on the problem of getting a recent enough system Ruby
author Chris Cannam
date Tue, 15 Aug 2017 16:26:46 +0100
parents ae8043b014c7
children 0dcd4f8c2b8a
files extra/soundsoftware/scripted-deploy/vagrant/Vagrantfile extra/soundsoftware/scripted-deploy/vagrant/provision.d/000-apt.sh extra/soundsoftware/scripted-deploy/vagrant/provision.d/000-system-packages.sh extra/soundsoftware/scripted-deploy/vagrant/vagrant-provision.sh
diffstat 4 files changed, 77 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/extra/soundsoftware/scripted-deploy/vagrant/Vagrantfile	Tue Aug 15 13:33:56 2017 +0100
+++ b/extra/soundsoftware/scripted-deploy/vagrant/Vagrantfile	Tue Aug 15 16:26:46 2017 +0100
@@ -2,7 +2,8 @@
 # vi: set ft=ruby :
 
 Vagrant.configure("2") do |config|
-  config.vm.box = "ubuntu/xenial64"
+#  config.vm.box = "ubuntu/xenial64"
+  config.vm.box = "centos/7"
   config.vm.network "forwarded_port", guest: 80, host: 8080
   config.vm.synced_folder "../../../..", "/vagrant-code"
   config.vm.provision :shell, path: "vagrant-provision.sh"
--- a/extra/soundsoftware/scripted-deploy/vagrant/provision.d/000-apt.sh	Tue Aug 15 13:33:56 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#!/bin/bash
-
-set -e
-
-apt-get update && \
-    apt-get dist-upgrade -y && \
-    apt-get install -y \
-    ack-grep \
-    apache2 \
-    apache2-dev \
-    apt-utils \
-    build-essential \
-    cron \
-    curl \
-    doxygen \
-    exim4 \
-    git \
-    graphviz \
-    imagemagick \
-    libapache-dbi-perl \
-    libapache2-mod-perl2 \
-    libapr1-dev \
-    libaprutil1-dev \
-    libauthen-simple-ldap-perl \
-    libcurl4-openssl-dev \
-    libdbd-pg-perl \
-    libpq-dev \
-    libmagickwand-dev \
-    libio-socket-ssl-perl \
-    logrotate \
-    mercurial \
-    postgresql \
-    rsync \
-    ruby \
-    ruby-dev \
-    sudo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/extra/soundsoftware/scripted-deploy/vagrant/provision.d/000-system-packages.sh	Tue Aug 15 16:26:46 2017 +0100
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+set -e
+
+if [ -x /usr/bin/yum ]; then
+
+    # assumption: CentOS 7
+
+    yum install -y epel-release centos-release-scl && \
+        yum update -y && \
+        yum install -y \
+            httpd \
+            httpd-devel \
+            gcc \
+            gcc-c++ \
+            curl \
+            doxygen \
+            git \
+            mercurial \
+            mod_perl \
+            postgresql \
+            rh-ruby24 \
+            rh-ruby24-ruby-devel \
+            rh-ruby24-rubygems \
+            rh-ruby24-rubygems-devel \
+            logrotate
+
+    if [ -f /usr/bin/ruby ]; then
+        yum remove -y ruby
+    fi
+
+    cat > /etc/profile.d/enableruby24.sh <<EOF
+#!/bin/bash
+source scl_source enable rh-ruby24
+EOF
+    
+else
+
+    # assumption: Ubuntu 16.04
+
+    apt-get update && \
+        apt-get dist-upgrade -y && \
+        apt-get install -y \
+                ack-grep \
+                apache2 \
+                apache2-dev \
+                apt-utils \
+                build-essential \
+                cron \
+                curl \
+                doxygen \
+                exim4 \
+                git \
+                graphviz \
+                imagemagick \
+                libapache-dbi-perl \
+                libapache2-mod-perl2 \
+                libapr1-dev \
+                libaprutil1-dev \
+                libauthen-simple-ldap-perl \
+                libcurl4-openssl-dev \
+                libdbd-pg-perl \
+                libpq-dev \
+                libmagickwand-dev \
+                libio-socket-ssl-perl \
+                logrotate \
+                mercurial \
+                postgresql \
+                rsync \
+                ruby \
+                ruby-dev \
+                sudo
+
+fi
--- a/extra/soundsoftware/scripted-deploy/vagrant/vagrant-provision.sh	Tue Aug 15 13:33:56 2017 +0100
+++ b/extra/soundsoftware/scripted-deploy/vagrant/vagrant-provision.sh	Tue Aug 15 16:26:46 2017 +0100
@@ -7,7 +7,7 @@
 
 set -e
 
-for f in /vagrant/provision.d/[0-9]* ; do
+for f in /vagrant-code/extra/soundsoftware/scripted-deploy/vagrant/provision.d/[0-9]* ; do
     case "$f" in
         *~) ;;
         *) echo "Running provision script: $f"