コード例 #1
0
ファイル: BackupShell.php プロジェクト: alt3/cakebox-console
 /**
  * Define available subcommands, arguments and options.
  *
  * @return parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description([__('Manage backups.')]);
     $parser->addSubcommand('database', ['parser' => ['description' => [__("Creates a Percona XtraBackup full (hot) backup of your MySQL server.")]]]);
     return $parser;
 }
コード例 #2
0
ファイル: UpdateShell.php プロジェクト: alt3/cakebox-console
 /**
  * Define available subcommands, arguments and options.
  *
  * @return parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description([__('Manage updates.')]);
     $parser->addSubcommand('self', ['parser' => ['description' => [__("Updates your Cakebox Dashboard and Cakebox Commands\n                        to the most recent version.")]]]);
     return $parser;
 }
コード例 #3
0
 /**
  * Define available subcommands, arguments and options.
  *
  * @return parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description([__('Easily create fully working applications.')]);
     $parser->addSubcommand('add', ['parser' => ['description' => [__('Installs a fully working application in /home/vagrant/Apps using Nginx and MySQL.')], 'arguments' => ['url' => ['help' => __('Fully qualified domain name used to expose the application.'), 'required' => true]], 'options' => ['path' => ['short' => 'p', 'help' => __('Full path to installation directory. Defaults to ~/Apps of the user sudo-executing the cakebox command.'), 'required' => false], 'framework' => ['short' => 'f', 'help' => __('PHP framework to use for the application.'), 'choices' => ['cakephp', 'laravel'], 'default' => 'cakephp'], 'majorversion' => ['short' => 'm', 'help' => __('Major CakePHP version to use for the application.'), 'choices' => ['2', '3'], 'default' => '3'], 'source' => ['help' => __('Source used to provision your own application. Provide either the Github shortname to your repository (owner/repository) or the Composer package name (e.g. cakephp/app). Framework will be autodetected.'), 'required' => false], 'webroot' => ['help' => __('Webroot as to be used as your Nginx virtual host webroot directive. Required when using custom sources.'), 'required' => false], 'hhvm' => ['help' => __('Serve pages using HHVM instead of PHP-FPM.'), 'boolean' => true], 'ssh' => ['help' => __('Use SSH instead of HTTPS. Only useful in combination with out-of-the-box applications using git repositories.'), 'boolean' => true], 'repair' => ['help' => __('Repair an existing installation by installing only missing sources, databases and/or virtual hosts.'), 'boolean' => true]]]]);
     return $parser;
 }
コード例 #4
0
ファイル: PackageShell.php プロジェクト: alt3/cakebox-console
 /**
  * Define available subcommands, arguments and options.
  *
  * @return parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description([__('Manage Ubuntu software pacakges.')]);
     $parser->addSubcommand('add', ['parser' => ['description' => [__("Installs a software package from the Ubuntu Package archive.")], 'arguments' => ['name' => ['help' => __('Name of the software package as used by `apt-get install`.'), 'required' => true]]]]);
     return $parser;
 }
コード例 #5
0
ファイル: ConfigShell.php プロジェクト: alt3/cakebox-console
 /**
  * Define available subcommands, arguments and options.
  *
  * @return parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description([__('Manage various configuration settings.')]);
     $parser->addSubcommand('git', ['parser' => ['description' => [__("Configures git globals user.name and user.email.")], 'options' => ['username' => ['short' => 'u', 'help' => __('Git user.name to use globally.'), 'required' => false], 'email' => ['short' => 'e', 'help' => __('Git user.email to use globally.'), 'required' => false]]]]);
     $parser->addSubcommand('dashboard', ['parser' => ['description' => [__("Configures the Cakebox Dashboard.")], 'options' => ['protocol' => ['help' => __('Git user.name to use globally.'), 'required' => false, 'options' => ['http', 'https']], 'force' => ['short' => 'f', 'help' => __('Set protocol even if it is already being used.'), 'boolean' => true]]]]);
     $parser->addSubcommand('debug', ['parser' => ['description' => [__("Enable CakePHP debug mode for Cakebox Commands and Dashboard.")], 'arguments' => ['mode' => ['required' => true, 'choices' => ['on', 'off']]]]]);
     return $parser;
 }
コード例 #6
0
ファイル: VhostShell.php プロジェクト: alt3/cakebox-console
 /**
  * Define available subcommands, arguments and options.
  *
  * @return parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description([__('Manage Nginx virtual hosts.')]);
     $parser->addSubcommand('add', ['parser' => ['description' => [__("Create and enable a virtual host.")], 'arguments' => ['url' => ['help' => __('Fully qualified domain name used for the virtual host.'), 'required' => true], 'webroot' => ['help' => __('Full path to the directory serving the web pages.'), 'required' => true]], 'options' => ['force' => ['short' => 'f', 'help' => __('Use to overwrite an existing virtual host configuration file.'), 'boolean' => true], 'hhvm' => ['help' => __('Serve pages using HHVM instead of PHP-FPM.'), 'boolean' => true]]]]);
     $parser->addSubcommand('remove', ['parser' => ['description' => [__("Remove a virtual host by deleting virtual hosts file, unlinking sites-enabled and reloading Nginx.")], 'arguments' => ['url' => ['help' => __('Fully qualified domain name used to expose the site.'), 'required' => true]]]]);
     $parser->addSubcommand('listall', ['parser' => ['description' => [__("List all virtual hosts.")]]]);
     return $parser;
 }
コード例 #7
0
 /**
  * Define available subcommands, arguments and options.
  *
  * @return parser
  */
 public function getOptionParser()
 {
     $parser = parent::getOptionParser();
     $parser->description([__('Manage databases directly from the command line.')]);
     # add
     $parser->addSubcommand('add', ['parser' => ['description' => [__("Create a MySQL databases and accompanying 'test_' prefixed test database.")], 'arguments' => ['name' => ['help' => __('Name to be used for the databases.'), 'required' => true]], 'options' => ['username' => ['short' => 'u', 'help' => __('Username with localhost database access.'), 'default' => 'cakebox'], 'password' => ['short' => 'p', 'help' => __('Password for user with localhost access.'), 'default' => 'secret'], 'force' => ['short' => 'f', 'help' => __('Drop existing database.'), 'boolean' => true]]]]);
     # remove
     $parser->addSubcommand('remove', ['parser' => ['description' => [__("Drops database and related 'test_' prefixed database.")], 'arguments' => ['name' => ['help' => __('Name of database to be dropped.'), 'required' => true]]]]);
     # listall
     $parser->addSubcommand('listall', ['parser' => ['description' => [__("Lists all databases.")]]]);
     return $parser;
 }
