StartupsFeb 3, 2019
Newdruggs

Best way to deploy cloud service in Linux?

I’m building a personal project in Linux and I’m currently running my python script as a background task. Basically “python start.py &” What is the correct way to run this service? As a Linux service? And I’m building out a pipeline to lint, test, deploy. How do I do the deployment to EC2? Have the ec2 instance pull and run the python code? Then start it as a background program?

Add a comment
IBM 👅👅✊🏼✊🏼👅 Feb 3, 2019

Ibm cloud utilizing red hat.

Oscar 🐨koala Feb 3, 2019

And built on top of the horrible openstack shit!!

OpenText FBstockLOL Feb 3, 2019

AWS Lambda

New
druggs OP Feb 3, 2019

It needs to be fast

Oscar 🐨koala Feb 3, 2019

Lambda is quick but use case may not fit what you need.

Flagged by the community.
Oscar 🐨koala Feb 3, 2019

Ec2 - run it with a daemonizer such as supervisord or monit. Otherwise run it as ecs (container) or run as app engine (google). Use free tier if you dont expect much, or get a droplet from digitialocean for $5 a month.

New
druggs OP Feb 3, 2019

Will monit add latency? This is a very low lag application so I don’t want to use an containerization like Docker

New
druggs OP Feb 3, 2019

How does deployment work with monit?

Microsoft Micr0s0ft Feb 3, 2019

GCP

Qualtrics rm -rf ~/ Feb 3, 2019

Docker + supervisord as Oscar mentioned

New
druggs OP Feb 3, 2019

Can’t use Docker because it needs to be low lag. Is supervisord better than monit?

Qualtrics rm -rf ~/ Feb 3, 2019

Read this before you decide docker is not feasible: https://stackoverflow.com/questions/21889053/what-is-the-runtime-performance-cost-of-a-docker-container Haven't used monit, so don't know. In any case, definitely don't use AWS Lambda if you care about latency.

Microsoft PMM’d Feb 3, 2019

Omg folks. Systemd. Why making your lives complicated - it’s THE way to run services on Linux. https://github.com/torfsen/python-systemd-tutorial/blob/master/README.md Also, you might want to proxy that with Nginx.