Open the mod-http-passenger. Save the mod-http-passenger. First, we'll create a separate branch used to deploy our application. In the Create New Branch dialog, specify the branch name capistrano-deploy in our case and click Create.
Open the project Gemfile and add the following Capistrano gems. To capify the application, select Tools Capistrano Capify Application from the main menu. The following files will be added to the project. Note that Tools Capistrano Capify Application executes the cap install command. After running this command, RubyMine creates the run configuration for executing the install task. If necessary, you can customize this configuration to pass specific arguments.
Open the Capfile and add the following lines to load the required dependencies. In the same file, specify the following settings for rbenv. Before configuring deployment settings, commit and push changes to a remote repository. In our tutorial, it will be the capistrano-deploy branch of the sample Rails application. Here you need to specify the Git repository details and the deployment path on our web server. Since we are using the staging configuration for deployment, we need to add the staging environment in our Rails application.
Then, we should provide custom credentials. Create the staging environment as described in Creating Rails Environments.
This option specifies that the master key used to decrypt credentials should be available on our web server. You can then view deployments in the New Relic UI. By default, all deployment information is recorded in your production environment. The deployment upload script will use that label to associate an app with the deployment. If you installed the Ruby agent as a gem, you can record deployments directly by using the newrelic executable:. You can use several optional values with newrelic.
The description is short text. When using the -c option, you can pipe the change log into the script. If not piping when using the -c option, select control-D to signify the end of file EOF. By default, both the application user and group take the same name as the application. Each release is marked by a unique tag, generated with the current timestamp. This should not be changed, as the format is matched in the list of tags to find deploy tags. On tagging a release, a message is also recorded alongside the tag.
This message can contain anything useful — its contents are not important for the recipe. According to this description I have to set a repository in the deploy. I assume this is the source code of my app, is that correct? At the moment I have my app repository on a cloud9 server. To deploy the app I type cap production deploy on the development system.
So, do I have to put in the url and path of the cloud9 server? That seems weird, because I deploy from that server. Or is this file transferred to the production system that then pulls the data from the development environment? Does this mean, I need a passwordless ssh connection from a cloud 9 server to the production server or vice versa?
Or do I need to push my data to a third system? The reason is that by defaut, capistrano will try to pull code from the repo to the deployed server instead of pushing your code directly.
0コメント