Thanks for the meeting

Events happening in the community are now at Drupal community events on www.drupal.org.
tim042849's picture

I want to thank K.C. for setting up the meeting and Mark for providing the room at Restoration Science. It was good to meet all of you. Since I have not posted before, I want to see how this works before I attempt to post a "recipe" on using drush to update or "push" a development site on a desktop to a server for deployment. Thanks Again, Tim

Comments

Hopefully Helpful Links

tehbmar's picture

I'm very curious on your methods to moving code with Drush, and I found an article that might save you some time from writing, since this is a lengthy subject.

Using drush to synchronize and deploy sites

Also, personally, when moving code, not including database information, I follow this
Building a Drupal site with Git

But the way I like to work around updating the database by hand is to keep as much as I can in code (i.e. Content types, features, etc) and use HOOK_update_N in my custom module's install files.

For more information on that method this article should be of help. Managing Drupal site updates with hook_update_N()

Thanks for the links Brandon.

tim042849's picture

Thanks for the links Brandon. I'm getting "access denied" from the link titled "Using drush to synchronize and deploy sites", but I would guess that I have may have read the same from another source. I'm also blocked from "Building a Drupal site with Git" with the same message, but again, that gives me the hooks to do the research.

I use my own application to leverage drush. I first used a shell script, but rewrote in python to best leverage some features that I was looking for. So, I have automated drush. Here's an example output (code begins)
Drush commands to execute
drush --yes @akwebsoft.rem vset maintenance_mode 1
drush --yes rsync @akwebsoft.here @akwebsoft.rem
drush --yes sql-sync --no-cache @akwebsoft.here @akwebsoft.rem
drush --yes @akwebsoft.rem updb
drush --yes @akwebsoft.rem cache-clear all
drush --yes @akwebsoft.rem vset maintenance_mode 0
(code ends)
Bear in mind that these are printed out because I choose the "print only, don't execute" option from my CLI (command line interface) that runs this. With the "execute" option, I would of course push the development site to the deployed server by executing the commands above.
For those not familiar with drush, following "@" are "aliases" which are mapped to descriptor data structures that provide controls and data.

One thing I have not yet figured out is how to do "updb" or "sql-sync" without overwriting other users. It is moot in this case because it applies to my company site where I am the only user. (I'm guessing that "skip-tables" is a clue....)

Brandon, I note your reference to using git and hook_update_N(), I appreciate the info. All things being equal, my preference would be the command line, and I'm prepared to be edified by "git".

Some may ask why I don't use PHP to automate drush. Three reasons :
1)I'm a seasoned pythonist and green to PHP
2)Even PHP programmers will tell you that it has its limits when it comes to system programming.
3)I may find myself supporting other drupalists .... using my existing tools.

I'm really jamming here at home at will have more time to participate in this thread tomorrow or the next day. See my questions about "updb" and "sql-sync" with other authenticated users, that is something I need an answer for.

Cheers
Tim

Drupal Noob (since 2012)
Coder since 1987 - Web Coder since 1996
akwebsoft.com - tj49.com

It seems to be an issues with

tehbmar's picture

It seems to be an issues with freelinking I'll investigate a little into until then here are the direct urls.

Building a drupal site with git: https://drupal.org/node/803746
Using drush to synchronize sites: https://drupal.org/node/670460

But it seems the methods you provided are very similar to, if not exact to the drush article I posted, which is good.

As for updb, when using the command "drush updb" it only runs update.php which to the extent of my knowledge runs HOOK_update_N() functions inside of every module (according to the last time those hooks were ran).

And for using "drush sql-sync" have you tried the --skip-tables-key flag? more documentation here. http://drush.ws/#sql-sync

Oops, I left out the

tim042849's picture

Oops, I left out the --skip-tables-key flag :
Here are the amended commands as automated by my app:

drush --yes @akwebsoft.rem vset maintenance_mode 1
drush --yes rsync @akwebsoft.here @akwebsoft.rem
drush --yes sql-sync --no-cache --skip-tables-key=akwebsoft @akwebsoft.here @akwebsoft.rem
drush --yes @akwebsoft.rem updb
drush --yes @akwebsoft.rem cache-clear all
drush --yes @akwebsoft.rem vset maintenance_mode 0

As importantly : Here is the table list code that I put together:
$max_skip_tables = array('users','users_roles','roles','permission','cache','cache_block',
'cache_bootstrap','cache_field','cache_filter','cache_form','cache_image',
'cache_media_xml','cache_menu','cache_page','cache_path','cache_update');
$options['skip-tables']['akwebsoft'] = $max_skip_tables;

Are the table names in $max_skip_tables correct?
thanks again, Brandon

Drupal Noob (since 2012)
Coder since 1987 - Web Coder since 1996
akwebsoft.com - tj49.com

Drush with the hosting

Loyer's picture

Drush/Git with the hosting platform of Pantheon (http://getpantheon.com) makes Syncing multiple environments of a site a true pleasure.

I also highly recommend Pantheon for a host on any Drupal site, great people and over the top service!

:) The silence is deafening.

tim042849's picture

:) The silence is deafening. Have I stumped the chumps? Or have I got it right? Inquiring minds want to know!

Oh well, I will study the database schema and maybe I will post an inquiry to the forum if I have to. It will be good for me to know if my email notification setting work for the forum as well as for this subsection.

cheers
tim

Drupal Noob (since 2012)
Coder since 1987 - Web Coder since 1996
akwebsoft.com - tj49.com

I got nothing but I'll

LDMartin1959's picture

I got nothing but I'll respond just so you don't think your post got lost.

Thanks for the support and

tim042849's picture

Thanks for the support and feedback Les(?) - I did see my post. Have a good one.

Drupal Noob (since 2012)
Coder since 1987 - Web Coder since 1996
akwebsoft.com - tj49.com

Alaska Drupal Users Group

Group categories

Location

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week