PlantUml Samples

PlantUml 을 사용해서 Uml 을 작성한 샘플들 입니다

UML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@startuml
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/master/dist
!includeurl AWSPuml/AWSCommon.puml
!includeurl AWSPuml/Compute/all.puml
!includeurl AWSPuml/Mobile/APIGateway.puml
!includeurl AWSPuml/General/User.puml
!includeurl AWSPuml/General/Users.puml
!includeurl AWSPuml/General/Client.puml
!includeurl AWSPuml/General/InternetGateway.puml
!includeurl AWSPuml/Database/DynamoDB.puml

skinparam rectangle {
roundCorner 25
roundCorner 45
backgroundColor White
}

header GRACE Tenant Provisioning Overview

rectangle "<$User>\nFuture Tenant 1" as cust

rectangle "<$Users>\nDevSecOps Team" as dev #WhiteSmoke

rectangle "<$Client>\nCLI Provisioning Tool" as cli #WhiteSmoke

skinparam {
ArrowColor Black
NoteBorderColor Black
linetype ortho
FolderBorderColor Black
}



skinparam agent {
borderColor Black
}

skinparam component {
borderColor Black
backgroundColor White
}

rectangle ServiceNow #WhiteSmoke {
folder json as "<b>GRACE Request Form" {
}
}

package GRACE as "GRACE AWS" #WhiteSmoke {
node "Production - Master" #MintCream {
rectangle org #PeachPuff [
<b> AWS Organizations
]
note " <b>Provisioning\nsts:AssumeRole" as AR #PHYSICAL
}

node "Production - Management" #MintCream {
rectangle node1 #PeachPuff [
<b> S3 Bucket
]

rectangle lamb #PeachPuff [
<b>Amazon Lambda
====
Customer Lambda
]

}

node Tenant_1 #White [
<b>Tenant 1
====
Prod
....
Staging
....
Test
....
Dev
]

component [<b>Tenant Request\nJSON Data] as json2

cust .[hidden]r. cli
dev .u.> cli
cli .r.> json2
json .r.> dev
cust .d.> json
json2 .d.> node1
node1 <-> lamb
lamb -u-> AR
AR -> org
org ~d~ Tenant_1
@enduml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@startuml
skinparam {
ArrowColor Black
NoteBorderColor Black
linetype ortho
}

agent cust as "Future Tenant 1" #LightCyan

skinparam agent {
borderColor Black
}

node ServiceNow #WhiteSmoke {
folder json as "GRACE Request Form" {
[JSON Data]
}
}

package GRACE as "GRACE AWS" #WhiteSmoke {
node "Production - Master" #MintCream {
node org #PeachPuff [
<b> AWS Organizations
]
note "sts:AssumeRole" as AR #PHYSICAL
}

node "Production - Management" #MintCream {
node node1 #PeachPuff [
<b> S3 Bucket
]

node lamb #PeachPuff [
<b>Amazon Lambda
====
Customer Lambda
]

}

node Tenant_1 #LightCyan [
<b>Tenant 1
====
Prod
....
Staging
....
Test
....
Dev
]

cust -d-> json
[JSON Data] .r.> node1
node1 <-> lamb
lamb -u-> AR
AR -> org
org ~d~ Tenant_1
@enduml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
@startuml
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/master/dist
!includeurl AWSPuml/AWSCommon.puml
!includeurl AWSPuml/Compute/all.puml
!includeurl AWSPuml/Mobile/APIGateway.puml
!includeurl AWSPuml/General/User.puml
!includeurl AWSPuml/General/Users.puml
!includeurl AWSPuml/General/Client.puml
!includeurl AWSPuml/General/InternetGateway.puml
!includeurl AWSPuml/Database/DynamoDB.puml

skinparam {
ArrowColor Black
NoteBorderColor Black
UseCaseBorderColor Black

}

header GRACE Architecture Overview
rectangle "<b>DevSecOps Team\n<$Users>\nDeployment" as team #WhiteSmoke
database CircleCI #WhiteSmoke

skinparam agent {
borderColor Green
backgroundColor Beige
}

skinparam rectangle {
roundCorner 25
roundCorner 45
backgroundColor White
}

rectangle tools #WhiteSmoke [
<b> DevSecOps Tools\n<$Client>
====
Terraform
....
Golang
....
Python
----
GitHub
]

