plesk cli wrapper

Post on 25-Jun-2015

2.528 Views

Category:

Technology

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

Tool for geeky Plesk admins.

TRANSCRIPT

Awesome CLITool for geeky Plesk admins

Unix only

Captain Obvious

A lot of time in console

Completion, aliases, own scripts

Plesk has rich CLI interface

There are some problems with it ;)

Not So Obvious

I waste spend~50% of time at console

typing... typing... typing...

Typical Commands

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

/usr/local/psa/bin/domain ...

/usr/local/psa/bin/sw-engine-pleskrun /usr/local...

tail -f /var/log/sw-cp-server/error_log

...

(taken from history file)

MotivationPrevious problems

Book

Tool for own use

Welcome To “plesk”Plesk CLI Wrapper

One utility named “plesk” for every task

Self-documenting

Manual page (man plesk, right!)

Bundled with Plesk 11.5

One-click installer for older versions

Commands vs. SuitesToo much commands

/usr/local/psa/bin/domain

mysql

cat, tail and etc.

Unification

plesk - single command for everything

plesk help subcommand - self documenting

Command Suites Examples

git

svn

rails

rake

...

Available Commands

plesk help

plesk bin

plesk sbin

plesk db

plesk php

plesk conf

plesk log

plesk version

Old Way#  cat  /etc/issueCentOS  release  5.9  (Final)..

#  cat  /usr/local/psa/version  11.5.22  CentOS  5  115130325.19

#  cat  /usr/local/psa/.revision  319415

#  uname  -­‐aLinux  hp-­‐demo.sb.plesk.ru  ...

New Way#  plesk  version

Product  version:  11.5.22          Build  date:  2013/03/25  19:00      Build  target:  CentOS  5              Revision:  319415      Architecture:  32-­‐bitWrapper  version:  1.0

Old Way#  mysql  -­‐uadmin  -­‐p`cat  /etc/psa/.psa.shadow`  psa

Welcome  to  the  MySQL  monitor......Type  'help;'  or  '\h'  for  help...

mysql>  

New Way#  plesk  db

Welcome  to  the  MySQL  monitor......Type  'help;'  or  '\h'  for  help...

mysql>  

Old Way#  /usr/local/psa/bin/sw-­‐engine-­‐pleskrun  /usr/local/psa/bin/client  -­‐h

Usage:  client  command  <login_name>  ..        Available  commands:        -­‐-­‐create  or  -­‐c          <login_name>        Creates  a  new  customer  account..

#  /usr/local/psa/bin/sw-­‐engine-­‐pleskrun  /usr/local/psa/bin/client  -­‐-­‐create  ...

New Way#  plesk  bin  cl<TAB>

client              client_pref    cloning

#  plesk  bin  client  -­‐-­‐create<TAB>

-­‐-­‐create          -­‐-­‐create-­‐gapps-­‐account

Results

Use it everyday by myself

Save time

Really like it (getting fun :))

Easy to extend with new commands

Integrated into Plesk 11.5

Try It!On your installation of Plesk 11.5

Using one-click installer for older versions

Project Repohttps://github.com/sibprogrammer/plesk-ctl

Thank You

Questions & suggestions:

sibprogrammer@gmail.com

top related