Install vFrabric tc server (as bundled with STS) into Linux EC2 instance? - linux

I have been developing a Spring MVC web app using Springsource Tool Suite (STS). STS comes with vFabric tc server developer edition I believe. When I deploy the .war file into my EC2 Linux AMI instance running tomcat6, there are incompatibilities between tomcat and vFabric.
For example, vFabric will accept objectName.getMethod() whereas it will return an error in tomcat6. I have to change it to objectName.method.
Here is my question. So, when making changes now, I don't use STS anymore and every change I have to package and redeploy which is time consuming. What is a good way around this?
I am thinking of installing the vFrabic tc server in my EC2 linux instance. Will that work? If I do that, theoretically, everything I develop in STS should be 100% compatible when deployed, correct?
Second question. How do I install vFrabic tc server in my EC2 instance?
Thanks!

One suggestion would be to develop inside of STS using a Tomcat server instead of tcServer. However, then of course you loose some of the nice capabilities of tcServer.
If no one here can give you a complete answer, I would recommend the SpringSource forums (for STS):
http://forum.springsource.org/forumdisplay.php?32-SpringSource-Tool-Suite
or here for tcServer:
http://forum.springsource.org/forumdisplay.php?64-tc-Server-General

Related

Deploy NodeJS application on EC2 via launch template

I built a simple NodeJS application and ran on an EC2 instance.
Everything works fine. I decided to create an AMI (Amazon Linux based) and a launch template to be used by a ASG.
The problem is, I cannot get the application start automatically.
I tried to add the following command through the user_data field but it doesn't work:
node main.js
Any ideas on how to automatically start this application once launched by the ASG?
Typically you would add this to the startup script of the AMI, so once the instance has started it will run the script on boot.
You may want to look at PM2 as well, it's a great tool for things like this and also makes it easy to setup each node instance in cluster mode ( assuming you have an EC2 instance with more than one core )
Some other ways of doing this, albeit not an auto scale but with DigitalOcean they offer a CASS model called 'apps' that basically pushes you app into a container from a git-repo and deploys it, you can then just spin new instances out as needed. Downside is that the bandwidth is a bit small but CND etc can help with that.

Installing cpanel on AWS EC2 with Node

I'm starting to use EC2 on Amazon and I'm planning to use Node.js as my server and for back end development. But I am really used to managing files via GUI and not CLI. That is why I want to install Cpanel on EC2. But I think cpanel comes with a web server like apache or nginx. So is it alright to install cpanel on EC2 if im planning to use node? Will there be any compatibility errors?
Thanks in advance
I would recommend selecting Instance type and storage accordingly if you are planning to use WHM/Cpannel.
You can install it on any server you want refer this guide. I think WHM Takes care of webserver like apache that is installed with this package.
Although things you need to keep in mind are :
you need pay for licence
Load Balancing etc would be very difficult.
Do not Forget to Assign a Static IP (Elastic IP)
Thanks

Using Docker to replicate a flask app set up?

I have not used Docker before at all, but I have a flask app running on an Azure server right now which I would like the mostly replicate to another server.
Ubuntu 16.10
Anaconda for my Python environments
A few systemd files to configure nginx and uwsgi
My goal is to start fresh without having to do a fresh install of the OS (I do not have the ability to do this) on my current server. I have a few issues with environments and multiple Python versions which I would like to escape from.
I would then like to take this set up and send it over to another server which is completely fresh (a brand new Azure instance which hasn't been touched yet). Is this possible with Docker?
To make things clear, Docker is not a technolgy to migrate applications from one server to another. Docker is a "vitualization" technology which allows you to isolate applications when they are running. Once you have this isolation, the Docker containers can be migrated to any server having just Docker installed. Thus you releive yourself from issues like "It works on this machine, but it doesn't work on that".
In order to do that, you need first to Dockerize your application. Your requirements are very common, and there are many samples online of how to containarize such applications.
However, you need first to learn about Docker to get started (which need a couple of hours/days). You can start learning about Docker here. Once you have your application dockerized and working on one machine, moving it to another server is a piece of cake.

Is there any linux scripts to for uploading nodejs app to myown linux server? Like appfog or heroku

Is there any linux scripts to for uploading nodejs app to myown linux server?
Like appfog or heroku. I have dedicated linux server and working on linux too.
I want upload my nodejs application to server and restart nodejs with one shell command.
I can write script, but maybe don't need to invent bycicle?
Popular choices using SSH:
rsync
fabric
For serious stuff you really should look at configuration management and server provisioning applications like (in no particular order):
Chef
Puppet
Ansible (+1 for the name, "Enders Game" is one of my favorite books)
Most revision control systems allows for "after/before-commit" hooks; sometimes I use these hooks to run tests before and automatically deploy to the acceptance environment after commits.
See also Jenkins CI (Continuous Integration is a hot topic).
I use fleet from substack to manage deployment. Fleet is a git-based tool that allows you to deploy code and manage your node processes running on remote servers.
Adding in seaport and either bouncy or node-http-proxy is a great way to build an application that is made up of lots of small components that work together.

Best solution to host a (command line) Windows application?

I have a Windows application that does some calculations and is called from command line. On my Windows machine, I have a PHP script running under Apache that executes the application and shows the output.
Is there any hosting solution that I can use to do the same? I can't figure out if EC2 or Azure are the right solutions. Basically, I need a web server + ability to execute my application.
Suggestions? Thanks.
You can host your application on AppHarbor, the .NET Platform-as-a-Service. You can either port your web frontend to .NET or try to get your PHP stuff working with Phalanger. AppHarbor is working on Background Tasks, which might be a good match for your workload.
I would just run the PHP script you already have under IIS in a Windows Azure web role.
If it is a Windows Application and you have the source code I would go with an Azure Worker Role. The advantage of using a PaaS (as Azure) instead of an IaaS (as Amazon) is that you wont have to bother of keeping the server up to date.
The real investment in time will be when you rewrite your application to make it work as a Worker Role. The time needed to do this work depends on how your application works right now. If is uses a lot of disc access it might be difficult and perhaps an Amazon server would be better. But if it only crunches numbers in memory an Azure Worker Role is a very good candidate.
The real advantage of using an Amazon server is that you probably wont need to do any work at all. Except maintaining the server.
As described in the question both Azure and EC2 will do the job very well. This is the kind of task both systems are designed for.
So the question becomes really: which is best? That depends on two things: what the application needs to do and your own experience and preference.
As it's a Windows application there should probably be a leaning towards Azure. While EC2 supports Windows, the tooling and support resources for Azure are probably deeper at this point.
If cost is a factor then a (somewhat outdated) resource is here: http://blog.mccrory.me/2010/10/30/public-cloud-hourly-cost-comparison/ -- the conclusion is that, by and large, Azure and Amazon are roughly similar for compute charges.
Steve Marx has a blog post that describes how to run another web server (i.e not IIS) on Azure
This potentially has everything you need - you can deploy Apache and your executable and run it in exactly the same way.
Alternatively - you can deploy your executable along side a bit of code in a worker role that would run that application periodically, all depending on your exact requirements

Resources