|
If you plan to use a deployment utility such as Capistrano, you need to create a deploy user account. The deploy user is a user account with valid rights and roles to deploy your application. In this topic: |
At a Glance
This topic describes how to set up a dedicated user account to handle the deployment tasks on your SmartMachine. |
Before You Begin
This topic assumes that you plan to deploy multiple applications on a SmartMachine in the following way:
/home/ExampleWebApp-1/ /home/ExampleWebApp-2/
| You need a copy of the public SSH key for each developer in your project who can deploy the application. |
Creating the Deploy User
| An easy way to deploy a single application is to use the jill account as the deploy user. |
- In Virtualmin, create a new user named deploy.
- Log in to your SmartMachine and run the following command:
usermod -P "Service Management" deploy
This will grant the deploy user with Service Management rights, which allows use of several important SMF commands.
- Add the public SSH key for each developer with deploy rights to /home/deploy/.ssh/authorized_keys
Examples
This section contains examples for different deployment systems.
Capistrano
To deploy new code have your developers SSH in and run these commands:
set :user, "deploy" set :runner, "deploy" task :restart_web_server, :roles => :web do run "svcadm restart http" end