diagrams
diagrams copied to clipboard
📦 NEW: Add missing HashiCorp Icons
Add HashiCorp missing Icons from https://www.hashicorp.com/brand
- Waypoint
- Packer
- Vagrant
- boundary
autogen.sh:
All done! ✨ 🍰 ✨
170 files reformatted, 16 files left unchanged.
Tests:
----------------------------------------------------------------------
Ran 29 tests in 1.401s
OK
@mingrammer Please check!
@mhmdio
Great PR just one comment about the icons, actually there's already 4 HashiCorp services and they don't have the Company name and service under, so maybe for consistency it's better to have the version with only the icon. Also all other Nodes have only the icon... Didn't check all but the one I use so far.
Here the diagrams with the existing icons and the one pushed in this PR. As you can see all the existing service except Terraform are only icon without text so I think it's better to have the icon only version and push again Terraform one.
And the code to generate the diagrams.
from diagrams import Diagram, Cluster
from diagrams.onprem.security import Vault
from diagrams.onprem.iac import Terraform
from diagrams.onprem.network import Consul
from diagrams.onprem.compute import Nomad
from diagrams.custom import Custom
from urllib.request import urlretrieve
with Diagram("Hashicorp", show=False, filename="", direction="LR"):
with Cluster("Existing"):
Vault("Vault")
Terraform("Terraform")
Consul("Consul")
Nomad("Nomad")
with Cluster("PR 428"):
waypoint_url = "https://github.com/mingrammer/diagrams/raw/f4036a7ebe44ab83711639c13817922ce77ceeeb/resources/onprem/ci/waypoint.png"
waypoint_icon = "waypoint.png"
urlretrieve(waypoint_url, waypoint_icon)
waypoint = Custom("Waypoint", waypoint_icon)
vagrant_url = "https://github.com/mingrammer/diagrams/raw/f4036a7ebe44ab83711639c13817922ce77ceeeb/resources/onprem/iac/vagrant.png"
vagrant_icon = "vagrant.png"
urlretrieve(vagrant_url, vagrant_icon)
vagrant = Custom("Vagrant", vagrant_icon)
packer_url = "https://github.com/mingrammer/diagrams/raw/f4036a7ebe44ab83711639c13817922ce77ceeeb/resources/onprem/iac/packer.png"
packer_icon = "packer.png"
urlretrieve(packer_url, packer_icon)
packer = Custom("Packer", packer_icon)
boundary_url = "https://github.com/mingrammer/diagrams/raw/f4036a7ebe44ab83711639c13817922ce77ceeeb/resources/onprem/security/boundary.png"
boundary_icon = "boundary.png"
urlretrieve(boundary_url, boundary_icon)
boundary = Custom("Boundary", boundary_icon)
@gabriel-tessier Thanks for the feedback. I updated the logos and Terraform logo also.
I suggest this to be added in its own class for example hashicorp.packer
@mhmdio Thank you for adding all the hashicorp services! As you said, creating the new hashicorp
provider looks nice to me. Could you please work on it? (however, for backward compatibility, existing nodes should remain until major updates.)
Fix conflicts
Any updates on this? @mingrammer
Ok, I managed to create a new Provider (@mingrammer) for HashiCorp, to mirror the following services:
now with Diagrams:
Notes
- Keep existing nodes, until a major update,to be removed ( after that using the HashiCorp provider only)
- used the official icons from HashiCorp for now ( with names ), we can modify them later to remove the names, see more here https://www.hashicorp.com/brand
Tests
❯ docker exec diagrams python -m unittest tests/*.py -v
test_cluster (tests.test_c4.C4Test) ... ok
test_edge_without_constraint (tests.test_c4.C4Test) ... ok
test_edges (tests.test_c4.C4Test) ... ok
test_edges_with_labels (tests.test_c4.C4Test) ... ok
test_external_nodes (tests.test_c4.C4Test) ... ok
test_nodes (tests.test_c4.C4Test) ... ok
test_systems (tests.test_c4.C4Test) ... ok
test_node_not_in_diagram (tests.test_diagram.ClusterTest) ... ok
test_node_to_node (tests.test_diagram.ClusterTest) ... ok
test_node_to_nodes (tests.test_diagram.ClusterTest) ... ok
test_nodes_to_node (tests.test_diagram.ClusterTest) ... ok
test_validate_direction (tests.test_diagram.ClusterTest) ... ok
test_with_global_context (tests.test_diagram.ClusterTest) ... ok
test_with_nested_cluster (tests.test_diagram.ClusterTest) ... ok
test_custom_filename (tests.test_diagram.DiagramTest) ... ok
test_default_filename (tests.test_diagram.DiagramTest) ... ok
test_empty_name (tests.test_diagram.DiagramTest)
Check that providing an empty name don't crash, but save in a diagrams_image.xxx file. ... ok
test_node_not_in_diagram (tests.test_diagram.DiagramTest) ... ok
test_node_to_node (tests.test_diagram.DiagramTest) ... ok
test_node_to_nodes (tests.test_diagram.DiagramTest) ... ok
test_nodes_to_node (tests.test_diagram.DiagramTest) ... ok
test_outformat_list (tests.test_diagram.DiagramTest)
Check that outformat render all the files from the list. ... ok
test_validate_curvestyle (tests.test_diagram.DiagramTest) ... ok
test_validate_direction (tests.test_diagram.DiagramTest) ... ok
test_validate_outformat (tests.test_diagram.DiagramTest) ... ok
test_with_global_context (tests.test_diagram.DiagramTest) ... ok
test_node_to_node (tests.test_diagram.EdgeTest) ... ok
test_node_to_node_with_additional_attributes (tests.test_diagram.EdgeTest) ... ok
test_node_to_node_with_attributes (tests.test_diagram.EdgeTest) ... ok
test_node_to_nodes (tests.test_diagram.EdgeTest) ... ok
test_nodes_to_node (tests.test_diagram.EdgeTest) ... ok
test_nodes_to_node_with_additional_attributes (tests.test_diagram.EdgeTest) ... ok
test_nodes_to_node_with_additional_attributes_directional (tests.test_diagram.EdgeTest) ... ok
test_nodes_to_node_with_attributes_bidirectional (tests.test_diagram.EdgeTest) ... ok
test_nodes_to_node_with_attributes_bothdirectional (tests.test_diagram.EdgeTest) ... ok
test_nodes_to_node_with_attributes_loop (tests.test_diagram.EdgeTest) ... ok
test_nodes_to_node_with_attributes_onedirectional (tests.test_diagram.EdgeTest) ... ok
test_folder_depth (tests.test_diagram.ResourcesTest)
The code currently only handles resource folders up to a dir depth of 2 ... ok
----------------------------------------------------------------------
Ran 38 tests in 2.352s
OK
Oh, I missed one. Currently, the icons have the company name under the logo. But It is better to use icon only version I think as @gabriel-tessier said.
Bumping this, any change of merging this?
Friendly note that I discovered this today and would also love to see these icons added when possible.
I will update this, the problem, with these icons they include branding
@mingrammer I removed company name from logos, and changed the size to 256x256