This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from diagrams import Cluster, Diagram | |
from diagrams.aws.compute import ECS | |
from diagrams.aws.network import ELB, Route53 | |
from diagrams.aws.database import RDS | |
from diagrams.onprem.client import User | |
graph_attr = { | |
"fontsize": "25", | |
"bgcolor": "transparent" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 2_advanced_diagram.py # To run the file to generate diagram | |
ls -lrt # To check the files. A file called my_diagram.jpg will be generated in the directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdg-open my_diagram.jpg # Opens the generated diagram in default image viewver. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from diagrams import Diagram, Cluster, Edge | |
from diagrams.custom import Custom | |
from diagrams.onprem.network import Nginx | |
from diagrams.onprem.network import Tomcat | |
from diagrams.onprem.inmemory import Memcached | |
from diagrams.onprem.queue import Rabbitmq | |
from diagrams.onprem.database import Mongodb | |
from diagrams.onprem.database import Mysql | |
from diagrams.elastic.elasticsearch import Elasticsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdg-open custom_diagram.jpg # Opens the generated diagram in default image viewver. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 3_custom_diagram.py # To run the file to generate diagram | |
ls -lrt # To check the files. A file called custom_diagram.jpg will be generated in the directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "github_repository" "Document_as_a_Code" { | |
name = "document_as_a_code" | |
description = "A Repo for managing for CI/CD implementation" | |
visibility = "public" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
github = { | |
source = "integrations/github" | |
version = "~> 4.0" | |
} | |
} | |
} | |
provider "github" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To initialize a working directory containing Terraform configuration files | |
terraform init | |
# To rewrite Terraform configuration files to a canonical format and style | |
terraform fmt | |
# To validate the configuration files in a directory (not accessing any remote services such as remote state, provider APIs, etc) | |
terraform validate | |
# Optional to run || To generate a visual representation || Need Graphviz package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GITHUB_TOKEN=<<Replace the Personal Access Token here!!>> |