Back to top

Jenkins + Drush + Dropbox = Easily share sanitized database projects

I recently wrote about setting up Jenkins. My next step was making it do something useful to help our team become more efficient. In most any team it's likely that you'll get some folks for whom "just use drush sql-sync" is not a reasonble solution.

My goal: get a database backup into dropbox on a regular basis and make sure no sensitive customer data is in that backup.

Make a Database backup of the live site

We're running jenkins on a non-production server (for a variety of reasons). So, we get a backup of the live database into a temporary scratch database using the drush aliases feature. That process sanitizes it a bit using the sql-sanitize feature of drush. Then we dump out that database.

  1. Start with an up to date checkout of your live site's Drupal code
  2. Use the multisite feature and create a sites/example.prod/settings.php where the $databases array has a set of read-only credentials to the production database
  3. A second "site" at sites/example.scratch/settings.php
  4. Setup a Drush alias that points to those two sites inside the Drupal - be sure to use the 'uri' element so that drush knows which set of credentials to use inside the sites/ folder:

    $aliases['example.prod'] = array(
    'root' => '/var/lib/jenkins/example_scripts/example_com_checkout_for_drush/',
    'uri' => 'example.backup',
    );
    $aliases['example.scratch'] = array(
    'root' => '/var/lib/jenkins/example_scripts/example_com_checkout_for_drush/',
    'uri' => 'example.scratch',
    );
  5. The example.scratch credentials should point to a "scratch" database that is used just for these purposes.
  6. Finally a line in the Jenkins job to copy the database from the live site to the backup.
    drush sql-sync @sitename.prod @sitename.backup
People Involved: 

Using Drupal's Meta tag module for Facebook Open Graph, Google rel=author, and Page titles

Meta tags have gone back and forth in terms of their usefulness for promoting your site. In the late 90s they were a way for nascent search engines to easily categorize sites, then they were abused for keyword stuffing unrelated to page content and their use waned, but they are back again with three major purposes: Facebook Open Graph, Google Authors and Page titles. These are not necessarily "SEO" purposes, but the goal is ultimately the same: making sure that your site puts its best foot forward to gain new visitors.

Metatag module setup

The basic Metatag module setup is pretty straightforward. Download the latest version from the metatag project page. If you don’t have them already you will need the CTools and Token modules.

Setting up Metatag for Facebook Open Graph

There were a few different things I wanted to achieve with the Facebook Open Graph support. Basically, whenever someone includes our page on Facebook I wanted to make sure that the title, description text, and image that Facebook pulled in were the best possible images. I expect that most of the "liking" will occur on our card landing pages. So, I enabled the "Meta tags: Open Graph" sub-module that is included in the main Metatag module. Then I added a meta tag default for the "Campaign" node type by clicking on the bright "Add a meta tag default" at the top of the page on the page at Administration - Configuration - Search and metadata - Meta tags.

People Involved: 

11 wonderfully horrible modern productivity anti-patterns

You are a modern web-worker. When the internet in your office goes offline, it is a major drain on your productivity. Here are some things you may do or see in your daily life that are "anti-patterns" or behaviors which are counter to productivity. Please, don't do them! If someone else does one of them, maybe send them this post (it includes solutions).

When people break these rules (especially via email) it just makes me feel like Billy Sorrels: DELETE, DELETE, DELETE.

1. Putting Screenshots into Microsoft Word Documents

You make a screenshot using the "PrtScr" key and want to share it. How do you do this? You open Microsoft Word, paste the screenshot into the document, and send it via e-mail. It's an image, not a document. Save it that way.

The Problem: Bloat and speed meaning fewer people read the message. It takes way longer to open a document than to open an image. It also takes up more space in my inbox. I mostly don't care about e-mail/inbox size these days, but when I'm on a slow connection (via phone, via internet in a foreign country) it can be an issue.

The Solution: This depends on the operating system you use. Windows users: take the screen shot, open "Paint" (or another graphics program like Gimp) and paste the screenshot there. Save it as an image. If you are going to do it often I humbly suggest Skitch or AwesomeScreenshot.

Category: 
People Involved: 
timeline: 

New Discover Credit Card Design: Metallic front, details on back

Various news outlets are covering the release of the new Discover credit card, like Daily Finance.com.

Discover Card Design

And, here is the card design:

Discover it card design

It's interesting how they have completely broken from the standard way of lots of information on the front of the card. It's a really clean design with just their Discover logo/wordmark and a little orange "it" on the top right edge. The name, number, and all the other junk is on the back of the card. I haven't been able to find the design of the back of the card anywhere. Apparently the new card will be sent via expedited mail, getting it to customers in just a couple days instead of the industry standard "3-5 business days."

Their delivery box is not only going to get to you faster, it's attractive too:

Discover it delivery box

Commercials: Support and better features

Discover also has several new ads to go along with the card. This first one emphasizes the human, America-based support that is someone so friendly you might just call them for fun:

And this second one emphasizes the "no change to APR for your first late payment" while still giving the human, America-based, friendly support:

Drawbacks to Discover

Category: 
People Involved: 

Is Wal-Mart replacing Green Dot with American Express for Prepaid debit cards?

There's lots of news coverage today that Wal-Mart is partnering with American Express to offer prepaid debit cards in their stores. Wal-Mart previously offered Wal-Mart branded Visas via a partnership with Green Dot. American Express is accepted less widely than Visa, so it seems likely that Wal-Mart will want to continue offering a Visa or Mastercard either with Green Dot or someone else. On the other hand...since Wal-Mart accepts American Express they might see this as a feature: it means people will choose them if another merchant doesn't accept AmEx.

Press covreage of prepaid expansion by Amex

Amex/Walmart deal affects GreenDot shares

In trading on Monday, shares of Wal-Mart (WMT) and American Express (AXP) were largely unchaged while Green Dot was down about 20%. Investors have been watching closely to see whether Wal-Mart will renew their current agreement with Green Dot which is set to expire at the end of 2012.

Fees for the Bluebird debit card

According to a reuters article:

Category: 
People Involved: 

Pages

Subscribe to Knaddison.com RSS