Merge branch 'dev' of feistymeow.org:feisty_meow into dev
authorChris Koeritz <fred@gruntose.com>
Mon, 18 Dec 2017 13:04:07 +0000 (13:04 +0000)
committerChris Koeritz <fred@gruntose.com>
Mon, 18 Dec 2017 13:04:07 +0000 (13:04 +0000)
documentation/feisty_meow_command_reference.txt
production/sites/cakelampvm.com/rolling/env_vars.001/env_vars_cakelampvm.conf [new file with mode: 0644]
scripts/site_avenger/powerup.sh
scripts/site_avenger/revamp_cakelampvm.sh
scripts/site_avenger/standup.sh
scripts/site_avenger/teardown.sh

index 75371b11ba697be5f89127803283f8df363f7fc5..ebe9d02c412b643c573a56513c4d1c8bbb83be88 100644 (file)
@@ -120,7 +120,7 @@ managing web sites.  these scripts offer a lot of power to the developer, and
 of course that comes with great responsibility...
 
 the site avenger scripts are configured by "app" files stored in the "config"
-directory (in $FEISTY_MEOW_SCRIPTS/scripts/site_avenger/config).  the scripts
+directory (in $FEISTY_MEOW_SCRIPTS/site_avenger/config).  the scripts
 seek out a config file named after the application, e.g. they look for
 "winterportlibrary.app" if the application name is "winterportlibrary".
 the basic config file "default.app" is used for any application that is unknown
diff --git a/production/sites/cakelampvm.com/rolling/env_vars.001/env_vars_cakelampvm.conf b/production/sites/cakelampvm.com/rolling/env_vars.001/env_vars_cakelampvm.conf
new file mode 100644 (file)
index 0000000..3575476
--- /dev/null
@@ -0,0 +1,17 @@
+
+# these variables are global for all sites.
+# you may want to override them in your specific site config file.
+
+SetEnv SSO_SANDBOX_USE_LOCAL 1
+
+SetEnv SSO_SERVER_LOCAL_URL "http://accounts.local"
+
+SetEnv SSO_UNIVERSAL_SECRET "jimmydodad"
+
+SetEnv SSO_SERVER_LOOKUP_BROKER 0
+
+SetEnv AVENGER_SANDBOX_MODE 1
+
+SetEnv AVENGER_AIRPLANE_MODE 0
+
+
index c2ed28d5afaa15f9bb87d552dab1dccab7567528..ff2a99441a825320fc6742edd78d57bf6421439e 100644 (file)
@@ -38,7 +38,6 @@ function print_instructions()
   echo "app dirname: The folder where the app will be stored."
   echo "repository: The name of the git repository (short version, no URL)."
   echo "theme name: The name to use for the cakephp theme."
-#  echo "user name: The name of the user to chown the checkout to."
   echo
   exit 0
 }
@@ -51,9 +50,6 @@ function print_instructions()
 app_dirname="$1"; shift
 repo_name="$1"; shift
 theme_name="$1"; shift
-#user_name="$1"; shift
-
-#echo "*** user name is $user_name"
 
 if [ "$app_dirname" == "-help" -o "$app_dirname" == "--help" ]; then
   print_instructions
@@ -107,12 +103,17 @@ create_site_links "$site_store_path" "$theme_name"
 
 sep
 
-#if [ ! -z "$user_name" ]; then
-#  echo "Chowning the apps folder to be owned by: $user_name"
-##hmmm: have to hope for now for standard group named after user 
-#  chown -R "$user_name:$user_name" "$BASE_APPLICATION_PATH"
-#  test_or_die "Chowning $BASE_APPLICATION_PATH to be owned by $user_name"
-#fi
+# go with the default user running the script.
+user_name=$USER
+if [ ! -z "$user_name" -a "$user_name" != "root" ]; then
+  echo "Chowning the apps folder to be owned by: $user_name"
+#hmmm: have to hope for now for standard group named after user 
+  chown -R "$user_name:$user_name" "$BASE_APPLICATION_PATH"
+  test_or_die "Chowning $BASE_APPLICATION_PATH to be owned by $user_name"
+
+else
+echo "user name failed checks for chowning, was '$user_name'"
+fi
 
 sep
 
index a9016d8c5af158567714c54f17415e79ffac5100..8bd5eeee411cc5237e60287310788415f2716083 100644 (file)
@@ -20,6 +20,16 @@ source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh"
 
 ##############
 