コード例 #8
0
ファイル: WorkerShell.php プロジェクト: uafrica/delayed-jobs
 public function getOptionParser()
 {
     $options = parent::getOptionParser();
     $options->addSubcommand('worker', ['help' => 'Executes a job', 'parser' => $this->Worker->getOptionParser()]);
     return $options;
 }
コード例 #9
0
ファイル: MonitorShell.php プロジェクト: uafrica/delayed-jobs
 public function getOptionParser()
 {
     $options = parent::getOptionParser();
     $options->description('Allows monitoring of the delayed job service')->addOption('snapshot', ['help' => 'Generate a single snapshot of the delayed job service', 'boolean' => true, 'short' => 's'])->addOption('basic-stats', ['help' => 'Show basic information with sparklines', 'boolean' => true, 'default' => false, 'short' => 'b'])->addOption('hide-jobs', ['help' => 'Hide active jobs', 'boolean' => true, 'default' => false, 'short' => 'j']);
     return $options;
 }
コード例 #10
0
ファイル: shell.php プロジェクト: jippi/vault-php-sdk
 /**
  * Nice CLI validation and help output
  *
  * @return mixed
  */
 public function getOptionParser()
 {
     $requireProject = ['arguments' => ['project' => ['help' => 'Project name (folder)', 'required' => true]]];
     return parent::getOptionParser()->addSubCommand('all', ['help' => 'Same as "start" + "create" + "unseal" + "mounts"'])->addSubCommand('start', ['help' => 'Start vault'])->addSubCommand('stop', ['help' => 'Stop vault'])->addSubCommand('restart', ['help' => 'Stop vault'])->addSubCommand('reset', ['help' => 'Wipe Vault and all its configuration'])->addSubCommand('status', ['help' => 'Get the status of the Vault instance'])->addSubCommand('create', ['help' => 'Initialize Vault and store the secrets safely'])->addSubCommand('env', ['help' => join(PHP_EOL, ['Export the ENV variables for using the vault CLI tool directly.', 'Please run: eval $(sudo bownty-cli vault env)'])])->addSubCommand('mounts', ['help' => 'Create the mounts required for global operation'])->addSubCommand('seal', ['help' => 'Seal the Vault'])->addSubCommand('unseal', ['help' => 'Unseal the Vault'])->addSubCommand('sync_vault_key', ['help' => 'Sync the Vault key into Consul (used by consul-template)'])->addSubCommand('wait_for', ['help' => 'Wait for something']);
 }
コード例 #11
0
 public function getOptionParser()
 {
     $options = parent::getOptionParser();
     $options->addSubcommand('start-workers', ['help' => 'Starts workers', 'parser' => ['options' => ['workers' => ['help' => 'Number of workers to run', 'default' => $this->_autoWorker()]]]])->addSubcommand('stop-workers', ['help' => 'Stops workers', 'parser' => ['options' => ['wait' => ['help' => 'Wait for workers to stop.', 'default' => false, 'boolean' => true]]]])->addSubcommand('recurring', ['help' => 'Fires the recurring event and creates the initial recurring job instance'])->addSubcommand('reload', ['help' => 'Restarts all running worker hosts'])->addSubcommand('revive', ['help' => 'Requeues all new or failed jobs that should be in RabbitMQ'])->addSubcommand('requeue', ['help ' => 'Receues a job', 'parser' => ['arguments' => ['id' => ['help' => 'Job id', 'required' => true]]]])->addOption('qos', ['help' => 'Sets the QOS value for workers', 'default' => 1])->addOption('workers', ['help' => 'Number of workers to run', 'default' => $this->_autoWorker()]);
     return $options;
 }