Why would you do this?
- You own your bare metal infrastructure.
- You want to take advantage of Kubernetes.
- You do not wish to migrate your application to the cloud
Why it will not always suit your needs?
Logging, tracing, and metrics are 3 pillars of system observability.
Logging records discrete events in the system. For example, we can record an incoming request or a visit to databases as events. It has the highest volume. ELK (Elastic-Logstash-Kibana) stack is often used to build a log analysis platform. We often define a standardized logging format for different teams to implement, so that we can leverage keywords when searching among massive amounts of logs.
(PRE) Create a free tier ec2 Ubuntu machine
SSH into the server instance
Run as super user: sudo su
Run: apt-get update
(1) NPM and Nodejs installation: https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-up-node-on-ec2-instance.html
Mongodb has two very useful commands for this purpose: mongodump
and mongorestore
. Here's how to use them:
mongodump: It is a utility for creating a binary export of the contents of a database. Basically, using this command you can export MongoDb database.
Use the following command to dump your local database:
mongodump --db <your_database_name> --out <directory_path>
For example:
The best way to handle environment variables in React Native is to use the react-native-config
library.
Here are the steps:
npm install react-native-config
Or if you use Yarn:
You can run this command in a shell from the directory that you want to get the names of the folder into a csv.
find . -maxdepth 1 -type d -name "MA*" | sed 's|./||' > folder-names.csv
What this does is it looks for any directories ('-type d') within your current location ('.') that start with 'MA' ('-name "MA"')*. The '-maxdepth 1' part just means we're only looking at the top level, and not diving down into subdirectories.
Once those directories are found, we strip out the './' at the beginning of each folder name using 'sed', and then we put all of these names into a file called 'folder-names.csv'
``` | |
server { | |
listen 80; | |
server_name SUB_DOMAIN.DOMAIN.com; | |
return 301 https://$host$request_uri; | |
} | |
upstream backend { | |
server EC2_Private_IPv4:APP_PORT; # In-house test server |
// Clear chrome sync storage
chrome.storage.sync.clear(() => {
console.log('Chrome sync storage has been cleared.');
});
// Clear chrome local storage
chrome.storage.local.clear(() => {
console.log('Chrome local storage has been cleared.');
});