diagrams icon indicating copy to clipboard operation
diagrams copied to clipboard

📦 NEW: Add missing HashiCorp Icons

Open mhmdio opened this issue 4 years ago • 12 comments

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

mhmdio avatar Jan 02 '21 18:01 mhmdio

@mingrammer Please check!

mhmdio avatar Jan 02 '21 18:01 mhmdio

@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.

hashicorp

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 avatar Jan 03 '21 08:01 gabriel-tessier

@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

image

mhmdio avatar Jan 03 '21 12:01 mhmdio

@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.)

mingrammer avatar Aug 21 '21 02:08 mingrammer

Fix conflicts

mhmdio avatar Jan 13 '22 15:01 mhmdio

Any updates on this? @mingrammer

thehedgefrog avatar Mar 28 '22 14:03 thehedgefrog

Ok, I managed to create a new Provider (@mingrammer) for HashiCorp, to mirror the following services:

HashiCorp Stack with Product Names

now with Diagrams:

hashicorp_stack

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

mhmdio avatar Sep 05 '22 12:09 mhmdio

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.

mingrammer avatar Nov 04 '22 09:11 mingrammer

Bumping this, any change of merging this?

nreisbeck avatar Apr 25 '23 23:04 nreisbeck

Friendly note that I discovered this today and would also love to see these icons added when possible.

sbowers-gbx avatar Jun 30 '23 12:06 sbowers-gbx

I will update this, the problem, with these icons they include branding

mhmdio avatar Jun 30 '23 14:06 mhmdio

@mingrammer I removed company name from logos, and changed the size to 256x256

mhmdio avatar Jul 07 '23 06:07 mhmdio