landscape/diagram.py

255 lines
10 KiB
Python
Raw Normal View History

2021-12-29 19:54:15 +00:00
from diagrams import Diagram, Cluster, Edge
from diagrams.custom import Custom
from diagrams.saas.chat import Discord
from diagrams.saas.filesharing import Nextcloud
from diagrams.saas.social import Facebook, Twitter
from diagrams.programming.language import Python, Nodejs, Php
from diagrams.programming.framework import Rails
from diagrams.elastic.elasticsearch import Beats, Elasticsearch, Kibana, Logstash
wordpress = "./resources/wordpress.png"
2021-12-29 21:18:59 +00:00
wings = "./resources/wings.png"
2022-07-31 13:46:32 +00:00
trello = "./resources/trello.png"
2021-12-29 21:18:59 +00:00
gitlab_logo = "./resources/gitlab.png"
2022-07-31 13:46:32 +00:00
github_logo = "./resources/github.svg"
2021-12-29 19:54:15 +00:00
mailchimp = "./resources/mailchimp.png"
2021-12-29 21:45:52 +00:00
nginx = "./resources/nginx.png"
2021-12-29 19:54:15 +00:00
www = "./resources/www.png"
2022-07-31 13:46:32 +00:00
instagram = "./resources/instagram.png"
tiktok_logo = "./resources/tiktok.svg"
youtube_logo = "./resources/youtube.png"
linkedin_logo = "./resources/linkedin.svg"
heroku = "./resources/heroku.png"
transip_logo = "./resources/transip.png"
greenhost_logo = "./resources/greenhost.png"
email_logo = "./resources/email.png"
2022-11-08 15:26:04 +00:00
telegram_logo = "./resources/telegram.png"
antivirus_logo = "./resources/antivirus.png"
2021-12-29 19:54:15 +00:00
with Diagram("BIJ1 IT landscape"):
with Cluster("Socials"):
2021-12-29 21:39:54 +00:00
with Cluster("BIJ1 socials landelijk"):
fb = Facebook("facebook.com/www.bij1.org")
tw = Twitter("twitter.com/PolitiekBIJ1")
insta = Custom("instagram.com/politiek_bij1", instagram)
2022-07-31 13:46:32 +00:00
yt = Custom("youtube.com/c/BIJ1Politiek", youtube_logo)
vimeo = Custom("vimeo.com/bij1", "./resources/vimeo.svg")
linkedin = Custom("linkedin.com/company/bij1", linkedin_logo)
2021-12-29 21:39:54 +00:00
with Cluster("BIJ1 local socials"):
2021-12-29 21:18:59 +00:00
local_fb = Facebook("Local FBs")
local_tw = Twitter("Local Twitters")
local_insta = Custom("Local Instagrams", instagram)
2022-07-31 13:46:32 +00:00
local_yt = Custom("Local Youtubes", youtube_logo)
local_li = Custom("Local LinkedIns", linkedin_logo)
2021-12-29 19:54:15 +00:00
2021-12-29 21:39:54 +00:00
with Cluster("Radicaal socials"):
fb_radicaal = Facebook("facebook.com/pjo.radicaal")
tw_radicaal = Twitter("twitter.com/pjo_radicaal")
insta_radicaal = Custom("instagram.com/pjo_radicaal", instagram)
tiktok_radicaal = Custom("tiktok.com/@pjo_radicaal", tiktok_logo)
2021-12-29 19:54:15 +00:00
with Cluster("Hosting"):
transip = Custom("TransIP BIJ1", transip_logo)
transip_kennis = Custom("TransIP Audre Lorde", transip_logo)
transip_intl = Custom("TransIP Clemencia Redmond", transip_logo)
greenhost = Custom("GreenHost BIJ1", greenhost_logo)
greenhost_pjo = Custom("GreenHost Radicaal", greenhost_logo)
2022-07-31 13:46:32 +00:00
hetzner = Custom("Hetzner", "./resources/hetzner.png")
2021-12-29 19:54:15 +00:00
wpengine = Custom("WpEngine", "./resources/wpengine.jpg")
2023-01-05 14:01:27 +00:00
# servercow = Custom("ServerCow", "./resources/servercow.svg")
email = Custom("transip.email (BIJ1)", email_logo)
2023-01-05 14:01:27 +00:00
# mailcow = Custom("MailCow", "./resources/mailcow.svg")
email_intl = Custom("transip.email (Audre Lorde)", email_logo)
email_kennis = Custom("transip.email (Clemencia Redmond)", email_logo)
email_pjo = Custom("webmail.greenhost.nl (Radicaal)", email_logo)
2021-12-29 19:54:15 +00:00
email >> transip
email_intl >> transip_intl
email_kennis >> transip_kennis
email_pjo >> greenhost_pjo
2023-01-05 14:01:27 +00:00
# mailcow >> servercow
2022-01-01 18:14:14 +00:00
heroku_flyer = Custom("bij1-data-dashboard.herokuapp.com", heroku)
heroku_flyer_demo = Custom("bij1-flyer-app.herokuapp.com", heroku)
2022-11-08 15:26:04 +00:00
with Cluster("Web domains"):
bij1_org = Custom("bij1.org", www)
bij1_org >> transip
bij1_org >> email
bij1_net = Custom("bij1.net", www)
bij1_net >> greenhost
radicaal_org = Custom("radicaal.org", www)
radicaal_org >> greenhost_pjo
radicaal_org >> email_pjo
clemenciaredmond_org = Custom("clemenciaredmond.org", www)
clemenciaredmond_org >> transip_kennis
clemenciaredmond_org >> email_kennis
2021-12-29 19:54:15 +00:00
with Cluster("Code repositories"):
2021-12-29 21:18:59 +00:00
gitlab = Custom("gitlab.com/bij1", gitlab_logo)
github = Custom("github.com/bij1", github_logo)
github_data = Custom("github.com/bij1data", github_logo)
gitea = Custom("code.bij1.org", "./resources/gitea.svg")
woodpecker = Custom("build.bij1.org", "./resources/woodpecker.png")
github >> gitlab >> gitea
gitea >> woodpecker
2021-12-29 19:54:15 +00:00
with Cluster("Roadmap"):
trello_campaign = Custom("Trello Campagne Tweede Kamer verkiezingen", trello)
trello_it = Custom("Trello BIJ1 ICT", trello)
2021-12-29 21:18:59 +00:00
gitlab_issues = Custom("Gitlab issues", gitlab_logo)
2022-01-08 21:49:01 +00:00
github_projects = Custom("BIJ1 Data kanban", github_logo)
email >> trello_campaign
2022-01-08 21:49:01 +00:00
github_projects >> github_data
2021-12-29 19:54:15 +00:00
with Cluster("Aanmeldingen Kanban"):
trello_vrijwilligers = Custom("Trello board NieuweBIJ1ers", trello)
localize_trello = Python("localize-trello")
2021-12-29 21:18:59 +00:00
with Cluster("Lokale aanmeldingen"):
2021-12-29 19:54:15 +00:00
local_trello = Custom("trello by region", trello)
2021-12-29 21:18:59 +00:00
trello_vrijwilligers >> localize_trello >> local_trello
2021-12-29 19:54:15 +00:00
trello_campaign >> trello_vrijwilligers
with Cluster("Nieuwsbrieven"):
mailchimp_central = Custom("Landelijke MailChimp", mailchimp)
with Cluster("Lokale nieuwsbrieven"):
mailchimp_central = Custom("Lokale MailChimps", mailchimp)
2023-01-05 14:00:42 +00:00
# with Cluster("ELK"):
2021-12-29 19:54:15 +00:00
2023-01-05 14:00:42 +00:00
# logstash = Logstash("Logstash")
# beats = Beats("Beats")
# elasticsearch = Elasticsearch("Elasticsearch")
# kibana = Kibana("Kibana")
2021-12-29 19:54:15 +00:00
2023-01-05 14:00:42 +00:00
# logstash >> beats
# logstash >> elasticsearch
# logstash >> kibana
2021-12-29 19:54:15 +00:00
2023-01-05 14:00:42 +00:00
# greenhost >> logstash
# greenhost >> beats
# greenhost >> elasticsearch
# greenhost >> kibana
2021-12-29 19:54:15 +00:00
with Cluster("Meetings"):
2022-07-31 13:46:32 +00:00
zoom = Custom("Zoom", "./resources/zoom.svg")
jitsi = Custom("meet.bij1.org", "./resources/jitsi.svg")
bbb = Custom("bigbluebutton.bij1.org", "./resources/bigbluebutton.svg")
2021-12-29 19:54:15 +00:00
bbb >> hetzner
ingang = Rails("vergadering.bij1.org/ingang/")
flowmailer = Custom("FlowMailer", "./resources/flowmailer.svg")
2022-07-31 13:46:32 +00:00
helios = Custom("stemmen.bij1.org", "./resources/helios.png")
coturn = Custom("turn.bij1.org", "./resources/webrtc.png")
2021-12-29 19:54:15 +00:00
coturn >> bbb >> ingang >> helios
ingang >> flowmailer
jitsi >> greenhost
ingang >> greenhost
helios >> greenhost
coturn >> greenhost
with Cluster("Websites"):
proxy = Custom("proxy.bij1.net", nginx)
bij1_wp = Custom("bij1.org", wordpress)
staging_wp = Custom("staging-wp.bij1.net", wordpress)
doemee_wp = Custom("doemee.bij1.org", wordpress)
doemee_wp >> wpengine
doemee_wp >> trello_vrijwilligers
2022-07-31 13:46:32 +00:00
radicaal = Custom("radicaal.bij1.org", "./resources/squarespace.png")
shop = Custom("shop.bij1.org", "./resources/woocommerce.svg")
wings_bij1 = Custom("Wings", wings)
2021-12-29 19:54:15 +00:00
proxy >> bij1_wp
proxy >> greenhost
bij1_wp >> greenhost
staging_wp >> greenhost
shop >> bij1_wp
2022-07-31 13:46:32 +00:00
bij1_wp >> wings_bij1 # donations
2021-12-29 19:54:15 +00:00
2021-12-29 21:18:59 +00:00
with Cluster("Static"):
2021-12-29 19:54:15 +00:00
static = Custom("static.bij1.net", nginx)
links = Custom("links.bij1.org", www)
# actie = Custom("actie.bij1.org", www)
# iktelookmee = Custom("iktelookmee.bij1.org", www)
# wijzijn = Custom("wijzijn.bij1.org", www)
static >> links
# static >> actie
# static >> iktelookmee
# static >> wijzijn
2021-12-29 21:18:59 +00:00
static >> greenhost
2021-12-29 19:54:15 +00:00
with Cluster("Afdelingssites"):
wings_amsterdam = Custom("amsterdam.bij1.org", wings)
wings_rotterdam = Custom("rotterdam.bij1.org", wings)
2021-12-29 19:54:15 +00:00
wings_denhaag = Custom("denhaag.bij1.org", wings)
wings_utrecht = Custom("utrecht.bij1.org", wings)
wings_hilversum = Custom("hilversum.bij1.org", wings)
wp_almere = Custom("almerebij1.org", wordpress)
wp_amsterdam_staging = Custom("amsterdam.wp-staging.bij1.net", wordpress)
wp_amersfoort_staging = Custom("amersfoort.wp-staging.bij1.net", wordpress)
wp_almere_staging = Custom("almere.wp-staging.bij1.net", wordpress)
wp_rotterdam_staging = Custom("rotterdam.wp-staging.bij1.net", wordpress)
wp_hilversum_staging = Custom("hilversum.wp-staging.bij1.net", wordpress)
2021-12-29 19:54:15 +00:00
zapier = Custom("Zapier", "./resources/zapier.png")
doemee_wp >> zapier
2022-01-08 21:49:01 +00:00
airtable = Custom("Airtable", "./resources/airtable.png")
2021-12-29 19:54:15 +00:00
zapier >> airtable
with Cluster("Intranet"):
2021-12-29 21:39:54 +00:00
2021-12-29 19:54:15 +00:00
# kom = Custom("kom.bij1.org", www)
# kom >> transip
2022-07-31 13:46:32 +00:00
# keycloak = Custom("jij.bij1.org", "./resources/keycloak.svg")
2021-12-29 19:54:15 +00:00
cloud = Nextcloud("cloud.bij1.org")
cloud >> greenhost
# kom >> keycloak
# keycloak >> cloud
2022-11-08 15:26:04 +00:00
telegram_2fa = Custom("@bij1cloudbot", telegram_logo)
telegram_2fa >> cloud
clam_av = Custom("ClamAV", antivirus_logo)
clam_av >> cloud
2021-12-29 19:54:15 +00:00
2021-12-29 21:39:54 +00:00
# what shouldn't be our cloud but currently is 😩
gdrive = Custom("Google Drive", "./resources/google-drive.png")
2022-07-31 13:46:32 +00:00
mega = Custom("Mega", "./resources/mega.svg")
2021-12-29 21:39:54 +00:00
2021-12-29 21:18:59 +00:00
with Cluster("CRM"):
2022-07-31 13:46:32 +00:00
civi = Custom("CiviCRM", "./resources/civicrm.svg")
2021-12-29 19:54:15 +00:00
bij1algemeen = Php("bij1algemeen")
bij1rules = Php("bij1rules")
bij1migratie = Php("bij1migratie")
2021-12-29 21:18:59 +00:00
bij1_wp >> civi
2021-12-29 19:54:15 +00:00
airtable >> bij1migratie >> civi
2022-11-08 15:26:04 +00:00
2021-12-29 21:39:54 +00:00
with Cluster("chat"):
with Cluster("Discord"):
discord_bij1 = Discord("BIJ1 Discord (unofficial)")
discord_radicaal = Discord("Radicaal Discord")
with Cluster("Local Discords"):
discords_local = Discord("Local BIJ1 Discords")
fb_group = Facebook("Facebook groep actieve leden")
with Cluster("Signal"):
2021-12-29 21:45:52 +00:00
signal = Custom("signal groups (many)", "./resources/signal.png")
2021-12-29 19:54:15 +00:00
mollie = Custom("Mollie", "./resources/mollie.jpg")
export_mollie = Nodejs("export-mollie")
mollie >> export_mollie >> bij1migratie
2022-07-31 13:46:32 +00:00
terraform = Custom("Terraform", "./resources/terraform.png")
terraform_cloud = Custom("Terraform Cloud", "./resources/terraform-cloud.png")
terraform >> terraform_cloud
2022-07-31 13:46:32 +00:00
canva = Custom("Canva", "./resources/canva.png")
snelstart = Custom("snelstart", "./resources/snelstart.svg")
with Cluster("link collections"):
linktree = Custom("Linktree", "./resources/linktree.png")
linktree >> local_insta
linkbee = Custom("links.bij1.org", "./resources/link.png")
linkbee >> insta