drush plain confusing.

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

look, i just cannot understand this drush thing especially in relation to aegir. i have been stuck for months because i couldnt add modules or themes and i didnt want to look stupid. well, too late for that. i mean, i have looked at drush tuts on youtube and on the web, nothing seems to work. its like reading a book with pages missing. can somebody just tell me exactly what drush stuff on preloaded on BOA?

Comments

I agree - it has me beat

geofftech's picture

I agree - it has me beat also.

I know some commands are only available if you login in as a particular user.

I would really like to understand this part better, but have not had the time to explore it yet.

thank you! i thought i was

socialtalker's picture

thank you!
i thought i was the only one on the entire planet that was confused on how drush, aegir, barracuda, octopus all work together. everybody else is just swimming right along, and i am drowing in a swamp of confusion. lol.
like a lot of stuff that blocks me, its probably just a few simple things i need to understand.

Completely agree with you here.

paddypatpat's picture

It's just so damn difficult to do something sensibly and well. Just wanted to completely agree with you here.

Scattered documentation and conflicting methods for various versions is a pain. It's like Drupal needs to use it's ability to show multiple languages for the same content to show multiple versions of instructions based on the drupal version. And to show it in one place, rather than everywhere (if you can find it).

Steam released

EDIT: Sorry, looks like there's a +1 button now. I should have used that.

What exactly are you looking for?

defiantbyte's picture

Drush is a command line tool that makes it quicker to manage drupal sites than using the online interface. There's nothing BOA / Aegir specific about it install-wise, HOWEVER drush does depend on knowing which site it is dealing with.

Drush figures that out by what directory you are in when running the Drush commands. On a normal Drupal install you can be in sites/all or sites/default, but Aegir uses Drupal multi-site so you need to be in the site/your-domain folder when running the commands.

If you are having trouble finding your site, you need to first find the platform it is running on. Then find the file location for that platform, which is available in the Aegir interface. Inside that platform's folder is a regular drupal folder structure, so you should see sites and in there your site.

If you are looking for something more specific, let me know.

wow, i thought no one would

socialtalker's picture

wow, i thought no one would respond to my post because the question was stupid. thats for responding.

first off, can you just tell me this first: do i have to actually install drush on my vps?

with installing BOA, there was so much pre-install tools added to aegir for security and optimization, i half assumed drush was one of them.
the tutorials that are posted on youtube about drush do not deal with aegir, just basic drupal and they are using a WAMP or MAMP, not something linode.
since i couldnt install mod and themes or enable them on the site, after i failed to connect using drush, i tried to find them using smartftp, which i couldnt even connect to.

tonight i will be trying to understand you instructions about where to locate my sites. i have tried and failed to try to locate them on octopus before.

FTP User

defiantbyte's picture

I know you answered this for yourself, but for the sake of anyone stumbling onto this thread I wanted to reply with answers here.

Yes, Drush is already installed and ready to go after the BOA install. And like I said previously, there isn't anything BOA or Aegir specific installed (outside of extension commands). But Aegir does use Drupal multi-site to manage sites within a platform, so you have to be in the site-specific folder to run drush commands not sites/all or sites/default.

Your issue with connecting via an FTP client might be a few things.

  1. Make sure you are using SSH/SFTP.
  2. After the Octopus install you should have received an email about a new Aegir install. In that email there is a user that you should use to connect to the server. It's typically in the format of "o1.ftp".
  3. If you changed the SSH port during your Barracuda install, make sure you are using that port.

Hope this helps.

okay, how do you run

geofftech's picture

okay,

how do you run provision-verify from the command line?

I would have thought it would be

drush provision-verify @domain.com

Check out Mig5's post on

defiantbyte's picture

Check out Mig5's post on this. He talks about running a bunch of these commands related to Aegir.

http://mig5.net/content/manage-your-aegir-system-command-line

This is the proper syntax:
drush @domain.com provision-verify

That @domain.com is the alias Drush uses to identify the site. Are you just looking to verify the site? Or are you working on something bigger?

thanks i will take a look at

socialtalker's picture

thanks i will take a look at this tonight!

okay, i read that link,

socialtalker's picture

okay, i read that link, question; am i correct in assuming drush was installed with BOA and barracuda/octopus did steps 1,2,3, and 4 already?
no, wait, BOA has also done steps 5-10 also?
it acts as if installing sites on the front end doesnt count.

"A Drupal installation directory could not be found "

so i stare over and look for the platform address
nearly all the sites i have put in are standard drupal 7, so
i went back to aegir and found the path for the platform
Drush configuration:
/data/disk/my name/distro/001/drupal-7.12-prod/drushrc.php

i use cd command to get as far as the modules folder, but i still make no further progress with drush.

then i tried to install a module and some other things and it still doesnt work
http://pastebin.com/zDaS8Xx2
why isnt it working?!?! anybody! please!

You need to be in the domain folder

defiantbyte's picture

Ok the first problem is you aren't in your site folder, you are in sites/all. Change into the sites directory and do "ls". You should see folders for each of the sites you have installed to that platform.

Secondly I don't think your drush commands are correct. Have you seen this page?

