How to reload/deploy moleculer services in production? - moleculer

How should i deploy new versions of molecular services?
The documentation explains well how to start them with moleculer-runner, but i can't find what is the proper way reload them without downtime.

The zero-downtime updating is not part of the framework, it's a system admin/devops issue. I recommend using Kubernetes for deploying upgraded containers with zero-downtime: https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/

Related

Deploy a Vue.js app on Google Compute Engine

I created a simple Vue.js application. I am trying to deploy it on Google compute engine(not app engine or any other), but I can't find any appropriate solution. Can anyone help me?
Have a look at App Engine. It'll be the easiest way to deploy your app without thinking about infrastructure management.
If you really want/need to use Compute Engine you should decide on your own which OS to use and then install and configure all the required software manually.
Meanwhile, I should mention Cloud Run as managed compute platform that automatically scales your stateless containers with your code.
Please update your question if you need more details.
Deployed using express server, Nginx and pm2.

How to deploy multiple version of an application in production for microservice based application

Is it possible to have multiple versions of service(s) deployed in production at the same time. From my assumption, this should be pretty common pattern for microservice/api based projects or mobile projects. I want to know how do you do it and what are common pattern in industry for this kind of problems. It would be helpful if your answers around AWS environment or Kubernetes environment.
Thanks in Advance.
Is it possible to have multiple versions of service(s) deployed in production at the same time
Yes, it is possible. The idea is to keep all used microservices in production (v1, v2 ...) at the same time and to bring down the versions that are not used anymore. For this, you should somehow know when a version is not used anymore.
AFAIK, you have to options:
For every new version you make a new endpoint (like /v2/someApiCall) that is connected to the same (now upgraded) microservice and gradually instruct clients to use the new endpoind; when the old endpoint is not used anymore you deleted it; this is the preferred way.
For every new version you make a new microservice that share the same persistence with the old microservice; you should avoid the use of this solution; Netflix uses this strategy in rare occasions when the cost of changing old consumers is too high.
You can read more at page 62 from Building microservices by Sam Newman.
With AWS API Gateway you could deploy multiple versions of your code and switch between them from the mapping templates, as explained here. You might also want to look into stage variables.
Assuming your are exposing services over An HTTP REST API, the general standard is to always base line your service urls with a version.
Eg,
/v1/account/getUserInfo
If you need to release a new version, expose it over:
/v2/account/getUserInfo
Where v2 can run over a different branch of the codebase.
I have blogged about this: Multi-version Service Discovery using Spring Cloud Netflix Eureka and Ribbon, focussed on Spring Cloud Netflix components / libraries though.
But the idea is to deploy a new version of the artifact / binary in a new host / VPS / Container and have the service register with a registry server (Eureka, Consul, ....) and include metadata about the API versions it supports (v1, v2, ...). Client apps would discover which host / container / ... serves the API version needed.

Can MemSQL be deployed under YARN?

MemSQL is a in-memory database and makes effective use of cores on the machines it has been deployed.
I want to deploy in the same database on the same infrastructure where my other ecosystem tools are running. What are possibilities of MemSQL working under a resource management framework like YARN or Mesos?
I could not find much information on Google, wondering if it is possible at all?
MemSQL can be deployed with Mesos - we have a Mesosphere framework for MemSQL which makes it extremely easy to deploy, see http://blog.memsql.com/how-to-deploy-memsql-on-the-mesosphere-dcos-2/. We don't currently have a similar framework for YARN but it certainly can be done.

Hosting a Rails Application on Linode

