I wanted to develop a script (probably using Ruby) and with leveraging vendor provided REST APIs which should configure firewalls into Edge systems.
For example, these are various values I would need to read and use for configurations.
source:
destination:
port:
There would be several number of rules which includes different sources, destinations, ports to be mentioned in the file read. What would be the best way to save all this info and read by the script?
How are such deployments handled today using scripts? Sorry, I am quite new in automated deployments and scripting, could you please help with some pointers so that start with?
Thanks!
I use Chef - http://gettingstartedwithchef.com
There are many other tools out there for automated deployments and infrastructure provisioning. Here are some more I've encounted:
Capistrano - http://capistranorb.com/
Puppet - http://puppetlabs.com/
AWS Cloud Formation or Elastic Beanstalk - http://aws.amazon.com/cloudformation
Well you might want to take a look at Capistrano which is what's generally used in the ruby world for deploying web applications:
https://github.com/capistrano/capistrano
If you want something more generic, then you might want to investigate SSHKit (which is what Capistrano is built upon). SSHKit lets you deploy and run tasks on remote machines:
https://github.com/capistrano/sshkit
Related
Folks,
We have got an enterprise application which uses Apache Service Mix for deployment. The application consists of various services and each is created as separate Maven project (bundle).During development, we are actually building each service separately and in-order to deploy it,its being put in the deploy folder. Also, we have to uninstall the bundle from the container(say; karaf) and then install it again from the console to bring the new changes in effect. This is fine during the development phase.
Now we want to deploy the code to an UAT environment (Amazon EC2) for the client to do the testing. We are now confused about how to deploy the bundles to the remote environment. Do we have a standard approach for CI using Jenkins(or some other tool) to automate the build and deploy process , so that someone who has no knowledge about the bundles(SMX) can deploy the code. We are using Github for source code management.
We have searched a lot in this regard and couldn't find any resources which provide some leads/hints on this.
Any help/tips is highly appreciated. If you need more info, I can give more details.
~Ragesh
We do have exactly similar setup and we use the Jenkins to build and let the Sysadmin to copy the bundles to one server and then he enables the rsync to rest of the servers.
Remember, always deploy the dependent bundle first and then remaining ..
Since we have this dependency ,we can't go automating this process.
I am creating a Ruby on Rails website deployed on AWS. I am running into configuration issues and I can't seem to find docs/tutorials that cover configuration of the various tools mentioned and how to set them up BOTH for ease of use in development (on localhost) and while deploying.
Right now I have a Rails app set up and I am using Bundler for all my Ruby gems.
I have two major goals.
Ease of development - Ideally somebody should just have to clone the repo and run 'rails server' and should be good to go. All other stuff like Redis servers, Resque workers, Mongo DB databases, should automatically be started/created.
Ease of deployment - Given some configuration file (like YAML files), I should be easily able to deploy to various stages by simply running 'cap production deploy' or something similar. It should automatically run all the rspec tests, and prevent deploying if something goes wrong. Once deployed it should also handle all other aspects like restarting Apache/Nginx, handling DB migrations, restarting Resque workers, etc. I know how to do this all manually, but again I am looking for a solution that will let a novice (i.e. unexperienced with my app's deployment process, not novice in general) easily be able to deploy.
I have looked at various tools/gems like Foreman, God, etc. but I am not clear on how to use them correctly and how they work in different environments like development and production.
I am looking for either docs/tutorials on how to do this or even Github repo's of Rails app that have solved these problems (preferably smaller repo's so that I don't have to wade through application specific stuff to get the information I looking for).
I am also looking for a way to monitor my Rails app. As what kind of errors are happening? how frequently are they happening? Is Splunk a good tool to do so?
Note : I am not tied down to use any of the tools mentioned above, since I am only starting to develop my website.
This is pretty comprehensive if you want to deploy to a small EC2 instance using Capistrano and Apache.
For monitoring I'd suggest New Relic or just checking your logfiles.
However, you're going to have to be more specific about your technology questions. You're covering a lot of breadth here and going deeper into answering this would require a lengthy essay and possibly a consulting fee.
What are the useful gems or softwares that will help deployment of RoR 3.2 application on the clouds?
There is no specific requirements since I just want to get experience with it. But I am thinking of Amazon EC2 as a primary environment to test the application. The goal is to deploy it in the multiple servers.
I guess the most naive way would be launching the same application on multiple servers at the same time, but that will requires a lot of manual restart/reboot which requires a lot of human resources.
Is a single application of ruby on rails just not suited well for deployment on multiple servers?
We use Capistrano (https://github.com/capistrano/capistrano) to communicate with multiple EC2 instances on AWS.
We use Chef (https://github.com/opscode/chef) to do the system management configuration.
You can get cookbooks for various applications that you want to install (eg nginx, monit, logrotate...) from Opscode (http://community.opscode.com/cookbooks)
You will need both Capistrano and Chef to setup and deploy to AWS.
Puppet is another system management configuration that you can use too. (https://github.com/puppetlabs/puppet)
This is what Capistrano is for.
https://github.com/capistrano/capistrano/wiki/
I want to deploy a rails onto amazon ec2. I've had a look at poolparty and ec2onrails but neither seem to be maintained anymore.
What are people using to do this? Is it all homebrewed puppet and capistrano or is there a project that will get me going?
I can recommend two projects:
If you have a single Rails app, take a look at Rubber. It's a gem that can provision EC2 instances for you, install software and deploy your app. It's based on Capistrano. There are recipes for the most common components (mysql, apache, passenger, postgres, etc.).
In case you have more complex setup (e.g. multiple apps or specific needs that aren't covered by Rubber) I recommend Chef. It does have quite a learning curve, so prepare yourself. Take a look at OpsCode to get started with Chef.
You may want to take a look at our Rubystack AMIs. They are free and we keep them up to date. You still need to do work for automating deployment and integrating in your workflow, the AMIs mainly address the environment and runtime setup.
Is Capistrano only used for deploying Rails apps?
Basically I want a scripting framework to handle all server/client scripting for me.
Examples:
Updating Ubuntu, installing gems with dependencies etc.
Creating a new Rails app, Git initialize it and commit, create Heroku project and upload the app.
Automatize basic file/folder operations
Should I consider to use Capistrano for this (cause it can handle server/clients) or should I just use Rake for it?
Capistrano could do everything Rake could, but not the other way around?
What are the pros and cons with each?
A few attempts have been made at making capistrano more universal - capistrano-boss and my own capistrano-provisioning, for example - it may be that somebody has already done it. Certainly, in terms of running commands remotely and organising tasks, namespaces, hooks etc, capistrano is second-to-none. But I've yet to see a comprehensive solution that allows you to really administer remote systems using it.
Have you investigated chef? It seems that this is frequently used in conjunction with cap. 37signals, for example, have extensive chef recipes available - and they were also the source of capistrano.