Skip to content

Commit

Permalink
feat(cloud): add library
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorin committed Feb 25, 2020
1 parent 44de051 commit b53ed7b
Show file tree
Hide file tree
Showing 18,428 changed files with 316,517 additions and 7 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*.puml]
indent_style = space
indent_size = 2
[*.sh]
indent_style = space
indent_size = 2
[*.md]
indent_style = space
indent_size = 2
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

Set of libraries for [PlantUML](http://plantuml.com).

- [AWS V3 - Amazon Web Services](aws-v3/README.md)
- [Azure](azure/README.md)
- [Cloud - with AWS, Azure and GCP](cloud/README.md)
- [C4 Model V2](c4model-v2/README.md)
- [EventStorming](eventstorming/README.md)
- [GCP - Google Compute Platform](gcp/README.md)

Deprecated libraries:

- [AWS V2](aws-v2/README.md)
- [AWS V2 - Amazon Web Services](aws-v2/README.md)
- [AWS V3 - Amazon Web Services](aws-v3/README.md)
- [Azure](azure/README.md)
- [C4 Model](c4model/README.md)
- [GCP - Google Compute Platform](gcp/README.md)
2 changes: 1 addition & 1 deletion aws-v3.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

. ./lib.sh
. lib.v1.sh

iconsUrl="https://d1.awsstatic.com/webteam/architecture-icons/AWS-Architecture-Icons_SVG_20200131.abfc4fb34450d2294f8c65d2dcc9ea1602b6a449.zip"

Expand Down
2 changes: 1 addition & 1 deletion azure.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

. ./lib.sh
. lib.v1.sh

iconsRelease="2019_09_11"
iconsUrl="https://download.microsoft.com/download/1/7/1/171DA19A-5477-4F50-B354-4ABAF28502A6/Microsoft_Cloud_AI_Azure_Service_Icon_Set_${iconsRelease}.zip"
Expand Down
56 changes: 56 additions & 0 deletions cloud.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env bash

export LIB_NAME="cloud"
export LIB_BRANCH="master"

. lib.v2.sh

cleanGeneratedResources

setConstants

downloadPlantUML

awsIconsUrl="https://d1.awsstatic.com/webteam/architecture-icons/AWS-Architecture-Icons_SVG_20200131.abfc4fb34450d2294f8c65d2dcc9ea1602b6a449.zip"
azureIconsUrl="https://download.microsoft.com/download/1/7/1/171DA19A-5477-4F50-B354-4ABAF28502A6/Microsoft_Cloud_AI_Azure_Service_Icon_Set_2019_09_11.zip"
gcpIconsUrl="https://cloud.google.com/icons/files/gcp-icons.zip"
materialsIconsUrl="https://github.com/google/material-design-icons/releases/download/3.0.1/material-design-icons-3.0.1.zip"

downloadIcons aws ${awsIconsUrl} "AWS-Architecture-Icons_SVG_20200131/SVG Light"
generateIcons aws -pps='s/-on-aws//i;s/-light-bg//i;' -pns='s/amazon//ig;s/aws//ig;'
generateElements aws
generateGroups aws
generateDocumentation aws element
generateDocumentation aws group

downloadIcons azure ${azureIconsUrl} "azure-icons"
generateIcons azure -pps='s/-on-azure//i;s/-non-azure/-external/i;' -pns='s/azure//ig;' --export-area-drawing
generateElements azure
generateGroups azure
generateDocumentation azure element
generateDocumentation azure group

downloadIcons gcp ${gcpIconsUrl} "GCP Icons/Products and services"
generateIcons gcp
generateElements gcp
generateGroups gcp
generateDocumentation gcp element
generateDocumentation gcp group

downloadIcons materials ${materialsIconsUrl}
if [[ ! -d "${tmpDir}/${libName}/materials/icons" ]]; then
find "${tmpDir}/${libName}/materials/material-design-icons-3.0.1" -wholename "*/production/*48px.svg" -print0 |
while IFS= read -r -d '' oPic; do
picName=$(sed -e 's/ic_//;s/_48px//;' <<< $(basename ${oPic}))
dPicDir=$(sed -e 's/material-design-icons-3\.0\.1/icons/;s:/svg/production::;' <<< $(dirname ${oPic}))
dPic="${dPicDir}/${picName}"
log "materials" "extract SVG pictures (${oPic}) to (${dPic})"
mkdir -p ${dPicDir}
mv ${oPic} ${dPic}
done
fi
generateIcons materials
generateElements materials
generateDocumentation materials element

generateExamples
88 changes: 88 additions & 0 deletions cloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Cloud - with AWS, Azure and GCP

> PlantUML library providing elements and groups for the following cloud providers: Amazon Web Services, Microsoft Azure, Google Cloud Platform (+ material icons).
## Include the library

Include remotely the library:
```plantuml
@startuml
' configures the library
!global $LIB_BRANCH="master"
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/" + $LIB_BRANCH + "/cloud"
' loads the library
!includeurl $LIB_BASE_LOCATION/library.puml
@enduml
```

Include locally the library:
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../../"
' loads the library
!include ../../../library.puml
@enduml
```

## Load the style flavor

Guidelines about architecture diagrams changes according the cloud provider.
It can be about elements' shapes, font sizes, colors etc.

```plantuml
@startuml
' loads the AWS style
include('styles/aws')
@enduml
```

```plantuml
@startuml
' loads the Azure style
include('styles/azure')
@enduml
```

```plantuml
@startuml
' loads the GCP style
include('styles/gcp')
@enduml
```

## Load other resources

Additional sub-libraries can be included.

```plantuml
@startuml
' loads the AwsAnalytics element
include('elements/aws/Analytics/AwsAnalytics')
' loads the AwsCloud9Resource element
include('elements/aws/DeveloperTools/AwsCloud9Resource')
' loads the AwsGroupCloud group
include('groups/aws/AwsGroupCloud')
AwsGroupCloud('element', 'Cloud', 'an optional tech field')
@enduml
```

## Resources

- `aws` - Amazon Web Services
- [Elements](documentation/aws/elements.md)
- [Groups](documentation/aws/groups.md)
- `azure` - Microsoft Azure
- [Elements](documentation/azure/elements.md)
- [Groups](documentation/azure/groups.md)
- `gcp` - Google Cloud Platform
- [Elements](documentation/gcp/elements.md)
- [Groups](documentation/gcp/groups.md)
- [Material Icons](documentation/materials/elements.md)

## Resources

Examples with sources can be reviewed there: [examples](examples.md).
43 changes: 43 additions & 0 deletions cloud/constants.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@startuml

!if (%not(%variable_exists("$IMAGE_BASE_PATH"))) && (%variable_exists("$LIB_BASE_LOCATION"))
!global $IMAGE_BASE_PATH=$LIB_BASE_LOCATION + "/"
!endif

' COMMON

!global $ICON_FORMAT="png"

!global $TEXT_WIDTH_MAX=200
!global $MSG_WIDTH_MAX=150
!global $FONT_SIZE_SM=10
!global $FONT_SIZE_MD=14
!global $FONT_SIZE_LG=20
!global $FONT_COLOR="#212121"
!global $SPRITE_COLOR=$FONT_COLOR

' AWS

!global $AWS_COLOR_DARK_BLUE="#232F3D"
!global $AWS_COLOR_LIGHT_BLUE="#007CBC"
!global $AWS_COLOR_LIGHT_BLUE_BG="#E6F2F9"
!global $AWS_COLOR_RED="#DF3312"
!global $AWS_COLOR_ORANGE="#D86613"
!global $AWS_COLOR_GREEN="#1D8900"
!global $AWS_COLOR_GREY="#5A6B86"
!global $AWS_COLOR_GREY_BG="#EBEDF0"
!global $AWS_COLOR_VIOLET="#CD2264"

' AZURE

!global $AZURE_GROUP_BD_LIGHT="#e1e1e1"
!global $AZURE_GROUP_BD_DARK="#3f3f3f"
!global $AZURE_GROUP_BG_LIGHT="#f2f2f2"
!global $AZURE_BLUE="#0078d7"

' GCP

!global $GCP_CARD_BD="#e1e1e1"
!global $GCP_GROUP_FONT_COLOR="#595959"

@enduml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions cloud/documentation/aws/Analytics/AwsAnalytics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# AwsAnalytics
```text
elements/aws/Analytics/AwsAnalytics
```
| Icon | Element | Card |
| :-: | :-: | --- |
| ![AwsAnalytics icon](../../../icons/aws/Analytics/AwsAnalytics.png) | ![AwsAnalytics element](AwsAnalytics.element.png) | ![AwsAnalytics card](AwsAnalytics.card.png) |
## Element
### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BRANCH="master"
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/" + $LIB_BRANCH + "/cloud"
' loads the library
!includeurl $LIB_BASE_LOCATION/library.puml
' loads the AWS style
include('styles/aws')
' loads the AwsAnalytics element
include('elements/aws/Analytics/AwsAnalytics')
AwsAnalytics('element', 'Analytics', 'an optional tech field')
@enduml
```
### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../../"
' loads the library
!include ../../../library.puml
' loads the AWS style
include('styles/aws')
' loads the AwsAnalytics element
include('elements/aws/Analytics/AwsAnalytics')
AwsAnalytics('element', 'Analytics', 'an optional tech field')
@enduml
```
## Card
### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BRANCH="master"
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/" + $LIB_BRANCH + "/cloud"
' loads the library
!includeurl $LIB_BASE_LOCATION/library.puml
' loads the AWS style
include('styles/gcp')
' loads the AwsAnalytics card
include('elements/aws/Analytics/AwsAnalytics')
AwsAnalyticsCard('card', 'an optional functional name', 'Molestiae praesentium aut natus dolorem. Aut consequatur fugiat a consequatur ut.')
@enduml
```
### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../../"
' loads the library
!include ../../../library.puml
' loads the GCP style
include('styles/gcp')
' loads the AwsAnalytics card
include('elements/aws/Analytics/AwsAnalytics')
AwsAnalyticsCard('card', 'an optional functional name', 'Molestiae praesentium aut natus dolorem. Aut consequatur fugiat a consequatur ut.')
@enduml
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions cloud/documentation/aws/Analytics/AwsAthena.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# AwsAthena
```text
elements/aws/Analytics/AwsAthena
```
| Icon | Element | Card |
| :-: | :-: | --- |
| ![AwsAthena icon](../../../icons/aws/Analytics/AwsAthena.png) | ![AwsAthena element](AwsAthena.element.png) | ![AwsAthena card](AwsAthena.card.png) |
## Element
### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BRANCH="master"
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/" + $LIB_BRANCH + "/cloud"
' loads the library
!includeurl $LIB_BASE_LOCATION/library.puml
' loads the AWS style
include('styles/aws')
' loads the AwsAthena element
include('elements/aws/Analytics/AwsAthena')
AwsAthena('element', 'Athena', 'an optional tech field')
@enduml
```
### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../../"
' loads the library
!include ../../../library.puml
' loads the AWS style
include('styles/aws')
' loads the AwsAthena element
include('elements/aws/Analytics/AwsAthena')
AwsAthena('element', 'Athena', 'an optional tech field')
@enduml
```
## Card
### Load remotely
```plantuml
@startuml
' configures the library
!global $LIB_BRANCH="master"
!global $LIB_BASE_LOCATION="https://raw.githubusercontent.com/tmorin/plantuml-libs/" + $LIB_BRANCH + "/cloud"
' loads the library
!includeurl $LIB_BASE_LOCATION/library.puml
' loads the AWS style
include('styles/gcp')
' loads the AwsAthena card
include('elements/aws/Analytics/AwsAthena')
AwsAthenaCard('card', 'an optional functional name', 'Molestiae praesentium aut natus dolorem. Aut consequatur fugiat a consequatur ut.')
@enduml
```
### Load locally
```plantuml
@startuml
' configures the library
!global $INCLUSION_MODE="local"
!global $LIB_BASE_LOCATION="../../../"
' loads the library
!include ../../../library.puml
' loads the GCP style
include('styles/gcp')
' loads the AwsAthena card
include('elements/aws/Analytics/AwsAthena')
AwsAthenaCard('card', 'an optional functional name', 'Molestiae praesentium aut natus dolorem. Aut consequatur fugiat a consequatur ut.')
@enduml
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b53ed7b

Please sign in to comment.