package GRACE as "GRACE Environments" {

node "Production" #WhiteSmoke {
node pm as "Master_Prod" #MintCream {
note "<b> Provisioning \nsts:AssumeRole" as AR1 #Lavender
rectangle org #PeachPuff [
<b> AWS Organizations
]
}
node pm1 as "Prod_Managment" #MintCream {
note "<b> ReadLogs \nsts:AssumeRole" as AR #Lavender
rectangle node1 #PeachPuff [
<b>S3 Logging Bucket
]
rectangle lamb #PeachPuff [
<b>Amazon Lambda
====
Customer Lambda
]
}
}

node pp as "Pre-Production" #WhiteSmoke {
node sm as "Staging" #MintCream {
}
node tm as "Test" #MintCream {
}
node dm as "Dev" #MintCream {
}
}

}


node Tenant_1 #White [
<b>Tenant 1
====
Prod
....
Staging
....
Test
....
Dev
]

node Tenant_2 #White [
<b>Tenant 2
====
Prod
....
Staging
....
Test
....
Dev
]

node Tenant_X #White [
<b>Tenant X
====
...
....
...
....
...
....
...
]

dm .u.> tm
tm .u.> sm


team .l.> tools
tools .d.> CircleCI
tools .[hidden]down. GRACE
CircleCI .r.> dm
lamb .u.> AR1
AR1 .> org
org ~u~ Tenant_X
org ~u~ Tenant_2
org ~u~ Tenant_1
node1 -[hidden]u- lamb
sm .> Production
team ~[hidden]r~ Tenant_1
usecase "SecOps" as SO #Lavender
node1 <.. AR
AR <.l. SO
@enduml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
@startuml
skinparam {
ArrowColor Black
NoteBorderColor Black
UseCaseBorderColor Black
}

header GRACE Architecture Overview
agent team as "DevSecOps Team"
database CircleCI #WhiteSmoke
cloud console as "AWS Console" #PeachPuff

skinparam agent {
borderColor Green
backgroundColor Beige
}

node tools #WhiteSmoke [
<b> DevSecOps Tools
====
Terraform
....
Golang
]

package GRACE as "GRACE Environments" {
node Master_Prod #MintCream {
node org #PeachPuff [
<b> AWS Organizations
]
}

Master_Prod - Production

node "Production" #MintCream {
note "sts:AssumeRole" as AR #Lavender
node node1 #PeachPuff [
<b>AWS Services
====
CloudTrail
....
CloudWatch
....
Config
....
IAM
....
S3
]

node lamb #PeachPuff [
<b>Amazon Lambda
====

Customer Lambda

]
}

node Master_Staging #MintCream {
node org2 #PeachPuff [
<b> AWS Organizations
]
}

Master_Staging -d- Staging

node "Staging" #MintCream {
note "sts:AssumeRole" as AR2 #Lavender
node node2 #PeachPuff [
<b>AWS Services
====
CloudTrail
....
CloudWatch
....
Config
....
IAM
....
S3
]
}

node Master_Test #MintCream {
node org3 #PeachPuff [
<b> AWS Organizations
]
}

Master_Test -d- Test

node "Test" #MintCream {
note "sts:AssumeRole" as AR3 #Lavender
node node3 #PeachPuff [
<b>AWS Services
====
CloudTrail
....
CloudWatch
....
Config
....
IAM
....
S3
]
}

node Master_Dev #MintCream {
node org4 #PeachPuff [
<b> AWS Organizations
]
}

Master_Dev -d- Development

node "Development" #MintCream {
note "sts:AssumeRole" as AR4 #Lavender
node node4 #PeachPuff [
<b>AWS Services
====
CloudTrail
....
CloudWatch
....
Config
....
IAM
....
S3
]
}
}


node Tenant_1 #LightCyan [
<b>Tenant 1
====
Prod
....
Staging
....
Test
....
Dev
]

node Tenant_2 #LightCyan [
<b>Tenant 2
====
Prod
....
Staging
....
Test
....
Dev
]

node Tenant_X #LightCyan [
<b>Tenant X
====
Prod
....
Staging
....
Test
....
Dev
]

lamb .u.> org
org ~u~ Tenant_X
org ~u~ Tenant_2
org ~u~ Tenant_1
node1 -[hidden]right- lamb
team .l.> tools
tools .l.> CircleCI
CircleCI .d.> GRACE
team .r.> console
console -[hidden]down- Master_Staging
console ..> GRACE
usecase "SecOps" as SO #Lavender
node1 <.. AR
node2 <.. AR2
node3 <.. AR3
node4 <.. AR4
AR <.. SO
AR2 <.. SO
AR3 <.. SO
AR4 <.. SO
@enduml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@startuml
!include <C4/C4_Context.puml>
!include <C4/C4_Container.puml>
!include <office/Users/user.puml>

