Reputation: 423
How to organize development lift-cycle?
Yep, I understood that it's very difficult question; nevertheless I'm trying to find out the best way of organizing my development process among thousands articles/documentations and so on. However I'm afraid of painful mistakes that can lead to damages.
There is a project; let's call it titan
. This project was implemented on Ruby on rails
and postgresql
as database. Current structure is
[developer]->[dev-server]
{
(load-balancer)->app_server_1<---write/read--->Postgresql(master)
|
|replication
|
->app_server_2<---read.only---->Postgresql(slave)
}
This is an expected structure of the application; this application is only for developers so it can not be accessed from Internet. And at this point arise first problems. I have an intention of deploying my app in amazon cloud service.
Of course I could create a virtual machines in cloud, copy project's files, configure all my staff, however it takes much time and moreover it sometimes leads to different problems and errors. And I want to create environment for developers(me) that will help me to deploy my app by clicking on button.
I think that there is software that can easily handle my tasks with deployment, but now I stuck with it. So there is the structure that will be suitable for me as I think
[amazon]---------{
^ (load-balancer)->app_server_1<---write/read--->Postgresql(master) |
| |
| |replication |
| |
| ->app_server_2<---read.only---->Postgresql(slave) |
|
| }
|(a)
[developer]->[dev-server]
{
(load-balancer)->app_server_1<---write/read--->Postgresql(master)
|
|replication
|
->app_server_2<---read.only---->Postgresql(slave)
}
And at the point (a)
there is a number of questions. At this stage I want to test my app(unit testing), reconfigure according amazon's server configuration, change it status to production
, but not a dev
. And so on.
I hope that it should be a software that could help me to do it, or you'll leave me some helpful tips.
Upvotes: 0
Views: 57
Reputation: 102046
In Rails the development
environment is intended to be run locally on your machine (or some sort of virtual machine) you could potentially share it on an intranet if needed but never run Rails with the development
settings on server which is accessible to the public since they are potentially unsafe. You can mirror your production server into your development environment but dev and test should never connect to your production database as its a poor and unsafe practice.
If you want to have an environment where you can test out features and show them to stakeholders before they are deployed to production you would create what is called a staging environment. Usually the staging environment works on a mirror of the live database and has additional access control.
Rails lets you create any number of environments - the name basically just tells rails to load /config/environments/{name}.rb
and the gems particular to that environment.
As a part of your workflow you should already be using GIT (or at least some sort of version control). There are plenty of tools for AWS that allow you to deploy from your Github repository or other code hosting repositories.
Upvotes: 1