In this tutorial, we will cover setting up a production-ready Node.js application using the amazing services provided by Alibaba Cloud services. We'll be deploying an application called Node.js Blog, and to do this, we'll be using the following Alibaba Cloud services:
Before you begin this tutorial you'll need the following:
Note: Make sure the ECS instance and the ApsaraDB for MongoDB instance are created in exactly the same zone. This will improve application performance and also avoid any connection issues or restrictions.
In this step, we'll be installing all the dependencies we need to be able to run our node js application. To follow along, make sure you are logged in to your ECS instance.
To learn the following steps of installing Git and etc，you can refer to Deploying Node.js Apps for Production on Alibaba Cloud.
This tutorial shows you how to deploy a Node.js application on a CentOS server using Alibaba Cloud's Starter Package service.
If you are planning to host a Node.js application or dynamic website on Alibaba Cloud, then an optimal and economical solution with high bandwidth, SSD and powerful CPU might interests you. Introducing Alibaba Cloud's Starter Package Program, which provides SSD Cloud servers powered by 2nd Generation Intel Xeon Scalable Processors at highly affordable prices compared to other cloud providers. It allows you to access a powerful CPU at a much lower cost and supports both, Linux and Windows servers worldwide.
Alibaba Cloud's Starter Package helps you get started instantly through simple, scalable, and cost-effective Elastic Compute Service (ECS) that caters to all your cloud hosting needs. The new SSD Cloud Server Packages provide easy-to-use, high-performance virtual machines with higher data transfer plans at hugely discounted rates for enabling you to start from as low as $2.50 a month. Since it is available across 14 global regions, you can easily choose the Datacenter Region for your servers to meet any specific requirements. It allows each user to have up to five ECS instances with the simultaneous Data Transfer Plans.
So, once you have reserved your SSD Cloud Server via Starter Package 2.0, you can go ahead and easily deploy a Node.js project on CentOS operating system by following the instructions below:
To build your dynamic website by deploying a Node.js project on CentOS, you should meet the following requirements:
In this guide, we will talk about using Packer to build a machine image on Alibaba Cloud ECS instance, and Ansible for writing what we want our machine image to have.
Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel.
Ansible is an open source software that automates software provisioning, configuration management, and application deployment. Ansible connects via SSH, remote PowerShell or via other remote APIs.
In this guide, we will talk about using Packer to build a machine image on Alibaba Cloud Elastic Compute Service (ECS), and Ansible for writing what we want our machine image to have. We will be building an image that has a react JS application and nodejs setup. Machine image in DevOps is a single static unit that contains a pre-configured operating system and installed software which is used to quickly create new running machines. Machine image formats change for each platform.
You don't need to be an expert to follow this guide, All you need to have is an account on Alibaba Cloud and an Access key. Click on this link to see how to create an access key on Alibaba cloud.
To install packer on our system, we can follow the official installation page for packer or use a package manager, chocolatey for windows and homebrew for macOS. Using a package manager saves us from the hassle of adding environment variables to path.
In this Node.js troubleshooting series, we will describe the features and best practices of Node.js Performance Platform for Node.js applications.
In the previous article, we used Chrome DevTools to troubleshoot CPU and memory problems in Node.js applications. However, in actual production practices, we may find that Chrome DevTools is more inclined to local development because it obviously does not generate dump files, which are required for problem analysis. This means that developers additionally need to configure tools like v8-profiler and heapdump for online projects and export statuses of projects running online in real time by using additionally implemented services.
In addition to CPU and memory problems described in the previous article, in some scenarios, we may need to analyze error logs, disks, and core dump files to eventually locate problems. In these scenarios, Chrome DevTools alone may not be able to meet the requirements. To solve those pain points for Node.js developers, we recommend Node.js Performance Platform (formerly known as AliNode). Node.js Performance Platform has already been used to monitor and troubleshoot almost all of Alibaba Group's online Node.js applications. You can deploy and use it in your production environment without any worries.
This article describes the architecture, core capabilities, best practices, and other aspects of Node.js Performance Platform to help developers understand how to use this tool to analyze abnormal metrics and troubleshoot online Node.js application faults.
This manual is first published on GitHub at https://github.com/aliyun-node/Node.js-Troubleshooting-Guide and will be simultaneously updated to the community.
Note: At the time of writing, the Node.js Performance Platform product is only available for domestic (Mainland China) accounts.
Understand the advantage of a cloud server. Learn how to purchase ECS on Alibaba Cloud, manage the server on our console, backup critical data and ensure your system can adjust according to business needs.
For the security measures of the host on the cloud, we need to consider more factors, such as the configuration of the firewall inside the host, as well as various settings related to operating system user management and privilege management. Only by understanding and correctly configuring the security settings inside these hosts you can better cooperate with various cloud security products. This course is designed to help you better understand these security setup and learn how to properly configure them to maximize the security hardening of hosts on the cloud.
Websoft9 OpenCart is a pre-configured, ready to run image for running OpenCart on Alibaba Cloud. is an easy to-use, powerful, open source online store management program that can manage multiple online stores from a single back-end.
Websoft9 Ghost is a pre-configured, ready to run image for running Ghost on Alibaba Cloud.Ghost is a fully open source, hackable platform for building and running a modern online publication.
The JS SDK is easy to use and can be integrated in the Node.js environment or other environments, such as browsers or web applications. Node.js is required when you call the JS SDK that uses the TLS protocol. You can call the JS SDK directly in the browser when the HTTPS protocol is used.
Simple Application Server suits you well if all you need is a private virtual machine. It provides you the all-in-one solution to launch and manage your application, set up domain name resolution, and build, monitor, maintain your website with just a few clicks. It makes private server building much easier, and it is the best way for beginners to get started with cloud computing.
Simple Application Server is a new generation computing service for stand-alone application scenarios. It provides one-click application deployment and supports all-in-one services such as domain name resolution, website publishing, security, O&M, and application management. This optimizes the user experience of setting up a simple application and makes it easier for entry-level users to use cloud computing products.
Alibaba Cloud Elastic Compute Service (ECS) provides fast memory and the latest Intel CPUs to help you to power your cloud applications and achieve faster results with low latency.
Deploy ECS instances with just a few clicks from the easy-to-use console and scale capacity up or down based on real-time demands.
hyj1991 - June 20, 2019
Alibaba Clouder - November 25, 2019
hyj1991 - June 20, 2019
hyj1991 - July 22, 2019
hyj1991 - June 20, 2019
hyj1991 - June 20, 2019
More Posts by Alibaba Clouder