Rocketeer is a program run with PHP. Nó lấy cảm hứng từ Laravel Framework nên sẽ nhanh chóng, thanh lịch và quan trọng nhất là dễ sử dụng
Chức năng chính
- Đa chức năng, hỗ trợ nhiều kết nối, đa giao diện kết nối, nhiều giai đoạn trên mỗi máy chủ, v. v
- nhanh. tác vụ xếp hàng và chạy bài hát của chúng trên tất cả các máy chủ và các giai đoạn
- Có tính module. bạn không chỉ có thể thêm các chức năng tùy chỉnh và các thành phần, các phần cốt lõi của Rocketeer cũng có thể được thay đổi, mở rộng
- Cấu hình sẵn. nếu bạn cảm thấy mệt mỏi với việc thực hiện cùng một thói quen lặp đi lặp lại nhiều lần?
- Mạnh mẽ. quản lý phiên bản phát hành, kiểm tra máy chủ, khôi phục. Tất cả các tính năng bạn mong đợi từ một công cụ triển khai tự động đều có sẵn
In sao lại sử dụng Rocketeer? . Ngay trên trang chủ của Rocketeer cũng có câu trả lời
"Đó là một câu hỏi được đặt ra cho tôi, tại sao không sử dụng Capistrano? Tôi đã sử dụng Capistrano trong quá khứ, nó làm được mọi thứ bạn muốn, đó là một điều tuyệt vời
Tuy nhiên, nó vẫn là một gói Ruby và tương thích chặt chẽ với Rails theo một số cách; . Bằng cách nào đó bạn cấu hình nó một lần và có thể sử dụng nó bất cứ nơi nào bạn muốn trong lĩnh vực ứng dụng của bạn, ngay cả bên ngoài thói quen phát triển khai. Capistrano cũng rất dễ hiểu, dành cho những người dùng lần đầu hay người mới làm quen, Capistrano rất dễ dàng để tham gia cùng một lúc - Rocketeer hướng tới càng đơn giản càng tốt bằng cách cung cấp mặc định các thông minh và tăng thời gian
Nó cũng được suy nghĩ nhiều hơn cho thế giới PHP - mặc dù bạn có thể cấu hình Capistrano để chạy Composer và PHPUnit, điều đó không phải là điều mong đợi, trong khi những công việc đó là một phần nhiệm vụ của mọi nhà phát triển . "
2. Cài đặt
Vâng. cài đặt rocketeer rất đơn giản và dễ dàng. Bạn chỉ cần tải file chạy về và phân quyền chạy. xong
$ wget //rocketeer.autopergamene.eu/versions/rocketeer.phar
$ chmod +x rocketeer.phar
$ sudo mv rocketeer.phar /usr/local/bin/rocketeer
Đây là các câu lệnh có thể sử dụng với Rocketeer
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
3. Cấu hình Rocketeer
Chúng ta sẽ cấu hình Rocketeer = câu lệnh
No password or SSH key is set for [develop/0], which would you use? [key] [key/password]password
No password is set for [develop/0], please provide one:
0No connections have been set, please create one: [production]develop
-> bạn phải định nghĩa môi trường để rocketeer làm việc. as at here mình dùng
No password or SSH key is set for [develop/0], which would you use? [key] [key/password]password
No password is set for [develop/0], please provide one:
1No host is set for [develop/0], please provide one:10.0.1.101
-> chỉ định ip của máy chủ bất kỳ thuộc môi trường phát triển. 10. 0. 1. 101
No username is set for [develop/0], please provide one:cuongtv
-> tên người dùng để triển khai. cuongtv
No password or SSH key is set for [develop/0], which would you use? [key] [key/password]password
No password is set for [develop/0], please provide one:
-> chọn cách thức ssh tới máy chủ [mật khẩu hoặc sử dụng phím]. ở đây mình chọn mật khẩu
________số 8-> khai báo repo để triển khai. https. //github. com/cuongtv2004/test-01. git
No username is set for [repository], please provide one:
No password is set for [repository], please provide one:
-> khai báo người dùng để đăng nhập vào repo đó [nếu công khai thì không cần thiết]
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
0-> tên ứng dụng. kiểm tra01
There is done section config. We try check view
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
1Vì vậy rocketeer đã sinh ra thêm 1 thư mục. người bắn tên lửa. Tiếp theo chúng ta sẽ xem xét kỹ hơn các thư mục có trong đó nhé
4. Constructor directory
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
0- cấu hình. php Đây là nơi chứa file config main. Các thông tin bạn vừa nhập khi cấu hình rocketeer sẽ được lưu tại đây
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
1- móc. Tệp php này định nghĩa các tác vụ sẽ được chạy trên máy chủ trước và sau khi bạn thực hiện nhiệm vụ triển khai. VD trước khi setup mình cho cài nginx trên sv remote
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
2con đường. php Bạn có thể định nghĩa đường dẫn của PHP và trình soạn thảo trong tệp này. Nếu không, rocketer sẽ tự tìm đường dẫn mặc định của chúng
Xa xôi. php Đây là tập tin lưu trữ mọi thiết lập trên máy chủ được triển khai. Thông thường, các bạn cần chú ý đến các dòng này
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
3-> Đây là thư mục mà các bạn sẽ triển khai
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
4-> tên thư mục ứng dụng bạn muốn. Nếu không điền, rocketeer sẽ tự động nhận tên ứng dụng khi bạn cấu hình rocketeer
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
5-> các bạn đã tạo thư mục/chia sẻ tệp giữa các lần triển khai [thường là tệp nhật ký, phiên và tệp env]
- scm. php Đây là file lưu trữ thông tin repo và nhánh triển khai của các bạn. Các bạn có thể sử dụng với SVN hoặc với Git
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
6giai đoạn. php Trường hợp trên một máy chủ có nhiều công đoạn khác nhau [dàn dựng, thử nghiệm, sản xuất] thì chúng ta sẽ định nghĩa tại đây
chiến lược. php File cuối cùng cho phép bạn định cấu hình bất kỳ nhiệm vụ nào để sử dụng nhằm thực thi các phần cốt lõi của luồng phát triển của bạn
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
75. Triển khai
Tất nhiên là để triển khai được thì trên server các bạn nhớ cài đặt php trước nhé
- Kiểm tra kết nối tới máy chủ từ xa
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
8Thất bại rồi. ĐƯỢC RỒI. không sao cả. ở đây là do trong thư mục triển khai chưa tìm thấy composer thôi. Khởi tạo file composer nào
$ rocketeer list
Available commands:
check Check if the server is ready to receive the application
cleanup Clean up old releases from the server
current Display what the current release is
deploy Deploys the website
flush Flushes Rocketeer's cache of credentials
help Displays help for a command
ignite Creates Rocketeer's configuration
list Lists commands
rollback Rollback to the previous release, or to a specific one
setup Set up the remote server for deployment
strategies Lists the available options for each strategy
teardown Remove the remote applications and existing caches
test Run the tests on the server and displays the output
tinker Debug Rocketeer's environment
update Update the remote server without doing a new release
plugin
plugin:config Publishes the configuration of a plugin
plugin:install Install a plugin
plugin:list Lists the currently enabled plugins
9OK rồi. thử kiểm tra lại nhé
No connections have been set, please create one: [production]develop
0This is was connect to public to server rồi
- Thành lập
No connections have been set, please create one: [production]develop
1vậy là đã thiết lập xong. Sau bước thiết lập, trên server remote sẽ có 3 thư mục
No connections have been set, please create one: [production]develop
2in which. hiện tại là thư mục chứa mã đang chạy, bản phát hành. thư mục chứa các bản phát hành [chứa tối đa 4 lần theo file config] đã chia sẻ. thư mục chứa các tệp chia sẻ để sử dụng chung cho các lần phát hành
- Triển khai
No connections have been set, please create one: [production]develop
3Nào, chúng ta thử kiểm tra nhé. Create file nginx cursor to /opt/cuongtv/test01/current any. kiểm tra01 kiểm tra02