User login

Stefan Freudenberg

Cron on Agaric's MayFirst servers

The cron jobs for each web site are created as the user associated with that web site: the user accesses it with the crontab command

For instance:

su exampleuser
crontab -l

To see what cron jobs that user has, which should contain the "drush -r /var/local/drupal/exampleuser/web cron", where exampleuser is the site project name (which may or may not be identical to the username, but is in any case owned by the user).

The admin (root) can see them all in /var/spool/cron/crontabs

grep -h \* /var/spool/cron/crontabs/*

Pulling structured data from some web sites to another with RDFa

getting data from one site to another understanding fields and all (sounds like Deployment is what they want... but they want 'standards')

RDFa Monkey appears dead, or at least its link (from various sites) goes to a Microsoft IIS server's file not found page: http://www.avthasselt.sohosted.com/rdfamonkey/

http://rdfa.info/rdfa-implementations/

Execute command-line statements from within the vi editor

It is very simple and occasionally useful to access the power of the shell from within your vim text editor. In normal mode (esc from insert mode), simply type, colon included

:r

Commands must be preceded by a bang symbol (exclamation mark). Some examples:

:r !date
Wed Apr 21 23:04:22 PDT 2010

Personally, i'll find this useful simply for putting in paths from the file system that i may not be certain of but that bash's tab autocomplete will be able to verify for me.

Using Drush to list your modules and their statuses: drush sm (for show modules)

On the command line and want to list the modules you have on your site? Fortunately, there's a module-listing command that Agaric's Stefan Freudenberg contributed to Drush.

drush sm

Think "show modules" to remember sm. (The official full name of the command is pm-list which is confusing so just ignore it.)

You can do all your usual fancy command line things:

ben@ubuntu:~/code/agaric/web$ drush sm | grep Views

Kerberos user creation and password changes for Agaric test sites

Everyday use

You can change your password at https://agariclabs.net/krb/passwd

Or when logged in to simone.mayfirst.org with kpasswd (first type your current password, and then your new one, twice).

Initial setup of a user via the command line

These commands can be run on Agaric's test server, simone.mayfirst.org.

First, to see if a username already exists, you can list them with listprincs:

Create rewrite rules from new and old URLs using the power of Vim to munge text

As part of the move of Agaric content from Agaric.com to data.agaric.com, we needed to create a bunch (1,592 to be precise) redirects that look like this one:

RewriteRule ^nice-menus-drop-down-bug http://data.agaric.com/node/1048 [NC,R=301,L]

Stefan, in his wizardry, had already pulled a tab-separated-value file of the old path to the new URL, so that what we had was:

nice-menus-drop-down-bug http://data.agaric.com/node/1048

Much smarter command line history up/down behavior - with search

You may know about ctrl+shift+R for reverse case-insensitive search (or whatever it stands for) and that is still useful if you remember one very unique keyword from the middle of a command.

XML Schemas for Drupal configuration

Stefan brought up the desirability of defined XML schemas for Drupal configuration, and the niceness of autocomplete XML-aware editors could then provide.

Patterns module would appear to be the closest to providing this: http://drupal.org/node/353654

There is some conflict though, we think, between auto-generating and hand-editing XML (or any other) configuration files; changes should come from one source.

check for stale system table entries in one line

for file in mysql dbname -e "SELECT filename FROM system" | sed "1d"; do [ ! -f $file ] && echo $file; done

This lists all the files from the system table that do not exist in the actual file system anymore.

In our experience, this more often mean modules with bad uninstall practices, rather than modules deleted without uninstalling.

See also Enabled Modules

Deploying the Agaric way

Background

Where we come from

After journeying from Capistrano to Vlad we eventually use pure Rake tasks for our deployment. While Vlad was a great improvement it also had downsides. Lack of feedback from tasks made it hard to tell why they failed. Also the most interesting feature of those deployment tools is not required in our case: The ability to roll out to many servers at the same time.

Syndicate content