From 71b3251a25c2bffb1485e0c87c14bbf12e11e262 Mon Sep 17 00:00:00 2001 From: Yik Teng Hie Date: Wed, 24 Mar 2021 15:16:22 +0800 Subject: [PATCH] add aws --- aws/README.md | 68 ++++++++++++++++++++++++++++++++++++++++++ redis/README.md | 38 +++++++++++++++++++++++ service-mesh/README.md | 14 +++++++++ 3 files changed, 120 insertions(+) create mode 100644 aws/README.md create mode 100644 redis/README.md create mode 100644 service-mesh/README.md diff --git a/aws/README.md b/aws/README.md new file mode 100644 index 0000000..09a5a6f --- /dev/null +++ b/aws/README.md @@ -0,0 +1,68 @@ +# AWS + +* [CLI](https://docs.aws.amazon.com/cli/latest/userguide/welcome-versions.html) +* Console [SignIn](https://razerpay.signin.aws.amazon.com/console) +* EC2 vs Lambda [comparison](https://www.nakivo.com/blog/aws-lambda-vs-amazon-ec2-which-one-to-choose/#:~:text=AWS%20EC2%20is%20a%20service,environments%2C%20and%20run%20custom%20applications.&text=AWS%20Lambda%20provides%20you%20a,an%20event%20trigger%20is%20activated.) + * EC2 : VM instance + * always running + * Pricing : CPU, memory, storage & runtime + * use-case : high-performance application, long running + * Lambda : Container + * Run when event triggered + * Pricing : based on running time + * Max Mem : 3008MB + * Max runtime : 900 sec + * use-case : + * automating task + * realtime log + * processing object upload to S3 +* Storage + * EBS - Elastic Block Storage + * S3 +* Messaging + * SNS - Simple Notification Service + * distributed Publish Subscribe system. push to subscriber + * multiple receiver allowed + * SQS - Simple Queue Service (Message Queue) + * distributed queuing system. polling by receiver + * single receiver +* VPC - Virtual Private Cloud + +```sh +$ aws --version + +$ aws configure + +AWS Access Key ID [None]: ... +AWS Secret Access Key [None]: ... +Default region name [None]: ap-southeast-1 +Default output format [None]: + +$ aws configure list + + Name Value Type Location + ---- ----- ---- -------- + profile None None +access_key ****************7BMR shared-credentials-file +secret_key ****************Ph2l shared-credentials-file + region ap-southeast-1 config-file ~/.aws/config + + +``` + +* setting folder `~/.aws/credentials` & `~/.aws/config` + +* [Region Name](https://docs.aws.amazon.com/general/latest/gr/rande.html) + +* [SDK](https://docs.aws.amazon.com/cli/latest/userguide/welcome-resources.html) + +```sh +$ aws help + +$ aws ec2 help + +$ aws ec2 describe-instances help +``` + + + diff --git a/redis/README.md b/redis/README.md new file mode 100644 index 0000000..c85fdff --- /dev/null +++ b/redis/README.md @@ -0,0 +1,38 @@ +# Redis + +* login docker + + ```sh + PS> docker exec -it redis-redis_1 sh + ``` + + + +* login redis with password = admin + + ```sh + $ redis-cli -p admin + ``` + + + +* get key + + ```sh + 127.0.0.1:6379> keys * + ``` + + + +* set key + + ```sh + 127.0.0.1:6379> set keyname 1 + + // set "session_" (base64) key using for authentication + 127.0.0.1:6379> set c2Vzc2lvbl83ZDNlYjNiYS0zYjliLTQyMGEtYTc4YS1lOGQwYzJmY2MzYWVfU2luZ2Fwb3Jl 1 + ``` + + + +* \ No newline at end of file diff --git a/service-mesh/README.md b/service-mesh/README.md new file mode 100644 index 0000000..8b74189 --- /dev/null +++ b/service-mesh/README.md @@ -0,0 +1,14 @@ +# Service Mesh + +[mesh](https://www.nginx.com/blog/what-is-a-service-mesh/) + +A *service mesh* is a configurable, low‑latency infrastructure layer designed to handle a high volume of network‑based interprocess communication among application infrastructure services using application programming interfaces (APIs) + + + +Service Mesh Architecture + +* Kubernetes +* Netflix technology suite +* Azure Service Fabric +* AWS App Mesh \ No newline at end of file