Skip to content

Instantly share code, notes, and snippets.

View vanduc95's full-sized avatar
:octocat:

Nguyen Van Duc vanduc95

:octocat:
View GitHub Profile

Install Ceilometer + Gnocchi with backend Ceph

In Controller node

  • Create database
mysql -uroot -pWelcome123

CREATE DATABASE gnocchi;
GRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'localhost' IDENTIFIED BY 'Welcome123' WITH GRANT OPTION ;

Ceph Architecture and Components

Trong bài viết này, chúng ta sẽ đi tìm hiểu về kiến trúc cũng như các thành phần trong hệ thống lưu trữ Ceph

  • Ceph storage architecture
  • Ceph RADOS
  • Ceph Object Storage Device (OSD)
  • Ceph monitors (MON)
  • librados
  • The Ceph block storage
  • Ceph Object Gateway

Giới thiệu về Nginx

Bài viết giới thiệu tổng quan về Nginx và cách thiết lập cân bằng tải trong hệ thống máy chủ sử dụng Nginx. Trước khi đi vào tìm hiểu vẫn đề này, chúng ta sẽ nói qua chút về Proxy.

1. Proxy là gì?

Proxy là một Internet server làm nhiệm vụ chuyển tiếp thông tin và kiểm soát tạo sự an toàn cho việc truy cập Internet của các máy khách. Có 2 loại Proxy là Forward proxyReverse proxy.

1.1 Forward proxy

Là khái niệm miêu tả sự kiện proxy nhận dữ liệu từ server và gửi cho client thay vì client nhận dữ liệu trực tiếp từ server. Nếu không chỉ rõ thì khi nói đến proxy có thể hiểu là forward proxy.

Cụ thể, ta có 3 máy tính kết nối tới internet.

@vanduc95
vanduc95 / grep.sh
Last active November 5, 2020 15:54 — forked from isyufu/grep.sh
grep cheat sheet
#!/bin/sh
#http://www.thegeekstuff.com/2011/01/advanced-regular-expressions-in-grep-command-with-10-examples-%E2%80%93-part-ii/
# GENERAL
# print lines begining with range of letters
grep ^[A-D] table.txt
# REGEX
@vanduc95
vanduc95 / find.sh
Created November 5, 2020 15:38 — forked from gr1ev0us/find.sh
Cheatsheet for find linux
# List of cheatsheet for linux find.
# Taken from here http://alvinalexander.com/unix/edu/examples/find.shtml
# basic 'find file' commands
# --------------------------
find / -name foo.txt -type f -print # full command
find / -name foo.txt -type f # -print isn't necessary
find / -name foo.txt # don't have to specify "type==file"
find . -name foo.txt # search under the current dir
find . -name "foo.*" # wildcard
@vanduc95
vanduc95 / curl.md
Created November 2, 2020 09:05 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@vanduc95
vanduc95 / install Ceph Luminous on Ubuntu 16.04.md
Last active October 15, 2020 11:45
install Ceph Luminous on Ubuntu 16.04

Hướng dẫn cài đặt Ceph Luminous


I. Cài đặt cơ bản


1. Chuẩn bị môi trường

1.1 Mô hình mạng

Hướng dẫn tích hợp OpenStack Ocata và Ceph Jewel


I. Cài đặt


1. Chuẩn bị môi trường

1.1 Mô hình mạng

test_command='curl -sL \
-w "%{http_code}\\n" \
"http://localhost:8000/people/" \
-o /dev/null \
--connect-timeout 3 \
--max-time 5'
if [[ $(test_command) == "200" ]] ;
then
echo "OK" ;
else