本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
layer 屬性
重要
AWS OpsWorks Stacks 此服務已於 2024 年 5 月 26 日終止,並已針對新客戶和現有客戶停用。我們強烈建議客戶盡快將其工作負載遷移至其他解決方案。如果您對遷移有任何疑問,請透過 AWS re:Post
layers 屬性包含一組 layer 屬性,每個堆疊 layer 一個,以 layer 的簡稱為名,例如 php-app。堆疊的每個內建 layer 最多可有一個,其簡稱如下:
-
db-master:MySQL layer -
java-app:Java App Server layer -
lb:HAProxy layer -
monitoring-master:Ganglia layer -
memcached:Memcached layer -
nodejs-app:Node.js App Server layer -
php-app:PHP App Server layer -
rails-app:Rails App Server layer -
web:靜態 Web 伺服器層
堆疊可以包含任意數目的自訂 layer,有使用者定義的簡稱。
每個 layer 屬性都包含以下屬性:
- id
-
layer ID,是 OpsWorks 產生的一種 GUID,且為 layer 的唯一識別 (字串)。
node["opsworks"]["layers"]["layershortname"]["id"] - 執行個體
-
instances元素包含一組 instance 屬性,每個 layer 的線上執行個體各一個。它們以執行個體的主機名稱為名,例如php-app1。注意
instances元素只包含那些在建立特定堆疊組態和部署屬性時處於線上狀態的執行個體。每個 instance 元素都包含以下屬性:
- availability_zone
-
可用區域,例如
"us-west-2a"(字串)。node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["availability_zone"] - aws_instance_id
-
EC2 執行個體 ID (字串)。
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["aws_instance_id"] - backends
-
後端 Web 程序的數目 (數值)。例如,它會決定 HAProxy 要轉遞到 Rails 後端的並行連線數目。預設值視執行個體的記憶體和核心數而定。
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["backends"] - booted_at
-
EC2 執行個體的開機時間,使用 UTC yyyy-mm-dddThh:mm:ss+hh:mm 格式 (字串)。例如,
"2013-10-01T08:35:22+00:00"對應到 2013 年 10 月 10 日 8:35:22,無時區位移。如需詳細資訊,請參閱 ISO 8601。 node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["booted_at"] - created_at
-
EC2 執行個體建立的時間,使用 UTC yyyy-mm-dddThh:mm:ss+hh:mm 格式 (字串)。例如,
"2013-10-01T08:35:22+00:00"對應到 2013 年 10 月 10 日 8:35:22,無時區位移。如需詳細資訊,請參閱 ISO 8601。 node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["created_at"] - elastic_ip
-
彈性 IP 地址,如果執行個體沒有此地址則設為 null (字串)。
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["elastic_ip"] - instance_type
-
執行個體類型,例如
"c1.medium"(字串)。node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["instance_type"] - ip
-
公有 IP 地址 (字串)。
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["ip"] - private_ip
-
私有 IP 地址 (字串)。
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["private_ip"] - public_dns_name
-
公有 DNS 名稱 (字串)。
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["public_dns_name"] - private_dns_name
-
私有 DNS 名稱 (字串)。
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["private_dns_name"] - region
-
AWS 區域,例如
"us-west-2"(字串)。node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["region"] - status
-
狀態 (字串)。可能的值如下:
-
"requested" -
"booting" -
"running_setup" -
"online" -
"setup_failed" -
"start_failed" -
"terminating" -
"terminated" -
"stopped" -
"connection_lost"
node["opsworks"]["layers"]["layershortname"]["instances"]["instancehostname"]["status"] -
- name
-
layer 的名稱,用以在主控台中表示 layer (字串)。它可以是使用者定義的,但不一定是唯一的。
node["opsworks"]["layers"]["layershortname"]["name"]