アーキテクチャ図
(Architecture Diagram)
サンプル
@startuml
package "ユーザー側" {
[Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
[Webブラウザ] --> [Webサーバー]
[Webサーバー] --> [アプリケーションサーバー]
[アプリケーションサーバー] --> データベース
[アプリケーションサーバー] --> 外部API
}
@endumlPlantUMLソース
@startuml
package "ユーザー側" {
[Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
[Webブラウザ] --> [Webサーバー]
[Webサーバー] --> [アプリケーションサーバー]
[アプリケーションサーバー] --> データベース
[アプリケーションサーバー] --> 外部API
}
@enduml全体の設定
タイトル
タイトルを定義できます。
title 新基盤構築計画PlantUMLソース
@startuml
title 新基盤構築計画
package "ユーザー側" {
[Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
[Webブラウザ] --> [Webサーバー]
[Webサーバー] --> [アプリケーションサーバー]
[アプリケーションサーバー] --> データベース
[アプリケーションサーバー] --> 外部API
}
@endumlヘッダ
ヘッダを定義できます。
header 新基盤構築計画PlantUMLソース
@startuml
header 新基盤構築計画
package "ユーザー側" {
[Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
[Webブラウザ] --> [Webサーバー]
[Webサーバー] --> [アプリケーションサーバー]
[アプリケーションサーバー] --> データベース
[アプリケーションサーバー] --> 外部API
}
@endumlフッタ
フッタを定義できます。
footer フッタPlantUMLソース
@startuml
footer フッタ
package "ユーザー側" {
[Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
[Webブラウザ] --> [Webサーバー]
[Webサーバー] --> [アプリケーションサーバー]
[アプリケーションサーバー] --> データベース
[アプリケーションサーバー] --> 外部API
}
@endumlキャプション
キャプションを定義できます。
caption キャプションPlantUMLソース
@startuml
caption キャプション
package "ユーザー側" {
[Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
[Webブラウザ] --> [Webサーバー]
[Webサーバー] --> [アプリケーションサーバー]
[アプリケーションサーバー] --> データベース
[アプリケーションサーバー] --> 外部API
}
@endumlすべて組み合わせると…
PlantUMLソース
@startuml
header 新基盤構築計画
title 新基盤構築計画
caption キャプション
footer フッタ
package "ユーザー側" {
[Webブラウザ]
}
database データベース
cloud 外部API
package "サーバー側" {
[Webブラウザ] --> [Webサーバー]
[Webサーバー] --> [アプリケーションサーバー]
[アプリケーションサーバー] --> データベース
[アプリケーションサーバー] --> 外部API
}コンポーネント
[]で囲むか、componentに続けてコンポーネント名を記載する事でコンポーネントを定義できます。
[コンポーネント名]PlantUMLソース
@startuml
[コンポーネント名]
@endumlcomponent コンポーネント名PlantUMLソース
@startuml
component コンポーネント名
@endumlパッケージ
アーキテクチャ図では、関連する要素の論理的なグループとしてパッケージを使うようです。
package Sample {
component コンポーネント名
}PlantUMLソース
@startuml
package Sample {
component コンポーネント名
}
@endumlノード
物理的または論理的な実行環境を表します。
node ノード名PlantUMLソース
@startuml
node ノード名
@endumlデータストア
database データストアPlantUMLソース
@startuml
database データストア
package Sample {
component コンポーネント名
}
@endumlクラウド
cloud "クラウド"PlantUMLソース
@startuml
cloud "クラウド"
@enduml単方向の関連
[ブラウザ] --> [サーバ]PlantUMLソース
@startuml
[ブラウザ] --> [サーバ]
@enduml双方向の関連
[ブラウザ] <-> [サーバ]PlantUMLソース
@startuml
[ブラウザ] <-> [サーバ]
@enduml抽象的な依存
[ブラウザ] ..> [サーバ]PlantUMLソース
@startuml
[ブラウザ] ..> [サーバ]
@endumlラベル
[ブラウザ] --> [サーバ] : HTTP通信PlantUMLソース
@startuml
[ブラウザ] --> [サーバ] : HTTP通信
@enduml太線
[ブラウザ] == [サーバ]PlantUMLソース
@startuml
[ブラウザ] == [サーバ]
@enduml