LAYOUT_WITH_LEGEND()

title UCS - High Level

Person(OperatorMeli, Operator Meli, "<$user>")

System_Boundary(Fury, "Fury") {

System_Boundary(Backoffice, "Backoffice") {
System_Boundary(UCSFrontend, "UCS Frontend Module") {
Container(UCSFrontendRegistry, "Registry","JS + Nordic")
Container(UCSFrontendSorter, "Sorter","JS + Nordic")
Container(UCSFrontendSorterEvents, "Sorter Events","JS + Nordic")
}
}

System_Boundary(UCSRegistry, "UCS Registry") {
Container(Registry, "Registry", "Golang")
ContainerDb(RegistryDB, "Database", "MySQL")
}

System_Boundary(UCSSorter, "UCS Sorter") {
Container(Sorter, "Sorter", "Golang")
ContainerDb(SorterDB, "Database", "MySQL")
}

System_Boundary(UCSSorterEvents, "UCS Sorter Events") {
Container(SorterEvents, "Sorter Events", "Golang")
ContainerDb(SorterEventsDB, "Database", "MySQL")
}

System_Boundary(UCSMeasures, "UCS Measures") {
Container(Measures, "Measures", "Golang")
}

System_Boundary(UCSPrinter, "UCS Printer") {
Container(Printer, "Printer", "Golang")
}

System_Boundary(UCSDeviceState, "UCS Device State") {
Container(DeviceState, "DeviceState", "Golang")
}

System_Boundary(BigQ, "BigQ") {
System_Ext(BigQTopic, "Topic")
System_Ext(BigQConsumer, "Consumer")
}

System_Ext(OtherMeliApps, "Other Meli Apps")
}

System_Boundary(LogisticCenter, "Logistic Centers") {
Container(LogisticCenterPrinters, "Printers", "Device")
Container(LogisticCenterSorters, "Sorters", "Backend")
}

' Users > Frontend
Rel(OperatorMeli, UCSFrontendRegistry, "Manages Devices")
Rel(OperatorMeli, UCSFrontendSorter, "Manages Sorter")
Rel(OperatorMeli, UCSFrontendSorterEvents, "Analyzes metrics of Sorter")

' Frontend > API
Rel(UCSFrontendRegistry, Registry, "Manages Devices")
Rel(UCSFrontendRegistry, DeviceState, "Updates Device status")
Rel(UCSFrontendSorter, Sorter, "Manages Sorter settings")
Rel(UCSFrontendSorterEvents, SorterEvents, "Recovers metrics from Sorter")

' API > API
Rel(Printer, Registry, "Recovers Printer settings")
Rel(Sorter, Registry, "Recovers Sorter settings")
Rel(Sorter, Measures, "Send Measures")

' API > DB
Rel_Back_Neighbor(RegistryDB, Registry, "Reads from and writes to")
Rel_Back_Neighbor(SorterDB, Sorter, "Reads from and writes to")
Rel_Back_Neighbor(SorterEventsDB, SorterEvents, "Reads from and writes to")

' API > LogisticCenter
Rel(Printer, LogisticCenterPrinters, "Send Print")
Rel(Sorter, LogisticCenterSorters, "Send ramp configuration per package")
Rel(LogisticCenterSorters, Sorter, "Sends events that occurred in the sorter")

' API > BigQ
Rel_Back_Neighbor(BigQTopic, BigQConsumer, "Send messages")
Rel(Sorter, BigQTopic, "Send messages")
Rel(BigQConsumer, SorterEvents, "Read messages")
Rel(Measures, BigQTopic, "Send messages")
Rel(BigQConsumer, Measures, "Read messages")

' OtherMeliApps > API
Rel(OtherMeliApps, Registry, "Recovers device informations")
Rel(OtherMeliApps, Printer, "Send Print request")
Rel(OtherMeliApps, Sorter, "Send package configurations")
@enduml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
@startuml
title Company & Payment Methods & Product Plan

object Company {
name
description
country
currency
billing_email_address
is_prepaid
status { ACTIVE, INACTIVE, BLOCKED, CLOSED }
verification_status { VERIFIED, UNVERIFED }
}

object ProductPlan {
name
description
inbound_voice_rate_id(FK)
outbound_voice_rate_id(FK)
inbound_sms_rate_id(FK)
outbound_sms_rate_id(FK)
phone_number_rate_id(FK)
auto_recharge_amount
one_time_fee
}

