├── .gitignore ├── ACI_Ansible ├── Complex │ ├── hosts_aci.yml │ ├── playbook_aci_create.yml │ ├── playbook_aci_delete.yml │ └── vars │ │ └── variables_aci.yml ├── MSO │ ├── hosts.yml │ ├── playbook_create_mso_tenant.yml │ └── vars │ │ └── mso_variables.yml ├── Simple │ ├── hosts_aci.yml │ ├── playbook_aci_create.yml │ ├── playbook_aci_delete.yml │ └── vars │ │ └── variables_aci.yml └── Vault │ ├── .gitignore │ ├── hosts_aci.yml │ ├── playbook_aci_create.yml │ ├── playbook_aci_delete.yml │ └── vars │ └── variables_aci.yml ├── ACI_MSO ├── authenticate.py └── get_tenants.py ├── ACI_Python_ACITookit ├── .gitignore ├── Complex │ ├── create_aci.py │ └── vars │ │ └── aci_variables.yml └── Simple │ ├── create_tenant_vrf_bd.py │ ├── create_tenant_vrf_bd_subnet.py │ └── variables.yml ├── ACI_Python_Requests ├── Complex │ ├── acicontroller.py │ ├── assign_contract.py │ ├── create_all.py │ ├── create_ap.py │ ├── create_bd.py │ ├── create_contract.py │ ├── create_epg.py │ ├── create_filter.py │ ├── create_tenant.py │ ├── create_vrf.py │ ├── delete_tenant.py │ ├── templates │ │ ├── add_ap.j2.json │ │ ├── add_bd.j2.json │ │ ├── add_contract.j2.json │ │ ├── add_epg.j2.json │ │ ├── add_filter.j2.json │ │ ├── add_tenant.j2.json │ │ ├── add_vrf.j2.json │ │ ├── assign_contract_cons.j2.json │ │ ├── assign_contract_prov.j2.json │ │ ├── delete_tenant.j2.json │ │ └── login.j2.json │ └── vars │ │ └── aci_variables.yml └── Simple │ ├── aci_login.py │ ├── create_tenant.py │ ├── delete_tenant.py │ └── get_tenants.py ├── ACI_Python_Requests_Jinja ├── aci.py ├── example.py ├── loopbacks │ ├── normal │ │ ├── loopback.py │ │ └── loopback.yml │ └── variant │ │ ├── loopback_variant.py │ │ └── loopback_variant.yml ├── templates │ ├── login.j2.json │ ├── loopback.j2 │ ├── loopback_variant.j2 │ ├── tenant.j2.json │ └── vlans.j2 └── vlans │ ├── vlan.py │ ├── vlans.yml │ ├── vlans_file.py │ ├── vlans_file_yml_file.py │ └── vlans_multiple.py ├── ACI_Terraform ├── Complex │ ├── credentials.tf │ ├── main_aci.tf │ └── variables_aci.tf └── Simple │ ├── main.tf │ ├── provider.tf │ ├── terraform.tf │ └── variables.tf ├── ACI_Terraform_Gitlab ├── .gitignore ├── .gitlab-ci_create.yml ├── .gitlab-ci_destroy.yml ├── cli_mdt.py ├── main_aci.tf ├── terraform.tf └── variables_aci.tf ├── ACI_Terraform_sequel ├── part1 │ ├── main.tf │ ├── output.tf │ ├── provider.tf │ └── variables.tf ├── part2 │ ├── main.tf │ ├── output.tf │ ├── provider.tf │ ├── terraform.tfvars │ └── variables.tf ├── part3 │ ├── main.tf │ ├── modules │ │ ├── aci_ap │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_bd │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_tenant │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ └── aci_vrf │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ ├── output.tf │ ├── provider.tf │ ├── terraform.tfvars │ └── variables.tf ├── part4 │ ├── main.tf │ ├── modules │ │ ├── aci_ap │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_bd │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_tenant │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ └── aci_vrf │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ ├── output.tf │ ├── provider.tf │ ├── terraform.tfvars │ └── variables.tf ├── part5 │ ├── main.tf │ ├── modules │ │ ├── aci_ap │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_bd │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_tenant │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_tenant_vrf_ap │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ └── aci_vrf │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ ├── output.tf │ ├── provider.tf │ ├── terraform.tfvars │ └── variables.tf ├── part6 │ ├── main.tf │ ├── modules │ │ ├── aci_bd │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ ├── aci_tenant │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ └── aci_tenant_vrf_ap │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ ├── output.tf │ ├── provider.tf │ ├── terraform.tfvars │ └── variables.tf ├── part7 │ ├── main.tf │ ├── modules │ │ ├── aci_bd │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ │ └── aci_tenant_vrf_ap │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── provider.tf │ │ │ └── variables.tf │ ├── output.tf │ ├── provider.tf │ ├── terraform.tfvars │ └── variables.tf └── part8 │ ├── main.tf │ ├── modules │ ├── aci_bd │ │ ├── main.tf │ │ ├── output.tf │ │ ├── provider.tf │ │ └── variables.tf │ └── aci_tenant_vrf_ap │ │ ├── main.tf │ │ ├── output.tf │ │ ├── provider.tf │ │ └── variables.tf │ ├── output.tf │ ├── provider.tf │ ├── terraform.tfvars │ └── variables.tf ├── ACI_vSphere_Terraform ├── main_aci.tf ├── main_vsphere.tf ├── variables_aci.tf └── variables_vsphere.tf ├── AWS_Kubernetes_Ansible ├── Ansible │ ├── ansible.cfg │ ├── hosts │ ├── initial.yml │ ├── kube-dependencies.yml │ ├── master.yml │ └── workers.yml └── Terraform │ ├── main.tf │ ├── provider.tf │ └── variables_AWS.tf ├── AWS_Terraform ├── main.tf ├── provider.tf └── variables_AWS.tf ├── AWS_Terraform_Gitlab ├── .gitlab-ci.yml ├── main.tf ├── provider.tf ├── terraform.tf └── variables.tf ├── AWS_Terraform_RemoteState ├── main.tf ├── provider.tf ├── terraform.tf └── variables.tf ├── Ansible_IOSXE ├── ios_modules │ ├── ansible.cfg │ ├── change_description.yaml │ ├── change_description_multipleinterface_variant.yaml │ ├── change_description_multipleinterfaces.yaml │ ├── command_show.yaml │ ├── command_show_variant1.yaml │ ├── command_show_variant2.yaml │ ├── group_vars │ │ └── iosxe.yaml │ ├── hosts │ ├── loopback_create_multiple.yaml │ ├── loopback_create_single.yaml │ ├── loopback_remove_multiple.yaml │ ├── loopback_remove_single.yaml │ └── vars │ │ ├── loopbacks.yaml │ │ └── loopbacks_interfaces.yaml ├── napalm │ ├── ansible.cfg │ ├── bijhouden.yml │ ├── create_loopback.yml │ ├── diff │ ├── get_facts.yml │ ├── group_vars │ │ └── iosxe.yaml │ ├── hosts │ ├── loopbacks.txt │ ├── show_command.yml │ ├── validate_command.yml │ └── validation.yml ├── netconf │ ├── ansible.cfg │ ├── group_vars │ │ └── iosxe.yaml │ ├── hosts │ ├── loopback_create_netconf.yaml │ └── show_command._tobechanged.yaml └── restconf │ └── Method1 │ ├── ansible.cfg │ ├── create_interfaces_restconf.yml │ ├── create_interfaces_restconf_variant.yml │ ├── delete_interfaces_restconf.yml │ ├── get_interfaces_restconf.yml │ ├── group_vars │ └── iosxe.yaml │ ├── hosts │ ├── loopback.json │ └── test.json ├── DNAC_PythonRequests ├── Assurance │ ├── authenticate.py │ └── get_client_health.py ├── CommandRunner │ ├── authenticate.py │ └── commandrunner.py ├── Devices │ ├── authenticate.py │ ├── get_devicelist.py │ └── get_interfaces.py ├── FlowAnalysis │ ├── authenticate.py │ └── flowanalysis.py ├── NetworkDiscovery │ ├── authenticate.py │ ├── run_discovery.py │ └── templates │ │ └── discovery.j2.json ├── Sites │ ├── add_assign_device.py │ ├── add_building.py │ ├── add_device.py │ ├── add_floor.py │ ├── add_site.py │ ├── add_site_building_floor.py │ ├── authenticate.py │ ├── delete_site.py │ ├── get_membership.py │ ├── get_sites.py │ └── templates │ │ ├── building.j2.json │ │ ├── dummy_device.json │ │ ├── floor.j2.json │ │ ├── site.j2.json │ │ └── site_building_floor.j2.json └── Webhooks │ ├── authenticate.py │ └── webhooks.py ├── DigitalOcean_Kubernetes_Ansible ├── Ansible │ ├── ansible.cfg │ ├── hosts │ ├── initial.yml │ ├── kube-dependencies.yml │ ├── master.yml │ └── workers.yml └── Terraform │ ├── create_server.tf │ └── variables.tf ├── ESXi_ARM_VMTools └── install_openvm_tools.sh ├── Express_Mongo_REST_API ├── app.js ├── bin │ └── www ├── config │ └── database.js ├── models │ └── todo.js ├── package.json ├── public │ └── stylesheets │ │ └── style.css ├── routes │ ├── index.js │ ├── todo.js │ └── users.js └── views │ ├── error.pug │ ├── index.pug │ └── layout.pug ├── Express_Mongo_REST_Angular ├── app.js ├── bin │ └── www ├── config │ └── database.js ├── models │ └── todo.js ├── package.json ├── public │ ├── controllers │ │ └── controller.js │ ├── images │ │ └── empty.js │ ├── index.html │ ├── javascript │ │ └── empty.js │ └── stylesheets │ │ └── style.css └── routes │ ├── index.js │ ├── todo.js │ └── users.js ├── Flask ├── Flask-Basic-Beanstalk │ ├── .gitignore │ ├── application.py │ ├── requirements.txt │ ├── templates │ │ └── index.html │ ├── test_application.py │ └── wsgi.py ├── Flask-Basic-CICD-GithubActions-Beanstalk │ ├── .github │ │ └── workflows │ │ │ └── main.yml │ ├── .gitignore │ ├── application.py │ ├── requirements.txt │ ├── templates │ │ └── index.html │ ├── test_application.py │ └── wsgi.py ├── Flask-Basic-CICD-GithubActions-DigitalOcean-Apps │ ├── .gitignore │ ├── README.md │ ├── app.py │ ├── gunicorn_config.py │ ├── requirements.txt │ ├── templates │ │ └── index.html │ └── wsgi.py ├── Flask-Basic-CICD-GithubActions-DigitalOcean-Droplet │ ├── .github │ │ └── workflows │ │ │ └── main.yml │ ├── .gitignore │ ├── Dockerfile │ ├── app │ │ ├── app.py │ │ ├── templates │ │ │ └── index.html │ │ └── wsgi.py │ ├── docker-compose.yml │ └── requirements.txt ├── Flask-Basic-CICD-GithubActions-DigitalOcean-K8S │ ├── .github │ │ └── workflows │ │ │ └── main.yml │ ├── Dockerfile │ ├── app │ │ ├── app.py │ │ ├── templates │ │ │ └── index.html │ │ └── wsgi.py │ ├── config │ │ └── deployment.yml │ ├── docker-compose.yml │ └── requirements.txt ├── Flask-Basic-CICD-GithubActions-Docker-ECS-herdoen │ ├── .github │ │ └── workflows │ │ │ └── main.yml │ ├── Dockerfile │ ├── app │ │ ├── app.py │ │ ├── templates │ │ │ └── index.html │ │ └── wsgi.py │ ├── aws-task-definition.json │ ├── docker-compose.yml │ └── requirements.txt ├── Flask-Basic-CICD-GithubActions-Heroku │ ├── .github │ │ └── workflows │ │ │ └── main.yml │ ├── .gitignore │ ├── Dockerfile │ ├── Procfile │ ├── app │ │ ├── app.py │ │ └── templates │ │ │ └── index.html │ ├── requirements.txt │ └── wsgi.py ├── Flask-Basic-CICD-Heroku │ ├── .gitignore │ ├── Dockerfile │ ├── Procfile │ ├── README.md │ ├── app │ │ ├── app.py │ │ └── templates │ │ │ └── index.html │ ├── requirements.txt │ └── wsgi.py ├── Flask-Basic-Docker │ ├── Dockerfile │ ├── app │ │ ├── app.py │ │ ├── templates │ │ │ └── index.html │ │ └── wsgi.py │ ├── docker-compose.yml │ └── requirements.txt ├── Flask-Basic-Heroku │ ├── .gitignore │ ├── Dockerfile │ ├── Procfile │ ├── app │ │ ├── app.py │ │ └── templates │ │ │ └── index.html │ ├── requirements.txt │ └── wsgi.py ├── Flask-Basic-Waypoint-Docker │ ├── Dockerfile │ ├── app │ │ ├── app.py │ │ ├── templates │ │ │ └── index.html │ │ └── wsgi.py │ ├── requirements.txt │ └── waypoint.hcl ├── Flask-Basic-Waypoint-ECR-ECS │ ├── Dockerfile │ ├── Procfile │ ├── app │ │ ├── app.py │ │ └── templates │ │ │ └── index.html │ ├── requirements.txt │ ├── waypoint.hcl │ └── wsgi.py ├── Flask-Basic-Waypoint-Gitlab │ ├── .gitlab-ci.yml │ ├── Dockerfile │ ├── Procfile │ ├── app │ │ ├── app.py │ │ └── templates │ │ │ └── index.html │ ├── requirements.txt │ ├── waypoint.hcl │ └── wsgi.py ├── Flask-Basic │ ├── app │ │ ├── app.py │ │ ├── templates │ │ │ └── index.html │ │ └── wsgi.py │ └── requirements.txt └── Flask-Todo-Bootstrap │ ├── .env.dev │ ├── .gitignore │ ├── docker-compose.yml │ └── web │ ├── Dockerfile │ ├── app │ ├── __init__.py │ ├── admin │ │ ├── __init__.py │ │ ├── forms.py │ │ └── routes.py │ ├── auth │ │ ├── __init__.py │ │ ├── forms.py │ │ └── routes.py │ ├── entrypoint.sh │ ├── home │ │ ├── __init__.py │ │ └── routes.py │ ├── models.py │ ├── static │ │ └── css │ │ │ └── style.css │ ├── templates │ │ ├── admin │ │ │ └── todo │ │ │ │ ├── todo.html │ │ │ │ └── todos.html │ │ ├── auth │ │ │ ├── login.html │ │ │ └── register.html │ │ ├── base.html │ │ ├── errors │ │ │ ├── 403.html │ │ │ ├── 404.html │ │ │ └── 500.html │ │ └── home │ │ │ ├── admin_dashboard.html │ │ │ ├── dashboard.html │ │ │ └── index.html │ └── todo │ │ ├── __init__.py │ │ └── routes.py │ ├── config.py │ ├── entrypoint.sh │ ├── migrations │ ├── README │ ├── alembic.ini │ ├── env.py │ ├── script.py.mako │ └── versions │ │ └── 4aaed8e460be_.py │ ├── requirements.txt │ └── run.py ├── IOSXE_ModelDrivenTelemetry ├── netconf │ ├── mdt_create_subscriptions_netconf_jinja2-variant.py │ ├── mdt_create_subscriptions_netconf_jinja2.py │ ├── mdt_create_subscriptions_netconf_xml.py │ ├── mdt_get_subscriptions_netconf.py │ ├── templates │ │ ├── netconf_mdt_jinja2-variant.j2.xml │ │ ├── netconf_mdt_jinja2.j2 │ │ └── netconf_mdt_xml.xml │ └── vars │ │ └── variables.yml ├── netmiko │ ├── mdt_create_subcriptions_netmiko.py │ ├── mdt_get_subcriptions_netmiko.py │ ├── templates │ │ └── netmiko.j2 │ └── vars │ │ └── variables.yml └── restconf │ ├── get_interfaces.py │ └── mdt_create_subscriptions_restconf.py ├── InfraAsCode └── Webserver │ ├── Amazon-CDK │ ├── .gitignore │ ├── README.md │ ├── amazon_cdk │ │ ├── __init__.py │ │ └── amazon_cdk_stack.py │ ├── app.py │ ├── cdk.context.json │ ├── cdk.json │ ├── requirements.txt │ ├── setup.py │ └── source.bat │ ├── AmazonCDK_existingVPC │ ├── .gitignore │ ├── README.md │ ├── amazon_cdk_existing_vpc │ │ ├── __init__.py │ │ └── amazon_cdk_existing_vpc_stack.py │ ├── app.py │ ├── cdk.context.json │ ├── cdk.json │ ├── requirements.txt │ ├── setup.py │ └── source.bat │ ├── AmazonCDK_newVPC │ ├── .gitignore │ ├── README.md │ ├── amazon_cdk_new_vpc │ │ ├── __init__.py │ │ └── amazon_cdk_new_vpc_stack.py │ ├── app.py │ ├── cdk.context.json │ ├── cdk.json │ ├── requirements.txt │ ├── setup.py │ └── source.bat │ ├── Pulumi_AWS_defaultVPC │ ├── .gitignore │ ├── Pulumi.yaml │ ├── __main__.py │ └── requirements.txt │ ├── Pulumi_AWS_existingVPC │ ├── .gitignore │ ├── Pulumi.yaml │ ├── __main__.py │ └── requirements.txt │ ├── Pulumi_AWS_newVPC │ ├── .gitignore │ ├── Pulumi.dev.yaml │ ├── Pulumi.yaml │ ├── __main__.py │ └── requirements.txt │ ├── Terraform │ ├── .terraform.lock.hcl │ ├── main.tf │ ├── modules │ │ └── ec2 │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ └── variables.tf │ ├── terraform.tfstate │ └── terraform.tfstate.backup │ └── TerraformCDK │ ├── .gitignore │ ├── Pipfile │ ├── Pipfile.lock │ ├── cdktf.json │ ├── help │ └── main.py ├── KVM_Kubernetes_Ansible └── Ansible │ ├── ansible.cfg │ ├── hosts │ ├── initial.yml │ ├── kube-dependencies.yml │ ├── master.yml │ └── workers.yml ├── Meraki_PythonRequests ├── getCameras.py ├── getOrganizationNetworks.py └── getSSIDs.py ├── Meraki_PythonSDK └── getOrganizations.py ├── Napalm_Introduction ├── change_config.j2 ├── change_config.py ├── change_config.yml ├── execute_commands.py ├── get_interfaces.py ├── start.py ├── validate.py └── validation.yml ├── Netconf_Python ├── capabilities.py ├── connect.py ├── edit_config_format.py ├── edit_config_jinja2.py ├── ios-xe-mgmt-latest.cisco.com.xml ├── netconf_filter_part1.py ├── netconf_filter_part2.py ├── running_config.py ├── running_config_toFile.py └── templates │ ├── interface.j2.xml │ └── interface.xml ├── Netmiko_Introduction ├── changes.txt ├── get_prompt.py ├── loopback │ ├── hosts.yml │ ├── loopback.j2 │ ├── loopback.py │ └── loopback.yml ├── netmiko_logging.py ├── set_description.py ├── set_description_textfile.py ├── show_interface_description.py ├── show_uptime.py ├── test.log └── textFSM.py ├── Netpalm_Introduction ├── get_configuration.py └── netpalm │ ├── .gitignore │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── Dockerfile │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── backend │ ├── core │ │ ├── confload │ │ │ ├── __init__.py │ │ │ └── confload.py │ │ ├── redis │ │ │ ├── __init__.py │ │ │ ├── rediz.py │ │ │ └── rediz_workers.py │ │ └── routes │ │ │ ├── __init__.py │ │ │ └── routes.py │ └── plugins │ │ ├── __init__.py │ │ ├── custom_scripts │ │ ├── __init__.py │ │ └── hello_world.py │ │ ├── getconfig │ │ ├── __init__.py │ │ └── exec_command.py │ │ ├── jinja2 │ │ ├── __init__.py │ │ └── j2.py │ │ ├── jinja2_templates │ │ ├── __init__.py │ │ ├── cisco_ios_add_ip_int.j2 │ │ ├── cisco_ios_create_vlans.j2 │ │ ├── cisco_ios_remove_ip_int.j2 │ │ ├── cisco_ios_remove_vlans.j2 │ │ ├── loopback.j2 │ │ ├── loopback_create.j2 │ │ ├── loopback_remove.j2 │ │ └── test.j2 │ │ ├── napalm │ │ ├── __init__.py │ │ └── napalm_drvr.py │ │ ├── ncclient │ │ ├── __init__.py │ │ └── ncclient_drvr.py │ │ ├── netmiko │ │ ├── __init__.py │ │ └── netmiko_drvr.py │ │ ├── ntc-templates │ │ ├── ntc-templates (WAUTERW-M-65P7's conflicted copy 2020-04-24) │ │ ├── restconf │ │ ├── __init__.py │ │ └── restconf.py │ │ ├── scriptrunner │ │ ├── __init__.py │ │ └── script.py │ │ ├── service │ │ ├── __init__.py │ │ └── service.py │ │ ├── service_templates │ │ ├── args.txt │ │ ├── boilerplate.j2 │ │ ├── ip_int_service.j2 │ │ ├── loopback.j2 │ │ ├── loopback_multiple.j2 │ │ └── vlan_service.j2 │ │ ├── setconfig │ │ ├── __init__.py │ │ └── exec_config.py │ │ └── textfsm │ │ ├── __init__.py │ │ └── template.py │ ├── config.json │ ├── docker-compose.yml │ ├── images │ ├── arch.png │ ├── netpalm.png │ ├── netpalm_concept.png │ ├── netpalm_eg_1.png │ ├── netpalm_eg_2.png │ ├── netpalm_eg_3.png │ ├── netpalm_eg_4.png │ ├── netpalm_ingest.gif │ └── netpalm_postman.png │ ├── netpalm.postman_collection.json │ ├── netpalm.py │ ├── requirements.txt │ └── tests │ ├── __init__.py │ ├── j2.py │ └── test.py ├── Nornir_Introduction ├── inventory │ ├── defaults.yml │ ├── groups.yml │ └── hosts.yml ├── nornir.log ├── nornir_config.yml ├── nornir_part1.py ├── nornir_part2.py ├── nornir_part3.py ├── nornir_part4.py └── test.py ├── Packer ├── DigitalOcean-Packer │ ├── .gitignore │ ├── digitalocean.pkr.hcl │ ├── scripts │ │ └── software_install.sh │ └── variables.pkr.hcl ├── Docker_Packer_HashicorpTools │ ├── docker-ubuntu.pkr.hcl │ ├── scripts │ │ ├── packer_install.sh │ │ └── terraform_install.sh │ └── variables.pkr.hcl ├── vSphere-Packer_20.04 │ ├── .gitignore │ ├── http │ │ ├── meta-data │ │ └── user-data │ ├── scripts │ │ ├── fix_vm_customization_bug.sh │ │ └── software_install.sh │ ├── ubuntu_20.04.pkr.hcl │ └── variables_20.04.pkr.hcl └── vSphere-Packer_22.04 │ ├── .gitignore │ ├── http │ ├── meta-data │ └── user-data │ ├── scripts │ ├── fix_vm_customization_bug.sh │ └── software_install.sh │ ├── ubuntu_22.04.pkr.hcl │ └── variables_22.04.pkr.hcl ├── Packer_Introduction ├── AWS │ ├── Simple │ │ └── aws.json │ └── WithProvisioner │ │ ├── aws.json │ │ ├── helloworld.sh │ │ └── helloworld.txt ├── DigitalOcean │ ├── do.json │ └── scripts │ │ └── nginx.sh └── vSphere │ ├── preseed.cfg │ ├── server.json │ └── variables.json ├── Paramiko_Introduction ├── ExecuteMultipleCommandsMultipleDevices.py ├── ExecuteMultipleCommandsMultipleDevicesIssue.py ├── ExecuteMultipleCommandsMultipleDevices_toFile.py ├── ExecuteSingleCommand.py ├── ExecuteSingleCommandMultipleDevices.py ├── GetDescription.py ├── SetDescription_modular.py └── connection.py ├── Parse_JSON_Python ├── parseCustomers.py ├── parseOrders.py └── sample.json ├── Parse_XML_Python ├── parseCustomers.py ├── parseOrders.py └── sample.xml ├── Parse_YAML_Python ├── parseYAML.py └── variables.yaml ├── Python_AMQP ├── receive.py └── send.py ├── Python_Coinbase_DCA ├── dca.py └── dcatest.py ├── Python_Coinmarketcap ├── .gitignore ├── coinmarket_top10.py └── coinmarket_top10_24hrPercentage.py ├── Python_Scraping_BeautifulSoup └── scrape.py ├── RestConf_Python ├── add_interfaces_cisco.py ├── change_interfaces_cisco.py ├── change_interfaces_ietf.py ├── delete_interfaces_cisco.py ├── delete_interfaces_ietf.py ├── get_interfaces_cisco.py ├── get_interfaces_ietf.py ├── get_static_routes_ietf.py └── update.py ├── SDWAN_PythonRequests ├── authenticate.py ├── bijhouden.txt ├── buildtemplate_TOFINNISH.py ├── change_password_user.py ├── create_user.py ├── get_alarms.py ├── get_auditlog.py ├── get_certificate_summary.py ├── get_certificates.py ├── get_controller_status.py ├── get_device_control_connections.py ├── get_devicecontrollers.py ├── get_stats.py ├── get_template_feature.py ├── get_templates.py ├── get_tunnel_statistics.py └── get_vEdges.py ├── Scrapli Introduction ├── example1.py ├── example2.py ├── example3.py └── response.py ├── Terraform ├── DigitalOcean-K8S │ ├── config │ ├── create_k8s.tf │ ├── variables.tf │ └── versions.tf ├── DigitalOcean-SingleDroplet │ ├── create_server.tf │ └── variables.tf ├── DigitalOcean-Terraform-LoadbalancerSetup │ ├── main.tf │ ├── provider.tf │ ├── scripts │ │ └── software_install.sh │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── DigitalOcean-Terraform-MultipleServers-Modules-Improved-Alternative │ ├── main.tf │ ├── modules │ │ ├── project │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ ├── record │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ └── server │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── scripts │ │ │ └── software_install.sh │ │ │ ├── variables.tf │ │ │ └── versions.tf │ ├── outputs.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── DigitalOcean-Terraform-MultipleServers-Modules-Improved │ ├── main.tf │ ├── modules │ │ ├── project │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ ├── record │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ └── server │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── scripts │ │ │ └── software_install.sh │ │ │ ├── variables.tf │ │ │ └── versions.tf │ ├── outputs.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── DigitalOcean-Terraform-MultipleServers │ ├── main.tf │ ├── provider.tf │ ├── scripts │ │ └── software_install.sh │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── DigitalOcean-Terraform-SingleServer-Modules-Improved │ ├── main.tf │ ├── modules │ │ ├── project │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ ├── record │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ │ └── server │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── scripts │ │ │ └── software_install.sh │ │ │ ├── variables.tf │ │ │ └── versions.tf │ ├── outputs.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── DigitalOcean-Terraform-SingleServer-Modules │ ├── main.tf │ ├── modules │ │ └── server │ │ │ ├── main.tf │ │ │ ├── outputs.tf │ │ │ ├── scripts │ │ │ └── software_install.sh │ │ │ ├── variables.tf │ │ │ └── versions.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── DigitalOcean-Terraform-SingleServer │ ├── main.tf │ ├── provider.tf │ ├── scripts │ │ └── software_install.sh │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── Import │ ├── ec2.tf │ └── variables.tf ├── MSO │ ├── .terraform.tfstate.lock.info │ ├── create_tenant_schema_2ap_1epg_ctr.tf │ ├── provider.tf │ └── variables.tf ├── Terraform_Python_Jinja2 │ ├── main.py │ ├── requirements.txt │ ├── templates │ │ └── terraform.j2 │ └── variables.yml ├── Terraform_vSphere_21.10 │ ├── main.tf │ ├── modules │ │ └── ubuntu-server │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── variables.tf │ │ │ └── versions.tf │ ├── output.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── Terraform_vSphere_21.10_install_software │ ├── main.tf │ ├── modules │ │ └── ubuntu-server │ │ │ ├── main.tf │ │ │ ├── output.tf │ │ │ ├── scripts │ │ │ ├── 01_create_user.sh │ │ │ ├── 02_install_nginx.sh │ │ │ ├── 03_install_docker.sh │ │ │ └── 04_docker_playbook.yaml │ │ │ ├── variables.tf │ │ │ └── versions.tf │ ├── output.tf │ ├── ssh_keys │ │ └── ed25519_git.pub │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf └── UseCases_Terraform │ ├── UseCase1 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase10 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase11 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase12 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase13 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase2 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase3 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase4 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase5 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase6-list_of_objects │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase6 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase7 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase8-overlap │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ ├── UseCase8 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf │ └── UseCase9 │ ├── main.tf │ ├── provider.tf │ ├── terraform.tfvars │ ├── variables.tf │ └── versions.tf ├── WebexTeams_Chatbots ├── botkit_deckofcards │ ├── .gitignore │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── assets │ │ └── images │ │ │ └── heroku_config-variables.png │ ├── bot.js │ ├── features │ │ ├── about.js │ │ ├── coffee.js │ │ ├── deckofcards.js │ │ ├── deckofcards_function.js │ │ ├── favorite.js │ │ ├── favorite_restricted.js │ │ ├── hello.js │ │ ├── help.js │ │ ├── loop.js │ │ ├── math_quiz.js │ │ ├── restricted.js │ │ ├── sample_echo.js │ │ ├── sample_hears.js │ │ ├── source.js │ │ ├── storage.js │ │ ├── threads.js │ │ ├── webex_cards.js │ │ ├── webex_features.js │ │ ├── welcome.js │ │ └── z-fallback.js │ ├── package-lock.json │ ├── package.json │ └── www │ │ ├── monitor.png │ │ └── stats.png └── python_deckofcards │ ├── aci_bot │ ├── Procfile │ ├── aci.py │ ├── chatbot.py │ ├── messenger.py │ ├── requirements.txt │ ├── templates │ │ ├── login.j2.json │ │ └── tenant.j2.json │ ├── test.json │ └── test.yaml │ ├── deckofcards_bot │ ├── Procfile │ ├── chatbot.py │ ├── messenger.py │ └── requirements.txt │ └── webexteamsbot_aci │ ├── Procfile │ ├── aci.py │ ├── chatbot.py │ ├── messenger.py │ ├── requirements.txt │ ├── templates │ ├── login.j2.json │ └── tenant.j2.json │ ├── test.json │ └── test.yaml ├── Webex_Chatbot_Messages ├── Part1 │ ├── webex_create.py │ ├── webex_delete_messages.py │ └── webex_markdown.py ├── Part2 │ ├── authenticate.py │ ├── get_devicelist.py │ └── webexteams.py ├── Part3 │ ├── Procfile │ ├── app.py │ └── requirements.txt └── Part4 │ ├── authenticate.py │ ├── get_devicelist.py │ └── webexteams.py ├── vSphere_Kubernetes_Ansible ├── Ansible │ ├── ansible.cfg │ ├── hosts │ ├── initial.yml │ ├── kube-dependencies.yml │ ├── master.yml │ └── workers.yml └── Terraform │ ├── main.tf │ └── variables.tf └── vSphere_Terraform ├── main.tf └── variables.tf /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.pyo 3 | __pycache__/ 4 | venv/ 5 | .DS_Store 6 | .vscode 7 | .terraform 8 | -------------------------------------------------------------------------------- /ACI_Ansible/Complex/hosts_aci.yml: -------------------------------------------------------------------------------- 1 | [apic] 2 | 10.48.108.214 3 | 4 | [apic:vars] 5 | ansible_connection = local 6 | ansible_python_interpreter = /usr/bin/python3 7 | username = admin 8 | password = --- -------------------------------------------------------------------------------- /ACI_Ansible/MSO/hosts.yml: -------------------------------------------------------------------------------- 1 | [mso] 2 | 10.48.109.10 3 | 4 | [mso:vars] 5 | username=admin 6 | password=Cisco123456! 7 | ansible_python_interpreter=/usr/bin/python3 8 | 9 | -------------------------------------------------------------------------------- /ACI_Ansible/Simple/hosts_aci.yml: -------------------------------------------------------------------------------- 1 | [apic] 2 | 10.48.108.214 3 | 4 | [apic:vars] 5 | ansible_connection = local 6 | ansible_python_interpreter = /usr/bin/python3 7 | username = admin 8 | password = --- 9 | -------------------------------------------------------------------------------- /ACI_Ansible/Simple/vars/variables_aci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | tenant: "Tenant_Ansible" 3 | vrf: "VRF_Ansible" 4 | bridge_domains: 5 | - bd: "BD_Ansible" 6 | gateway: "10.16.100.1" 7 | mask: "24" 8 | scope: "shared" 9 | ap: "AP_Ansible" 10 | epgs: 11 | - epg: "EPG_Ansible" 12 | bd: "BD_Ansible" 13 | 14 | 15 | -------------------------------------------------------------------------------- /ACI_Ansible/Vault/.gitignore: -------------------------------------------------------------------------------- 1 | .vault_pass 2 | -------------------------------------------------------------------------------- /ACI_Ansible/Vault/hosts_aci.yml: -------------------------------------------------------------------------------- 1 | [apic] 2 | sandboxapicdc.cisco.com 3 | 4 | [apic:vars] 5 | ansible_connection = local 6 | ansible_python_interpreter = /usr/bin/python3 7 | username = admin 8 | password = ciscopsdt 9 | -------------------------------------------------------------------------------- /ACI_Python_ACITookit/.gitignore: -------------------------------------------------------------------------------- 1 | acitoolkit/ 2 | venv/ -------------------------------------------------------------------------------- /ACI_Python_ACITookit/Simple/variables.yml: -------------------------------------------------------------------------------- 1 | --- 2 | tenant: "Tenant_Blog" 3 | vrf: "VRF_Blog" 4 | bridge_domains: 5 | - bd: "BD_Blog" 6 | gateway: "10.16.100.1" 7 | mask: "24" 8 | scope: "shared" 9 | l3_out: "labinfra-l3out-ro" -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/add_ap.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvAp": 3 | { 4 | "attributes":{ 5 | "dn":"uni/tn-{{tenant_name}}/ap-{{ap_name}}", 6 | "name":"{{ap_name}}", 7 | "rn":"ap-{{ap_name}}", 8 | "status":"created" 9 | }, 10 | "children":[] 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/add_epg.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvAEPg": 3 | { 4 | "attributes":{ 5 | "dn":"uni/tn-{{tenant_name}}/ap-{{ap_name}}/epg-{{epg_name}}", 6 | "name":"{{epg_name}}", 7 | "rn":"epg-{{epg_name}}", 8 | "status":"created" 9 | }, 10 | "children":[ 11 | { 12 | "fvRsBd": 13 | { 14 | "attributes": 15 | { 16 | "tnFvBDName":"{{bd_name}}", 17 | "status":"created,modified" 18 | }, 19 | "children":[] 20 | } 21 | } 22 | ] 23 | } 24 | } -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/add_tenant.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvTenant": { 3 | "attributes": { 4 | "dn": "uni/tn-{{name}}", 5 | "name": "{{name}}", 6 | "descr": "{{description}}", 7 | "rn": "tn-{{name}}", 8 | "status": "created" 9 | }, 10 | "children": [] 11 | } 12 | } -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/add_vrf.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvTenant": { 3 | "attributes": { "name": "{{tenant_name}}" }, 4 | "children": [ 5 | { 6 | "fvCtx": { 7 | "attributes": { "name": "{{vrf_name}}", "pcEnfPref": "enforced" }, 8 | "children": [] 9 | } 10 | } 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/assign_contract_cons.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvRsCons": 3 | { 4 | "attributes": 5 | { 6 | "tnVzBrCPName":"{{contract_name}}", 7 | "status":"created,modified" 8 | }, 9 | "children":[] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/assign_contract_prov.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvRsProv": 3 | { 4 | "attributes": 5 | { 6 | "tnVzBrCPName":"{{contract_name}}", 7 | "status":"created,modified" 8 | }, 9 | "children":[] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/delete_tenant.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvTenant": { 3 | "attributes": { 4 | "dn": "uni/tn-{{name}}", 5 | "name": "{{name}}", 6 | "rn": "tn-{{name}}", 7 | "status": "deleted" 8 | }, 9 | "children": [] 10 | } 11 | } -------------------------------------------------------------------------------- /ACI_Python_Requests/Complex/templates/login.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "aaaUser": { 3 | "attributes": { 4 | "name": "{{ username }}", 5 | "pwd": "{{ password }}" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/example.py: -------------------------------------------------------------------------------- 1 | from jinja2 import Template 2 | template = Template("Hello {{ something }}!") 3 | print(template.render(something="World")) -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/loopbacks/normal/loopback.py: -------------------------------------------------------------------------------- 1 | import yaml 2 | from jinja2 import Environment, FileSystemLoader 3 | 4 | loopbacks = yaml.load(open('loopback.yml'), Loader=yaml.SafeLoader) 5 | 6 | env = Environment(loader = FileSystemLoader('../../templates'), trim_blocks=True, lstrip_blocks=True) 7 | template = env.get_template('loopback.j2') 8 | loopback_config = template.render(loopbacks) 9 | 10 | print(loopback_config) -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/loopbacks/normal/loopback.yml: -------------------------------------------------------------------------------- 1 | interfaces: 2 | Loopback2000: 3 | description: Description for Loopback 2000 4 | ipv4_addr: 200.200.200.200 5 | ipv4_mask: 255.255.255.255 6 | Loopback2001: 7 | description: Description for Loopback 2001 8 | ipv4_addr: 200.200.200.201 9 | ipv4_mask: 255.255.255.255 -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/loopbacks/variant/loopback_variant.py: -------------------------------------------------------------------------------- 1 | import yaml 2 | from jinja2 import Environment, FileSystemLoader 3 | 4 | interfaces = yaml.load(open('loopback_variant.yml'), Loader=yaml.SafeLoader) 5 | 6 | env = Environment(loader = FileSystemLoader('../../templates'), trim_blocks=True, lstrip_blocks=True) 7 | template = env.get_template('loopback_variant.j2') 8 | loopback_config = template.render(data=interfaces) 9 | 10 | print(loopback_config) -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/loopbacks/variant/loopback_variant.yml: -------------------------------------------------------------------------------- 1 | interfaces: 2 | - name: Loopback2001 3 | description: Description for Loopback 2000 4 | ipv4_addr: 200.200.200.200 5 | ipv4_mask: 255.255.255.255 6 | - name: Loopback2002 7 | description: Description for Loopback 2001 8 | ipv4_addr: 200.200.200.201 9 | ipv4_mask: 255.255.255.255 -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/templates/login.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "aaaUser": { 3 | "attributes": { 4 | "name": "{{ username }}", 5 | "pwd": "{{ password }}" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/templates/loopback.j2: -------------------------------------------------------------------------------- 1 | interface Loopback2000 2 | description {{interfaces.Loopback2000.description}} 3 | ip address {{interfaces.Loopback2000.ipv4_addr}} {{interfaces.Loopback2000.ipv4_mask}} 4 | ! 5 | interface Loopback2001 6 | description {{interfaces.Loopback2001.description}} 7 | ip address {{interfaces.Loopback2001.ipv4_addr}} {{interfaces.Loopback2001.ipv4_mask}} 8 | end -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/templates/loopback_variant.j2: -------------------------------------------------------------------------------- 1 | {%- for interface in data.interfaces %} 2 | interface {{interface.name}} 3 | description {{interface.description}} 4 | ip address {{interface.ipv4_addr}} {{interface.ipv4_mask}} 5 | {%- endfor %} -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/templates/tenant.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "fvTenant": { 3 | "attributes": { 4 | "dn": "uni/tn-{{name}}", 5 | "name": "{{name}}", 6 | "rn": "tn-{{name}}", 7 | "status": "created" 8 | }, 9 | "children": [] 10 | } 11 | } -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/templates/vlans.j2: -------------------------------------------------------------------------------- 1 | {%- for vlan_id, vlan_name in vlans.items() %} 2 | vlan {{ vlan_id }} 3 | name {{ vlan_name }} 4 | {%- endfor %} 5 | -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/vlans/vlan.py: -------------------------------------------------------------------------------- 1 | import jinja2 2 | 3 | template_vars = { 4 | "vlan_id": 620, 5 | "vlan_name": "vlan-620" 6 | } 7 | 8 | vlan_template = """ 9 | vlan {{ vlan_id }} 10 | name {{ vlan_name }} 11 | """ 12 | 13 | template = jinja2.Template(vlan_template) 14 | print(template.render(template_vars)) -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/vlans/vlans.yml: -------------------------------------------------------------------------------- 1 | 620: VLAN-620 2 | 621: VLAN-621 3 | 622: VLAN-622 4 | 623: VLAN-623 5 | -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/vlans/vlans_file.py: -------------------------------------------------------------------------------- 1 | from jinja2 import Environment 2 | from jinja2 import FileSystemLoader 3 | 4 | my_template = Environment(loader=FileSystemLoader('../templates')) 5 | 6 | vlans = { 7 | "620": "VLAN-620", 8 | "621": "VLAN-621", 9 | "622": "VLAN-622", 10 | "623": "VLAN-623", 11 | } 12 | 13 | template = my_template.get_template("vlans.j2") 14 | result = template.render(vlans=vlans) 15 | print(result) 16 | 17 | -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/vlans/vlans_file_yml_file.py: -------------------------------------------------------------------------------- 1 | from jinja2 import Environment 2 | from jinja2 import FileSystemLoader 3 | import yaml 4 | 5 | my_template = Environment(loader=FileSystemLoader('../templates')) 6 | 7 | vlans = yaml.load(open('vlans.yml'), Loader=yaml.SafeLoader) 8 | 9 | print(type(vlans)) 10 | template = my_template.get_template("vlans.j2") 11 | result = template.render(vlans=vlans) 12 | print(result) 13 | 14 | -------------------------------------------------------------------------------- /ACI_Python_Requests_Jinja/vlans/vlans_multiple.py: -------------------------------------------------------------------------------- 1 | import jinja2 2 | 3 | vlans = { 4 | "620": "VLAN-620", 5 | "621": "VLAN-621", 6 | "622": "VLAN-622", 7 | "633": "VLAN-623", 8 | } 9 | 10 | template_vars = { 11 | "vlans": vlans 12 | } 13 | 14 | 15 | vlan_template = """ 16 | {% for vlan_id, vlan_name in vlans.items() %} 17 | vlan {{ vlan_id }} 18 | name {{ vlan_name }} 19 | {% endfor %} 20 | """ 21 | 22 | template = jinja2.Template(vlan_template) 23 | print(template.render(template_vars)) -------------------------------------------------------------------------------- /ACI_Terraform/Complex/credentials.tf: -------------------------------------------------------------------------------- 1 | variable "aci_user" { 2 | default = "admin" 3 | } 4 | 5 | variable "aci_password" { 6 | default = "---" 7 | } 8 | 9 | variable "apic_ip" { 10 | default = "https://sandboxapicdc.cisco.com" 11 | } -------------------------------------------------------------------------------- /ACI_Terraform/Simple/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "Tenant_TF_Demo" { 2 | name = var.aci_tenant 3 | description = "Tenant created by TF" 4 | } 5 | 6 | resource "aci_vrf" "VRF_TF_Demo" { 7 | tenant_dn = aci_tenant.Tenant_TF_Demo.id 8 | name = var.aci_vrf 9 | } 10 | 11 | resource "aci_bridge_domain" "BD_TF_Demo" { 12 | tenant_dn = aci_tenant.Tenant_TF_Demo.id 13 | name = var.aci_bd 14 | description = "BD created by TF" 15 | relation_fv_rs_ctx = aci_vrf.VRF_TF_Demo.name 16 | } -------------------------------------------------------------------------------- /ACI_Terraform/Simple/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aci" { 2 | username = "admin" 3 | password = "---" 4 | url = "https://10.48.109.10" 5 | insecure = true 6 | } -------------------------------------------------------------------------------- /ACI_Terraform/Simple/terraform.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "s3" { 3 | bucket = "be.wymedia.terraform" 4 | key = "terraform/state" 5 | region = "eu-west-1" 6 | } 7 | } -------------------------------------------------------------------------------- /ACI_Terraform/Simple/variables.tf: -------------------------------------------------------------------------------- 1 | variable "aci_tenant" { 2 | default = "Tenant_Terraform_Demo" 3 | } 4 | 5 | variable "aci_vrf" { 6 | default = "VRF_Terraform_Demo" 7 | } 8 | 9 | variable "aci_bd" { 10 | default = "BD_Terraform_Demo" 11 | } -------------------------------------------------------------------------------- /ACI_Terraform_Gitlab/.gitignore: -------------------------------------------------------------------------------- 1 | .terraform 2 | .tfstate 3 | -------------------------------------------------------------------------------- /ACI_Terraform_Gitlab/terraform.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "s3" { 3 | bucket = "be.wymedia.terraform" 4 | key = "terraform/state" 5 | region = "eu-west-1" 6 | } 7 | } -------------------------------------------------------------------------------- /ACI_Terraform_Gitlab/variables_aci.tf: -------------------------------------------------------------------------------- 1 | variable "apic_server" { 2 | default = "https://10.16.2.1" 3 | } 4 | 5 | variable "apic_username" { 6 | default = "admin" 7 | } 8 | 9 | variable "apic_password" { 10 | default = "---" 11 | } 12 | 13 | variable "aci_tenant" { 14 | default = "Tenant_Terraform_Demo" 15 | } 16 | 17 | variable "aci_vrf" { 18 | default = "VRF_Terraform_Demo" 19 | } 20 | 21 | variable "aci_bd" { 22 | default = "BD_Terraform_Demo" 23 | } 24 | 25 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part1/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part2/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part2/terraform.tfvars: -------------------------------------------------------------------------------- 1 | aci_tenant_1_name="tenant-1" 2 | aci_tenant_2_name="tenant-2" 3 | application_profile_1_name = "applicationprofile-1" 4 | application_profile_2_name = "applicationprofile-2" 5 | vrf_1_name = "vrf-1" 6 | vrf_2_name = "vrf-2" 7 | bd_1_name = "bd-1" 8 | bd_2_name = "bd-2" -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_ap/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_application_profile" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.ap_name 4 | } 5 | 6 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_ap/output.tf: -------------------------------------------------------------------------------- 1 | output "applicationprofile" { 2 | value = aci_application_profile.this 3 | } 4 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_ap/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_ap/variables.tf: -------------------------------------------------------------------------------- 1 | variable "ap_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant" { 6 | type = any 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_bd/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_bridge_domain" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.bd_name 4 | relation_fv_rs_ctx = var.vrf.id 5 | } 6 | 7 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_bd/output.tf: -------------------------------------------------------------------------------- 1 | output "bridge_domain" { 2 | value = aci_bridge_domain.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_bd/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_bd/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant" { 2 | type = any 3 | } 4 | 5 | variable "vrf" { 6 | type = any 7 | } 8 | 9 | variable "bd_name" { 10 | type = string 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_tenant/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | } 4 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_tenant/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } 4 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_tenant/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_tenant/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_vrf/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_vrf" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.vrf_name 4 | } 5 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_vrf/output.tf: -------------------------------------------------------------------------------- 1 | output "vrf" { 2 | value = aci_vrf.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_vrf/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/modules/aci_vrf/variables.tf: -------------------------------------------------------------------------------- 1 | variable "vrf_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant" { 6 | type = any 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part3/terraform.tfvars: -------------------------------------------------------------------------------- 1 | aci_tenant_1_name="tenant-1" 2 | aci_tenant_2_name="tenant-2" 3 | application_profile_1_name = "applicationprofile-1" 4 | application_profile_2_name = "applicationprofile-2" 5 | vrf_1_name = "vrf-1" 6 | vrf_2_name = "vrf-2" 7 | bd_1_name = "bd-1" 8 | bd_2_name = "bd-2" -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_ap/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_application_profile" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.ap_name 4 | } 5 | 6 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_ap/output.tf: -------------------------------------------------------------------------------- 1 | output "applicationprofile" { 2 | value = aci_application_profile.this 3 | } 4 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_ap/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_ap/variables.tf: -------------------------------------------------------------------------------- 1 | variable "ap_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant" { 6 | type = any 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_bd/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_bridge_domain" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.bd_name 4 | relation_fv_rs_ctx = var.vrf.id 5 | } 6 | 7 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_bd/output.tf: -------------------------------------------------------------------------------- 1 | output "bridge_domain" { 2 | value = aci_bridge_domain.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_bd/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_bd/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant" { 2 | type = any 3 | } 4 | 5 | variable "vrf" { 6 | type = any 7 | } 8 | 9 | variable "bd_name" { 10 | type = string 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_tenant/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | description = var.tenant_description 4 | } 5 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_tenant/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } 4 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_tenant/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_tenant/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant_description" { 6 | type = string 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_vrf/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_vrf" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.vrf_name 4 | } 5 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_vrf/output.tf: -------------------------------------------------------------------------------- 1 | output "vrf" { 2 | value = aci_vrf.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_vrf/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/modules/aci_vrf/variables.tf: -------------------------------------------------------------------------------- 1 | variable "vrf_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant" { 6 | type = any 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/terraform.tfvars: -------------------------------------------------------------------------------- 1 | tenants = { 2 | "tenant1_name" = "Tenant-1", 3 | "tenant1_description" = "Description for Tenant 1", 4 | "tenant2_name" = "Tenant-2", 5 | "tenant2_description" = "Description for Tenant 2", 6 | } 7 | 8 | aps = { 9 | "application_profile_1_name" = "ap-1", 10 | "application_profile_2_name" = "ap-2" 11 | } 12 | 13 | 14 | vrfs = { 15 | "vrf_1_name" = "vrf-1", 16 | "vrf_2_name" = "vrf-2" 17 | } 18 | 19 | bds = { 20 | "bd_1_name" = "bd-1", 21 | "bd_2_name" = "bd-2" 22 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part4/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenants" { 2 | type = map 3 | } 4 | 5 | variable "aps" { 6 | type = map 7 | } 8 | 9 | variable "vrfs" { 10 | type = map 11 | } 12 | 13 | variable "bds" { 14 | type = map 15 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_ap/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_application_profile" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.ap_name 4 | } 5 | 6 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_ap/output.tf: -------------------------------------------------------------------------------- 1 | output "applicationprofile" { 2 | value = aci_application_profile.this 3 | } 4 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_ap/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_ap/variables.tf: -------------------------------------------------------------------------------- 1 | variable "ap_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant" { 6 | type = any 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_bd/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_bridge_domain" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.bd_name 4 | relation_fv_rs_ctx = var.vrf.id 5 | } 6 | 7 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_bd/output.tf: -------------------------------------------------------------------------------- 1 | output "bridge_domain" { 2 | value = aci_bridge_domain.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_bd/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_bd/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant" { 2 | type = any 3 | } 4 | 5 | variable "vrf" { 6 | type = any 7 | } 8 | 9 | variable "bd_name" { 10 | type = string 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | description = var.tenant_description 4 | } 5 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } 4 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant_description" { 6 | type = string 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant_vrf_ap/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | description = var.tenant_description 4 | } 5 | 6 | resource "aci_vrf" "this" { 7 | tenant_dn = aci_tenant.this.id 8 | name = var.vrf_name 9 | } 10 | 11 | resource "aci_application_profile" "this" { 12 | tenant_dn = aci_tenant.this.id 13 | name = var.ap_name 14 | } 15 | 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant_vrf_ap/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } 4 | 5 | output "applicationprofile" { 6 | value = aci_application_profile.this 7 | } 8 | 9 | output "vrf" { 10 | value = aci_vrf.this 11 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant_vrf_ap/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_tenant_vrf_ap/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant_description" { 6 | type = string 7 | } 8 | 9 | variable "ap_name" { 10 | type = string 11 | } 12 | 13 | variable "vrf_name" { 14 | type = string 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_vrf/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_vrf" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.vrf_name 4 | } 5 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_vrf/output.tf: -------------------------------------------------------------------------------- 1 | output "vrf" { 2 | value = aci_vrf.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_vrf/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/modules/aci_vrf/variables.tf: -------------------------------------------------------------------------------- 1 | variable "vrf_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant" { 6 | type = any 7 | } 8 | 9 | 10 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/output.tf: -------------------------------------------------------------------------------- 1 | output "tenants" { 2 | value = { for p in sort(keys(var.tenants)) : p => module.tenant[p].tenant.name } 3 | } 4 | 5 | output "vrfs" { 6 | value = { for p in sort(keys(var.tenants)) : p => module.vrf[p].vrf.name } 7 | } 8 | 9 | output "aps" { 10 | value = { for p in sort(keys(var.tenants)) : p => module.app[p].applicationprofile.name } 11 | } 12 | 13 | output "bds" { 14 | value = { for p in sort(keys(var.tenants)) : p => module.bd[p].bridge_domain.name } 15 | } 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part5/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenants" { 2 | type = map 3 | } 4 | 5 | variable "vrfs" { 6 | type = map 7 | } 8 | 9 | variable "aps" { 10 | type = map 11 | } 12 | 13 | variable "bds" { 14 | type = map 15 | } 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_bd/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_bridge_domain" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.bd_name 4 | relation_fv_rs_ctx = var.vrf.id 5 | } 6 | 7 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_bd/output.tf: -------------------------------------------------------------------------------- 1 | output "bridge_domain" { 2 | value = aci_bridge_domain.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_bd/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_bd/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant" { 2 | type = any 3 | } 4 | 5 | variable "vrf" { 6 | type = any 7 | } 8 | 9 | variable "bd_name" { 10 | type = string 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | description = var.tenant_description 4 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant_description" { 6 | type = string 7 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant_vrf_ap/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | description = var.tenant_description 4 | } 5 | 6 | resource "aci_vrf" "this" { 7 | tenant_dn = aci_tenant.this.id 8 | name = var.vrf_name 9 | } 10 | 11 | resource "aci_application_profile" "this" { 12 | tenant_dn = aci_tenant.this.id 13 | name = var.ap_name 14 | } 15 | 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant_vrf_ap/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } 4 | 5 | output "applicationprofile" { 6 | value = aci_application_profile.this 7 | } 8 | 9 | output "vrf" { 10 | value = aci_vrf.this 11 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant_vrf_ap/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/modules/aci_tenant_vrf_ap/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant_description" { 6 | type = string 7 | } 8 | 9 | variable "ap_name" { 10 | type = string 11 | } 12 | 13 | variable "vrf_name" { 14 | type = string 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/output.tf: -------------------------------------------------------------------------------- 1 | output "tenants" { 2 | value = { for p in sort(keys(var.tenants)) : p => module.tenantvrfap[p].tenant.name } 3 | } 4 | 5 | output "vrfs" { 6 | value = { for p in sort(keys(var.tenants)) : p => module.tenantvrfap[p].vrf.name } 7 | } 8 | 9 | output "aps" { 10 | value = { for p in sort(keys(var.tenants)) : p => module.tenantvrfap[p].applicationprofile.name } 11 | } 12 | 13 | output "bds" { 14 | value = { for p in sort(keys(var.tenants)) : p => module.bd[p].bridge_domain.name } 15 | } 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part6/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenants" { 2 | type = map 3 | } 4 | 5 | variable "vrfs" { 6 | type = map 7 | } 8 | 9 | variable "aps" { 10 | type = map 11 | } 12 | 13 | variable "bds" { 14 | type = map 15 | } 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_bd/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_bridge_domain" "this" { 2 | tenant_dn = var.tenant.id 3 | name = var.bd_name 4 | relation_fv_rs_ctx = var.vrf.id 5 | } 6 | 7 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_bd/output.tf: -------------------------------------------------------------------------------- 1 | output "bridge_domain" { 2 | value = aci_bridge_domain.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_bd/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_bd/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant" { 2 | type = any 3 | } 4 | 5 | variable "vrf" { 6 | type = any 7 | } 8 | 9 | variable "bd_name" { 10 | type = string 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_tenant_vrf_ap/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | description = var.tenant_description 4 | } 5 | 6 | resource "aci_vrf" "this" { 7 | tenant_dn = aci_tenant.this.id 8 | name = var.vrf_name 9 | } 10 | 11 | resource "aci_application_profile" "this" { 12 | tenant_dn = aci_tenant.this.id 13 | name = var.ap_name 14 | } 15 | 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_tenant_vrf_ap/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } 4 | 5 | output "applicationprofile" { 6 | value = aci_application_profile.this 7 | } 8 | 9 | output "vrf" { 10 | value = aci_vrf.this 11 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_tenant_vrf_ap/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/modules/aci_tenant_vrf_ap/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant_description" { 6 | type = string 7 | } 8 | 9 | variable "ap_name" { 10 | type = string 11 | } 12 | 13 | variable "vrf_name" { 14 | type = string 15 | } 16 | 17 | 18 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/output.tf: -------------------------------------------------------------------------------- 1 | output "tenants" { 2 | value = { for p in sort(keys(var.tenants)) : p => module.tenantvrfap[p].tenant.name } 3 | } 4 | 5 | output "vrfs" { 6 | value = { for p in sort(keys(var.tenants)) : p => module.tenantvrfap[p].vrf.name } 7 | } 8 | 9 | output "aps" { 10 | value = { for p in sort(keys(var.tenants)) : p => module.tenantvrfap[p].applicationprofile.name } 11 | } 12 | 13 | output "bds" { 14 | value = { for p in sort(keys(var.tenants)) : p => module.bd[p].bridge_domain.name } 15 | } 16 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part7/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenants" { 2 | type = map(object({ 3 | tenant_name = string 4 | tenant_description = string 5 | })) 6 | } 7 | 8 | variable "vrfs" { 9 | type = map(object({ 10 | vrf_name = string 11 | })) 12 | } 13 | 14 | variable "aps" { 15 | type = map(object({ 16 | ap_name = string 17 | })) 18 | } 19 | 20 | variable "bds" { 21 | type = map(object({ 22 | bd_name = string 23 | })) 24 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_bd/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_bridge_domain" "this" { 2 | for_each = var.bds 3 | 4 | tenant_dn = var.tenant.id 5 | name = var.bds[each.key].bd_name 6 | 7 | //relation_fv_rs_ctx = var.bds[each.key].vrf 8 | } 9 | 10 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_bd/output.tf: -------------------------------------------------------------------------------- 1 | output "bridge_domain" { 2 | value = aci_bridge_domain.this 3 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_bd/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_bd/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant" { 2 | type = any 3 | } 4 | 5 | // variable "vrf" { 6 | // type = any 7 | // } 8 | 9 | variable "bds" { 10 | type = any 11 | } 12 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_tenant_vrf_ap/main.tf: -------------------------------------------------------------------------------- 1 | resource "aci_tenant" "this" { 2 | name = var.tenant_name 3 | description = var.tenant_description 4 | } 5 | 6 | resource "aci_vrf" "this" { 7 | for_each = var.vrfs 8 | 9 | tenant_dn = aci_tenant.this.id 10 | name = var.vrfs[each.key].vrf_name 11 | } 12 | 13 | resource "aci_application_profile" "this" { 14 | for_each = var.aps 15 | 16 | tenant_dn = aci_tenant.this.id 17 | name = var.aps[each.key].ap_name 18 | } 19 | 20 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_tenant_vrf_ap/output.tf: -------------------------------------------------------------------------------- 1 | output "tenant" { 2 | value = aci_tenant.this 3 | } 4 | 5 | // output "applicationprofile" { 6 | // value = aci_application_profile.this 7 | // } 8 | 9 | output "vrf" { 10 | value = aci_vrf.this 11 | } -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_tenant_vrf_ap/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/modules/aci_tenant_vrf_ap/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenant_name" { 2 | type = string 3 | } 4 | 5 | variable "tenant_description" { 6 | type = string 7 | } 8 | 9 | variable "aps" { 10 | type = any 11 | } 12 | 13 | variable "vrfs" { 14 | type = any 15 | } 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/provider.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | aci = { 4 | source = "CiscoDevNet/aci" 5 | } 6 | } 7 | } 8 | 9 | provider "aci" { 10 | username = "apic:amslab\\\\wauterw" 11 | password = "***" 12 | url = "***" 13 | insecure = true 14 | } 15 | -------------------------------------------------------------------------------- /ACI_Terraform_sequel/part8/variables.tf: -------------------------------------------------------------------------------- 1 | variable "tenants" { 2 | type = map(object({ 3 | tenant_name = string 4 | tenant_description = string 5 | })) 6 | } 7 | 8 | variable "vrfs" { 9 | type = map(map(object({ 10 | vrf_name = string 11 | }))) 12 | } 13 | 14 | variable "aps" { 15 | type = map(map(object({ 16 | ap_name = string 17 | }))) 18 | } 19 | 20 | variable "bds" { 21 | type = map(map(object({ 22 | bd_name = string 23 | vrf = string 24 | }))) 25 | } 26 | -------------------------------------------------------------------------------- /AWS_Kubernetes_Ansible/Ansible/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking = False 3 | -------------------------------------------------------------------------------- /AWS_Kubernetes_Ansible/Ansible/hosts: -------------------------------------------------------------------------------- 1 | #hosts 2 | [masters] 3 | master ansible_host=18.203.68.253 ansible_user=ubuntu 4 | 5 | [workers] 6 | worker1 ansible_host=3.249.4.142 ansible_user=ubuntu 7 | worker2 ansible_host=3.249.141.242 ansible_user=ubuntu 8 | 9 | [all:vars] 10 | ansible_python_interpreter=/usr/bin/python3 11 | ansible_ssh_private_key_file=~/.ssh/AWS-Cisco.pem -------------------------------------------------------------------------------- /AWS_Kubernetes_Ansible/Terraform/main.tf: -------------------------------------------------------------------------------- 1 | resource "aws_instance" "Server" { 2 | ami = var.ec2_image 3 | instance_type = var.ec2_instance_type 4 | key_name = var.ec2_keypair 5 | count = var.ec2_count 6 | tags = { 7 | Name = "${var.ec2_tags}-${count.index+1}" 8 | } 9 | } 10 | 11 | output "instance_ip_addr" { 12 | value = aws_instance.Server.*.private_ip 13 | description = "The private IP address of the main server instance." 14 | } 15 | 16 | output "instance_ips" { 17 | value = aws_instance.Server.*.public_ip 18 | } -------------------------------------------------------------------------------- /AWS_Kubernetes_Ansible/Terraform/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | version = "~> 2.0" 3 | region = var.ec2_region 4 | } -------------------------------------------------------------------------------- /AWS_Kubernetes_Ansible/Terraform/variables_AWS.tf: -------------------------------------------------------------------------------- 1 | variable "ec2_region" { 2 | default = "eu-west-1" 3 | } 4 | 5 | variable "ec2_image" { 6 | default = "ami-00035f41c82244dab" 7 | } 8 | 9 | variable "ec2_instance_type" { 10 | default = "t2.medium" 11 | } 12 | 13 | variable "ec2_keypair" { 14 | default = "AWS-Cisco" 15 | } 16 | 17 | variable "ec2_tags" { 18 | default = "Kubernetes" 19 | } 20 | 21 | variable "ec2_count" { 22 | default = "3" 23 | } 24 | 25 | -------------------------------------------------------------------------------- /AWS_Terraform/main.tf: -------------------------------------------------------------------------------- 1 | resource "aws_instance" "Server" { 2 | ami = var.ec2_image 3 | instance_type = var.ec2_instance_type 4 | key_name = var.ec2_keypair 5 | count = var.ec2_count 6 | tags = { 7 | Name = var.ec2_tags 8 | } 9 | } 10 | 11 | output "instance_ip_addr" { 12 | value = aws_instance.Server.*.private_ip 13 | description = "The private IP address of the main server instance." 14 | } 15 | 16 | output "instance_ips" { 17 | value = aws_instance.Server.*.public_ip 18 | } -------------------------------------------------------------------------------- /AWS_Terraform/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | version = "~> 2.0" 3 | region = var.ec2_region 4 | } -------------------------------------------------------------------------------- /AWS_Terraform/variables_AWS.tf: -------------------------------------------------------------------------------- 1 | variable "ec2_region" { 2 | default = "eu-west-1" 3 | } 4 | 5 | variable "ec2_image" { 6 | default = "ami-00035f41c82244dab" 7 | } 8 | 9 | variable "ec2_instance_type" { 10 | default = "t2.micro" 11 | } 12 | 13 | variable "ec2_keypair" { 14 | default = "AWS-Cisco" 15 | } 16 | 17 | variable "ec2_tags" { 18 | default = "Cisco-Demo-Terraform" 19 | } 20 | 21 | variable "ec2_count" { 22 | default = "2" 23 | } 24 | 25 | -------------------------------------------------------------------------------- /AWS_Terraform_Gitlab/main.tf: -------------------------------------------------------------------------------- 1 | resource "aws_instance" "OneServer" { 2 | ami = var.ec2_image 3 | instance_type = var.ec2_instance_type 4 | key_name = var.ec2_keypair 5 | count = var.ec2_count 6 | tags = { 7 | Name = var.ec2_tags 8 | } 9 | } 10 | 11 | output "instance_ip_addr" { 12 | value = aws_instance.OneServer.*.private_ip 13 | description = "The private IP address of the main server instance." 14 | } 15 | 16 | output "instance_ips" { 17 | value = aws_instance.OneServer.*.public_ip 18 | } -------------------------------------------------------------------------------- /AWS_Terraform_Gitlab/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | version = "~> 2.0" 3 | region = var.ec2_region 4 | } -------------------------------------------------------------------------------- /AWS_Terraform_Gitlab/terraform.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "s3" { 3 | bucket = "be.wymedia.terraform" 4 | key = "terraform/state" 5 | region = "eu-west-1" 6 | } 7 | } -------------------------------------------------------------------------------- /AWS_Terraform_Gitlab/variables.tf: -------------------------------------------------------------------------------- 1 | variable "ec2_region" { 2 | default = "eu-west-1" 3 | } 4 | 5 | variable "ec2_image" { 6 | default = "ami-00035f41c82244dab" 7 | } 8 | 9 | variable "ec2_instance_type" { 10 | default = "t2.micro" 11 | } 12 | 13 | variable "ec2_keypair" { 14 | default = "AWS-Cisco" 15 | } 16 | 17 | variable "ec2_tags" { 18 | default = "Cisco-Demo-Terraform" 19 | } 20 | 21 | variable "ec2_count" { 22 | default = "2" 23 | } 24 | 25 | -------------------------------------------------------------------------------- /AWS_Terraform_RemoteState/main.tf: -------------------------------------------------------------------------------- 1 | resource "aws_instance" "OneServer" { 2 | ami = var.ec2_image 3 | instance_type = var.ec2_instance_type 4 | key_name = var.ec2_keypair 5 | count = var.ec2_count 6 | tags = { 7 | Name = var.ec2_tags 8 | } 9 | } 10 | 11 | output "instance_ip_addr" { 12 | value = aws_instance.OneServer.*.private_ip 13 | description = "The private IP address of the main server instance." 14 | } 15 | 16 | output "instance_ips" { 17 | value = aws_instance.OneServer.*.public_ip 18 | } -------------------------------------------------------------------------------- /AWS_Terraform_RemoteState/provider.tf: -------------------------------------------------------------------------------- 1 | provider "aws" { 2 | version = "~> 2.0" 3 | region = var.ec2_region 4 | } -------------------------------------------------------------------------------- /AWS_Terraform_RemoteState/terraform.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "s3" { 3 | bucket = "be.wymedia.terraform" 4 | key = "terraform/state" 5 | region = "eu-west-1" 6 | } 7 | } -------------------------------------------------------------------------------- /AWS_Terraform_RemoteState/variables.tf: -------------------------------------------------------------------------------- 1 | variable "ec2_region" { 2 | default = "eu-west-1" 3 | } 4 | 5 | variable "ec2_image" { 6 | default = "ami-00035f41c82244dab" 7 | } 8 | 9 | variable "ec2_instance_type" { 10 | default = "t2.micro" 11 | } 12 | 13 | variable "ec2_keypair" { 14 | default = "AWS-Cisco" 15 | } 16 | 17 | variable "ec2_tags" { 18 | default = "Cisco-Demo-Terraform-1" 19 | } 20 | 21 | variable "ec2_count" { 22 | default = "2" 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | hostfile = hosts 3 | host_key_checking = False 4 | deprecation_warnings=False 5 | stdout_callback = skippy 6 | 7 | [persistent_connection] 8 | connect_timeout = 100 9 | command_timeout = 80 -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/change_description.yaml: -------------------------------------------------------------------------------- 1 | #simple IOS config in ansible 2 | --- 3 | - name: Change interface description 4 | hosts: iosxe 5 | gather_facts: no 6 | 7 | tasks: 8 | - name: configure interface settings 9 | ios_config: 10 | lines: 11 | - description Changed through Ansible 12 | - ip address 172.31.1.1 255.255.255.0 13 | parents: interface GigabitEthernet3 -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/command_show_variant1.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Getting started 3 | hosts: iosxe 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: GATHERING FACTS 8 | ios_facts: 9 | gather_subset: hardware 10 | 11 | - name: run multiple commands 12 | ios_command: 13 | commands: 14 | - show version 15 | - show ip interface brief 16 | register: output 17 | 18 | - name: display all 19 | debug: 20 | var: output["stdout_lines"] 21 | 22 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/command_show_variant2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Getting started 3 | hosts: iosxe 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: GATHERING FACTS 8 | ios_facts: 9 | gather_subset: hardware 10 | 11 | - name: run multiple commands 12 | ios_command: 13 | commands: "{{ commands }}" 14 | register: output 15 | 16 | - name: display all 17 | debug: 18 | var: output["stdout_lines"] 19 | 20 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/group_vars/iosxe.yaml: -------------------------------------------------------------------------------- 1 | ansible_connection : local 2 | ansible_python_interpreter : /usr/bin/python3 3 | host_key_checking : False 4 | ansible_ssh_user : developer 5 | ansible_ssh_pass : C1sco12345 6 | ansible_port: 8181 7 | 8 | commands: 9 | - "show version" 10 | - "show ip interface brief" 11 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/hosts: -------------------------------------------------------------------------------- 1 | [iosxe] 2 | ios-xe-mgmt-latest.cisco.com 3 | 4 | 5 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/loopback_create_single.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Configure loopback using ios_interface 3 | hosts: iosxe 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: Creating loopback 8 | ios_interface: 9 | name: Loopback100 10 | enabled: True 11 | description: Loopback interface 100 created with Ansible 12 | - name: Assign IP to loopback 13 | ios_l3_interface: 14 | name: Loopback100 15 | ipv4: 10.10.10.10/32 -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/loopback_remove_multiple.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Delete interfaces 3 | hosts: iosxe 4 | gather_facts: no 5 | vars_files: 6 | - vars/loopbacks.yaml 7 | 8 | tasks: 9 | - name: Delete loopback interfaces 10 | ios_interface: 11 | name: "{{ item.loopbackname }}" 12 | state: absent 13 | with_items: "{{ loopbacks }}" 14 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/loopback_remove_single.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Delete interfaces 3 | hosts: iosxe 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: Delete loopback 100 8 | ios_interface: 9 | name: Loopback100 10 | state: absent 11 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/vars/loopbacks.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | loopbacks: 3 | - loopbackname: "Loopback100" 4 | ip: "10.16.100.100" 5 | mask: "32" 6 | - loopbackname: "Loopback101" 7 | ip: "10.16.100.101" 8 | mask: "32" 9 | - loopbackname: "Loopback102" 10 | ip: "10.16.100.102" 11 | mask: "32" 12 | - loopbackname: "Loopback103" 13 | ip: "10.16.100.103" 14 | mask: "32" 15 | -------------------------------------------------------------------------------- /Ansible_IOSXE/ios_modules/vars/loopbacks_interfaces.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | loopbacks_interfaces: 3 | - loopbackinterface: "interface Loopback100" 4 | - loopbackinterface: "interface Loopback101" 5 | - loopbackinterface: "interface Loopback102" 6 | - loopbackinterface: "interface Loopback103" 7 | 8 | -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | library = /usr/local/lib/python3.7/site-packages/napalm_ansible/modules 3 | action_plugins = /usr/local/lib/python3.7/site-packages/napalm_ansible/plugins/action 4 | hostfile = hosts 5 | host_key_checking = False 6 | deprecation_warnings=False 7 | stdout_callback = skippy 8 | 9 | 10 | [persistent_connection] 11 | connect_timeout = 100 12 | command_timeout = 80 -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/bijhouden.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Configure loopback using ios_interface 3 | hosts: iosxe 4 | gather_facts: no 5 | vars_files: 6 | - vars/loopbacks.yaml 7 | 8 | tasks: 9 | - name: get facts from device 10 | napalm_get_facts: 11 | username: "{{ ansible_user }}" 12 | password: "{{ ansible_ssh_pass }}" 13 | filter: facts,interfaces 14 | optional_args: 15 | port: 8181 16 | register: result 17 | 18 | - name: print data 19 | debug: var=result 20 | 21 | 22 | -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/diff: -------------------------------------------------------------------------------- 1 | +description LOOPBACK 100 2 | + ip address 4.4.4.101 255.255.255.255 3 | +description LOOPBACK 100 4 | + ip address 1.1.1.20 255.255.255.255 -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/get_facts.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Retrieve interfaces 3 | hosts: iosxe 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: get facts from device 8 | napalm_get_facts: 9 | username: "{{ ansible_user }}" 10 | password: "{{ ansible_ssh_pass }}" 11 | filter: interfaces_ip 12 | optional_args: 13 | port: 8181 14 | register: result 15 | 16 | - name: print data 17 | debug: var=result 18 | 19 | 20 | -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/group_vars/iosxe.yaml: -------------------------------------------------------------------------------- 1 | host_key_checking : False 2 | ansible_user: developer 3 | ansible_ssh_pass: C1sco12345 4 | ansible_port: 8181 5 | ansible_python_interpreter: /usr/local/bin/python3 6 | ansible_network_os: ios 7 | ansible_connection: network_cli 8 | validate_file: "validation.yml" -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/hosts: -------------------------------------------------------------------------------- 1 | [iosxe] 2 | ios-xe-mgmt-latest.cisco.com -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/loopbacks.txt: -------------------------------------------------------------------------------- 1 | interface Loopback100 2 | description LOOPBACK 100 3 | ip address 4.4.4.101 255.255.255.255 4 | ! 5 | interface Loopback200 6 | description LOOPBACK 200 7 | ip address 1.1.1.20 255.255.255.255 8 | end -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/validate_command.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Validate command 3 | hosts: iosxe 4 | gather_facts: no 5 | 6 | tasks: 7 | - name: NaPalm Validation 8 | napalm_validate: 9 | hostname: "{{ inventory_hostname }}" 10 | username: "{{ ansible_user }}" 11 | password: "{{ ansible_ssh_pass }}" 12 | dev_os: "ios" 13 | optional_args: 14 | port: 8181 15 | validation_file: "{{ validate_file }}" 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /Ansible_IOSXE/napalm/validation.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - get_facts: 3 | os_version: 16.11.1a 4 | vendor: Cisco 5 | 6 | - get_interfaces_ip: 7 | Loopback100: 8 | ipv4: 9 | 4.4.4.102: 10 | prefix_length: 32 -------------------------------------------------------------------------------- /Ansible_IOSXE/netconf/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | gathering = explicit 3 | retry_files_enabled = False 4 | host_key_checking = False 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Ansible_IOSXE/netconf/group_vars/iosxe.yaml: -------------------------------------------------------------------------------- 1 | ansible_user: 'developer' 2 | ansible_password: 'C1sco12345' 3 | netconf_port: 10000 4 | ansible_port: 8181 5 | ansible_network_os: "default" 6 | -------------------------------------------------------------------------------- /Ansible_IOSXE/netconf/hosts: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_python_interpreter="/usr/bin/python3" 3 | 4 | [iosxe] 5 | ios-xe-mgmt.cisco.com ansible_port=8181 6 | -------------------------------------------------------------------------------- /Ansible_IOSXE/netconf/show_command._tobechanged.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: NETCONF sample 1 3 | hosts: iosxe 4 | connection: netconf 5 | gather_facts: False 6 | 7 | tasks: 8 | - name: run multiple commands 9 | netconf_get: 10 | source: running 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Ansible_IOSXE/restconf/Method1/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | hostfile = hosts 3 | host_key_checking = False 4 | deprecation_warnings=False 5 | stdout_callback = skippy 6 | 7 | 8 | [persistent_connection] 9 | connect_timeout = 100 10 | command_timeout = 80 -------------------------------------------------------------------------------- /Ansible_IOSXE/restconf/Method1/create_interfaces_restconf.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Restconf - Config 3 | hosts: iosxe 4 | 5 | tasks: 6 | - name: Create interfaces with IETF YANG model 7 | restconf_config: 8 | method: post 9 | format: json 10 | path: /data/ietf-interfaces:interfaces 11 | content: "{{ lookup('file','./loopback.json') | string }}" 12 | register: output 13 | ignore_errors: true 14 | 15 | - name: display all 16 | debug: 17 | var: output 18 | -------------------------------------------------------------------------------- /Ansible_IOSXE/restconf/Method1/create_interfaces_restconf_variant.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Restconf - Config 3 | hosts: iosxe 4 | 5 | tasks: 6 | - name: Create interfaces with IETF YANG model 7 | restconf_config: 8 | path: /data/ietf-interfaces:interfaces 9 | content: "{{ loopback_interfaces | to_json }}" 10 | 11 | -------------------------------------------------------------------------------- /Ansible_IOSXE/restconf/Method1/delete_interfaces_restconf.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Restconf - Config 3 | hosts: iosxe 4 | 5 | tasks: 6 | - name: Delete interfaces with IETF YANG model 7 | restconf_config: 8 | method: delete 9 | path: /data/ietf-interfaces:interfaces/interface={{ item['name'] }} 10 | with_items: "{{ loopback_interfaces['interface'] }}" 11 | -------------------------------------------------------------------------------- /Ansible_IOSXE/restconf/Method1/get_interfaces_restconf.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Restconf - GET 3 | hosts: iosxe 4 | connection: local 5 | 6 | tasks: 7 | - name: Get interfaces from IETF YANG model 8 | restconf_get: 9 | content: config 10 | output: json 11 | path: /data/ietf-interfaces:interfaces 12 | register: output 13 | 14 | - name: display all 15 | debug: 16 | var: output 17 | 18 | 19 | -------------------------------------------------------------------------------- /Ansible_IOSXE/restconf/Method1/hosts: -------------------------------------------------------------------------------- 1 | [all:vars] 2 | ansible_python_interpreter="/usr/bin/python3" 3 | ansible_network_os=default 4 | 5 | [iosxe] 6 | ios-xe-mgmt.cisco.com ansible_port=8181 7 | -------------------------------------------------------------------------------- /DNAC_PythonRequests/Devices/authenticate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wiwa1978/blog-hugo-netlify-code/b0fee024cd02131d223ea232b3d930479b9fcfb1/DNAC_PythonRequests/Devices/authenticate.py -------------------------------------------------------------------------------- /DNAC_PythonRequests/NetworkDiscovery/templates/discovery.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ name }}", 3 | "discoveryType": "Range", 4 | "ipAddressList": "192.168.30.0-192.168.30.100", 5 | "timeOut": 1, 6 | "protocolOrder": "ssh,telnet", 7 | "preferredMgmtIPMethod": "None" 8 | } -------------------------------------------------------------------------------- /DNAC_PythonRequests/Sites/templates/building.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "building", 3 | "site": { 4 | "building": { 5 | "name": "{{building_name}}", 6 | "address": "123 Main Street", 7 | "parentName": "Global/{{site_name}}", 8 | "latitude": "51.0458", 9 | "longitude": "5.6413" 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /DNAC_PythonRequests/Sites/templates/dummy_device.json: -------------------------------------------------------------------------------- 1 | { 2 | "ipAddress": [ 3 | "192.80.2.23" 4 | ], 5 | "snmpVersion": "v2", 6 | "snmpROCommunity": "readonly", 7 | "snmpRWCommunity": "readwrite", 8 | "snmpRetry": "1", 9 | "snmpTimeout": "60", 10 | "cliTransport": "ssh", 11 | "userName": "wim", 12 | "password": "cisco123", 13 | "enablePassword": "cisco1234!" 14 | } -------------------------------------------------------------------------------- /DNAC_PythonRequests/Sites/templates/floor.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "floor", 3 | "site": { 4 | "floor": { 5 | "name": "{{floor_name}}", 6 | "parentName": "Global/{{site_name}}/{{building_name}}", 7 | "rfModel": "Cubes and Walled Offices", 8 | "width": "20", 9 | "length": "30", 10 | "height": "10" 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /DNAC_PythonRequests/Sites/templates/site.j2.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "area", 3 | "site": { 4 | "area": { 5 | "name": "{{site_name}}", 6 | "parentName": "Global" 7 | } 8 | } 9 | } -------------------------------------------------------------------------------- /DigitalOcean_Kubernetes_Ansible/Ansible/ansible.cfg: -------------------------------------------------------------------------------- 1 | [defaults] 2 | host_key_checking = False 3 | -------------------------------------------------------------------------------- /DigitalOcean_Kubernetes_Ansible/Ansible/hosts: -------------------------------------------------------------------------------- 1 | #hosts 2 | [masters] 3 | master ansible_host=192.168.80.105 4 | 5 | [workers] 6 | worker1 ansible_host=192.168.80.106 7 | worker2 ansible_host=192.168.80.107 8 | 9 | [all:vars] 10 | ansible_python_interpreter=/usr/bin/python3 11 | ansible_ssh_private_key_file=/Users/wauterw/GoogleDrive/Keys_and_Certificates/homelab 12 | ansible_user=wim -------------------------------------------------------------------------------- /DigitalOcean_Kubernetes_Ansible/Terraform/variables.tf: -------------------------------------------------------------------------------- 1 | variable "do_token" { 2 | default = "c4a***325" 3 | } 4 | 5 | variable "region" { 6 | default = "AMS3" 7 | } 8 | 9 | variable "ssh_fingerprint" { 10 | default = "5a:25:***:c9:8d:03" 11 | } 12 | 13 | variable "number_servers" { 14 | default = "3" 15 | } 16 | 17 | variable "size" { 18 | default = "s-2vcpu-2gb" 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Express_Mongo_REST_API/config/database.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | url : 'mongodb://localhost/mean-todo' 3 | } -------------------------------------------------------------------------------- /Express_Mongo_REST_API/models/todo.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | var Schema = mongoose.Schema; 3 | 4 | // todo model 5 | var todoSchema = new Schema({ 6 | content: String, 7 | description:String, 8 | completed: { type: Boolean, default: false }, 9 | created_at: { type: Date, default: Date.now }, 10 | updated_at: { type: Date, default: Date.now } 11 | }); 12 | 13 | module.exports = mongoose.model('Todo', todoSchema); -------------------------------------------------------------------------------- /Express_Mongo_REST_API/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mean-todo-application", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "~1.4.4", 10 | "debug": "~2.6.9", 11 | "express": "~4.16.1", 12 | "http-errors": "~1.6.3", 13 | "mongoose": "^5.9.7", 14 | "morgan": "~1.9.1", 15 | "pug": "2.0.0-beta11" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Express_Mongo_REST_API/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /Express_Mongo_REST_API/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /Express_Mongo_REST_API/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /Express_Mongo_REST_API/views/error.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /Express_Mongo_REST_API/views/index.pug: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /Express_Mongo_REST_API/views/layout.pug: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/config/database.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | url : 'mongodb://localhost/mean-todo' 3 | } -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/models/todo.js: -------------------------------------------------------------------------------- 1 | var mongoose = require('mongoose'); 2 | var Schema = mongoose.Schema; 3 | 4 | // todo model 5 | var todoSchema = new Schema({ 6 | content: String, 7 | description:String, 8 | completed: { type: Boolean, default: false }, 9 | created_at: { type: Date, default: Date.now }, 10 | updated_at: { type: Date, default: Date.now } 11 | }); 12 | 13 | module.exports = mongoose.model('Todo', todoSchema); -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mean-todo-application", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "~1.4.4", 10 | "debug": "~2.6.9", 11 | "express": "~4.16.1", 12 | "http-errors": "~1.6.3", 13 | "mongoose": "^5.9.7", 14 | "morgan": "~1.9.1", 15 | "pug": "2.0.0-beta11" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/public/images/empty.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wiwa1978/blog-hugo-netlify-code/b0fee024cd02131d223ea232b3d930479b9fcfb1/Express_Mongo_REST_Angular/public/images/empty.js -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/public/javascript/empty.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wiwa1978/blog-hugo-netlify-code/b0fee024cd02131d223ea232b3d930479b9fcfb1/Express_Mongo_REST_Angular/public/javascript/empty.js -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/routes/index.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET home page. */ 5 | router.get('/', function(req, res, next) { 6 | res.render('index', { title: 'Express' }); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /Express_Mongo_REST_Angular/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Beanstalk/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Elastic Beanstalk Files 3 | .elasticbeanstalk/* 4 | !.elasticbeanstalk/*.cfg.yml 5 | !.elasticbeanstalk/*.global.yml 6 | .git 7 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Beanstalk/application.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | application = Flask(__name__) 4 | 5 | # test 6 | @application.route("/") 7 | def index(): 8 | return render_template("index.html") 9 | 10 | 11 | if __name__ == "__main__": 12 | application.run() 13 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Beanstalk/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gevent==21.1.2 4 | greenlet==1.0.0 5 | gunicorn==20.0.4 6 | itsdangerous==1.1.0 7 | Jinja2==2.11.2 8 | MarkupSafe==1.1.1 9 | Werkzeug==1.0.1 10 | zope.event==4.5.0 11 | zope.interface==5.2.0 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Beanstalk/test_application.py: -------------------------------------------------------------------------------- 1 | from application import application 2 | 3 | with application.test_client() as c: 4 | response = c.get("/") 5 | assert response.status_code == 200 6 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Beanstalk/wsgi.py: -------------------------------------------------------------------------------- 1 | from application import application 2 | 3 | if __name__ == "__main__": 4 | application.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Beanstalk/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | # Elastic Beanstalk Files 3 | .elasticbeanstalk/* 4 | !.elasticbeanstalk/*.cfg.yml 5 | !.elasticbeanstalk/*.global.yml 6 | .git 7 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Beanstalk/application.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | application = Flask(__name__) 4 | 5 | # test 6 | @application.route("/") 7 | def index(): 8 | return render_template("index.html") 9 | 10 | 11 | if __name__ == "__main__": 12 | application.run() 13 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Beanstalk/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gevent==21.1.2 4 | greenlet==1.0.0 5 | gunicorn==20.0.4 6 | itsdangerous==1.1.0 7 | Jinja2==2.11.2 8 | MarkupSafe==1.1.1 9 | Werkzeug==1.0.1 10 | zope.event==4.5.0 11 | zope.interface==5.2.0 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Beanstalk/test_application.py: -------------------------------------------------------------------------------- 1 | from application import application 2 | 3 | with application.test_client() as c: 4 | response = c.get("/") 5 | assert response.status_code == 200 6 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Beanstalk/wsgi.py: -------------------------------------------------------------------------------- 1 | from application import application 2 | 3 | if __name__ == "__main__": 4 | application.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Apps/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | venv/* 3 | *.pyc -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Apps/README.md: -------------------------------------------------------------------------------- 1 | This is a test 2 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Apps/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | 6 | @app.route("/") 7 | def index(): 8 | return render_template("index.html") 9 | 10 | 11 | if __name__ == "__main__": 12 | app.run(host="0.0.0.0") 13 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Apps/gunicorn_config.py: -------------------------------------------------------------------------------- 1 | bind = "0.0.0.0:5000" 2 | workers = 2 3 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Apps/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gunicorn==20.1.0 4 | itsdangerous==1.1.0 5 | Jinja2==2.11.2 6 | MarkupSafe==1.1.1 7 | Werkzeug==1.0.1 8 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Apps/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Droplet/.gitignore: -------------------------------------------------------------------------------- 1 | .git 2 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Droplet/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Droplet/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | 6 | @app.route("/") 7 | def index(): 8 | return render_template("index.html") 9 | 10 | 11 | if __name__ == "__main__": 12 | app.run(host="0.0.0.0") 13 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Droplet/app/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Droplet/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.6' 2 | 3 | services: 4 | web: 5 | build: . 6 | networks: 7 | - default 8 | ports: 9 | - 50000:5000 10 | restart: always -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-Droplet/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gevent==21.1.2 4 | greenlet==1.0.0 5 | gunicorn==20.0.4 6 | itsdangerous==1.1.0 7 | Jinja2==2.11.2 8 | MarkupSafe==1.1.1 9 | Werkzeug==1.0.1 10 | zope.event==4.5.0 11 | zope.interface==5.2.0 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-K8S/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-K8S/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | 6 | @app.route("/") 7 | def index(): 8 | return render_template("index.html") 9 | 10 | 11 | if __name__ == "__main__": 12 | app.run(host="0.0.0.0") 13 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-K8S/app/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-K8S/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.6' 2 | 3 | services: 4 | web: 5 | build: . 6 | networks: 7 | - default 8 | ports: 9 | - 50000:5000 10 | restart: always -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-DigitalOcean-K8S/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gevent==21.1.2 4 | greenlet==1.0.0 5 | gunicorn==20.0.4 6 | itsdangerous==1.1.0 7 | Jinja2==2.11.3 8 | MarkupSafe==1.1.1 9 | Werkzeug==1.0.1 10 | zope.event==4.5.0 11 | zope.interface==5.2.0 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Docker-ECS-herdoen/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Docker-ECS-herdoen/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | 6 | @app.route("/") 7 | def index(): 8 | return render_template("index.html") 9 | 10 | 11 | if __name__ == "__main__": 12 | app.run(host="0.0.0.0") 13 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Docker-ECS-herdoen/app/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Docker-ECS-herdoen/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.6' 2 | 3 | services: 4 | web: 5 | build: . 6 | networks: 7 | - default 8 | ports: 9 | - 50000:5000 10 | restart: always -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Docker-ECS-herdoen/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gevent==21.1.2 4 | greenlet==1.0.0 5 | gunicorn==20.0.4 6 | itsdangerous==1.1.0 7 | Jinja2==2.11.2 8 | MarkupSafe==1.1.1 9 | Werkzeug==1.0.1 10 | zope.event==4.5.0 11 | zope.interface==5.2.0 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Heroku/.gitignore: -------------------------------------------------------------------------------- 1 | venv/ 2 | .git -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Heroku/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn wsgi:app -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Heroku/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | app.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Heroku/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gunicorn==20.0.4 4 | itsdangerous==1.1.0 5 | Jinja2==2.11.3 6 | MarkupSafe==1.1.1 7 | Werkzeug==1.0.1 8 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-GithubActions-Heroku/wsgi.py: -------------------------------------------------------------------------------- 1 | from app.app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-Heroku/.gitignore: -------------------------------------------------------------------------------- 1 | venv/ 2 | .git -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-Heroku/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-Heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn wsgi:app -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-Heroku/README.md: -------------------------------------------------------------------------------- 1 | This is an example of how to deploy a Flask app by uploading the code to Github and use the existing Heroku-Github integration 2 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-Heroku/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | app.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-Heroku/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gunicorn==20.0.4 4 | itsdangerous==1.1.0 5 | Jinja2==2.11.3 6 | MarkupSafe==1.1.1 7 | Werkzeug==1.0.1 8 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-CICD-Heroku/wsgi.py: -------------------------------------------------------------------------------- 1 | from app.app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-Docker/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | app.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Docker/app/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.6' 2 | 3 | services: 4 | web: 5 | build: . 6 | networks: 7 | - default 8 | ports: 9 | - 50000:5000 10 | restart: always -------------------------------------------------------------------------------- /Flask/Flask-Basic-Docker/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gevent==21.1.2 4 | greenlet==1.0.0 5 | gunicorn==20.0.4 6 | itsdangerous==1.1.0 7 | Jinja2==2.11.2 8 | MarkupSafe==1.1.1 9 | Werkzeug==1.0.1 10 | zope.event==4.5.0 11 | zope.interface==5.2.0 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Heroku/.gitignore: -------------------------------------------------------------------------------- 1 | venv/ -------------------------------------------------------------------------------- /Flask/Flask-Basic-Heroku/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 5000 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-Heroku/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn wsgi:app -------------------------------------------------------------------------------- /Flask/Flask-Basic-Heroku/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | app.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Heroku/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | gunicorn==20.0.4 4 | itsdangerous==1.1.0 5 | Jinja2==2.11.3 6 | MarkupSafe==1.1.1 7 | Werkzeug==1.0.1 8 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Heroku/wsgi.py: -------------------------------------------------------------------------------- 1 | from app.app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 8081 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:8081", "wsgi", "-k", "gevent"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Docker/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | application = Flask(__name__) 4 | 5 | @application.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | application.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Docker/app/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import application 2 | 3 | if __name__ == "__main__": 4 | application.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Docker/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | itsdangerous==1.1.0 4 | Jinja2==2.11.2 5 | MarkupSafe==1.1.1 6 | Werkzeug==1.0.1 7 | gevent 8 | gunicorn 9 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Docker/waypoint.hcl: -------------------------------------------------------------------------------- 1 | project = "Flask Todo application" 2 | 3 | app "flask_todo_app" { 4 | labels = { 5 | "service" = "flask-todo", 6 | "env" = "dev" 7 | } 8 | build { 9 | use "docker" { 10 | } 11 | 12 | } 13 | 14 | deploy { 15 | use "docker" { 16 | service_port = 8081 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-ECR-ECS/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 8082 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:8082", "wsgi", "-k", "gevent"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-ECR-ECS/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn wsgi:app -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-ECR-ECS/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | app.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-ECR-ECS/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | itsdangerous==1.1.0 4 | Jinja2==2.11.2 5 | MarkupSafe==1.1.1 6 | Werkzeug==1.0.1 7 | gevent 8 | gunicorn 9 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-ECR-ECS/wsgi.py: -------------------------------------------------------------------------------- 1 | from app.app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Gitlab/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ENV LC_ALL=C.UTF-8 4 | ENV LANG=C.UTF-8 5 | 6 | RUN apt-get update -y && apt-get install -y python3-pip 7 | 8 | # We copy just the requirements.txt first to leverage Docker cache 9 | ADD requirements.txt /app/ 10 | 11 | WORKDIR /app 12 | 13 | RUN /bin/bash -c "pip3 install --no-cache-dir -r requirements.txt" 14 | 15 | ADD /app/ /app/ 16 | 17 | EXPOSE 8082 18 | 19 | CMD ["gunicorn", "-b", "0.0.0.0:8082", "wsgi", "-k", "gevent"] -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Gitlab/Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn wsgi:app -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Gitlab/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | app.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Gitlab/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | itsdangerous==1.1.0 4 | Jinja2==2.11.2 5 | MarkupSafe==1.1.1 6 | Werkzeug==1.0.1 7 | gevent 8 | gunicorn 9 | -------------------------------------------------------------------------------- /Flask/Flask-Basic-Waypoint-Gitlab/wsgi.py: -------------------------------------------------------------------------------- 1 | from app.app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic/app/app.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/') 6 | def index(): 7 | return (render_template('index.html')) 8 | 9 | if __name__ == '__main__': 10 | app.run(host='0.0.0.0') 11 | 12 | -------------------------------------------------------------------------------- /Flask/Flask-Basic/app/wsgi.py: -------------------------------------------------------------------------------- 1 | from app import app 2 | 3 | if __name__ == "__main__": 4 | app.run() 5 | -------------------------------------------------------------------------------- /Flask/Flask-Basic/requirements.txt: -------------------------------------------------------------------------------- 1 | click==7.1.2 2 | Flask==1.1.2 3 | itsdangerous==1.1.0 4 | Jinja2==2.11.2 5 | MarkupSafe==1.1.1 6 | Werkzeug==1.0.1 7 | -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/.env.dev: -------------------------------------------------------------------------------- 1 | FLASK_APP=run.py 2 | FLASK_ENV=production 3 | DATABASE_URL=mysql+pymysql://root:12345678a-@mysql_container:3306/flask_todo 4 | SQL_HOST=db 5 | SQL_PORT=3306 6 | DATABASE=mysql 7 | APP_FOLDER=/usr/src/app 8 | -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/.gitignore: -------------------------------------------------------------------------------- 1 | venv 2 | venv/* 3 | .DS_Store 4 | __pycache__ -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/web/app/admin/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | admin = Blueprint('admin', __name__) 4 | 5 | from . import routes -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/web/app/admin/forms.py: -------------------------------------------------------------------------------- 1 | from flask_wtf import FlaskForm 2 | from wtforms import StringField, SubmitField 3 | from wtforms.validators import DataRequired 4 | from wtforms.ext.sqlalchemy.fields import QuerySelectField 5 | 6 | from ..models import Task 7 | 8 | 9 | class TodoForm(FlaskForm): 10 | """ 11 | Form for admin to add or edit a department 12 | """ 13 | name = StringField('Name', validators=[DataRequired()]) 14 | description = StringField('Description', validators=[DataRequired()]) 15 | submit = SubmitField('Submit') -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/web/app/auth/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | auth = Blueprint('auth', __name__) 4 | 5 | from . import routes -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/web/app/entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$DATABASE" = "mysql" ] 4 | then 5 | echo "Waiting for mysql..." 6 | 7 | while ! nc -z $SQL_HOST $SQL_PORT; do 8 | sleep 0.1 9 | done 10 | 11 | echo "MySQL started" 12 | fi 13 | 14 | python run.py create_db 15 | 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/web/app/home/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | home = Blueprint('home', __name__) 4 | 5 | from . import routes -------------------------------------------------------------------------------- /Flask/Flask-Todo-Bootstrap/web/app/templates/auth/login.html: -------------------------------------------------------------------------------- 1 | 2 | {% import "bootstrap/utils.html" as utils %} 3 | {% import "bootstrap/wtf.html" as wtf %} 4 | {% extends "base.html" %} 5 | {% block title %}Login{% endblock %} 6 | {% block body %} 7 |