Build RPM to deploy - deployment

I would like to know what is the best method to deploy applications like Django, Flask etc.. is by building RPM files or by using a tool like fabric which more or less does the same thing.. I'm trying to figure out the best approach to handle deployment and automation.

After considering the requirements I believe in my situation fabric will work best for basic deployments to multiple servers. While rpms can do similar things every time there is a change in source a new RPM must be created which for my environment will not work since the source code changes frequently. Any input from anyone is welcome. But I feel at least for me this will work best in the current situation.

Related

Create a local custom testing environment through Minikube

I'm currently creating a Minikube cluster for the developers, they will each have their own Minikube cluster in their local machine for testing, assuming the developers don't know anything about Kubernetes, is creating a bash script to handle all the installations and the setup of the pod the recommended way? Is it possible to do it through Terraform instead?Or there's other way to do this easier? Thanks!
Depending on what your requirements are, choosing Minikube may or may not be the best way to go.
Just to give you some other options you might want to take a look at the following tools when it comes to local enviornments for developers (depending on their needs):
kind
k8s-vagrant-multi-node
Since you do not seem to care about Windows or other users (at least they weren't mentioned), a bash script may be the simplest way to go. However, usually that's were tools like Ansible come into play. They help you with automating things in a clear fashion and allow for proper testing. Some tools (like Ansible) even have support for certain Windows features that may be useful.
TL;DR
A Bash script is not the recommended way as it has lots of pain points that come with it, however, it may be the fastest approach depending on your skillset.
If you want to do it properly use tools like Ansible, Chef, Puppet, etc.

Deploying Go App

I have a REST API endpoint written in Go and I am wondering what is the best way to deploy it. I know that using Google App Engine would probably make my life easier in terms of deployment. But, suppose that I want to deploy this on AWS. What options/process/procedures do I have. What are some of the best practices out there? Do I need to write my own task to build, SCP and run it?
One option that I am interested in trying is using Fabric to create deployment tasks.
Just got back from Mountain West DevOps today where we talked about this, a lot. (Not for Go specifically, but in general.)
To be concise, all I can say is: it depends.
For a simple application that doesn't receive high use, you might just manually spin up an instance, plop the binary onto it, run it, and then you're done. (You can cross-compile your Go binary if you're not developing on the production platform.)
For slightly more automation, you might write a Python script that uploads and runs the latest binary to an EC2 instance for you (using boto/ssh).
Even though Go programs are usually pretty safe (especially if you test), for more reliability, you might daemonize the binary (make it a service) so that it will run again if it crashes for some reason.
For even more autonomy, use a CI utility like Jenkins or Travis. These can be configured to run deployment scripts automatically when you commit code to a certain branch or apply tags.
For more powerful automation, you can take it up another notch and use tools like Packer or Chef. I'd start with Packer unless your needs are really intense. The Packer developer talked about it today and it looks simple and powerful. Chef serves several enterprises, but might be overkill for you.
Here's the short of it: the basic idea with Go programs is that you just need to copy the binary onto the production server and run it. It's that simple. How you automate that or do it reliably is up to you, depending on your needs and preferred workflow.
Further reading: http://www.reddit.com/r/golang/comments/1r0q79/pushing_and_building_code_to_production/ and specifically: https://medium.com/p/528af8ee1a58

Automated deploys JBoss/Tomcat

i'm looking for a tool to make remote automatic deployments in JBoss/Tomcat(under linux/unix) where a component is updated and version is incremented in my Artifactory.
For example.
I have an instance called 'A' under tomcat/jboss with the deployed component "my-plugin-1.0.jar" . Then I upload the component "my-plugin-1.1.jar" in artifactory, and after that, i need the automatic update of this new component in my application server.
Does anyone know any tool that can do this?
Thanks in advance
Kind regards
If you are into serious DevOps development, Chef or Puppet are your tools.
If you don't feel like writing Ruby scripts, ZeroTurnaround's LiveRebel is a way to go.

How can I automate Node.js deployments?

I'm looking for something analogous to Capistrano for Rails - https://github.com/capistrano/capistrano/wiki/
I'd like to be able to run a single command from my workstation that will update the code on my server(s) from a GitHub project and handle all necessary process restarting for the application. I need to be able to control specifically when this happens, not use a hook in GitHub's checkin event.
Are Node.js developers also using Capistrano, or is there a tool that works better for Node.js?
You could use fabric, it's a python lib. Nodejs already uses python for some build operations for extensions, no reason you couldn't also use python to do what you're asking.
http://docs.fabfile.org/en/1.2.2/index.html
I don't know of a javascript lib that does this, not to say there isn't one though. Fabric sounds very much like what capistrano is, but maybe a tiny bit different in some aspects.
Capistrano seems to be the most popular choice.

Could you use Nuget / OpenWrap to manage remote deployments?

I haven't thought this through to completion, but it seems that if nuget is a tool for managing the inclusion of packages in a known location, could it not be used as a deployment tool for web servers (a website being just a very large package itself)?
A service running on the web server would ping a nuget server for updates, and install them when available. There would have to be some additional management (recycling app pools, making sure that all your webservers don't update at the same time etc.), but I think it could work?
Any thoughts?
Yes that's definitly on the roadmap for openrasta/openwrap, so it's not a crazy idea. Some people already have done some of that work themselves.
This sort of thing is usually known as a Continuous Integration (CI for short) setup. You could probably cobble something together with Nuget but there are already some pretty good tools out there. Cruise and TFS to name a couple.
If you're looking for a mad scientist project though, carry on and let the community know what you come up with!