+# new requirement is to get the sql root password, since we need to do some sql db configuration.
+echo -n "Please enter the MySQL root account password: "
+read mysql_passwd
+if [ -z "$mysql_passwd" ]; then
+  echo "This script must have the sql root password to proceed."
+  exit 1
+fi
+
+##############
+
 echo "Regenerating feisty meow loading dock."
 
 reconfigure_feisty_meow
@@ -122,8 +132,9 @@ if [ -L /etc/apache2/sites-enabled/000-default.conf ]; then
   rm -f /etc/apache2/sites-available/000-default.conf 
   test_or_die "removing old apache site"
 
-  # copy in our new 000 version (which  
-  cp $FEISTY_MEOW_APEX/production/sites/cakelampvm.com/rolling/default_page.001/* \
+  # copy in our new version of the default page.
+#hmmm: would be nice if this worked without mods for any new version, besides just 001.  see apache env var file below for example implem.
+  cp -f $FEISTY_MEOW_APEX/production/sites/cakelampvm.com/rolling/default_page.001/* \
       /etc/apache2/sites-available
   test_or_die "installing new apache default sites"
 
@@ -194,6 +205,42 @@ else
   echo successfully patched the samba configuration to enable writes on user home directories.  way cool.
 fi
 
+##############
+
+# set up some crucial users in the mysql db that we seem to have missed previously.
+
+mysql -u root -p "$mysql_passwd" <<EOF
+  create user 'root'@'%' IDENTIFIED BY '$mysql_passwd';
+  grant all privileges on *.* TO 'root'@'%' with grant option;
+
+  create user 'wampcake'@'%' IDENTIFIED BY 'bakecamp';
+  grant all privileges on *.* TO 'wampcake'@'%' with grant option;
+
+  create user 'lampcake'@'%' IDENTIFIED BY 'bakecamp';
+  grant all privileges on *.* TO 'lampcake'@'%' with grant option;
+EOF
+test_or_die "configuring root, wampcake and lampcake users on mysql"
+
+##############
+
+# add the latest version of the cakelampvm environment variables for apache.
+
+echo Setting up environment variables for apache2...
+
+# drop existing file, if already configured.  ignore errors.
+a2disconf env_vars_cakelampvm
+
+# plug in the new version, just stomping anything there.
+# note: we only expect to have one version of the env_vars dir at a time in place in feisty...
+cp -f $FEISTY_MEOW_APEX/production/sites/cakelampvm.com/rolling/env_vars.*/env_vars_cakelampvm.conf /etc/apache2/conf-available
+test_or_die "copying environment variables file into place"
+
+# enable the new version of the config file.
+a2enconf env_vars_cakelampvm
+test_or_die "enabling the new cakelampvm environment config for apache"
+
+echo Successfully configured the apache2 environment variables needed for cakelampvm.
+
 ##############
 ##############
 
index c31a33d8390e0e11487dec439146a08e780d3cdb..5adfcc63375aa07001e8e5b2818fc526a52c56bc 100644 (file)
@@ -72,9 +72,17 @@ test_or_die "Setting up domain: $DOMAIN_NAME"
 
 sep
 
+# add the main website as specified by the domain name they gave us.
 sudo bash "$FEISTY_MEOW_SCRIPTS/system/add_apache_site.sh" "$APPLICATION_NAME" "$DOMAIN_NAME"
 test_or_die "Setting up apache site for: $APPLICATION_NAME"
 
+# make the shadow site also, which always ends in cakelampvm.com.
+shadow_domain="${APPLICATION_NAME}.cakelampvm.com"
+if [ "$shadow_domain" != "$DOMAIN_NAME" ]; then
+  sudo bash "$FEISTY_MEOW_SCRIPTS/system/add_apache_site.sh" "$APPLICATION_NAME" "$shadow_domain"
+  test_or_die "Setting up shadow apache site on '$shadow_domain'"
+fi
+
 sep
 
 #echo about to do powerup with: app="$APPLICATION_NAME" repo="$REPO_NAME" theme="$THEME_NAME"
index 3e194083baa03488ab4705dd7edd9b30619b82a0..5bfcbd4699b9a01696af8f4a85ebd8e6b9bb2252 100644 (file)
@@ -62,6 +62,13 @@ sep
 sudo bash "$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh" "$DOMAIN_NAME"
 test_or_die "dropping apache site for: $DOMAIN_NAME"
 
+# drop the shadow site too.
+shadow_domain="${APPLICATION_NAME}.cakelampvm.com"
+if [ "$shadow_domain" != "$DOMAIN_NAME" ]; then
+  sudo bash "$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh" "$shadow_domain"
+  test_or_die "dropping shadow apache site on '$shadow_domain'"
+fi
+
 sep
 
 #echo "!! domain being removed is: $DOMAIN_NAME"