object PaymentHistory {
company_party_id(FK)
company_counterparty_id(FK)
payment_method_id(FK)
amount
payment_date
status { CREATED, INPROCESS, SUCCESS, FAILED, REFUND }
payment_notes
}

object CompanyPaymentMethod #lightyellow {
company_id(FK)
payment_method_id(FK)
is_preferred
preference_order
}


object Coupon <<PaymentMethod>> {
name
amount_off
currency
create_date
created_by_user_id(FK)
approved_by_user_id(FK)
expiry_date
times_redeemed
approval_notes
status { valid, used, invalid }
}

object ManualAdjustment <<PaymentMethod>> {
created_by_user_id(FK)
approved_by_user_id(FK)
invoice_id(FK)
currency
amount
reason { original_payment_failed, check_payment, payments_not_possible }
approval_notes
}

object BankAccount <<PaymentMethod>> {
stripe_bank_account_id
account_holder_name
account_holder_type { individual, company }
bank_name
country
currency
stripe_fingerprint
last4
routing_number
status { new, validated, verified, verification_failed, errored }
}

object CreditCard <<PaymentMethod>> {
stripe_card_id
stripe_customer_id
stripe_fingerprint
card_brand
country
currency
card_funding_type { credit, debit, prepaid, unknown }
card_holder_name
last4
exp_month
exp_year
cvc_verification_check { pass, fail, unavailable, unchecked }
billing_address_id(FK)
}

object CardBillingAddress #lightyellow {
-credit_card_id
-billing_address_id
}

object BillingAddress {
address_line_1
address_line_2
city
zip
state
country
line_1_verification_status { pass, fail, unavailable, unchecked }
zip_verification_status { pass, fail, unavailable, unchecked }
}

Company "1" *-down- "many" CompanyPaymentMethod
Company "1" *-left- "1" ProductPlan

BillingAddress -up-> CardBillingAddress
CreditCard *-down-> CardBillingAddress

CompanyPaymentMethod -down-> CreditCard
CompanyPaymentMethod -down-> BankAccount
CompanyPaymentMethod -down-> Coupon
CompanyPaymentMethod -down-> ManualAdjustment

PaymentHistory -up-> Company
PaymentHistory -down-> Coupon
PaymentHistory -down-> CreditCard
PaymentHistory -down-> BankAccount
PaymentHistory -down-> ManualAdjustment
@enduml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
@startuml
title Product Plans


object ProductPlan {
name
description
inbound_voice_rate_id(FK)
outbound_voice_rate_id(FK)
inbound_sms_rate_id(FK)
outbound_sms_rate_id(FK)
phone_number_rate_id(FK)
auto_recharge_amount
one_time_fee
}

object OutboundVoiceRate {
prefix
effective_date
per_minute_price
minimum_billing_unit(seconds)
subsequent_billing_unit(seconds)
}

object InboundVoiceRate {
customer_tier_id(FK)
effective_date
call_setup_price
per_minute_price
minimum_billing_unit(seconds)
subsequent_billing_unit(seconds)
}


object OutboundSMSRate {
mcc
mnc
effective_date
unit_price
}

object InboundSMSRate {
customer_tier_id(FK)
effective_date
unit_price
}

object PhoneNumberRate {
customer_tier_id(FK)
effective_date
setup_fee
port_in_fee
port_out_fee
recurring_fee
recurring_frequency
}

object CustomerTier {
name
country
type { Longcode(DID)/Shortcode }
}

object CarrierTier {
name
country
type { Longcode(DID)/Shortcode }
}

object CustomerCarrierTier #lightyellow {
customer_tier_id
carrier_tier_id
}

object NetworkGroup #lightblue {
name
type { FIXED, MOBILE, TOLLFREE, PREMIUM, OTHERS }
prefixes[]
mnc[]
country_id(FK)
}

object Country #lightblue {
name
iso2
iso3
mcc
country_code(numeric)
}

NetworkGroup -down-> Country
CarrierTier -> CustomerCarrierTier
CustomerTier "1" *-down- "many" CustomerCarrierTier

ProductPlan "1" *-down- "1" OutboundSMSRate
ProductPlan "1" *-down- "1" InboundVoiceRate
ProductPlan "1" *-down- "1" OutboundVoiceRate
ProductPlan "1" *-down- "1" InboundSMSRate
ProductPlan "1" *-down- "1" PhoneNumberRate

InboundVoiceRate "1" *-down- "1" CustomerTier
InboundSMSRate "1" *-down- "1" CustomerTier
PhoneNumberRate "1" *-down- "1" CustomerTier
@enduml