I want to setup Elastic Beanstalk for my existing rails application.
I was successful in doing the sample foo app.
These are the questions I have
I need the deployment to happen from my git repository and not from my local path where I am deploying. How do I do that for the sample foo app.
I need to have a before_symlink deploy hook. How can I do this ?
I have addressed these issues.
git aws.push takes all the commited things to git and then deploys it. Local changes are not impacted.
Created a config file under .ebextensions
More here - http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/customize-containers.html
Related
I'm trying to test some changes out on production without having to commit and push the changes because I only want to commit what actually works. The project I'm working on was created with Rails (3.0.2), and deploys with Capistrano (3.1). I've tried making changes in the root folder of my app and redeploying, and the changes are not reflected on the website. I've tried making changes in the root/current directory and redeploying and that didn't work.
Is there any way I can redeploy changes to the server without having to push it to Github first?
Is there any way I can redeploy changes to the server without having
to push it to Github first?
No this isn't possible since one of the first things that Capistrano will do is git clone the latest from whatever branch you've specified in your deploy config.
I'm not sure what your familiarity with Rails is but the proper way to do this would be to create a new staging environment and deploy to that. The staging environment would have similar settings to your production environment with a separate database so that you don't affect production data.
Capistrano 3 supports this flow out of the box so that once you've set everything up you can simply call
cap staging deploy
to deploy to the staging environment, and
cap production deploy
to deploy to the production environment.
How to deploy subdirectory from github with mina?
My master contains
|Dir_name
|Rails-Project
|other stuff
I would like to deploy Rails-Project
I found this question, but without a good answer Deploy subdirectory with mina
I have 2 rails applications that live inside the same git repo.
There is a shared folder where common logic lives.
- app_1
- shared
- app_2
The shared folder is really just a symlink to the appropriate places inside the app_1 folder. There is also a shared_public folder that is symlinked to app_1/public/files and app_2/public/files.
How can I do this? I'm open to anything, it's a clean slate. The project was never deployed previously, so I don't have a existing infrastructure to rely on. And splitting the shared logic out is (unfortunately) not an option currently, because of the timeframe I have to work with.
Git
When you mention the shared folder is a symlink - this only exists in operating systems, not git
Since git is just a deployment mechanism in this instance (I.E will place your files from your repo onto your server), you'll probably be able to do the following:
Initialize a git repo on your server ($ git init on your server)
Clone your github repo locally (git clone https://github.com.... on your local box)
CD into your new folder and add the server's repo as a remote
$ git push [server repo name] master
This isn't what you want, I know.
It will push your files onto your server - so you'll get the following folder structure:
app1
app2
The shared folder could then be created on your server itself.
If you have your appropriate server setup, you should be able to get this running from performing these steps
Capistrano
If you want to use Capistrano, you'll have to do something a little more involved, as this does more than just push your files to your server
If you want to use Capistrano, you'll have to split your app1 and app2 into separate applications, and deploy them individually. This will still allow you to create a symlink on your server, except you'll have a slightly different structure to your directories
I'm using capistrano to deploy a rails 3.2 app. My code is hosted on a Git server with ubuntu server. Recently i started looking in how to use more of the git features as all i was using was commit and push. Capistrano take care of taking this and deploying it in production.
The only thing unusual i did with git is the following (more people will use this git) :
git config --global user.name "syl"
git config --global user.email syl#my.mail.adress.com
Since i did that, all my new commits are ignored in the rails deployment folder by capistrano, strange thing is, if i create a clone using the command from the capistrano trace : git clone -q linuxserveruser#gitserverip:/path/of/my/master/repo/ my latest changes are here.
What happened, what can i do to put my new commit in production?
Probably you need to delete the Capistrano shared cache (and probably you moved/renamed the git repository, too.)
Scenario
Project A is a Rails application:
Code hosted on GitHub on a private repo.
Deployed on Heroku (which has a readonly file system).
Project R that is an instance of Redmine, used to manage my project A:
Code hosted on GitHub on another private repo (same GitHub account).
Deployed on Heroku (which has a readonly file system).
Project CI that is an instance of Integrity, used to continuous integrate (by running tests) my project A:
Code hosted on GitHub on a third private repo (same GitHub account).
Deployed on Heroku (which has a readonly file system).
What I want
I want to be able to:
Use the Repository feature on Redmine on project R (in essence, to be able to see the repository from project R).
Run the tests on CI.
My problem
To clone and keep up to date the code of project A on both project R and project CI.
What I tried
For the 1. point, I've tried to follow the instructions found on http://www.redmine.org/wiki/1/RedmineRepositories, with the only difference that I've created the local bare copy of A into the root of R (because of Heroku's constraints on file system), which caused the creation of /A.git dir.
After that, I've re-deployed on Heroku the project R, and in the Redmine's project A settings I've configured as SCM "Git" and A.git as Path to .git directory (I've also tried ./A.git).
However, when I point to the tab Repository of A project on Redmine, I got a 500 with message:
"The entry or revision was not found in the repository."
Where am I wrong?
Any suggestion?
Thank you!
I think it is currently impossible to integrate Git or Mercurial repos with a Redmine instance running on Heroku due to the read-only filesystem constraint. I asked Eric Davis and he thinks so too. SVN and CVS don't require Redmine to have a local copy of the repo, and so I think they work, whereas Git and Hg don't.