-
Notifications
You must be signed in to change notification settings - Fork 1
/
diagrama.puml
150 lines (126 loc) · 5.95 KB
/
diagrama.puml
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
/'
Esse diagrama está descrito na linguagem PlantUML
http://plantuml.com
A imagem correspondente pode ser gerada usando o próprio servidor oficial
do PlantUML através de um link como esse:
http://www.plantuml.com/plantuml/proxy?fmt=svg&src=https://raw.githubusercontent.com/analytics-ufcg/leggo-geral/master/diagrama.puml
Caso adicione esse link em um arquivo markdown do Github, e depois altere esse
código fonte, pode ser que demore para atualizar por conta da cache que o Github
usa para imagens. Uma forma de tentar forçar a atualização da imagem é colocar
algum parâmetro irrelevante na url.
https://stackoverflow.com/questions/32203610/how-to-integrate-uml-diagrams-into-gitlab-or-github/32771815#32771815
'/
@startuml
skinparam componentStyle uml2
skinparam maxMessageSize 100
skinparam wrapWidth 100
skinparam database {
BackgroundColor gainsboro
}
skinparam hyperlink {
Color blue
}
skinparam ArrowColor black
!definelong repository(name, id, link, content = "")
rectangle "[[link name]]" as id #dfd {
content
}
!enddefinelong
/'
Hospedagem
'/
package "VM agorafrontend" #antiquewhite {
(**cron**) as cron
package "Docker" as docker_front #white {
package "[[https://github.com/analytics-ufcg/agora-digital-geral/blob/master/stacks/traefik.yml Traefik Stack]]" #mistyrose {
component "[[https://github.com/analytics-ufcg/leggo-geral/blob/master/arquitetura.md#traefik traefik]]" as traefik
}
component "[[https://github.com/analytics-ufcg/leggo-geral/blob/master/arquitetura.md#portainer portainer]]" as portainer
component "[[https://github.com/analytics-ufcg/leggoR leggor]]" as leggor
package "[[https://github.com/analytics-ufcg/agora-digital-geral/blob/master/stacks/frontend-production.yml Frontend Prod Stack]]" as frontprodstack #mistyrose {
[**frontend prod**\nnginx] as frontend_prod
}
package "[[https://github.com/analytics-ufcg/agora-digital-geral/blob/master/stacks/frontend-development.yml Frontend Dev Stack]]" as frontdevstack #mistyrose {
[**frontend dev**\nnginx] as frontend_dev
}
package "[[https://github.com/analytics-ufcg/agora-digital-geral/blob/master/stacks/backend.yml Backend API Stack]]" as backstack #mistyrose {
[**proxy**\nnginx] as backproxy
[**api**\npython] as api
[**db**\npostgres] as db
database "**statics**" as statics_vol
database "**socket**\nuwsgi" as socket_vol
database "**nginx config**" as nginx_config_vol
database "**db**" as db_vol
}
database "**CSVs**" as csvs
}
}
"**navegador web**" as navegador
cron --> leggor : Roda [[https://github.com/analytics-ufcg/leggo-geral/blob/master/update.sh update.sh]] que atualiza o código do leggor, recria sua imagem docker e a executa, atualizando os dados.
leggor -> csvs
csvs --> api
api <-> db
db <-> db_vol
backproxy -> traefik
frontend_dev --> traefik
frontend_prod --> traefik
traefik ~~~> navegador : "**porta 80 (HTTP)** redirecionada pelo traefik para a 443"
traefik ---> navegador : "**porta 443 (HTTPS)**"
api -- statics_vol
statics_vol --> backproxy
api ->socket_vol
socket_vol ---> backproxy
nginx_config_vol -u- api
nginx_config_vol --> backproxy
/'
Repositórios, CI/CD
'/
package "VM agorabackend" #antiquewhite {
package "Docker" as docker_back #white {
component "[[https://github.com/analytics-ufcg/leggo-geral/blob/master/arquitetura.md#gitlab-runner gitlab runner]]" as glrunner
}
}
package "Github" as gh #antiquewhite {
package "[[https://github.com/analytics-ufcg analytics-ufcg]]" as ghanalytics #fafffa {
repository("leggo-frontend", ghfront, "https://github.com/analytics-ufcg/leggo-frontend")
repository("leggo-backend", ghback, "https://github.com/analytics-ufcg/leggo-backend")
repository("leggor", ghr, "https://github.com/analytics-ufcg/leggor")
repository("rcongresso", rcongresso, "https://github.com/analytics-ufcg/rcongresso")
}
}
rectangle "Travis" as travis #antiquewhite
'Commits -> Github
commits ---> ghfront
commits ---> ghback
commits ---> ghr
commits ---> rcongresso
package "Gitlab" as gl #antiquewhite {
package "[[https://gitlab.com/analytics-ufcg analytics-ufcg]]" as glanalytics #fafffa {
rectangle "[[https://gitlab.com/analytics-ufcg/agora-digital-frontend agora-digital-frontend]]" as glfront #dfd {
database "[[https://gitlab.com/analytics-ufcg/agora-digital-frontend/container_registry front registry]]" as frontregistry #afa
}
rectangle "[[https://gitlab.com/analytics-ufcg/agora-digital-backend agora-digital-backend]]" as glback #dfd {
database "[[https://gitlab.com/analytics-ufcg/agora-digital-backend/container_registry back registry]]" as backregistry #afa
}
repository("agora-digital", glr, "https://gitlab.com/analytics-ufcg/agora-digital")
component "gitlab shared runners" as glsharunner
}
}
'Github -> Gitlab
ghfront ---> glfront : sincronização automática
ghback ---> glback : sincronização automática
ghr ---> glr : sincronização automática
rcongresso -- travis : "[[https://github.com/analytics-ufcg/rcongresso/blob/master/.travis.yml .travis.yml]] testa"
'Gitlab CI via Runner
glfront ---> glrunner : "[[https://github.com/analytics-ufcg/leggo-frontend/blob/master/.gitlab-ci.yml .gitlab-ci.yml]] faz build da imagem e testa"
glback ---> glrunner : "[[https://github.com/analytics-ufcg/leggo-backend/blob/master/.gitlab-ci.yml .gitlab-ci.yml]] faz build da imagem e testa"
glr -> glsharunner : "[[https://github.com/analytics-ufcg/leggor/blob/master/.gitlab-ci.yml .gitlab-ci.yml]] testa"
'Guarda imagens
glrunner ---> frontregistry : caso passe nos testes, salva imagem do front
glrunner ---> backregistry : caso passe nos testes, salva imagem do back
'Atualiza Stacks
glrunner ----> portainer : webhook de atualização das imagens
frontregistry ------> frontprodstack : **portainer** puxa imagem para atualizar a stack
frontregistry ------> frontdevstack : **portainer** puxa imagem para atualizar a stack
backregistry ------> backstack : **portainer** puxa imagem para atualizar a stack
@enduml