Thứ Tư, 2 tháng 4, 2014

Salt formula

Tự nhận thấy Salt là một chương trình quản lý cực kì tuyệt vời
Nó tuyệt ở chỗ bạn muỗn deploy một softwer nào đó trên một server  chỉ với hai ba dòng lệnh là ok, vậy mà một thằng 'lính mới' như mình lại mất cả vài tuần cũng chưa chắc đã hoàn thiện được như thế

Và tớ cũng muốn mình có thể tạo được những "chương trình" như thế, và người ta gọi đó là salt- formula
Thực sự hiện tại thấy để viết được một salt formula mình thấy rất là khó, nhưng khó không có nghĩa là không làm được. Hiện tại mới nhận ra mình cần làm những bước như thế này, trong quá trình làm nếu có gì không đúng sẽ sửa đổi dần dần
1. Đọc kĩ tut salt formula trong saltstack tutorial
2. Học jinja2
3. Đọc về Uwsgi
4. Đọc về nginx
5. Viết salt formula

Và những cái trên với mình có lẽ là ...mới. Cố gắng nào

Ở trên là những kiến thức cần học để viết lên một salt formula
Mình quên mất một điều quan trọng là một formula chỉ được viết khi đã cài đặt một softwer băng tay thành công

Trong ví dụ viết salt formula deploy gladius, cần thực hiện 3 bước:
1. Dùng salt formula cài uwsgi
2. Cấu hình cho gladius chạy bằng uwsgi và nginx
3. Viết salt formula sau khi đã cài đặt xong

Hiện tại thì mới hiểu được bước 1

Bước 1: Cài uwsgi: xong
uWsgi là cái khỉ gì?

WSGI is the Web Server Gateway Interface. It is a specification that describes how web server communicates with web applications, and how web applications can be chained together to process one request.

WSGI là  Web server Gateway Interface , Một Specification ( chỉ dẫn kỹ thuật) mô tả cái cách mà web server giao tiếp với các web app, và cái cách mà các web app kết hợp với nhau để xử lý một yêu cầu

The uWSGI project aims at developing a full stack for building hosting services.

Application servers (for various programming languages and protocols), proxies, process managers and monitors are all implemented using a common api and a common configuration style.

uWSGI project nhằm phát triển đầy đủ các thành phần cho quá trình xây dựng nên các hosting services ( các dịch vụ lưu trữ)

Các appliction servers( các server ứng dụng )  (cho cả các ngôn ngữ lập trình và các protocol khác ) , prixies , quản lý các quá trình cũng như các monitors đều được thực hiện với một api chung và một style configuration chung


Included components (updated to latest stable release)

The Core (implements configuration, processes management, sockets creation, monitoring, logging, shared memory areas, ipc, cluster membership and the uWSGI Subscription Server)

Request plugins (implement application server interfaces for various languages and platforms: WSGI, PSGI, Rack, Lua WSAPI, CGI, PHP, Go ...)















2 nhận xét:

  1. > uWSGI là một WSGI implementaion
    sai.

    Đã đọc định nghĩa thì đọc xong phải biết nó là cái j.
    http://uwsgi-docs.readthedocs.org/en/latest/

    The uWSGI project aims at developing a full stack for building hosting services.

    Application servers (for various programming languages and protocols), proxies, process managers and monitors are all implemented using a common api and a common configuration style.

    Thanks to its pluggable architecture it can be extended to support more platforms and languages.

    Currently, you can write plugins in C, C++ and Objective-C.

    The “WSGI” part in the name is a tribute to the namesake Python standard, as it has been the first developed plugin for the project.

    Trả lờiXóa
  2. Included components (updated to latest stable release)

    The Core (implements configuration, processes management, sockets creation, monitoring, logging, shared memory areas, ipc, cluster membership and the uWSGI Subscription Server)

    Request plugins (implement application server interfaces for various languages and platforms: WSGI, PSGI, Rack, Lua WSAPI, CGI, PHP, Go ...)

    Trả lờiXóa