OK! So those who attended my session on my Drupal development workflow at DrupalCamp Austin this year are probably still reeling from the experience-- I know I am. And I am wanting to post all the gaps I failed to cover and whatnot. There will be a reprise session, streamlined, clearer, and still more thorough at Southwest Drupal Summit 2010.
For now, here are some tidbits to tide you over:
Just this afternoon, I had to swap out a header slideshow from using views rotator to views_slideshow on a live site. My workflow for this, true to how it was presented but even better, was:
-
On production site:
- drush sql-dump > the .sql in the inaccessible assets folder monitored by git
- git add . to ensure I picked up all new documents, images and whatnot uploaded to the site since last maintenance
- git commit
-
git push orign master
because, in this case, I have an interim server hosting some of my git repos using indefero.
-
On local dev:
-
git pull origin master
- Contemplate pulling my hair out, because git crabbed about untracked files that would be overwritten, yada yada.. but instead
- rm that "offending" file and then git reset --hard for good measure
- then git pull origin master
- drush sqlc < the .sql from the inaccessible assets folder monitored by git.
-
git pull origin master
At this point, I've got local looking just like production, but the current views_rotator driven front page slideshow is not managed by Features! What to do! No worries..
I downloaded and enabled the views_slideshow module, edited the View locally, simply changing the Style to Views Slideshow, and set up the other params. Then I modified the css to match the previous views_rotator css-- not too different, just different selectors (and a chance to clean up a bit):
- drush dl views_slideshow
- drush en views_slideshow_single -y (what? oh cool, it automatically updates the "parent" dependency views_slideshow for me.. Thanks module manager!)
- Edit the view
- Edit the css
Next I created a new feature of this slideshow whose View machine name has not changed, added it to the site, and enabled it:
- Create the new feature via Manage Features web UI, cherrypicking a few things starting with the View in question and downloaded it.
- tar -xf frontpage_slideshow.tar (hmm, that sounds like my presentation almost to a T!) into the sites/all/modules/custom folder
- drush en frontpage_slideshow -y (psst, hey Chris, the -y is to bypass the y/n prompt ;) )
Commit to git, and push to remote. I include the sql-dump but don't intend to reload it at remote-- check it out:
- git add . (to pick up the newly downloaded views_slideshow module and the newly created frontpage_slideshow Feature)
- git commit -am "swapped out for views slideshow; modified css to support; created feature frontpage_slideshow"
- git push origin master (again, this is going to the lillipad indefero remote git repo)
Then on remote, production:
- git pull origin master at which point I now have all the files from the changes before but no database changes loaded
- drush en views_slideshow_single -y
-
drush en frontpage_slideshow -y
Ok, check this out.. do drush features or visit Manage Features page, and you'll see that the new Feature is installed and enabled..... but it's in the state of Overridden-- confused? Don't be: this just means that the database and live view of the frontpage slideshow (now actually referred to as frontpage_slideshow) is different (the old version) from the code version on disk. -
drush fr frontpage_slideshow -y
Woah. Revert?? Yes. That's the confusing nomenclature of Features (in this release). It's not really "revert", it's "update from file" in my workflow, but whatever. Just do it. Load from file, load from disk.
WHAM! The frontpage slideshow is now the new views_slideshow, and life is GOOOoood.
(oh, and yeah, it really works! I hope to post some log or screenshots here in a bit, but don't hold your breath.)
So - you are using features
So - you are using features to "package" aspects of the site and then Git provides version control for the feature? Then when you upload the updated feature to production, its all set except for the "revert" on the feature?
Is there any way to use Git to control versions of the whole site or DB? I'm just learning Git, so it may be dumb...
Or is it that you are using features to package the DB configuration into files, which are then versioned by Git?
Fantastic stuff, though... I appreciate the info and am looking forward to playing with a similar setup.
ron
Only features, not db _files_ in git
Good question, and in fact (if I understand correctly), I was once interested in storing the actual mysql files (the ones typically under /var/lib/mysql) but later go ahold of myself and never tried it. No, in fact in my workflow, I store the db dump as a whole and let it ride with the repo wherever it goes. Sometimes I dump again (usu just from staging/remote, not usu the other way) as changes to db and config are made.
As for your question (which is what getting stored where)-- I'm techincally only packaging site structures and functions (site features) and changes to css when I make these sorts of commits and updates remotely. This is only made possible by the Drupal Features module, and that is its sole purpose in life.
Git itself is just the ultra convenient transport (in this case), although it does of course work as version control if that's what you need, too. It is, in fact, version control at its heart, but is so efficient at moving things around and moving only and exactly everything that has changed on disk. There is no voodoo to my workflow other than the way that each works so incredibly well!
Ohhhh hoh hum. Now you're gonna motivate me to build out a proper blog post on my whole workflow. It was bound to happen anyhow! :)
hehehe - +1 on the tutorial
hehehe - +1 on the tutorial for build out! It would make a nice edition to your talk in Houston...
I mean - its not like you are busy or anything with 2 kids and one being born any day... :)
Can you please write more
Can you please write more blog entries on this subject, its a request, because after reading your blog I am highly interested in learning more....
Wallace Keynes
My Blog:
copy xbox 360 games|copy wii games|
Then click on the launcher —
Then click on the launcher — and run away from you. Another important distance is 2.5 km from the different games. The 31 skills of the eve isk that has a very important impact during eve online isk fights. It can also start not with the support of a vanguard ship, easily breaking the enemy spends some forces on the boundary of its Shield. The exact orbit depends on your specific tactics. For the chance of death, and many low
slots will be too low, the road to high-sec systems.
Many persons are intriguing
Many persons are intriguing in progress of the pc. They wish to know the latest information of the pc progress. Then, they wish to use the latest version of the program. youtube converter
Website is one of the media
Website is one of the media that routinely used to share records. It's because many people use internet. Therefore, the website will become trends in sharing many things and more faster. online solar classes
re
This kind of content exemplifies the Internet at its finest - and I do not assert this lightly!
Nowadays, the development of
Nowadays, the development of the computer is very high. It is because the developers answers people's demand. The variation of computer has been a lot. lawn mower reviews
Sometimes, computer gives
Sometimes, computer gives some problems. Some people may be panic. They do not know about the structure of the computer. forex ipad
I agree with every statement
I agree with every statement that you have made in the post and I really appreciate your effort in gathering up the information. relatiegeschenken
Great article. You do make an
Great article. You do make an excellent point there. Best of luck with your future posts.Computerhulp
That means that our last two
That means that our last two years can be summarized in 40gigs, and there's a lot of repetition arabian ranches dubai
I'm still learning from you,
I'm still learning from you, but I'm trying to achieve my goals. I certainly enjoy reading all that is posted on your blog. Keeps the information coming. I loved it!
Foley Catheter
nice one
I am inspired by the writing style of author. I will be visiting in future to extend my knowledge. Thanks Google Plus 1 Service
Very interesting and
Very interesting and insightful.
radyo dinle
I couldn't get to much other
I couldn't get to much other details on this piece, so it was great to find this one. I will probably end up being back to check out some other posts that you have another time..ooglaseren
It’s a great pleasure reading
It’s a great pleasure reading that you posted here.
html kod
Nicely written blog This is a
Nicely written blog This is a wonderful post. I enjoyed the information lot. I will bookmark this page. Thanks for sharing this important information.
white one shoulder dress
Netter Post
Wenn man sich die Post so ansieht kann man schon glauben, dass es der Wirklichkeit entspricht was so gepostet wird. Bin immer wieder sehr erstaunt wieviele Möglichkeiten es im Netz gibt sich zu unterhalten. Schönen Gruß von Lena! Feuershow Freue mich auf Euren Besuch
I really enjoyed reading this
I really enjoyed reading this article. It was very well authored and easy to understand. Unlike other blogs I have read which are really not that good. I also found your posts very interesting.
porter-cable router table
Your blog is very
Your blog is very informative. I really appreciate your hardwork. Thanks You for such good information. Keep up good work !!
pick up lines
Well written ! i have to
Well written ! i have to admit that it's very informative article. This really is another very amazing and interesting publish. You've provided the publish that's proportional to the interest. Thank you for this publish.
post nasal drip
Thank you for such a
Thank you for such a fantastic blog. Where else could anyone get that kind of info written in such a perfect way? I have a presentation that I am presently working on and I have been on the look out for such information. sd memory cards
Great article. You do make an
Great article. You do make an excellent point there. Best of luck with your future posts.
roulette online
Great info in this post. I'm
Great info in this post. I'm sure many will agree with you on this subject.
dust collector reviews
Good
I thank you for taking your time sharing your thoughts and ideas to a lot of readers out there.Its very typical to write such kind of article for typical topic.
wholesale women's clothing
Thanks for sharing this
Thanks for sharing this information, I'm sure many people have learned something from this post.
electric smoker reviews
Drupal projects have grown to
Drupal projects have grown to rely heavily on sitebuilding. Website creators use Drupal modules like Views and CCK to create site architecture.
toko sepatu online
This is exactly what I was
This is exactly what I was looking for. Thanks for sharing this great article! That is very interesting Smile I love reading Nama bayi
While Drupal 7 is gearing
While Drupal 7 is gearing fast towards releasing, Drupal itself needs your contributions and support today. Especially, in promoting Drupal as the best open source CMS out there and in ensuring that the new bronius.com is a perfect experience.
Drupal customization
Drupal Development and features
Agility recently announced an update to their Agility CMS labeled as the "May 2012 Release".The new release offers a complete revamp of their digital asset management system, image gallery and thumbnail improvements, and the ability to store and retrieve file and image assets in Agility's new Azure-based content delivery network.
opensource application development
Well information..
Awesome article on drupal because this program has been created in an effort to promote learning in the Drupal community and extend its reach.
Drupal development
This is exactly what I was
This is exactly what I was looking for. Thanks for sharing this great article! That is very interesting Smile I love reading Nama bayi
I like all the reviews have
I like all the reviews have been posted by the visitors of this site for Drupal development,some of them are very good suggested regard the article.
opensource crm
The work being done on this
The work being done on this is so good. You cannot go wrong with this at all. Keep up the good work layher gerueste
Very much appreciate similar
Very much appreciate similar to such a wonderful and excellent blog post from which can come into contact with a lot of meaningful knowledge and information . These are hard to come by , now mixed network can insight into this site really is not easy . Thank you for your wonderful sharing.
clubmz reviews
Good
I thank you for taking your time sharing your thoughts and ideas to a lot of readers out there.Its very typical to write such kind of article for typical topic.
wholesale women's clothing
Good question, and in fact
Good question, and in fact (if I understand correctly), I was once interested in storing the actual mysql files (the ones typically under /var/lib/mysql) but later go ahold of myself and never tried it. No, in fact in my workflow, I store the db dump as a whole and let it ride with the repo wherever it goes. Sometimes I dump again (usu just from staging/remote, not usu the other way) as changes to db and config are made.
itunes duplicate remover
Nice tutorial
I have been searching for quite some time for information on this topic and no doubt your website saved my time and I got my desired information. spy on text messages
Useful information
Very Useful information in this article. Hope I can read more soon!
airless paint sprayer reviews
NICE
I read your post and I found it amazing .Your thought process is wonderful. The way you express yourself is awesome. used cars for sale
nice topic
I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks briquette making machine rice husk
I just wanted to say that I
I just wanted to say that I found your web site via Yahoo and I'm glad I did. Keep up the good work and I will make sure to bookmark you for when I have more free time away from the books. Thanks for sharing and keep up the good work.
cell phone spy software
Thank you for another
Thank you for another essential article. Where else could anyone get that kind of information in such a complete way of writing? I have a presentation incoming week, and I am on the lookout for such information.
clubmz reviews
This is a very nice photo you
This is a very nice photo you got in here. Can't wait to see more of this from you. samsung 1080p hd tv
Useful intro
I really loved reading your blog. It was very well authored and easy to understand. really not good. I also found your posts very interesting. clubmz
The issue can normally be
The issue can normally be addressed by implementing aggressive caching as described above, such methods may be unimplementable in cases where the host does not offer access to PHP accelerators like XCache or APC. Drupal has plugins that facilitate similar caching without requiring special PHP extensions. Thanks.
Regards,
reverse email search
thanks
Your blog posts looks unique and informative. Thanks for sharing this.Reviews on Lipozene
It's easier if we have been
It's easier if we have been given the steps for it. So we just need to following it until finish.
Alaska SEO