http://drush.ws/

You can also run "drush help" and it will list the commands.

Once in the site-specific folder (sites/your-domain-com), you run the following:

  • drush dl views (this downloads it)
  • drush en views (this enables it)

The commands I gave are shortcuts, if you look on the page I linked you to the full commands are pm-download and pm-enable.

See if that helps.

thanks! i am going to try

socialtalker's picture

thanks! i am going to try your instruction a bit later after my tylenol has kicked in.

You need to be in the domain folder

defiantbyte's picture

Ok the first problem is you aren't in your site folder, you are in sites/all. Change into the sites directory and do "ls". You should see folders for each of the sites you have installed to that platform.

Secondly I don't think your drush commands are correct. Have you seen this page?

http://drush.ws/

You can also run "drush help" and it will list the commands.

Once in the site-specific folder (sites/your-domain-com), you run the following:

  • drush dl views (this downloads it)
  • drush en views (this enables it)

The commands I gave are shortcuts, if you look on the page I linked you to the full commands are pm-download and pm-enable.

See if that helps.

Note that in BOA there is a

omega8cc's picture

Note that in BOA there is a separation between Aegir system user and your limited shell user, so by default you don't have an access to the Aegir backend and you can't run any drush commands with aliases available only for the system user.

If you wish to operate as an Aegir system user, you need to switch to this user.

For example, if your limited shell user is o1.ftp (default), then your system user is o1. System user doesn't have any valid shell or password (this is what "system user" means, btw), so you need to switch to this user using command like:

$ su -s /bin/bash - o1

Now you can manage any site or platform using its drush aliases, so you don't need to use cd /path/to/site.

Remember that using Aegir system user requires some level of experience, as it is easy to destroy your system when you don't really know what are you doing. This is why BOA comes with safe, separate user, but it comes with a price - you can't use drush aliases with this user (yet), so you need to cd /path/to/site to do things like drush dl somemodule, drush en somemodule -y or drush cc all etc.

I hope this helps.

WORKING FINALLY!

socialtalker's picture

well, i think.....after a whole week of headache, i am able to install modules and themes. cant belive it, i thought i would never be able to do it.
drush dl module command works for sites/all, but drush en module doesnt work for sites/all, i have to do drush --uri=mysite1.com en module or site by site, i dont know why.

here is the situation and i hope and pray i dont have to scrap everything and rebuild my server, i would have a meltdown.

you have always said to install boa with a completely clean server thingy. welllll, i wanted some security. so i set my linode with 2 user names and gave them all privates, THEN in went into root and installed barracuda and octopus. so i end with with five usernames/passwords, included the root log in, the barracuda log in, the octopus log in, the aegir login, and another log in. five log in, just for me.

i tried to run drush with my aegir login, didnt work. so i logged in as root, and failed. it was still saying error. so i did as you meantioned and put su -s /bin/bash - o1
that didnt work, because it didnt know what o1 was, so i just put in 'su' in, it asked for a password. i put in a password in...i cant remember which one it was..lol i think the one i made before installing BOA. anyway it worked. i can install at 'root@server'.
you dont think that will cause some kind of problem in the further? i hope nothing breaks.
thanks for the post.
you dont think there will be problems in the future with this set up, do you

to omega8cc

socialtalker's picture

just for clarification, i DONT have to rebuild my server and reinstall BOA? somehow i dont think i am supposed to have five different log ins ,but if you say thats okay, then i wont change it.
thanks.

but drush en module doesnt

rpsu's picture

but drush en module doesnt work for sites/all, i have to do drush --uri=mysite1.com en module or site by site, i dont know why

In BOA modules are typically downloaded into sites/all/modules, and all sites can use those modules. However for site example-A.com you need to enable modules per site, so

  • either using site alias, like drush en date @example-A.com or
  • running drush command drush en date within your site directory, typically sites/example-a.com/ (same dir where settings.php exists) or
  • running drush commands with site location, for example drush en date -l example-a.com (so drush knows where to look for settings.php)

--
Perttu Ehn

thanks for responding. yes,

socialtalker's picture

thanks for responding. yes, that is what i wound up doing, enabling site by site. i was just concerned i might be doing something wrong. there are some modules i need on all sites, like views and themes, like omega.

Run Drush on ALL sites

geofftech's picture

If I want to run a command on all the sites on a particular platform, I have this as a shell file that I SSH and run from the /sites folder.

for d in *
do
   if [ ! -d $d ]
    then
       echo "$d if not a folder"
    elif [ $d == "all" ]; then
       echo "not the 'all' folder"
        elif [ $d == "default" ]; then
                echo "not the 'default' folder"
   else
      echo "do $d"
     cd $d
      drush updatedb -y
      drush cc all
       drush cron
     # drush en module_filter -y
        cd ..
  fi
done

You can see here - in this example - I am making sure the DB is up to date, clearing all caches and making sure the cron is run - for every domain.

Hope this is useful to someone.

brave man! i am not a coder,

socialtalker's picture

brave man!
i am not a coder, so i am not going near that.

BOA

Group organizers

Group notifications

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