Procházet zdrojové kódy

docs: update example postions and titles

tags/v0.6.0
mingrammer před 4 roky
rodič
revize
be2cc658bc
2 změnil soubory, kde provedl 38 přidání a 38 odebrání
  1. +1
    -1
      README.md
  2. +37
    -37
      docs/getting-started/examples.md

+ 1
- 1
README.md Zobrazit soubor

@@ -42,7 +42,7 @@ You can start with [quick start](https://diagrams.mingrammer.com/docs/getting-st

## Examples

| Event Processing on AWS | Stateful Architecture on k8s | On-Premise System Architecture |
| Event Processing | Stateful Architecture | Advanced Web Service |
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| ![event processing](https://diagrams.mingrammer.com/img/event_processing_diagram.png) | ![stateful architecture](https://diagrams.mingrammer.com/img/stateful_architecture_diagram.png) | ![advanced web service with on-premise](https://diagrams.mingrammer.com/img/advanced_web_service_with_on-premise.png) |



+ 37
- 37
docs/getting-started/examples.md Zobrazit soubor

@@ -5,7 +5,7 @@ title: Examples

Here are some more examples.

## Grouped Workers
## Grouped Workers on AWS

```python
from diagrams import Diagram
@@ -54,7 +54,7 @@ with Diagram("Clustered Web Services", show=False):

![clustered web services diagram](/img/clustered_web_services_diagram.png)

## Event Processing
## Event Processing on AWS

```python
from diagrams import Cluster, Diagram
@@ -89,7 +89,7 @@ with Diagram("Event Processing", show=False):

![event processing diagram](/img/event_processing_diagram.png)

## Message Collecting System
## Message Collecting System on GCP

```python
from diagrams import Cluster, Diagram
@@ -127,7 +127,7 @@ with Diagram("Message Collecting", show=False):

![message collecting diagram](/img/message_collecting_diagram.png)

## Exposed Pod with 3 Replicas on k8s
## Exposed Pod with 3 Replicas on Kubernetes

```python
from diagrams import Diagram
@@ -145,7 +145,7 @@ with Diagram("Exposed Pod with 3 Replicas", show=False):

![exposed pod with 3 replicas diagram](/img/exposed_pod_with_3_replicas_diagram.png)

## Stateful Architecture on k8s
## Stateful Architecture on Kubernetes

```python
from diagrams import Cluster, Diagram
@@ -170,37 +170,6 @@ with Diagram("Stateful Architecture", show=False):

![stateful architecture diagram](/img/stateful_architecture_diagram.png)

## RabbitMQ Consumers with custom nodes

```python
from urllib.request import urlretrieve

from diagrams import Cluster, Diagram
from diagrams.custom import Custom
from diagrams.aws.database import Aurora
from diagrams.k8s.compute import Pod

# Download an image to be used into a Custom Node class
rabbitmq_url = "https://jpadilla.github.io/rabbitmqapp/assets/img/icon.png"
rabbitmq_icon = "rabbitmq.png"
urlretrieve(rabbitmq_url, rabbitmq_icon)


with Diagram("Broker Consumers", show=False):
with Cluster("Consumers"):
consumers = [
Pod("worker"),
Pod("worker"),
Pod("worker")
]

queue = Custom("Message queue", rabbitmq_icon)

queue >> consumers >> Aurora("Database")
````

![rabbitmq consumers diagram](/img/rabbitmq_consumers_diagram.png)

## Advanced Web Service with On-Premise

```python
@@ -242,4 +211,35 @@ with Diagram("Advanced Web Service with On-Premise", show=False):
ingress >> grpcsvc >> aggregator
```

![advanced web service with on-premise diagram](/img/advanced_web_service_with_on-premise.png)
![advanced web service with on-premise diagram](/img/advanced_web_service_with_on-premise.png)

## RabbitMQ Consumers with Custom Nodes

```python
from urllib.request import urlretrieve

from diagrams import Cluster, Diagram
from diagrams.custom import Custom
from diagrams.aws.database import Aurora
from diagrams.k8s.compute import Pod

# Download an image to be used into a Custom Node class
rabbitmq_url = "https://jpadilla.github.io/rabbitmqapp/assets/img/icon.png"
rabbitmq_icon = "rabbitmq.png"
urlretrieve(rabbitmq_url, rabbitmq_icon)


with Diagram("Broker Consumers", show=False):
with Cluster("Consumers"):
consumers = [
Pod("worker"),
Pod("worker"),
Pod("worker")
]

queue = Custom("Message queue", rabbitmq_icon)

queue >> consumers >> Aurora("Database")
````

![rabbitmq consumers diagram](/img/rabbitmq_consumers_diagram.png)

Načítá se…
Zrušit
Uložit