from diagrams import Cluster, Diagram

from diagrams.onprem.database import Mysql
from diagrams.onprem.network import Apache, Internet
from diagrams.onprem.groupware import Nextcloud
from diagrams.generic.os import LinuxGeneral
from diagrams.programming.language import Php

import diagrams.outscale.storage as storage_2

with Diagram(filename="./assets/dia_nc_simple", show=False):
    out = Internet("Internet")

    with Cluster("LAMP"):

        with Cluster("Linux = L"):
            linux = LinuxGeneral()
            storage = storage_2.Storage()
                
            with Cluster("Nextcloud Web server = AMP"):
                Apache() - Mysql() - Php() 
                nc = Nextcloud()             

    linux >> out >> linux >> storage
    linux >> nc >> storage