Here is an introduction to Rocketeer
Once you use
rocketeer ignite you will receive the following questions:
1.No connections have been set, please create one: (production) 2.No host is set for [production], please provide one: 3.No username is set for [production], please provide one: 4.No password or SSH key is set for [production], which would you use? (key) [key/password] 5.Please enter the full path to your key ($PATHTOUSER/.ssh/id_rsa) 6.If a keyphrase is required, provide it 7.No repository is set for [repository], please provide one: 8.No username is set for [repository], please provide one: 9.No password is set for [repository], please provide one: production/0 | Ignite (Creates Rocketeer's configuration) 10.What is your application's name ? ($USER) The Rocketeer configuration was created at $USER/.rocketeer
Dry Run Example¶
A dry run will help check that your tasks and strategies appear correct before running them.
vendor/bin/rocketeer deploy --on="$YOURCONNECTION" --branch="$BRANCHNAME" --pretend --verbose
Key / Password Prompt¶
Depending on the way you are connecting to your server provide the key or password, the below example will use the users id_rsa key to connect via ssh.
No password or SSH key is set for [production/0], which would you use? (key) [key/password] # Type key Please enter the full path to your key ($PATHTOUSER/.ssh/id_rsa) # Type Enter If a keyphrase is required, provide it # Type Enter
To set up a task:
- Create the task class in the folder
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Tasks\TestTask::class, here we place it after the deploy step.
- ```php // Tasks to execute before the core Rocketeer Tasks 'before' => array( 'setup' => array(), 'deploy' => array(), 'cleanup' => array(), ),
// Tasks to execute after the core Rocketeer Tasks 'after' => array( 'setup' => array(), 'deploy' => array( Tasks\TestTask::class, ), 'cleanup' => array(), ), ```
Task - Functions¶
When working with setting up the tasks knowing the location of the task when it is executed is important. Rocketeer has some methods that allow you to run bash commands in the certain folders.
Getting the current connection:
More methods from extending the AbstractTask The api docs - AbstractTask