Giter VIP home page Giter VIP logo

rocketeer's Introduction

Rocketeer is unfortunately not maintained anymore and this repository is archived

I recommend to pivot to Deployer and/or CD pipelines

The Gitter chat will stay open for discussions and helping each other if you're locked into Rocketeer. You can also send me the occasional mail but keep in mind I haven't worked on this project in years and probably won't be able to solve your issue

Rocketeer

Gitter

Build Status Latest Stable Version Total Downloads Scrutinizer Quality Score Code Coverage Dependency Status Support via Gittip

Rocketeer is a modern PHP task runner and deployment package. It is inspired by the Laravel Framework philosophy and thus aims to be fast, elegant, and more importantly easy to use.

Like the latter, emphasis is put on smart defaults and modern development. While it is coded in PHP, it can deploy any project from small HTML/CSS websites to large Rails applications.

Main features

  • Versatile, support for multiple connections, multiserver connections, multiple stages per server, etc.
  • Fast, queue tasks and run them in parallel across all your servers and stages
  • Modulable, not only can you add custom tasks and components, every core part of Rocketeer can be hot swapped, extended, hacked to bits, etc.
  • Preconfigured, tired of defining the same routines again and again ? Rocketeer is made for modern development and comes with smart defaults and built-in tasks such as installing your application's dependencies
  • Powerful, releases management, server checks, rollbacks, etc. Every feature you'd expect from a deployment tool is there

Installation

The fastest way is to grab the binary:

$ wget http://rocketeer.autopergamene.eu/versions/rocketeer.phar
$ chmod +x rocketeer.phar
$ mv rocketeer.phar /usr/local/bin/rocketeer

More ways to setup Rocketeer can be found in the official documentation.

Usage

The available commands in Rocketeer are :

$ php rocketeer
  check        Check if the server is ready to receive the application
  cleanup      Clean up old releases from the server
  current      Display what the current release is
  deploy       Deploys the website
  flush        Flushes Rocketeer's cache of credentials
  help         Displays help for a command
  ignite       Creates Rocketeer's configuration
  list         Lists commands
  rollback     Rollback to the previous release, or to a specific one
  setup        Set up the remote server for deployment
  strategies   Lists the available options for each strategy
  teardown     Remove the remote applications and existing caches
  test         Run the tests on the server and displays the output
  update       Update the remote server without doing a new release

Documentation can be found here

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


Available plugins and integrations

Why not Capistrano?

That's a question that's been asked to me, why not simply use Capistrano? I've used Capistrano in the past, it does everything you want it to do, that's a given.

But, it remains a Ruby package and one that's tightly coupled to Rails in some ways; Rocketeer makes it so that you don't have Ruby files hanging around your app. That way you configure it once and can use it wherever you want in the realm of your application, even outside of the deploy routine. It's also meant to be a lot easier to comprehend, for first-time users or novices, Capistrano is a lot to take in at once – Rocketeer aims to be as simple as possible by providing smart defaults and speeding up the time between installing it and first hitting deploy.

It's also more thought out for the PHP world – although you can configure Capistrano to run Composer and PHPUnit, that's not something it expects from the get go, while those tasks that are a part of every PHP developer are integrated in Rocketeer's core deploy process.

rocketeer's People

Contributors

abenomar-uma avatar ada-u avatar anahkiasen avatar austenc avatar barryvdh avatar bramdevries avatar clone1018 avatar cviebrock avatar gasillo avatar gitter-badger avatar grahamcampbell avatar hannesvdvreken avatar helmut avatar koomai avatar krienas avatar marcovtwout avatar matiasfuster avatar miholeus avatar minicodemonkey avatar mithrandir0407 avatar montdidier avatar mpatek avatar namenu avatar rporrasluc avatar shonm avatar terion-name avatar tgerulaitis avatar tnarik avatar yusukezzz avatar zupolgec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rocketeer's Issues

Cannot Connect When Using RSA Key

I am only able to connect to the remote server when using username/password. Any connections hang and fail when attempting to use a rocketeer command when configured for an ssh key

Webfaction with composer - can we modify its location?

