jenkins-bot has submitted this change and it was merged.

Change subject: Port mw-vagrant install scripts into this repo
......................................................................


Port mw-vagrant install scripts into this repo

Not pleasant to use, but better than nothing... TODO: Glue on some
porcelain, then rewrite puppet to use these scripts.

Change-Id: I59a068b0e690a4e7e3d4b60577dcf686aa5f7885
---
A bin/civicrm-install.php
A bin/drupal-install.sh
2 files changed, 75 insertions(+), 0 deletions(-)

Approvals:
  Cdentinger: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/bin/civicrm-install.php b/bin/civicrm-install.php
new file mode 100644
index 0000000..cc6e74b
--- /dev/null
+++ b/bin/civicrm-install.php
@@ -0,0 +1,51 @@
+<?php
+
+if ( count( $argv ) !== 6 ) {
+       $usage = <<<EOT
+Usage: php ${argv[0]} SITE_NAME CIVICRM_DB DRUPAL_DB DB_USER DB_PASS
+
+Example: php ${argv[0]} civi.localhost.net civicrm drupal civiUser civiPass
+
+EOT;
+       die( $usage );
+}
+
+$basedir = __DIR__ . '/..';
+
+$SITE_NAME = $argv[1];
+$CIVICRM_DB = $argv[2];
+$DRUPAL_DB = $argv[3];
+$DB_USER = $argv[4];
+$DB_PASS = $argv[5];
+
+$config = array(
+    'site_dir' => 'default',
+    'base_url' => "http://${SITE_NAME}/";,
+    'mysql' => array(
+        'username' => $DB_USER,
+        'password' => $DB_PASS,
+        'server' => 'localhost',
+        'database' => $CIVICRM_DB,
+    ),
+    'drupal' => array(
+        'username' => $DB_USER,
+        'password' => $DB_PASS,
+        'server' => 'localhost',
+        'database' => $DRUPAL_DB,
+    ),
+);
+
+global $cmsPath, $crmPath, $installType;
+$cmsPath = "${basedir}/drupal";
+$crmPath = "${basedir}/civicrm";
+$installType = 'drupal';
+
+define( 'VERSION', '7.0' );
+define( 'DB_USER', $config['drupal']['username'] );
+define( 'DB_PASSWORD', $config['drupal']['password'] );
+define( 'DB_HOST', $config['drupal']['server'] );
+define( 'DB_NAME', $config['drupal']['database'] );
+
+require_once "${basedir}/civicrm/install/civicrm.php";
+
+civicrm_main( $config );
diff --git a/bin/drupal-install.sh b/bin/drupal-install.sh
new file mode 100755
index 0000000..1d5bd7d
--- /dev/null
+++ b/bin/drupal-install.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if [ $# -ne 3 ]; then
+       app_name=`basename $0`
+       cat <<-EOS
+               Usage: $app_name DB_URL SITE_NAME ADMIN_PASSWORD
+
+               Example: $app_name mysql://DB_USER:DB_PASS@localhost/DRUPAL_DB 
crm.localhost.net ADMIN123
+       EOS
+
+       exit 1
+fi
+
+DB_URL=$1
+SITE_NAME=$2
+ADMIN_PASSWORD=$3
+
+drush \
+       --root=`dirname $0`/../drupal \
+    site-install standard \
+    --db-url="$DB_URL" \
+    --site-name="$SITE_NAME" \
+    --account-name=admin --account-pass="$ADMIN_PASSWORD" \
+    install_configure_form.update_status_module='array(FALSE,FALSE)'

-- 
To view, visit https://gerrit.wikimedia.org/r/216891
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I59a068b0e690a4e7e3d4b60577dcf686aa5f7885
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: AndyRussG <andrew.green...@gmail.com>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: Katie Horn <kh...@wikimedia.org>
Gerrit-Reviewer: Ssmith <ssm...@wikimedia.org>
Gerrit-Reviewer: XenoRyet <dkozlow...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to