I'm planning to host a Rails application on Linode, but I'm still unsure about the requirements and process of deploying. I'm only getting the 512 plan since I'm expecting relative small traffic for the site.
My question is, do I need to get a repository such as Github to store my code? I'm also a bit concerned about how long it takes to set the server up and the deployment process. I've browsed through the Linode library but I'm not entirely clear on how to deploy Rails apps. I'm planning to use nginx as my server and passenger for deploying. Does anyone know where I can learn to deploy Rails applications on a Linode machine? A step-by-step tutorial with detailed explanation would be great. Thanks!
I've deployed a couple of simple applications on Linode and found their documentation to be excellent. In particular they have step-by-step tutorials tailored to specific environments. For example, in my case (like you) I wanted to use nginx, and I was using Ubuntu 10.04, so I followed this guide:
http://library.linode.com/frameworks/ruby-on-rails-nginx/ubuntu-10.04-lucid
If it's your first time setting up on a VPS there will be some hurdles certainly, but I found the experience to be very rewarding.
Regarding hosting your code, you have a number of options, but keep in mind that this is really a separate issue from deploying your app. You deploy your app on linode, but you don't have to host your code there, although you certainly can.
In general terms, if you're okay with making your code open, then certainly github is a good choice. If you want to keep the code private but still have access online (rather than just on one computer), you can take advantage of your linode machine and host your code there.
If you will have a number of other people contributing to the codebase, you might consider setting up gitosis or gitolite, which make it easy to do this. Alternatively if you will be the main user contributing to the codebase, you can setup a simpler configuration through HTTP, explained here: http://dev.bazingaweb.fr/2011/02/23/how-to-set-up-git-over-http.html
Linode also has documentation on setting up a remote git repository: https://library.linode.com/linux-tools/version-control/git
If you're choosing between gitosis and gitolite, I'd go with gitolite since gitosis appears to have been abandoned and is no longer being actively maintained.
Other references on deploying on linode:
http://infinite-sushi.com/2011/01/deploying-a-rails-app-to-a-linode-box/
http://blog.chris-spencer.co.uk/from-zero-to-git-deployment-on-linode
Ryan Bates has a great videocast on deploying Rails apps to... Linode! Today's your lucky day :) Grab some popcorn and enjoy: http://railscasts.com/episodes/335-deploying-to-a-vps
You don't need a GitHub account to deploy on Linode. The deploy process happens between your local machine and the Linode servers, usually by means of the Capistrano gem.
This tutorial from Smashing Magazine is pretty good. http://coding.smashingmagazine.com/2011/06/28/setup-a-ubuntu-vps-for-hosting-ruby-on-rails-applications-2/
Perfect Script for installation of nginx/ PostgreSQL/ Postfix/ Node.js/ Add deployer user/ rbenv
also refere this link https://medrails.wordpress.com/?blogsub=confirming#subscribe-blog
Thanks

Glassfish in a production environment?

Do you use Glassfish 2 or v3 in a production environment?
Do you find it robust?
Have you ever been able to find a complete set of documentation?
What do you do when you find that Glassfish ignores J2EE standards, like class and anotation scanning?
Glassfish is Sun's reference standard for a J2EE app server. V3 supports the new 3.1 standard. However, it is only a preview. It is currently scheduled to be released on Dec 10, 2009. Of course, it can always be dangerous to be a very early adopter in a production environment. Currently V3 doesn't support JMS or clustering, for example, but they should be in the final release.
I've used V2 in production for about 3 years and I personally like it. The web admin console makes it very easy to manage (http://localhost:4848, admin, adminadmin), and the performance is good. Here's one example, where someone benchmarked Glassfish: Blog. Of course, you should search for more examples and your YMMV. Here's a Sun document for Glassfish to help Tomcat User.
One last thing that I would add is that Sun ships, and integrates, both Tomcat and Glassfish in their Java IDE Netbeans so you can easily switch between the two app servers to test your particular app.
GlassFish Server V3 or V2 can be used in production environments but the number of users should be less than 1500. Its not very robust and scalable during high load. If used for simple applications GF works perfectly fine, as it is the reference implementation of Java EE standards by Sun which only server to be a guide to other vendors of application servers.
For more complex and high load applications, its better to go to IBM WebSphere Application Server. That's the most robust app server I have seen in my 15 yrs of experience.
Do I use GF in production? no.
Do I find it robust? yes, but I do not tax it very hard.
Have I ever found a complete set of documentation? I think so... the GlassFish v2.1 docs and the GlassFish v3 docs (http://docs.sun.com/app/docs/prod/gf.entsvr.v3?l=en&a=view)
What do I do when GlassFish ignores the J2EE standards? I file an issue here: https://glassfish.dev.java.net/issues/
Do I use in production? Yes. (Now, using 3.0.1)
Is it robust? Yes. But my point of view is from someone that likes to follow the server's developers community and can try some tricks.
What about documentation? The official one is really good, and the developers blogs are a great plus (http://blogs.oracle.com/theaquarium/). What is maybe far from other communities, at the moment, is the collective experience material (like forums), but I think the mail lists are good enough (http://glassfish.java.net/public/mailing-lists.html).