Composer could not install dependencies
bash: -c: line 0: syntax error near unexpected token (' bash: -c: line 0:cd /home/username/webapps/dev_username/releases/20130809181712 && which: no composer in (/usr/local/bin:/bin:/usr/bin) install'

The check finds composer because of alias however it seems to then do a look in when we try to deploy, /usr/local/bin etc etc.. however on Webfaction servers it's located in /home/username/bin

Permissions

My permissions don't work. I can't chown but normally I just chmod app/storage and public/builds to 777, the public dir itself doesn't have to be changed.
Maybe you could make it configurable?

Also, the logs are shared? So you should also modify the permissions of that shared folder, right?

Class remote does not exist

Hi, im trying to use your awesome package, but when im writing your package to config/app.php in providers and aliases im starting to see this error: "Class remote does not exist", and im noticed about laravel 4.1.* in dependencies and have latest dev version of laravel.

Cannot redeclare class Rocketeer\Rocketeer

Getting this error while installing - using dev-master:

Running artisan optimize or artisan deploy:ignite sets this off, artisan optimize runs okay if I disable the Rocketeer service provider. Have run artisan clear-compiled and composer update.

Service provider/Facade aliases are in app/config/app.php only once. Any ideas?

PHP Fatal error:  Cannot redeclare class Rocketeer\Rocketeer in ...\vendor\anahkiasen\rocketeer\src\Rocketeer\Rocketeer.php on line 12
PHP Stack trace:
PHP   1. {main}() ...\artisan:0
PHP   2. require_once() ...\artisan:30
PHP   3. require() ...\bootstrap\start.php:61
PHP   4. Illuminate\Foundation\Application->boot() ...\vendor\laravel\framework\src\Illuminate\Foundation\start.php:208
PHP   5. Rocketeer\RocketeerServiceProvider->boot() ...\vendor\laravel\framework\src\Illuminate\Foundation\Application.php:568
PHP   6. Rocketeer\RocketeerServiceProvider::make() ...\vendor\anahkiasen\rocketeer\src\Rocketeer\RocketeerServiceProvider.php:53
PHP   7. Rocketeer\RocketeerServiceProvider->bindScm() ...\vendor\anahkiasen\rocketeer\src\Rocketeer\RocketeerServiceProvider.php:86
PHP   8. Rocketeer\Rocketeer->getOption() ...\vendor\anahkiasen\rocketeer\src\Rocketeer\RocketeerServiceProvider.php:171
PHP   9. Illuminate\Config\Repository->get() ...\vendor\anahkiasen\rocketeer\src\Rocketeer\Rocketeer.php:53
PHP  10. Illuminate\Config\Repository->load() ...\vendor\laravel\framework\src\Illuminate\Config\Repository.php:99
PHP  11. Illuminate\Config\Repository->callAfterLoad() ...\vendor\laravel\framework\src\Illuminate\Config\Repository.php:159
PHP  12. call_user_func() ...\vendor\laravel\framework\src\Illuminate\Config\Repository.php:177
PHP  13. Rocketeer\RocketeerServiceProvider->Rocketeer\{closure}() ...\vendor\laravel\framework\src\Illuminate\Config\Repository.php:177
PHP  14. include() ...\vendor\anahkiasen\rocketeer\src\Rocketeer\RocketeerServiceProvider.php:280

{"error":{
    "type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException",
    "message":"Cannot redeclare class Rocketeer\\Rocketeer",
    "file":"...\\vendor\\anahkiasen\\rocketeer\\src\\Rocketeer\\Rocketeer.php",
    "line":12
}}

Add sessions to shared folder

Would it be a good idea to add app/storage/sessions to the default shared folders? Without that folder, sessions aren't kept between releases, which makes every user have to login again.

Also, {path.storage}/sessions doesn't work in the shared settings, which can be confusing if it does work on the permissions. Maybe also make it work there too?

Using different commands than 'php'

As discussed in #33, there is a issue with webfaction servers command usage. Command 'php' refers to 5.2 version and if you want to run 5.4 you use command 'php54'. And it looks like there is no way to change this behavior in the server.

[REQUEST] Custom path to laravel installation

Is it possible to set an custom path to the Laravel installation? Rocketeer is default going to look for the artisan and composer.phar in the root of the repository. But what when I have artisan and composer.json and phar in the {repositoryurl}/laravel. Now, composer.json, composer.phar and artisan aren't found because of this extra directory.

Is there an way we can fix this?

PHP Extension check doesn't explode string

When I check the extensions, they are not found.

You search for the module (ie mcrypt) with the output from php -m, but that is a string.
You cast it to an array like this in processCommands:

if (!is_array($commands)) {
    $commands = array($commands);
}

But you don't explode it on PHP_EOL (although you do implode them for pretend..). Does this work for you? It doesn't for me.. Exploding on PHP_EOL does work.

Deploy error

Hi, i'm trying to Deploy a private app and i getting some errors. So i did this test:

image

'The "release" argument does not exist.'

Any ideia?

Decouple from Laravel

Because the project is heavy coupled with Laravel it is not easily used outside of that Context. This could be fixed by using a configuration file like rocketeer.yml and replace the list of tasks and closures with an extension interface as the one found in PhpSpec2 https://github.com/phpspec/phpspec/blob/master/src/PhpSpec/Console/Application.php#L336 and https://github.com/phpspec/phpspec/blob/master/src/PhpSpec/Extension/ExtensionInterface.php which can be used like descriped here https://github.com/henrikbjorn/PhpSpecCodeCoverageExtension. Last instead of having it tie commands to artisan, it should ship with its own bin file proberly called rocketeer.

It sound like a lot of work, but would make adopting it much easier and more attraktive.

# This is an example file for Rocketeer Issue #8 on Github.
# Advantages for yaml, is the consise syntax also it still
# supports comments and its increased readability
connections: ['production']

git:
    repository: https://github.com/vendor/website.git
    username: foo
    password: bar
    branch: master

remote:
    root_directory: /home/www
    application_name: vendor-website
    keep_released: 4
    shared: []

# The composer extension could be in rocketeer and also
# a couple of framework specifics, which should be explicitly
# added here on a per project basis.
extensions:
    - Rocketeer\Extension\ComposerExtension
    - Rocketeer\Extension\LaravelExtension
    - Rocketeer\Extension\SymfonyExtension

Symlinking the current release

Shouldn't the symlink happen in the cleanup task? That way any custom tasks would have a chance to cancel the deployment in case there is a problem. I run a task, for example, that builds all Basset collections after a deploy. If something goes wrong there, the symlink is already set.

illumiate/remote can't be found

I tried per your instructions on laravel 4 and get the following error when running composer update.

Problem 1
- The requested package illumiate/remote could not be found in any version, there may be a typo in the package name.

checkPhpExtension function not finding loaded extensions

Experimenting with Rocketeer with PHP/5.4.6-1ubuntu1.3, Ubuntu 12.10, i found that mcrypt and mysql modules arent being recognised even though they're present:

Shas-Mac-mini:reedur sha$ php artisan deploy:check
Checking presence of git
Checking PHP version
Checking presence of mcrypt extension
The mcrypt extension does not seem to be loaded on the server
Checking presence of Composer
Checking presence of mysql extension
The mysql extension does not seem to be loaded on the server
Execution time: 1.4729s

I did a var dump of the output of php -m and got the following result:

array(1) {
  [0] =>
  string(437) "[PHP Modules]\nbcmath\nbz2\ncalendar\nCore\nctype\ncurl\ndate\ndba\ndom\nereg\nexif\nfileinfo\nfilter\nftp\ngd\ngeoip\ngettext\nhash\niconv\nimagick\nimap\nintl\njson\nlibxml\nmbstring\nmcrypt\nmemcache\nmemcached\nmhash\nming\nmysql\nmysqli\nopenssl\npcntl\npcre\nPDO\npdo_mysql\nPhar\nposix\nps\nreadline\nReflection\nsession\nshmop\nSimpleXML\nsoap\nsockets\nSPL\nstandard\nsysvmsg\nsysvsem\nsysvshm\ntokenizer\nwddx\nxdebug\nxml\nxmlreader\nxmlrpc\nxmlwriter\nzip\nzlib\n\n[Zend Modules]\nXdebug\n\n"
}

And found that

return in_array($extension, $this->extensions);

on line 186 in the checkPhpExtension method in Check.php seems to return false.

I wondered if this was unique to just me?

My fix was to modify the method to use str_pos instead:

/**
 * Check the presence of a PHP extension
 *
 * @param  string $extension    The extension
 *
 * @return boolean
 */
public function checkPhpExtension($extension)
{
    $this->command->comment('Checking presence of '.$extension. ' extension');

    if (!$this->extensions) {
        $this->extensions = $this->run('php -m', true, true);
    }

    foreach($this->extensions as $ext) {
        if(strpos($ext, $extension) !== false) {
            return true;
        }
    }

    return false;

    // return in_array($extension, $this->extensions);
}

before after symlink tasks

Hi, It would be useful. So you could call php artisan down before symlink and after symlink php artisan up

Errors don't provide a nice description

When I run php artisan deploy:check I get the following results from the command line:

Checking presence of git
{"error":{"type":"ErrorException","message":"Expected SSH_FXP_VERSION","file":" (...) /phpseclib\/Net\/SFTP.php","line":466}}

I don't understand if this error is from something that is missing at local or remote. I also don't understand at which stage I am. Has it already connected to the remote host? Is it an error that it get's when trying to connect locally?

Thanks in advance.

Support SSH key passphrases

Currently no option is available to use SSH key passphrases. Currently if u use a private key with a passphrase a very vague error is thrown by phpseclib:

dimitri@sjimi commands (develop) $ php artisan deploy:check --verbose
Checking presence of git
{"error":{"type":"ErrorException","message":"Connection closed prematurely","file":"\/Users\/dimitri\/Projects\/DarwinAnalytics\/commands\/vendor\/phpseclib\/phpseclib\/phpseclib\/Net\/SSH2.php","line":2401}}PHP Notice:  Connection closed prematurely in /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php on line 2817
PHP Stack trace:
PHP   1. {main}() /Users/dimitri/Projects/DarwinAnalytics/commands/artisan:0
PHP   2. Symfony\Component\Console\Application->run() /Users/dimitri/Projects/DarwinAnalytics/commands/artisan:59
PHP   3. Symfony\Component\Console\Application->doRun() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/symfony/console/Symfony/Component/Console/Application.php:121
PHP   4. Symfony\Component\Console\Application->doRunCommand() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/symfony/console/Symfony/Component/Console/Application.php:191
PHP   5. Illuminate\Console\Command->run() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/symfony/console/Symfony/Component/Console/Application.php:897
PHP   6. Symfony\Component\Console\Command\Command->run() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/laravel/framework/src/Illuminate/Console/Command.php:96
PHP   7. Illuminate\Console\Command->execute() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
PHP   8. Rocketeer\Commands\BaseTaskCommand->fire() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/laravel/framework/src/Illuminate/Console/Command.php:108
PHP   9. Rocketeer\Commands\BaseDeployCommand->fireTasksQueue() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Commands/BaseTaskCommand.php:55
PHP  10. Rocketeer\TasksQueue->run() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Commands/BaseDeployCommand.php:73
PHP  11. Rocketeer\TasksQueue->runQueue() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/TasksQueue.php:159
PHP  12. Rocketeer\Tasks\Check->execute() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/TasksQueue.php:179
PHP  13. Rocketeer\Tasks\Check->checkScm() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Tasks/Check.php:36
PHP  14. Rocketeer\Traits\Scm->execute() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Tasks/Check.php:91
PHP  15. Rocketeer\Bash->run() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Traits/Scm.php:56
PHP  16. Rocketeer\Bash->processCommands() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Bash.php:103
PHP  17. Rocketeer\Server->getSeparator() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Bash.php:381
PHP  18. Rocketeer\Server->getValue() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Server.php:75
PHP  19. Rocketeer\Server->Rocketeer\{closure}() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Server.php:113
PHP  20. Rocketeer\Bash->runRaw() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Server.php:61
PHP  21. Illuminate\Remote\RemoteManager->run() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Bash.php:157
PHP  22. Illuminate\Remote\RemoteManager->__call() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/anahkiasen/rocketeer/src/Rocketeer/Bash.php:157
PHP  23. call_user_func_array() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/illuminate/remote/Illuminate/Remote/RemoteManager.php:187
PHP  24. Illuminate\Remote\Connection->run() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/illuminate/remote/Illuminate/Remote/RemoteManager.php:187
PHP  25. Illuminate\Remote\SecLibGateway->nextLine() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/illuminate/remote/Illuminate/Remote/Connection.php:127
PHP  26. Net_SSH2->_get_channel_packet() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/illuminate/remote/Illuminate/Remote/SecLibGateway.php:108
PHP  27. Net_SSH2->_get_binary_packet() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:2645
PHP  28. user_error() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:2401
PHP  29. Illuminate\Exception\Handler->handleError() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:2401
PHP  30. Illuminate\Exception\Handler->handleException() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/laravel/framework/src/Illuminate/Exception/Handler.php:133
PHP  31. Illuminate\Exception\Handler->bail() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/laravel/framework/src/Illuminate/Exception/Handler.php:165
PHP  32. Net_SSH2->__destruct() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:0
PHP  33. Net_SSH2->disconnect() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:2376
PHP  34. Net_SFTP->_disconnect() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:2360
PHP  35. Net_SSH2->_disconnect() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php:2221
PHP  36. Net_SSH2->_send_binary_packet() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:3043
PHP  37. user_error() /Users/dimitri/Projects/DarwinAnalytics/commands/vendor/phpseclib/phpseclib/phpseclib/Net/SSH2.php:2817

Wrong key path when connecting through ssh

Hi!
I'm trying to use ssh to connect to the server using an ssh key instead of a password but when I run deploy:check it says that the key file cannot be found, showing a path that it's not the one I specified:

[2013-11-12 12:07:03] development.ERROR: exception 'Illuminate\Filesystem\FileNotFoundException' with message 'File does not exist at path /he/flatline/.ssh/id_rsa.pub' in /server/pouchy/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:31

As you can see, it is trying to search for the key on /he/flatline/.ssh/id_rsa.pub but the remote config is just fine:

    'connections' => array(

        'production' => array(
            'host'     => 'my-server-host',
            'username' => 'my-username',
            'password' => '',
            'key'      => '/home/flatline/.ssh/id_rsa',
        ),

    ),

But that's not all, when I change the config to use a password instead of the key, it still tries to use the key with the wrong path and keeps failing with the same error.

Update about this last thing right above: as @markalanevans says at #47 (comment) it appears that the file app/storage/meta/deployments.json keeps a config that's out of sync with the real app/config/remote.php

I don't know if this problems are Rocketeer or remote component issues. Maybe someone can give me a hand with this.

Thanks!!

Asking credentials

When not using any credentials for Git, Rocketeer asks them.

  1. Why isn't secret() used instead of question() in developer, this was the case in master.
  2. When you make a typo / wrong password, the password is remember. Maybe forget it when it fails?

Tasks not run after deploy

Sorry for all the questions, maybe I'm missing something.

I have in my published config, this:

// Tasks to execute after the core Rocketeer Tasks
    'after' => array(
        'setup'   => array(),
        'deploy'  => array(
            'Tasks\Chmod',
            'php artisan basset:build',
        ),
        'cleanup' => array(),
    ),

But no task is run after artisan deploy:deploy. It does work when I put the class in the custom array.

chown only works with "root" user

Hey there, first of all, awesome script! Now, on to my issue...

Instead of using root to login to the remote server, I've set up a deployer user that has appropriate permissions for the directory I'm deploying to. Everything works except for when the method "setPermissions()" is run, specifically the chown command on line 175 of Task.php

'chown -R www-data:www-data ' .$folder,

This is because my deployer user can't change the ownership on the file. Obviously, one solution is for me to just use root for my deploy script, but it seems less secure to have my server's root password in plain text in the remote config file (since my git code will be scattered to various developers).

Since I've set my deployer user to be a part of the www-data group, the permissions on line 176 of Task.php just need to be changed from:

'chmod -R +x ' .$folder,

to

'chmod -R 775 ' .$folder,

If there's some better way of doing this, I would love to know - otherwise, this seems like a pretty solid solution.

Thanks in advance!
Char

Specifying keys in the remote config.

So /app/config/remote.php are the configs for my users to ssh into the given server.

However, I don't really want to have to hard code the path for my local users on my mac, nor would i want to have my password in a config file.

First, i would expect that depending on the deployers operating system, Rocketeer would look in the default .ssh folders. And before deployment or connecting, if ssh requires a password(in my case its passwordless) it would prompt me.

In this way any of my developers could deploy if needed as long as their ssh user had access.

Is this possible? Or do i need to specify all of these things in the config file and add that to the repo?

Supporting Subversion as a SCM option

Hi All,

This is more of a question than an issue but I can't see where to ask a question.

I appreciate I'm likely to get flamed but are there any plans to incorporate Subversion support? The reason I ask is a number of projects I work on don't host in a Git repository but I would very much like to migrate away from Fabric (my current deployment process) to Rocketeer.

Pretend fails on first command

When I do deploy:pretend -p, I get the following output:

Checking PHP version
php -r "print PHP_VERSION;"
{"error":{"type":"ErrorException","message":"version_compare() expects parameter 1 to be string, array given","file":"/var/www/html/project/vendor/anahkiasen/rocketeer/src/Rocketeer/Tasks/Check.php","line":119}}

This way the task crashes, and I can't see the commands.

windows grab php modules problem

Hi,

with this line of code in check.php

$this->extensions = explode(PHP_EOL, $extensions);

i get this output

array(1) {
  [0] =>
  string(349) "[PHP Modules]\nbcmath\nbz2\ncalendar\nCore\nctype\ndate\ndba\ndom\nereg\nexif\nfileinfo\nfilter\nftp\ngd\ngettext\nhash\niconv\njson\nl
ibxml\nmbstring\nmcrypt\nmhash\nmysql\nmysqli\nopenssl\npcntl\npcre\nPDO\npdo_mysql\nPhar\nposix\nReflection\nsession\nshmop\nSimpleXML\nsoap\nsockets
\nSPL\nstandard\nsysvmsg\nsysvsem\nsysvshm\ntokenizer\nwddx\nxml\nxmlreader\nxmlwriter\nzip\nzlib\n\n[Zend Modules]"
}

with this

$this->extensions = explode("\n", $extensions);
array(52) {
  [0] =>
  string(13) "[PHP Modules]"
  [1] =>
  string(6) "bcmath"
  [2] =>
  string(3) "bz2"
  [3] =>
  string(8) "calendar"
  [4] =>
  string(4) "Core"
  [5] =>
  string(5) "ctype"
  [6] =>
  string(4) "date"
  [7] =>
  string(3) "dba"
  [8] =>
  string(3) "dom"
  [9] =>
  string(4) "ereg"
  [10] =>
  string(4) "exif"
  [11] =>
  string(8) "fileinfo"
  [12] =>
  string(6) "filter"
  [13] =>
  string(3) "ftp"
  [14] =>
  string(2) "gd"
  [15] =>
  string(7) "gettext"
  [16] =>
  string(4) "hash"
  [17] =>
  string(5) "iconv"
  [18] =>
  string(4) "json"
  [19] =>
  string(6) "libxml"
  [20] =>
  string(8) "mbstring"
  [21] =>
  string(6) "mcrypt"
  [22] =>
  string(5) "mhash"
  [23] =>
  string(5) "mysql"
  [24] =>
  string(6) "mysqli"
  [25] =>
  string(7) "openssl"
  [26] =>
  string(5) "pcntl"
  [27] =>
  string(4) "pcre"
  [28] =>
  string(3) "PDO"
  [29] =>
  string(9) "pdo_mysql"
  [30] =>
  string(4) "Phar"
  [31] =>
  string(5) "posix"
  [32] =>
  string(10) "Reflection"
  [33] =>
  string(7) "session"
  [34] =>
  string(5) "shmop"
  [35] =>
  string(9) "SimpleXML"
  [36] =>
  string(4) "soap"
  [37] =>
  string(7) "sockets"
  [38] =>
  string(3) "SPL"
  [39] =>
  string(8) "standard"
  [40] =>
  string(7) "sysvmsg"
  [41] =>
  string(7) "sysvsem"
  [42] =>
  string(7) "sysvshm"
  [43] =>
  string(9) "tokenizer"
  [44] =>
  string(4) "wddx"
  [45] =>
  string(3) "xml"
  [46] =>
  string(9) "xmlreader"
  [47] =>
  string(9) "xmlwriter"
  [48] =>
  string(3) "zip"
  [49] =>
  string(4) "zlib"
  [50] =>
  string(0) ""
  [51] =>
  string(14) "[Zend Modules]"
}

Exclude folders

I guess I just missed it but how can I exclude folders for the deployment?

Warn before removing folders

When running setup/teardown, the entire folder get's deleted, right?

Maybe it would be nice/smart to ask the user, before really deleting it? Or only when there are some folders in the shared folder.

Sometimes you might accidentally run a setup command instead of check/deploy, and it will delete all your files. The repo is in git, but your logs or uploaded files probably not..

deploy vs. deploy:deploy

What was your reasoning behind choosing php artisan deploy:deploy for the main deploy command?

Wouldn't just php artisan deploy be more intuitive?

Given my capistrano background, this was the first thing I noticed after reading the project's README.

Application name with a dot is not working as expected

When you have an application_name with a dot it wants to create a directory without the dot. So application_name is 'test.com'. Now on deployment it wants to create a directory called 'testcom'. Introduced in 0.6.3 -> Str::slug

Rocketeer.php:

public function getApplicationName()
   {
    return $this->getOption('remote.application_name'); //0.6.2
    return Str::slug($this->getOption('remote.application_name')); //0.6.3
   }

'Connections' doesn't seem to work as expected

(I'm editing my original post, because everything was getting too messy with writing down whenever I tried something)

I'm creating this issue just to see if anyone else experiences the same. It could be a problem on my end, or it could be with Rocketeer.

In short: I defined two connections, and tried to have Rocketeer push to each connection based on what I manually put in the 'connections' array in the config.php file.
This however did not seem to work. It kept pushing to the original connection, and never to the one that I added afterwards (even with cleaning cache and deployments.json)
All I can say with certainty is that I tried a variety of things: changing the 'default' in Laravel's remote.php, changing the connections array in Rocketeer's config.php, changing the order in which the connections are defined in remote.php, etc. Each time with clearing the app cache and deployments.json in storage/meta.
I can't draw any conclusion, because I got different results whatever I did, so I'm not going to try.

I ended up just making two Rocketeer config files, and before I push to a certain connection I rename the right one to 'config.php' and the other something else.

Hence this issue: it might very well be something that only exists on my end. Or it could be a bigger issue with how connections are handled. We'll see what we get.

Any tips on using with other packages?

Rocketeer looks like exactly what I need, but it's based off of 4.1.x (I understand why). Unfortunately every other package I use (Ardent, Former, etc.) requires 4.0.x so I can't use it with anything :)

I've no problems with running bleeding-edge/unstable packages. But short of creating a fork for each of the 4.0.x-dependant projects, updating composer and hoping they're still compatible, do you have any suggestions in the meantime?

Cheers

Ability to sleect a different SSH port

I have my staging and production server set up with a non standard SSH port. Would love to be able to specify this in the config file if possible in a future version.

Docs: Explain what Rocketeer does and what users has to do

Maybe it is obvious for most people (or people that used deploy tools like capistrano before), but before getting started, it took me a while to understand what Rocketeer was going to do and what I should do next. It is clear once you run the commands, but I did feel a bit hesitant to just run it (with just entering SSH + Git credentials etc.).

It doesn't have to be much, but something like:

  • Rocketeer creates a directory in the root folder, where a number of releases are stored (4 by default) (ie /home/www/facebook)
    • The directory contains all releases, and a symlink ' current' to the current deployed release, and a folder 'shared' with the shared folders, used by every release
    • Every deploy creates a new releases, where the git repo is cloned, composer dependancies installed and permissions are set. When succesfull, the symlinks are updated.
    • To make the release visible, you should symlink your web root (ie. public_html of htdocs) to current/public folder in your application (ie /home/www/facebook/current/public) or setup a vhost to use that directory (?)

Branch by stage

Hi guys. I think a common scenario is to have a master branch with live-deployable code, and a staging branch for WIP.

Is there any way to specify the branch to clone on each stage?

Also, if we clone the repo without the history (using --depth) wouldn't it make the deploy process faster?

We could also allow people to add composer parameters like --prefer-dist.

Deploy existing Rocketeer setup

Hi there,

I ran into an issue with configuring Rocketeer for my project. I don't want to have ssh-passwords/keys in my config files so I left them out of remote.php. When I do a deploy:check, I get asked for connection details (which is good), I fill them in et voila, I can deploy.
However if I flush caches with deploy:flush and add the connection details again, Rocketeer is not able to find the remote setup thus resulting in failed deployments (i.e. Rocketeer thinks the current release is in /releases instead of /releases/<release#>. Also a deploy:current returns 'No release has yet been deployed').
So, my question, what happens if my Rocketeer caches are invalidated? Will it ever be invalidated? Or is it a configuration error on my end?

Punchline, thanks for this awesome package!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.