├── .gitignore ├── third-party ├── Tito │ ├── asset │ │ ├── placeholder │ │ ├── Deployment │ │ │ ├── placeholder │ │ │ └── CloudAssembly │ │ │ │ ├── placeholder │ │ │ │ ├── titodb │ │ │ │ ├── tito_db_dummy.sh │ │ │ │ ├── create-tito-db.sql │ │ │ │ ├── README.md │ │ │ │ ├── tito_db.sh │ │ │ │ ├── tito_as.sh │ │ │ │ ├── mysqld.cnf │ │ │ │ └── mysql.sh │ │ │ │ └── apache │ │ │ │ ├── dir.conf │ │ │ │ └── envvars │ │ ├── font-awesome │ │ │ ├── placeholder │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── core.less │ │ │ │ ├── stacked.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── path.less │ │ │ │ ├── animated.less │ │ │ │ └── mixins.less │ │ │ └── scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── font-awesome.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _animated.scss │ │ │ │ └── _mixins.scss │ │ ├── img │ │ │ ├── bg.jpg │ │ │ ├── bgnew.jpg │ │ │ ├── callout.jpg │ │ │ ├── home-icon.png │ │ │ ├── building-icon.png │ │ │ ├── portfolio-1.jpg │ │ │ ├── portfolio-2.jpg │ │ │ ├── portfolio-3.jpg │ │ │ ├── portfolio-4.jpg │ │ │ ├── Apps-Home-icon.png │ │ │ └── bouchons-home7-banner.png │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ ├── js │ │ │ ├── book.js │ │ │ └── parallax.min.js │ │ └── css │ │ │ └── stylish-portfolio.css │ ├── info.php │ ├── nbproject │ │ ├── project.properties │ │ └── project.xml │ ├── db_dump.php │ ├── wavefront-test.php │ ├── api.php │ └── README.md ├── cypress │ ├── readme.md │ ├── README.md │ ├── titoactions.spec.js.mp4 │ ├── slackUpload.py │ └── titoactions.spec.js ├── aws-cft │ ├── README.md │ └── SingleAZVPC.yaml ├── terraform │ ├── README.md │ ├── terraform.tfvars │ ├── variables.tf │ └── vpc.tf ├── ComputeTowerTags Example.xlsx ├── locust │ ├── README.md │ ├── locustWavefrontLocking.py │ └── locustWavefront.py └── README.md ├── wavefront ├── readme.md └── README.md ├── vrealize-orchestrator ├── com.vmware.ace.opsaas.f5.package ├── com.vmware.opsaas.terraform.package └── README.md ├── code-stream ├── CustomIntegrations │ ├── README.md │ ├── deployment.json │ ├── GetResourceAddress.yml │ ├── deployment.yml │ ├── SlackBotThreadedAttachments.json │ └── SlackBotThreadedAttachments.yml ├── Pipelines │ ├── README.md │ └── BlueprintService.http ├── README.md ├── ABX_Rest.http.txt └── ABX_Rest.http ├── NOTICE.txt ├── cloud-assembly ├── README.md ├── ABX │ ├── README.md │ ├── ProjectOnboarding.abx │ ├── CASGetProjectMembers.abx │ ├── ProjectOnboarding.yaml │ ├── AssignProjectCAS.abx │ ├── InviteUserCAS.abx │ ├── CASProjectGitRepoBlueprints.abx │ ├── CASProjectGitRepoABX.abx │ ├── CASGetProjectMembers.py │ ├── CASProjecrGitRepoBlueprints.py │ ├── AssignProjectCAS.py │ ├── CASProjectGitRepoABX.py │ └── InviteUserCAS.py └── blueprints │ ├── PluginBasedDesign │ ├── [v1]SimpleAwsInstance │ │ └── blueprint.yaml │ ├── [v2]InstanceWithComputeAllocation │ │ └── blueprint.yaml │ ├── [v3]InstanceWithComputeFlavorImageAllocation │ │ └── blueprint.yaml │ ├── [v4]InstanceWithComputeFlavorImageNetworkAllocation │ │ └── blueprint.yaml │ ├── [v5]DynamicallyConfiguredInstancesAndVolume │ │ └── blueprint.yaml │ └── [v6]DynamicallyConfiguredInstancesVolumeAndKey │ │ └── blueprint.yaml │ ├── README.md │ ├── TitoRoute53 │ └── blueprint.yaml │ ├── DockerHost │ └── blueprint.yaml │ ├── WavefrontProxy │ └── blueprint.yaml │ └── TestRunner │ └── blueprint.yaml ├── LICENSE.txt ├── CONTRIBUTING.md ├── CODE-OF-CONDUCT.md └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third-party/Tito/asset/placeholder: -------------------------------------------------------------------------------- 1 | placeholder 2 | -------------------------------------------------------------------------------- /third-party/cypress/readme.md: -------------------------------------------------------------------------------- 1 | Cypress description 2 | -------------------------------------------------------------------------------- /wavefront/readme.md: -------------------------------------------------------------------------------- 1 | Wavefront product information 2 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/placeholder: -------------------------------------------------------------------------------- 1 | placeholder 2 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/placeholder: -------------------------------------------------------------------------------- 1 | placeholder 2 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/placeholder: -------------------------------------------------------------------------------- 1 | placeholder 2 | -------------------------------------------------------------------------------- /third-party/Tito/info.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /wavefront/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section contains sample .json for wavefront dashboard 4 | -------------------------------------------------------------------------------- /third-party/aws-cft/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section contains sample AWS Cloud Formation Templates 4 | -------------------------------------------------------------------------------- /third-party/Tito/asset/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/bg.jpg -------------------------------------------------------------------------------- /third-party/terraform/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section contains samples Terraform templates for create AWS VPCs 4 | -------------------------------------------------------------------------------- /third-party/Tito/asset/img/bgnew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/bgnew.jpg -------------------------------------------------------------------------------- /third-party/Tito/asset/img/callout.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/callout.jpg -------------------------------------------------------------------------------- /third-party/ComputeTowerTags Example.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/ComputeTowerTags Example.xlsx -------------------------------------------------------------------------------- /third-party/Tito/asset/img/home-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/home-icon.png -------------------------------------------------------------------------------- /third-party/Tito/asset/img/building-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/building-icon.png -------------------------------------------------------------------------------- /third-party/Tito/asset/img/portfolio-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/portfolio-1.jpg -------------------------------------------------------------------------------- /third-party/Tito/asset/img/portfolio-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/portfolio-2.jpg -------------------------------------------------------------------------------- /third-party/Tito/asset/img/portfolio-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/portfolio-3.jpg -------------------------------------------------------------------------------- /third-party/Tito/asset/img/portfolio-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/portfolio-4.jpg -------------------------------------------------------------------------------- /third-party/cypress/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section contains sample code written in Python for testing an application using Cypress 4 | -------------------------------------------------------------------------------- /third-party/cypress/titoactions.spec.js.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/cypress/titoactions.spec.js.mp4 -------------------------------------------------------------------------------- /third-party/Tito/asset/img/Apps-Home-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/Apps-Home-icon.png -------------------------------------------------------------------------------- /third-party/locust/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section contains sample locust loadtesting code written in Python and use 4 | Wavefront Proxy 5 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/titodb/tito_db_dummy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | exec &> logfile.txt 3 | echo -e 'running dummy tito db script' 4 | echo -e $1 5 | -------------------------------------------------------------------------------- /third-party/Tito/asset/img/bouchons-home7-banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/img/bouchons-home7-banner.png -------------------------------------------------------------------------------- /vrealize-orchestrator/com.vmware.ace.opsaas.f5.package: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/vrealize-orchestrator/com.vmware.ace.opsaas.f5.package -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/apache/dir.conf: -------------------------------------------------------------------------------- 1 | 2 | DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm 3 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /vrealize-orchestrator/com.vmware.opsaas.terraform.package: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/vrealize-orchestrator/com.vmware.opsaas.terraform.package -------------------------------------------------------------------------------- /third-party/Tito/asset/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /third-party/Tito/asset/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /third-party/Tito/asset/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /third-party/Tito/asset/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vmware-archive/cloud-automation-samples/HEAD/third-party/Tito/asset/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /third-party/Tito/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | include.path=${php.global.include.path} 2 | php.version=PHP_56 3 | source.encoding=UTF-8 4 | src.dir=. 5 | tags.asp=false 6 | tags.short=false 7 | web.root=. 8 | -------------------------------------------------------------------------------- /vrealize-orchestrator/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section contains sample code to build vRealize Orchestrator workflows. 4 | 5 | The Terraform template is one example of many possibilities. 6 | -------------------------------------------------------------------------------- /third-party/terraform/terraform.tfvars: -------------------------------------------------------------------------------- 1 | aws_access_key_id="" 2 | aws_secret_access_key="" 3 | vpc_region= "us-east-1" 4 | vpc_name="VPCDEVTERRAFORM" 5 | vpc_cidr_block="10.194.0.0/16" 6 | vpc_public_subnet_cidr="10.194.10.0/24" 7 | vpc_private_subnet_cidr="10.194.20.0/24" 8 | aws_region= "us-east-1" -------------------------------------------------------------------------------- /third-party/Tito/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.php.project 4 | 5 | 6 | Tito 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /code-stream/CustomIntegrations/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section of code-stream repository contains samples related to Custom Integrations. We have following custom integrations: 4 | 5 | 6 | * Deployment: a nodejs customization get the IP address of the node 7 | * SlackBotThreadedAttachments: a nodejs customation to post messages to a Slack channel to the same thread 8 | * GetResourceAddress: a nodejs customization get the IP address of the node 9 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | cloud-automation-samples 2 | Copyright (c) 2019 VMware, Inc. All Rights Reserved. 3 | 4 | This product is licensed to you under the BSD-2 license (the "License"). You may not use this product except in compliance with the BSD-2 License. 5 | 6 | This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. 7 | 8 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /code-stream/Pipelines/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section of code-stream repository contains samples related to Pipeline. We have following pipelines 4 | 5 | 6 | * BlueprintService.http: REST API samples for launching blueprints and getting status of the blueprints 7 | * ValidateApplication-Tito.yaml: Sample Pipeline to deploy the Tito application 8 | * Validate_Application_Tito_v2.yaml: Sample Pipeline to deploy the Tito application and validate, test and scale the application 9 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/titodb/create-tito-db.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE if not exists TitoDB; 2 | 3 | USE TitoDB; 4 | 5 | CREATE TABLE TitoTable (id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, 6 | home VARCHAR(50) NOT NULL, 7 | work VARCHAR(50) NOT NULL, 8 | hour_home_departure VARCHAR(50) NOT NULL, 9 | hour_work_departure VARCHAR(50) NOT NULL); 10 | 11 | CREATE USER 'Tito'@'%' IDENTIFIED BY 'VMware1!'; 12 | GRANT ALL PRIVILEGES ON TitoDB.* TO 'Tito'@'%' WITH GRANT OPTION; 13 | FLUSH PRIVILEGES; 14 | 15 | SET GLOBAL max_connect_errors=100000; 16 | SET GLOBAL max_connections = 400; 17 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /cloud-assembly/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | VMware Cloud Assembly orchestrates and expedites infrastructure and application delivery in line with DevOps principles. It is a multi-cloud, declarative blueprint orchestration and automation solution which enables infrastructure as code for expedited infrastructure consumption and application delivery 4 | 5 | 6 | ├── code-assembly # Folder for Code Stream Samples 7 | |── ABX # Source files for Action Based eXtensibility (ABX) 8 | ├── blueprints # Source files for blueprints 9 | └── README.md 10 | -------------------------------------------------------------------------------- /third-party/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section contains all the third party products and code used as part of our project 4 | 5 | 6 | ├── third-party # Folder for all third party products 7 | |── Cypress # Source files for Cypress End-to-End testing 8 | ├── Locust # Source files for Locust load testing tool 9 | ├── Tito # Source files for the Time Traffic Overview (Tito) Application 10 | ├── aws-cft # Source files for AWS Cloud Formation Templates 11 | ├── terraform # Source files for Terraform 12 | └── README.md 13 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/titodb/README.md: -------------------------------------------------------------------------------- 1 | # Tito DB Script 2 | shell script to crearte and configure Vince's Tito DB 3 | 4 | Just pull this shell script and run it. It requires the followings: 5 | - centos that can access MySQL db on port 3306; 6 | - mysql client installed 7 | - .my.cnf file configured and stored in user home directory. See this example: 8 | 9 | 10 | \[mysql\] 11 | 12 | user = 'your-username' 13 | 14 | password = 'your-password' 15 | 16 | In a Cloud Assembly Blueprint run it as follows : 17 | 18 | runcmd: 19 | - cd /tmp 20 | - git clone https://github.com/paoloromagnoli/titodb.git 21 | - git checkout ${input.titoVersion} 22 | ./tito_db.sh ${resource..endpoint} 23 | -------------------------------------------------------------------------------- /code-stream/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | VMware Code Stream provides release automation and continuous delivery to enable frequent, reliable releases of infrastructure and applications. 4 | The new deployment is triggered via a commit to Git which results in pipeline execution via a webhook. 5 | 6 | 7 | ├── code-stream # Folder for Code Stream Samples 8 | |── CustomIntgrations # Source files for Custom Integrations 9 | ├── Pipeline # Source files for Pipeline 10 | ├── ABX_Rest.http # Sample Action Based eXtensibility (ABX) Rest API calls 11 | ├── ABX_Reset.http.txt # Sample input to the Rest API for the ABX 12 | └── README.md 13 | 14 | 15 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /third-party/Tito/db_dump.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | connect_error) { 14 | die("Connection failed: " . $conn->connect_error); 15 | } 16 | 17 | $sql = "SELECT home, work, hour_home_departure, hour_work_departure FROM $tablename"; 18 | $result = $conn->query($sql); 19 | 20 | if ($result->num_rows > 0) { 21 | // output data of each row 22 | while($row = $result->fetch_assoc()) { 23 | echo "- " . $row["home"]. " " . $row["work"]. $row["hour_home_departure"] . $row["hour_work_departure"] . "
"; 24 | } 25 | } else { 26 | echo "0 results"; 27 | } 28 | $conn->close(); 29 | ?> -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section of code-assembly repository contains samples related to Action Based eXtensibility (ABX). We have following: 4 | 5 | ├── code-assembly # Folder for Code Stream Samples 6 | |── ABX # Source files for Action Based eXtensibility (ABX) 7 | ├── Route53 # Source files for Managing AWS Route53 changes 8 | ├── ServiceNow # Source files for Service Now Intergation 9 | └── README.md 10 | 11 | 12 | * AssignProjectCAS: Sample code to Assign a user to a Project 13 | * CASGetProjectMembers: Sample code to get Project Members 14 | * CASProjectGitRepoABX: Sample code to sync ABX's for a project to the Git Repo 15 | * CASProjectGitRepoBlueprints: Sample code to sync blueprints to a Git Repo 16 | * InviteUserCAS: Sample code to Invite User to a project 17 | * ProjectOnboarding: Sample code to onboard a project in CAS 18 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | 15 | .fa-icon-rotate(@degrees, @rotation) { 16 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 17 | -webkit-transform: rotate(@degrees); 18 | -ms-transform: rotate(@degrees); 19 | transform: rotate(@degrees); 20 | } 21 | 22 | .fa-icon-flip(@horiz, @vert, @rotation) { 23 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 24 | -webkit-transform: scale(@horiz, @vert); 25 | -ms-transform: scale(@horiz, @vert); 26 | transform: scale(@horiz, @vert); 27 | } 28 | -------------------------------------------------------------------------------- /third-party/Tito/asset/font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | 15 | @mixin fa-icon-rotate($degrees, $rotation) { 16 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 17 | -webkit-transform: rotate($degrees); 18 | -ms-transform: rotate($degrees); 19 | transform: rotate($degrees); 20 | } 21 | 22 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 23 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 24 | -webkit-transform: scale($horiz, $vert); 25 | -ms-transform: scale($horiz, $vert); 26 | transform: scale($horiz, $vert); 27 | } 28 | -------------------------------------------------------------------------------- /third-party/Tito/wavefront-test.php: -------------------------------------------------------------------------------- 1 | 34 | -------------------------------------------------------------------------------- /third-party/terraform/variables.tf: -------------------------------------------------------------------------------- 1 | #main config for AWS provider 2 | variable "aws_region" { 3 | description = "Default AWS provider region" 4 | default = "us-west-1" 5 | } 6 | 7 | # main creds for AWS connection 8 | variable "aws_access_key_id" { 9 | description = "AWS access key" 10 | } 11 | 12 | variable "aws_secret_access_key" { 13 | description = "AWS secret access key" 14 | } 15 | 16 | variable "availability_zone" { 17 | description = "availability zone used for the demo, based on region" 18 | default = { 19 | us-east-1 = "us-east-1a" 20 | } 21 | } 22 | 23 | ########################### dev VPC Config ################################## 24 | 25 | variable "vpc_name" { 26 | description = "VPC for building dev env" 27 | default ="DevTerraformVPC" 28 | } 29 | 30 | variable "vpc_region" { 31 | description = "AWS region" 32 | default = "us-east-1" 33 | } 34 | 35 | variable "vpc_cidr_block" { 36 | description = "Uber IP addressing for dev Network" 37 | default = "10.194.0.0/16" 38 | } 39 | 40 | variable "vpc_public_subnet_cidr" { 41 | description = "Public 0.0 CIDR for externally accessible subnet" 42 | default= "10.194.10.0/24" 43 | } 44 | 45 | 46 | variable "vpc_private_subnet_cidr" { 47 | description = "Private CIDR for internally accessible subnet" 48 | default= "10.194.20.0/24" 49 | } 50 | 51 | variable "vpc_access_from_ip_range" { 52 | description = "Private CIDR for internally accessible subnet" 53 | default= "0.0.0.0/0" 54 | } 55 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | cloud-automation-samples 2 | Copyright (c) 2019 VMware, Inc. All rights reserved 3 | 4 | The BSD-2 license (the "License") set forth below applies to all parts of the cloud-automation-samples project. You may not use this file except in compliance with the License. 5 | 6 | BSD-2 License 7 | 8 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 9 | 10 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 11 | 12 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /third-party/Tito/api.php: -------------------------------------------------------------------------------- 1 | 2 | array("message"=>$ex->getMessage(), "code" => $ex->getCode()))); 28 | } 29 | exit(0); 30 | 31 | /** 32 | * Get the request method 33 | * Return GET, POST, DELETE or PUT 34 | * 35 | * @return string 36 | */ 37 | function getMethod() { 38 | return strtoupper($_SERVER['REQUEST_METHOD']); 39 | } 40 | /** 41 | * Get the base URL without the script name and jquery params 42 | * 43 | * @return string 44 | */ 45 | function getBaseUrl(){ 46 | $url = str_replace($_SERVER['SCRIPT_NAME'], "", $_SERVER['REQUEST_URI']); 47 | return explode("?", $url)[0]; 48 | } 49 | /** 50 | * Get a JSON string from the $data array 51 | * 52 | * @param array $data 53 | * @return string 54 | */ 55 | function renderJsonResponse(array $data = array()) { 56 | $data['request_time'] = time(); 57 | echo json_encode($data); 58 | } 59 | -------------------------------------------------------------------------------- /code-stream/CustomIntegrations/deployment.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "description": "", 4 | "status": "NONE", 5 | "yaml": "---\r\nruntime: \"nodejs\"\r\ncode: |\r\n var context = require(\"./context.js\")\r\n let ip = \"\" ;\r\n const deploymentDet = context.getInput(\"deploymentDetails\");\r\n const node = context.getInput(\"nodeName\");\r\n \"\"\r\n //console.log(deploymentDet);\r\n \r\n const deployments = JSON.parse(deploymentDet);\r\n \r\n console.log(\"deployments: \" + deployments.length);\r\n \r\n for(let i = 0; i < deployments.length;i++){\r\n \r\n if(deployments[i] && deployments[i].hasOwnProperty('resources') ){\r\n console.log(JSON.stringify(deployments[i]));\r\n ip = deployments[i]['resources'][node] ? deployments[i]['resources'][node]['address'] : deployments[i]['resources'][node+'[0]']['address'] ;\r\n break;\r\n \r\n }\r\n }\r\n \r\n\r\n context.setOutput(\"ipAddress\", ip);\r\n\r\ninputProperties:\r\n - name: deploymentDetails\r\n type: text\r\n title: deploymentDetails\r\n placeHolder: deploymentDetails\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: parse deployment details to get IP\r\n - name: nodeName\r\n type: text\r\n title: nodeName\r\n placeHolder: nodeName\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: resource node name\r\noutputProperties:\r\n - name: ipAddress\r\n type: label\r\n title: IP Address\r\n ", 6 | "version": "draft", 7 | "name": "deployment", 8 | "kind": "CustomIntegration", 9 | "tags": [], 10 | "_link": "/pipeline/api/custom-integrations/b584083a85ebea7558b18ffb8affc", 11 | "_createdBy": "slynch", 12 | "_updatedBy": "slynch", 13 | "_updateTimeInMicros": 1561555479511001 14 | } -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/titodb/tito_db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # This scirpt disable SE Linux, install mysql client and create TitoDB 3 | #modified 4 | exec &> logfile.txt 5 | 6 | ##### Variables 7 | db_name=TitoDB 8 | db_password=Tito2016 9 | db_username=root 10 | init_db_password=Tito2016 11 | init_db_username=root 12 | init_db=$1 13 | 14 | echo 15 | echo "####### BIND VARIABLES #######" 16 | echo "db_name=$db_name" > tito.log 17 | echo "db_username=$db_username" >> tito.log 18 | echo "init_db_username=$init_db_username" >> tito.log 19 | echo "init_db=$init_db" >> tito.log 20 | echo "##############################" 21 | 22 | ##### Dsiable SE Linux 23 | sed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux && cat /etc/sysconfig/selinux 24 | 25 | ##### Install mysql and configure client 26 | yum install -y mysql 27 | 28 | cat > ~/.my.cnf < $db_name.sql < tito_as.log 7 | 8 | #### Variables 9 | HTMLPATH=/var/www/html 10 | GITREPO=https://github.com/vmeoc/Tito/ 11 | HTTPDCONF=/etc/httpd/conf/httpd.conf 12 | SQLSERVER=$1 13 | CODEVERSRION=V1.5 14 | 15 | #### disable SE Linux 16 | sed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux && cat /etc/sysconfig/selinux 17 | setenforce 0 18 | 19 | #### Disable firewall 20 | #echo -e "Open Firewall port 80\n" 21 | 22 | #firewall-cmd --zone=public --add-port=80/tcp --permanent 23 | #firewall-cmd --reload 24 | 25 | #### Install and configire HTTPD 26 | echo 27 | echo -e "Install Apache HTTPD & PHP\n" 28 | 29 | #yum update -y 30 | yum install httpd -y 31 | /usr/sbin/service httpd start 32 | yum install php -y 33 | yum install php-mysql -y 34 | /usr/sbin/chkconfig httpd on 35 | 36 | #### Install Git 37 | echo 38 | echo -e "install Git\n" 39 | 40 | yum install git -y 41 | 42 | echo 43 | echo -e "Install Tito sources \n" 44 | 45 | #### Download Tito code and configure HTTPD 46 | cd $HTMLPATH 47 | git clone $GITREPO . 48 | git checkout tags/$CodeVersion 49 | 50 | echo 51 | echo -e "conf httpd.conf to include PHP and set MySQL server\n" 52 | 53 | echo 54 | echo -e "modify SQLSERVER variable to remove not needed characters" 55 | SQLSERVER=$(tr -d []\' <<< $SQLSERVER) 56 | 57 | echo 58 | echo "LoadModule php5_module modules/libphp5.so" >> $HTTPDCONF 59 | cat <> $HTTPDCONF 60 | 61 | SetEnv TITODBSERVER "$SQLSERVER" 62 | 63 | EOF 64 | 65 | echo 66 | echo -e "conf php.ini Timezone \n" 67 | 68 | echo "date.timezone = \"Europe/Rome\"" >> /etc/php.ini 69 | 70 | #### Start HTTPD 71 | echo 72 | echo -e "Restart Apache HTTPD" 73 | 74 | /usr/sbin/service httpd restart 75 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/apache/envvars: -------------------------------------------------------------------------------- 1 | 2 | # envvars - default environment variables for apache2ctl 3 | 4 | # this won't be correct after changing uid 5 | unset HOME 6 | 7 | # for supporting multiple apache2 instances 8 | if [ "${APACHE_CONFDIR##/etc/apache2-}" != "${APACHE_CONFDIR}" ] ; then 9 | SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}" 10 | else 11 | SUFFIX= 12 | fi 13 | 14 | # Since there is no sane way to get the parsed apache2 config in scripts, some 15 | # settings are defined via environment variables and then used in apache2ctl, 16 | # /etc/init.d/apache2, /etc/logrotate.d/apache2, etc. 17 | export APACHE_RUN_USER=www-data 18 | export APACHE_RUN_GROUP=www-data 19 | # temporary state file location. This might be changed to /run in Wheezy+1 20 | export APACHE_PID_FILE=/var/run/apache2/apache2$SUFFIX.pid 21 | export APACHE_RUN_DIR=/var/run/apache2$SUFFIX 22 | export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX 23 | # Only /var/log/apache2 is handled by /etc/logrotate.d/apache2. 24 | export APACHE_LOG_DIR=/var/log/apache2$SUFFIX 25 | 26 | ## The locale used by some modules like mod_dav 27 | export LANG=C 28 | ## Uncomment the following line to use the system default locale instead: 29 | #. /etc/default/locale 30 | 31 | export LANG 32 | 33 | ## The command to get the status for 'apache2ctl status'. 34 | ## Some packages providing 'www-browser' need '--dump' instead of '-dump'. 35 | #export APACHE_LYNX='www-browser -dump' 36 | 37 | ## If you need a higher file descriptor limit, uncomment and adjust the 38 | ## following line (default is 8192): 39 | #APACHE_ULIMIT_MAX_FILES='ulimit -n 65536' 40 | 41 | ## If you would like to pass arguments to the web server, add them below 42 | ## to the APACHE_ARGUMENTS environment. 43 | #export APACHE_ARGUMENTS='' 44 | 45 | ## Enable the debug mode for maintainer scripts. 46 | ## This will produce a verbose output on package installations of web server modules and web application 47 | ## installations which interact with Apache 48 | #export APACHE2_MAINTSCRIPT_DEBUG=1 49 | -------------------------------------------------------------------------------- /third-party/cypress/slackUpload.py: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Tito Application Test Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | import os 36 | import slack 37 | import sys 38 | 39 | client = slack.WebClient(token=os.environ['SLACK_USER_TOKEN']) 40 | 41 | response = client.files_upload( 42 | channels='operationsaas-sre', 43 | title="Failed Cypress UI Test for review", 44 | file="/home/testrunner/cypress/videos/tito/titoactions.spec.js.mp4", 45 | thread_ts=os.environ['SLACK_THREAD']) 46 | assert response["ok"] 47 | 48 | sys.exit(-1) 49 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/PluginBasedDesign/[v1]SimpleAwsInstance/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2023 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | # simple statically configured plug-in based AWS instance 36 | formatVersion: 1 37 | inputs: {} 38 | resources: 39 | Idem_AWS_EC2_INSTANCE_1: 40 | type: Idem.AWS.EC2.INSTANCE 41 | properties: 42 | name: my-instance-1 43 | region: us-east-1 44 | account: AWS 45 | image_id: ami-0aa7d40eeae50c9a9 46 | availability_zone: us-east-1a 47 | instance_type: t2.small 48 | subnet_id: subnet-07d2c529b6336bd0e 49 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/ProjectOnboarding.abx: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | exportVersion: "1" 36 | exportId: "8a769e2b6c29e142016c3c0c14841136" 37 | name: "Project Onboarding" 38 | inputs: 39 | projectName: "VMworldTest_" 40 | configureABX: "false" 41 | memberDomain: "csp.local" 42 | projectCount: 5 43 | memberTemplate: "VMworld_" 44 | configureBlueprints: "true" 45 | projectNameTemplate: "VMworldTest_" 46 | timeoutSeconds: 600 47 | actionType: "FLOW" 48 | actionTemplateName: "Action flow with fork and join" 49 | actionTemplateNamespace: "com.vmware.automation.abx" 50 | memoryInMB: 150 51 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/README.md: -------------------------------------------------------------------------------- 1 | # cloud-automation-samples 2 | 3 | This section of code-assembly repository contains samples related to blueprints. 4 | 5 | Each folder must be defined as following 6 | 7 | |── Name # Name of the blueprint 8 | ├── blueprint.yaml # The YAML file that contains the code for the blueprint 9 | 10 | The blueprint.yaml must have the following 11 | 12 | version: 1.0 13 | name: bp-tito-dockerhost 14 | 15 | We have the following sample blueprints: 16 | 17 | * DockerHost: Blueprint to deploy a docker host 18 | * TestRunner: Blueprint to test Tito Application using Cypress and use Locus for load testing 19 | * Tito: Blueprint to deploy Tito Application 20 | * TitoRoute53: Blueprint to deploy Tito Application using AWS Route53 as Load Balancer 21 | * WavefrontProxy: Blueprint to deploy wavefront proxy 22 | * PluginBasedDesign: 23 | * [v1]SimpleAwsInstance: Blueprint to deploy simple statically configured plug-in based AWS instance 24 | * [v2]InstanceWithComputeAllocation: Blueprint to deploy plug-in based AWS instance with dynamically configured 25 | account, region and availability_zone using a Compute Allocation Helper 26 | * [v3]InstanceWithComputeFlavorImageAllocation: Blueprint to deploy plug-in based AWS instance with dynamically 27 | configured account, region, availability_zone, instance_type and image_id using Compute, Flavor and Image Allocation 28 | Helpers 29 | * [v4]InstanceWithComputeFlavorImageNetworkAllocation: Blueprint to deploy plug-in based AWS instance with 30 | dynamically configured account, region, availability_zone, instance_type, image_id and subnet_id using Compute, Flavor, 31 | Image and Network Allocation Helpers 32 | * [v5]DynamicallyConfiguredInstancesAndVolume: Blueprint to deploy two plug-in based AWS instances and a plug-in 33 | based AWS volume, attached to one of the instances, all of which dynamically configured with the same Allocation Helpers 34 | * [v6]DynamicallyConfiguredInstancesVolumeAndKey: Blueprint to deploy two plug-in based AWS instances, a plug-in 35 | based AWS volume, attached to one of the instances and encrypted with a "classic" KMS key, all of which dynamically 36 | configured with the same Allocation Helpers 37 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/CASGetProjectMembers.abx: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | exportVersion: "1" 36 | exportId: "8a76941c6c29e137016c3c8f4e401245" 37 | name: "CAS - Get Project Members" 38 | runtime: "python" 39 | entrypoint: "handler" 40 | inputs: 41 | baseUri: "https://api.mgmt.cloud.vmware.com" 42 | casToken: "CHANGE TOKEN" 43 | timeoutSeconds: 180 44 | deploymentTimeoutSeconds: 600 45 | actionType: "SCRIPT" 46 | configuration: 47 | const-providers: 48 | - "aws" 49 | const_azure-system_managed_identity: false 50 | actionTemplateName: "Custom script" 51 | actionTemplateNamespace: "com.vmware.automation.abx" 52 | memoryInMB: 150 53 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/ProjectOnboarding.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | version: 1 36 | flow: 37 | flow_start: 38 | next: action1 39 | action1: 40 | action: CAS - Create Projects 41 | next: fork1 42 | fork1: 43 | fork: 44 | next: [action2, action3] 45 | action2: 46 | action: CAS - Project Git Repo Blueprints 47 | next: join1 48 | action3: 49 | action: CAS - Project Git Repo ABX 50 | next: join1 51 | join1: 52 | join: 53 | type: all # type of the join (all or any) 54 | next: flow_end 55 | onError: 56 | action: hello aws # ID of the action to be triggered should an error occur 57 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/AssignProjectCAS.abx: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | exportVersion: "1" 36 | exportId: "8a769f1c6c4790b0016c50d0873f0c31" 37 | name: "Assign Project - CAS" 38 | runtime: "python" 39 | entrypoint: "handler" 40 | inputs: 41 | match: "vmworld" 42 | baseUri: "https://api.mgmt.cloud.vmware.com" 43 | casToken: "CHANGE TOKEN" 44 | invitedUsers: 45 | - "srlynch@gmail.com" 46 | timeoutSeconds: 180 47 | deploymentTimeoutSeconds: 600 48 | actionType: "SCRIPT" 49 | configuration: 50 | const-providers: 51 | - "aws" 52 | const_azure-system_managed_identity: false 53 | actionTemplateName: "Custom script" 54 | actionTemplateNamespace: "com.vmware.automation.abx" 55 | memoryInMB: 150 56 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/InviteUserCAS.abx: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | exportVersion: "1" 36 | exportId: "8a7699c86c3d8f37016c4074c4730306" 37 | name: "Invite User - CAS" 38 | runtime: "python" 39 | entrypoint: "handler" 40 | inputs: 41 | orgId: "b5959ebd-921b-4e11-a7b7-b6cdd6f52dee" 42 | baseUri: "https://console.cloud.vmware.com" 43 | casToken: "CHANGE TOKEN" 44 | usernames: 45 | - "srlynch@gmail.com" 46 | timeoutSeconds: 180 47 | deploymentTimeoutSeconds: 600 48 | actionType: "SCRIPT" 49 | configuration: 50 | const-providers: 51 | - "aws" 52 | const_azure-system_managed_identity: false 53 | actionTemplateName: "Custom script" 54 | actionTemplateNamespace: "com.vmware.automation.abx" 55 | memoryInMB: 150 56 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/TitoRoute53/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | formatVersion: 1 35 | name: bp-tito-route53 36 | version: 1.0.1 37 | inputs: 38 | region: 39 | default: ap-southeast-2 40 | readOnly: true 41 | type: string 42 | route53_zone_id: 43 | default: Z1DXP5AZ44Z4IY 44 | readOnly: true 45 | type: string 46 | dns_name: 47 | type: string 48 | pattern: '[a-z]' 49 | ELBDNSname: 50 | type: string 51 | resources: 52 | Tito_Route53: 53 | type: Cloud.Service.AWS.Route53.Record 54 | properties: 55 | name: '${input.dns_name}' 56 | type: A 57 | alias: 58 | - name: '${input.ELBDNSname}' 59 | evaluate_target_health: false 60 | zone_id: Z1GM3OXH4ZPM65 61 | region: '${input.region}' 62 | zone_id: '${input.route53_zone_id}' 63 | account: ca-aws 64 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/PluginBasedDesign/[v2]InstanceWithComputeAllocation/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2023 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | # plug-in based AWS instance with dynamically configured account, region and 36 | # availability_zone using a Compute Allocation Helper 37 | formatVersion: 1 38 | inputs: 39 | instance_name: 40 | type: string 41 | resources: 42 | Allocations_Compute_1: 43 | type: Allocations.Compute 44 | properties: 45 | constraints: 46 | - tag: env:dev 47 | Idem_AWS_EC2_INSTANCE_1: 48 | type: Idem.AWS.EC2.INSTANCE 49 | properties: 50 | name: ${input.instance_name} 51 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 52 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 53 | image_id: ami-0aa7d40eeae50c9a9 54 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 55 | instance_type: t2.small 56 | subnet_id: subnet-07d2c529b6336bd0e 57 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/CASProjectGitRepoBlueprints.abx: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | exportVersion: "1" 36 | exportId: "8a76a0ac6c29e15e016c3c0219181850" 37 | name: "CAS - Project Git Repo Blueprints" 38 | runtime: "python" 39 | entrypoint: "handler" 40 | inputs: 41 | name: "GitHub CS" 42 | type: "com.github.saas" 43 | typeId: "com.github" 44 | baseUri: "https://api.mgmt.cloud.vmware.com/" 45 | casToken: "CHANGE TOKEN" 46 | projectIds: 47 | - "cb858ff2-f31c-481f-a69f-34ad0ef35cd3" 48 | - "c908dd79-e7bf-4c40-ad57-d61a59311831" 49 | syncEnabled: "true" 50 | configBlueprint: 51 | path: "Assets/Blueprints" 52 | branch: "master" 53 | repository: "riazm-vmware/OperationSaaS" 54 | contentType: "BLUEPRINT" 55 | integrationId: "ba2d2da45dcc67558db040f20a75" 56 | timeoutSeconds: 180 57 | deploymentTimeoutSeconds: 600 58 | actionType: "SCRIPT" 59 | configuration: 60 | const-providers: 61 | - "aws" 62 | const_azure-system_managed_identity: false 63 | actionTemplateName: "Custom script" 64 | actionTemplateNamespace: "com.vmware.automation.abx" 65 | memoryInMB: 150 66 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/CASProjectGitRepoABX.abx: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | exportVersion: "1" 36 | exportId: "8a769e2b6c29e142016c3bd5d6b11111" 37 | name: "CAS - Project Git Repo ABX" 38 | runtime: "python" 39 | entrypoint: "handler" 40 | inputs: 41 | name: "GitHub CS" 42 | type: "com.github.saas" 43 | typeId: "com.github" 44 | baseUri: "https://api.mgmt.cloud.vmware.com" 45 | casToken: "CHANGE TOKEN" 46 | configABX: 47 | path: "Assets/ABX-actions" 48 | branch: "master" 49 | repository: "riazm-vmware/OperationSaaS" 50 | contentType: "ABX_SCRIPTS" 51 | integrationId: "ba2d2da45dcc67558db040f20a75" 52 | projectIds: 53 | - "cb858ff2-f31c-481f-a69f-34ad0ef35cd3" 54 | - "c908dd79-e7bf-4c40-ad57-d61a59311831" 55 | syncEnabled: "true" 56 | configureABX: "false" 57 | timeoutSeconds: 180 58 | deploymentTimeoutSeconds: 600 59 | actionType: "SCRIPT" 60 | configuration: 61 | const-providers: 62 | - "aws" 63 | const_azure-system_managed_identity: false 64 | actionTemplateName: "Custom script" 65 | actionTemplateNamespace: "com.vmware.automation.abx" 66 | memoryInMB: 150 67 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Contributing to cloud-automation-samples 4 | 5 | The cloud-automation-samples project team welcomes contributions from the community. Before you start working with cloud-automation-samples, please 6 | read our [Developer Certificate of Origin](https://cla.vmware.com/dco). All contributions to this repository must be 7 | signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on 8 | as an open-source patch. 9 | 10 | ## Contribution Flow 11 | 12 | This is a rough outline of what a contributor's workflow looks like: 13 | 14 | - Create a topic branch from where you want to base your work 15 | - Make commits of logical units 16 | - Make sure your commit messages are in the proper format (see below) 17 | - Push your changes to a topic branch in your fork of the repository 18 | - Submit a pull request 19 | 20 | Example: 21 | 22 | ``` shell 23 | git remote add upstream https://github.com/vmware/cloud-automation-samples.git 24 | git checkout -b my-new-feature master 25 | git commit -a 26 | git push origin my-new-feature 27 | ``` 28 | 29 | ### Staying In Sync With Upstream 30 | 31 | When your branch gets out of sync with the vmware/master branch, use the following to update: 32 | 33 | ``` shell 34 | git checkout my-new-feature 35 | git fetch -a 36 | git pull --rebase upstream master 37 | git push --force-with-lease origin my-new-feature 38 | ``` 39 | 40 | ### Updating pull requests 41 | 42 | If your PR fails to pass CI or needs changes based on code review, you'll most likely want to squash these changes into 43 | existing commits. 44 | 45 | If your pull request contains a single commit or your changes are related to the most recent commit, you can simply 46 | amend the commit. 47 | 48 | ``` shell 49 | git add . 50 | git commit --amend 51 | git push --force-with-lease origin my-new-feature 52 | ``` 53 | 54 | If you need to squash changes into an earlier commit, you can use: 55 | 56 | ``` shell 57 | git add . 58 | git commit --fixup 59 | git rebase -i --autosquash master 60 | git push --force-with-lease origin my-new-feature 61 | ``` 62 | 63 | Be sure to add a comment to the PR indicating your new changes are ready to review, as GitHub does not generate a 64 | notification when you git push. 65 | 66 | ### Code Style 67 | 68 | ### Formatting Commit Messages 69 | 70 | We follow the conventions on [How to Write a Git Commit Message](http://chris.beams.io/posts/git-commit/). 71 | 72 | Be sure to include any related GitHub issue references in the commit message. See 73 | [GFM syntax](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) for referencing issues 74 | and commits. 75 | 76 | ## Reporting Bugs and Creating Issues 77 | 78 | When opening a new issue, try to roughly follow the commit message format conventions above. 79 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/PluginBasedDesign/[v3]InstanceWithComputeFlavorImageAllocation/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2023 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | # plug-in based AWS instance with dynamically configured account, region, 36 | # availability_zone, instance_type and image_id using Compute, Flavor and Image 37 | # Allocation Helpers 38 | formatVersion: 1 39 | inputs: 40 | instance_name: 41 | type: string 42 | resources: 43 | Allocations_Compute_1: 44 | type: Allocations.Compute 45 | properties: 46 | constraints: 47 | - tag: env:dev 48 | Allocations_Flavor_1: 49 | type: Allocations.Flavor 50 | properties: 51 | flavor: small 52 | Allocations_Image_1: 53 | type: Allocations.Image 54 | properties: 55 | image: ubuntu 56 | Idem_AWS_EC2_INSTANCE_1: 57 | type: Idem.AWS.EC2.INSTANCE 58 | properties: 59 | name: ${input.instance_name} 60 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 61 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 62 | image_id: ${resource.Allocations_Image_1.selectedImageId} 63 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 64 | instance_type: ${resource.Allocations_Flavor_1.selectedInstanceTypeName} 65 | subnet_id: subnet-07d2c529b6336bd0e 66 | -------------------------------------------------------------------------------- /code-stream/CustomIntegrations/GetResourceAddress.yml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Pipeline Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | runtime: "nodejs" 36 | code: | 37 | var context = require("./context.js") 38 | let ip = "" ; 39 | const deploymentDet = context.getInput("deploymentDetails"); 40 | const node = context.getInput("nodeName"); 41 | 42 | //console.log(deploymentDet); 43 | 44 | const deployment = JSON.parse(deploymentDet); 45 | const resources = deployment.resources 46 | console.log("resources: " + resources.length); 47 | 48 | for(let i = 0; i < resources.length;i++){ 49 | 50 | if(resources[i].name.indexOf(node) != -1){ 51 | 52 | ip = resources[i].properties.address 53 | 54 | } 55 | } 56 | 57 | context.setOutput("ipAddress", ip); 58 | 59 | inputProperties: 60 | - name: deploymentDetails 61 | type: text 62 | title: deploymentDetails 63 | placeHolder: deploymentDetails 64 | bindable: true 65 | labelInfo: true 66 | labelMessage: parse deployment details to get IP 67 | - name: nodeName 68 | type: text 69 | title: nodeName 70 | placeHolder: nodeName 71 | bindable: true 72 | labelInfo: true 73 | labelMessage: resource node name 74 | outputProperties: 75 | - name: ipAddress 76 | type: label 77 | title: IP Address -------------------------------------------------------------------------------- /third-party/cypress/titoactions.spec.js: -------------------------------------------------------------------------------- 1 | /* 2 | # VMware Tito Application Test Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | */ 34 | 35 | /// 36 | //test data here 37 | let addresses = [ 38 | { 39 | home: "San Francisco, CA, USA", 40 | work: "VMware Hilltop B, Hillview Avenue, Palo Alto, CA, USA" 41 | }, 42 | { 43 | home: "Princeton, NJ, USA", 44 | work: "New York, NY, USA" 45 | }, 46 | { 47 | home: "Grays Point NSW, Australia", 48 | work: "175 Pitt Street,Sydney NSW, Australia" 49 | }, 50 | ]; 51 | context('Actions', () => { 52 | beforeEach(() => { 53 | //assumes environment variable set on execution 54 | cy.visit(Cypress.env('host'+/Tito/)) 55 | }) 56 | for (let i=0; i { 59 | cy.get('#home') 60 | .type(addresses[i].home).should('have.value', addresses[i].home) 61 | cy.get('#work') 62 | .type(addresses[i].work).should('have.value',addresses[i].work) 63 | cy.get('[name="home_time"]').select('07:00') 64 | cy.get('.col-lg-offset-2 > .form-group > .service-item > .select-date').select('17:00') 65 | cy.get('#submit').click('top') 66 | 67 | }) 68 | } 69 | 70 | }) 71 | -------------------------------------------------------------------------------- /code-stream/ABX_Rest.http.txt: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Pipeline Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | 36 | # CAS API Token 37 | @refreshToken = "" 38 | 39 | @bearer = {{login.response.body.token}} 40 | 41 | ### login 42 | # @name login 43 | POST https://api.mgmt.cloud.vmware.com/iaas/login HTTP/1.1 44 | Accept: application/json 45 | Content-Type: application/json 46 | 47 | {"refreshToken": {{refreshToken}} } 48 | 49 | ### - Get all ABX actions 50 | 51 | GET https://api.mgmt.cloud.vmware.com/abx/api/resources/actions/ 52 | Accept: application/json 53 | Authorization: Bearer {{bearer}} 54 | 55 | 56 | ### - Get ABX action - Route53 Update Alias 57 | GET https://api.mgmt.cloud.vmware.com/abx/api/resources/actions/8a7689dd6badd9cb016bb5014cb908ab?projectId=7ea6e1b3-660f-49c9-8937-4f6323cbb096 58 | Accept: application/json 59 | Authorization: Bearer {{bearer}} 60 | 61 | 62 | ### Execute - Route53 63 | 64 | POST https://api.mgmt.cloud.vmware.com/abx/api/resources/actions/8a7689dd6badd9cb016bb5014cb908ab 65 | Accept: application/json 66 | Authorization: Bearer {{bearer}} 67 | 68 | 69 | { 70 | "projectId": "7ea6e1b3-660f-49c9-8937-4f6323cbb096", 71 | "inputs": { 72 | "name": "tito.vmwapj.com", 73 | "region": "ap-southeast-2", 74 | "zoneId": "Z1DXP5AZ44Z4IY", 75 | "DNSName": "titoloadbalancer-mcm588524-11053-178741500.ap-southeast-2.elb.amazonaws.com", 76 | "aliasHostedZoneId": "Z1GM3OXH4ZPM65" 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/CASGetProjectMembers.py: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | from botocore.vendored import requests 35 | import json 36 | 37 | def handler(context, inputs): 38 | 39 | baseUri = inputs['baseUri'] 40 | casToken = inputs['casToken'] 41 | url = baseUri + "/iaas/login" 42 | headers = {"Accept":"application/json","Content-Type":"application/json"} 43 | payload = {"refreshToken":casToken} 44 | 45 | results = requests.post(url,json=payload,headers=headers) 46 | print(results.json()["token"]) 47 | bearer = "Bearer " 48 | bearer = bearer + results.json()["token"] 49 | 50 | casURI = baseUri + "/iaas/api/projects" 51 | print(casURI) 52 | headers = {"Accept":"application/json","Content-Type":"application/json", "Authorization":bearer } 53 | 54 | results = requests.get(casURI, headers=headers) 55 | print(results.json()['content']) 56 | 57 | projects = results.json()['content'] 58 | print(projects) 59 | projectInfo = []; 60 | 61 | for project in projects: 62 | print(project) 63 | projMember = { 64 | "id": project['id'], 65 | "name": project['name'], 66 | "members": project['members'] 67 | 68 | } 69 | projectInfo.append(projMember) 70 | 71 | outputs = { 72 | "projects": projectInfo 73 | } 74 | return outputs -------------------------------------------------------------------------------- /code-stream/CustomIntegrations/deployment.yml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Pipeline Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | --- 35 | runtime: "nodejs" 36 | code: | 37 | const context = require("./context.js") 38 | let ip = "" ; 39 | const deploymentDet = context.getInput("deploymentDetails"); 40 | const node = context.getInput("nodeName"); 41 | 42 | const deployments = JSON.parse(deploymentDet); 43 | 44 | console.log("deployments: " + deployments.length); 45 | 46 | for(let i = 0; i < deployments.length;i++){ 47 | 48 | if(deployments[i] && deployments[i].hasOwnProperty('resources') ){ 49 | console.log(JSON.stringify(deployments[i])); 50 | ip = deployments[i]['resources'][node] ? deployments[i]['resources'][node]['address'] : deployments[i]['resources'][node+'[0]']['address'] ; 51 | break; 52 | 53 | } 54 | } 55 | 56 | 57 | context.setOutput("ipAddress", ip); 58 | 59 | inputProperties: 60 | - name: deploymentDetails 61 | type: text 62 | title: deploymentDetails 63 | placeHolder: deploymentDetails 64 | bindable: true 65 | labelInfo: true 66 | labelMessage: parse deployment details to get IP 67 | - name: nodeName 68 | type: text 69 | title: nodeName 70 | placeHolder: nodeName 71 | bindable: true 72 | labelInfo: true 73 | labelMessage: resource node name 74 | outputProperties: 75 | - name: ipAddress 76 | type: label 77 | title: IP Address 78 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/CASProjecrGitRepoBlueprints.py: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | from botocore.vendored import requests 35 | import json 36 | 37 | def handler(context, inputs): 38 | 39 | for projectId in inputs['projectIds']: 40 | 41 | baseUri = inputs['baseUri'] 42 | casToken = inputs['casToken'] 43 | url = baseUri + "/iaas/login" 44 | headers = {"Accept":"application/json","Content-Type":"application/json"} 45 | payload = {"refreshToken":casToken} 46 | 47 | results = requests.post(url,json=payload,headers=headers) 48 | print(results.json()["token"]) 49 | bearer = "Bearer " 50 | bearer = bearer + results.json()["token"] 51 | 52 | casURI = baseUri + "/content/api/sources" 53 | print(casURI) 54 | headers = {"Accept":"application/json","Content-Type":"application/json", "Authorization":bearer } 55 | 56 | payload = { 57 | "name": inputs['name'], 58 | "typeId": inputs['typeId'], 59 | "type": inputs['type'], 60 | "projectId": projectId, 61 | "config":inputs['configBlueprint'], 62 | "syncEnabled": inputs['syncEnabled'] 63 | } 64 | results = requests.post(casURI,json=payload, headers=headers) 65 | print(results.json()) 66 | 67 | outputs = {} 68 | outputs = { 69 | } 70 | return outputs -------------------------------------------------------------------------------- /cloud-assembly/blueprints/PluginBasedDesign/[v4]InstanceWithComputeFlavorImageNetworkAllocation/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2023 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | # plug-in based AWS instance with dynamically configured account, region, 36 | # availability_zone, instance_type, image_id and subnet_id using Compute, 37 | # Flavor, Image and Network Allocation Helpers 38 | formatVersion: 1 39 | inputs: 40 | instance_name: 41 | type: string 42 | resources: 43 | Allocations_Compute_1: 44 | type: Allocations.Compute 45 | properties: 46 | constraints: 47 | - tag: env:dev 48 | Allocations_Flavor_1: 49 | type: Allocations.Flavor 50 | properties: 51 | flavor: small 52 | Allocations_Image_1: 53 | type: Allocations.Image 54 | properties: 55 | image: ubuntu 56 | Allocations_Network_1: 57 | type: Allocations.Network 58 | properties: 59 | networkType: existing 60 | constraints: 61 | - tag: alternative-net 62 | Idem_AWS_EC2_INSTANCE_1: 63 | type: Idem.AWS.EC2.INSTANCE 64 | properties: 65 | name: ${input.instance_name} 66 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 67 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 68 | image_id: ${resource.Allocations_Image_1.selectedImageId} 69 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 70 | instance_type: ${resource.Allocations_Flavor_1.selectedInstanceTypeName} 71 | subnet_id: ${resource.Allocations_Network_1.selectedSubnet.id} 72 | -------------------------------------------------------------------------------- /cloud-assembly/ABX/AssignProjectCAS.py: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | from botocore.vendored import requests 35 | import json 36 | 37 | def handler(context, inputs): 38 | 39 | baseUri = inputs['baseUri'] 40 | casToken = inputs['casToken'] 41 | url = baseUri + "/iaas/login" 42 | headers = {"Accept":"application/json","Content-Type":"application/json"} 43 | payload = {"refreshToken":casToken} 44 | 45 | results = requests.post(url,json=payload,headers=headers) 46 | print(results.json()["token"]) 47 | bearer = "Bearer " 48 | bearer = bearer + results.json()["token"] 49 | 50 | casURI = baseUri + "/iaas/api/projects" 51 | print(casURI) 52 | headers = {"Accept":"application/json","Content-Type":"application/json", "Authorization":bearer } 53 | 54 | results = requests.get(casURI, headers=headers) 55 | #print(results.json()['content']) 56 | 57 | projects = results.json()['content'] 58 | projectInfo = []; 59 | 60 | for project in projects: 61 | 62 | print( project['name'].lower() ) 63 | 64 | projectName = project['name'] 65 | 66 | projectName.find(inputs['match']) 67 | projMember = { 68 | "id": project['id'], 69 | "name": project['name'], 70 | "members": project['members'] 71 | 72 | } 73 | projectInfo.append(projMember) 74 | 75 | outputs = { 76 | "projects": projectInfo 77 | } 78 | return outputs -------------------------------------------------------------------------------- /cloud-assembly/ABX/CASProjectGitRepoABX.py: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Actions Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | from botocore.vendored import requests 35 | import json 36 | 37 | def handler(context, inputs): 38 | if inputs['configureABX'] == 'true': 39 | for projectId in inputs['projectIds']: 40 | 41 | baseUri = inputs['baseUri'] 42 | casToken = inputs['casToken'] 43 | url = baseUri + "/iaas/login" 44 | headers = {"Accept":"application/json","Content-Type":"application/json"} 45 | payload = {"refreshToken":casToken} 46 | 47 | results = requests.post(url,json=payload,headers=headers) 48 | print(results.json()["token"]) 49 | bearer = "Bearer " 50 | bearer = bearer + results.json()["token"] 51 | 52 | casURI = baseUri + "/content/api/sources" 53 | print(casURI) 54 | headers = {"Accept":"application/json","Content-Type":"application/json", "Authorization":bearer } 55 | 56 | payload = { 57 | "name": inputs['name'], 58 | "typeId": inputs['typeId'], 59 | "type": inputs['type'], 60 | "projectId": projectId, 61 | "config":inputs['configABX'], 62 | "syncEnabled": inputs['syncEnabled'] 63 | } 64 | results = requests.post(casURI,json=payload, headers=headers) 65 | print(results.json()) 66 | 67 | outputs = {} 68 | outputs = { 69 | } 70 | return outputs 71 | else: 72 | print("skipping ABX git configuration") -------------------------------------------------------------------------------- /third-party/Tito/asset/js/book.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @param {Array} carsList The cars list to print 3 | * @param {string} containerSelector The container selector where print the cars list 4 | * @param {object} opts The build options 5 | */ 6 | function initCarsList(carsList, containerSelector, opts) { 7 | 8 | // Throw error if no car in list 9 | if (!Array.isArray(carsList)) { 10 | throw new Error('Missing carsList parameter or is not an array'); 11 | } 12 | 13 | // Throw error if no container selector 14 | if (!containerSelector) { 15 | throw new Error('Missing containerSelector parameter'); 16 | } 17 | 18 | opts = opts || {}; 19 | 20 | // Get container reference 21 | const container = $(containerSelector); 22 | // Create table 23 | const table = $('
'); 24 | // Create body table 25 | const tableBody = $(''); 26 | 27 | // Append row for each car into cars list 28 | carsList.forEach((car, index) => tableBody.append(buildCardRow(car, { 29 | buttonClass: opts.buttonClass, 30 | buttonContent: opts.buttonContent || 'Book it', 31 | buttonClick: opts.buttonClick || function(id, index, elm) {}, 32 | idKey: opts.idKey ||  'id', 33 | index 34 | }))); 35 | 36 | // If no car into cars list, then append empty row 37 | if (!carsList.length) { 38 | tableBody.append(buildEmptyListRow(opts.emptyListMessage || 'No Cars', opts.emptyListClass)); 39 | } 40 | 41 | // Append body table into table 42 | table.append(tableBody); 43 | // Replace container content by the created table 44 | container.html(table); 45 | } 46 | 47 | /** 48 | * @param {string} emptyListMessage The empty list message 49 | * @param {string} emptyListClass The empty list "td" class 50 | * @return 51 | */ 52 | function buildEmptyListRow(emptyListMessage, emptyListClass) { 53 | return $(` 54 | ${emptyListMessage} 55 | `); 56 | } 57 | 58 | /** 59 | * @param {Car} data The car to display 60 | * @param {object} opts The build options 61 | * @return 62 | */ 63 | function buildCardRow(data, opts) { 64 | 65 | opts = opts || {}; 66 | 67 | const row = $(` 68 | 69 | ${data.name} 70 | ${data.capa}% capa remaining 71 | ${data.location} km away 72 | `); 73 | 74 | if (data.available) { 75 | // Create avaible td 76 | const tdAvailable = $('available'); 77 | const tdButton = $(''); 78 | // Create book button 79 | const button = $(''); 80 | 81 | // Attach click event 82 | button.click(function(elm) { 83 | // Call button click function 84 | opts.buttonClick(data[opts.idKey], opts.index, elm); 85 | }); 86 | 87 | tdButton.append(button); 88 | row.append(tdAvailable); 89 | row.append(tdButton); 90 | } else { 91 | row.append('not available'); 92 | row.append(''); 93 | 94 | } 95 | return row; 96 | } -------------------------------------------------------------------------------- /CODE-OF-CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in cloud-automation-samples project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at oss-coc@vmware.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | 78 | -------------------------------------------------------------------------------- /third-party/Tito/README.md: -------------------------------------------------------------------------------- 1 | 37 | ![My image](https://vmeoc.github.io/vmeoc/TitoRoad.png) 38 | 39 | Tito is a sample multi tiers application used to showcase the various ways of deploying and running an app across multiple technologies such as VMware vRealize Automation, virtual machines, containers, Kubernetes, public cloud, PaaS, etc... etc... etc... 40 | 41 | Tito is a super simple application: 42 | * to make it easy to understand the code (and therefore modify it) 43 | * developped with widely supported languages/framework (PHP, Bootstrap) 44 | * Running on a typical 3 Tiers architecture 45 | 46 | What does the app do when running? 47 | 48 | > I thought most people are commuting pretty much everyday so I wrote a "Time Traffic Overview" app a.k.a Tito. 49 | >Simply enter your home address, work address and regular time departure and it will give you a number of stats such as the duration for each day of the week, the total duration, per week, per month, etc... 50 | >Beware, some of them are scary. 51 | >Have you ever calculated the amount of time in your life you will spend commuting? Here we go... 52 | 53 | ![My image](https://vmeoc.github.io/vmeoc/Result.png) 54 | 55 | ### App files structure 56 | 57 | Tito is made of a simple index.php webpage providing the initial content, once the user has clicked on submit, form_result.php is triggered and will turn the inputs in the right format, ask Google on the duration, create some stats, display them, display a map, write the inputs in a DB. That's it! 58 | The folder "Deployment" contain the various Infra as a code files to deploy the app. 59 | The other folder are just css files, picture files and other stuff. 60 | 61 | ### App architecture 62 | tito is a 3 Tier architecture. This vRealize Automation blueprint does a good job at showing the full application architecture 63 | ![My image](https://vmeoc.github.io/vmeoc/vRABlueprint.png) 64 | 65 | 66 | ### For more information 67 | 68 | visit www.vmcloud.fr 69 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/titodb/mysqld.cnf: -------------------------------------------------------------------------------- 1 | 2 | # The MySQL database server configuration file. 3 | # 4 | # You can copy this to one of: 5 | # - "/etc/mysql/my.cnf" to set global options, 6 | # - "~/.my.cnf" to set user-specific options. 7 | # 8 | # One can use all long options that the program supports. 9 | # Run program with --help to get a list of available options and with 10 | # --print-defaults to see which it would actually understand and use. 11 | # 12 | # For explanations see 13 | # http://dev.mysql.com/doc/mysql/en/server-system-variables.html 14 | 15 | # This will be passed to all mysql clients 16 | # It has been reported that passwords should be enclosed with ticks/quotes 17 | # escpecially if they contain "#" chars... 18 | # Remember to edit /etc/mysql/debian.cnf when changing the socket location. 19 | 20 | # Here is entries for some specific programs 21 | # The following values assume you have at least 32M ram 22 | 23 | [mysqld_safe] 24 | socket = /var/run/mysqld/mysqld.sock 25 | nice = 0 26 | 27 | [mysqld] 28 | # 29 | # * Basic Settings 30 | # 31 | user = mysql 32 | pid-file = /var/run/mysqld/mysqld.pid 33 | socket = /var/run/mysqld/mysqld.sock 34 | port = 3306 35 | basedir = /usr 36 | datadir = /var/lib/mysql 37 | tmpdir = /tmp 38 | lc-messages-dir = /usr/share/mysql 39 | skip-external-locking 40 | # 41 | # Instead of skip-networking the default is now to listen only on 42 | # localhost which is more compatible and is not less secure. 43 | # bind-address = 127.0.0.1 44 | # 45 | # * Fine Tuning 46 | # 47 | key_buffer_size = 16M 48 | max_allowed_packet = 16M 49 | thread_stack = 192K 50 | thread_cache_size = 8 51 | # This replaces the startup script and checks MyISAM tables if needed 52 | # the first time they are touched 53 | myisam-recover-options = BACKUP 54 | #max_connections = 100 55 | #table_open_cache = 64 56 | #thread_concurrency = 10 57 | # 58 | # * Query Cache Configuration 59 | # 60 | query_cache_limit = 1M 61 | query_cache_size = 16M 62 | # 63 | # * Logging and Replication 64 | # 65 | # Both location gets rotated by the cronjob. 66 | # Be aware that this log type is a performance killer. 67 | # As of 5.1 you can enable the log at runtime! 68 | #general_log_file = /var/log/mysql/mysql.log 69 | #general_log = 1 70 | # 71 | # Error log - should be very few entries. 72 | # 73 | log_error = /var/log/mysql/error.log 74 | # 75 | # Here you can see queries with especially long duration 76 | #slow_query_log = 1 77 | #slow_query_log_file = /var/log/mysql/mysql-slow.log 78 | #long_query_time = 2 79 | #log-queries-not-using-indexes 80 | # 81 | # The following can be used as easy to replay backup logs or for replication. 82 | # note: if you are setting up a replication slave, see README.Debian about 83 | # other settings you may need to change. 84 | #server-id = 1 85 | #log_bin = /var/log/mysql/mysql-bin.log 86 | expire_logs_days = 10 87 | max_binlog_size = 100M 88 | #binlog_do_db = include_database_name 89 | #binlog_ignore_db = include_database_name 90 | # 91 | # * InnoDB 92 | # 93 | # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. 94 | # Read the manual for more InnoDB related options. There are many! 95 | # 96 | # * Security Features 97 | # 98 | # Read the manual, too, if you want chroot! 99 | # chroot = /var/lib/mysql/ 100 | # 101 | # For generating SSL certificates I recommend the OpenSSL GUI "tinyca". 102 | # 103 | # ssl-ca=/etc/mysql/cacert.pem 104 | # ssl-cert=/etc/mysql/server-cert.pem 105 | # ssl-key=/etc/mysql/server-key.pem -------------------------------------------------------------------------------- /third-party/locust/locustWavefrontLocking.py: -------------------------------------------------------------------------------- 1 | 2 | # VMware Tito Application Test Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | from locust import HttpLocust, TaskSet, task 36 | import resource 37 | import locust.events 38 | import time 39 | import socket 40 | import atexit 41 | import os 42 | import gevent 43 | from gevent.lock import RLock 44 | 45 | lock = RLock() 46 | 47 | resource.setrlimit(resource.RLIMIT_NOFILE, (999999, 999999)) 48 | 49 | # Wavefront metric format 50 | # [] source= [pointTags] 51 | # Note: This python script assumes the environemnt variable WAVEFRONT_PROXY has been set prior to execution 52 | 53 | 54 | class Tito(TaskSet): 55 | @task 56 | def open_index_page(self): 57 | self.client.get("/Tito/") 58 | 59 | class MyLocust(HttpLocust): 60 | task_set = Tito 61 | sock = None 62 | 63 | def __init__(self): 64 | super(MyLocust, self).__init__() 65 | self.sock = socket.socket() 66 | wavefrontProxy = os.environ.get("WAVEFRONT_PROXY") 67 | self.sock.connect( (wavefrontProxy, 2878) ) 68 | locust.events.request_success += self.hook_request_success 69 | locust.events.request_failure += self.hook_request_fail 70 | atexit.register(self.exit_handler) 71 | 72 | def hook_request_success(self, request_type, name, response_time, response_length): 73 | myHost = self.host 74 | myHost = myHost.replace("http://","") 75 | met_locustRequest = 'locust.response.success' + ' ' + str(response_time) + ' ' + str(time.time()) + ' ' + 'source=' + myHost + ' ' + 'app=Tito' + ' \n' 76 | #with lock: 77 | self.sock.sendall(met_locustRequest.encode('utf-8')) 78 | print(met_locustRequest) 79 | 80 | def hook_request_fail(self, request_type, name, response_time, exception): 81 | myHost = self.host 82 | myHost = myHost.replace("http://","") 83 | met_locustRequestFailed = 'locust.response.failed' + ' ' + str(response_time) + ' ' + str(time.time()) + ' ' + 'source=' + myHost + ' ' + 'app=Tito' + ' \n' 84 | #with lock: 85 | self.sock.sendall(met_locustRequestFailed.encode('utf-8')) 86 | print(met_locustRequestFailed) 87 | 88 | def exit_handler(self): 89 | self.sock.shutdown(socket.SHUT_RDWR) 90 | self.sock.close() 91 | -------------------------------------------------------------------------------- /third-party/locust/locustWavefront.py: -------------------------------------------------------------------------------- 1 | 2 | # VMware Tito Application Test Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | 34 | 35 | from locust import HttpLocust, TaskSet, task 36 | import resource 37 | import locust.events 38 | import time 39 | import socket 40 | import atexit 41 | import os 42 | import gevent 43 | from gevent.coros import RLock 44 | 45 | lock = RLock() 46 | resource.setrlimit(resource.RLIMIT_NOFILE, (999999, 999999)) 47 | 48 | # Wavefront metric format 49 | # [] source= [pointTags] 50 | # Note: This python script assumes the environemnt variable WAVEFRONT_PROXY has been set prior to execution 51 | 52 | class Tito(TaskSet): 53 | @task 54 | def open_index_page(self): 55 | self.client.get("/Tito/") 56 | 57 | class MyLocust(HttpLocust): 58 | task_set = Tito 59 | sock = None 60 | 61 | def __init__(self): 62 | super(MyLocust, self).__init__() 63 | self.sock = socket.socket() 64 | wavefrontProxy = os.environ.get("WAVEFRONT_PROXY") 65 | self.sock.connect( (wavefrontProxy, 2878) ) 66 | locust.events.request_success += self.hook_request_success 67 | locust.events.request_failure += self.hook_request_fail 68 | atexit.register(self.exit_handler) 69 | 70 | def hook_request_success(self, request_type, name, response_time, response_length): 71 | myHost = self.host 72 | myHost = myHost.replace("http://","") 73 | met_locustRequest = 'locust.response.success' + ' ' + str(response_time) + ' ' + str(time.time()) + ' ' + 'source=' + myHost + ' ' + 'app=Tito' + ' \n' 74 | self.sock.sendall(met_locustRequest.encode('utf-8')) 75 | #print(met_locustRequest) 76 | 77 | def hook_request_fail(self, request_type, name, response_time, exception): 78 | myHost = self.host 79 | myHost = myHost.replace("http://","") 80 | met_locustRequestFailed = 'locust.response.failed' + ' ' + str(response_time) + ' ' + str(time.time()) + ' ' + 'source=' + myHost + ' ' + 'app=Tito' + ' \n' 81 | self.sock.sendall(met_locustRequestFailed.encode('utf-8')) 82 | #print(met_locustRequestFailed) 83 | 84 | def exit_handler(self): 85 | try: 86 | self.sock.shutdown(socket.SHUT_RDWR) 87 | except IOError: 88 | # Don't be surprised if the socket is in "not 89 | # connected" state. 90 | pass 91 | else: 92 | self.sock.close() -------------------------------------------------------------------------------- /third-party/terraform/vpc.tf: -------------------------------------------------------------------------------- 1 | #Configure the AWS provider 2 | provider "aws" { 3 | version = "~> 2.18" 4 | region = "${var.vpc_region}" 5 | access_key = "${var.aws_access_key_id}" 6 | secret_key = "${var.aws_secret_access_key}" 7 | } 8 | 9 | # Define a vpc 10 | resource "aws_vpc" "vpc_name" { 11 | cidr_block = var.vpc_cidr_block 12 | tags = { 13 | Name = "${var.vpc_name}" 14 | } 15 | } 16 | 17 | # Internet gateway for the public subnet 18 | resource "aws_internet_gateway" "dev_ig" { 19 | vpc_id = "${aws_vpc.vpc_name.id}" 20 | tags = { 21 | Name = "operationsaasgateway" 22 | } 23 | } 24 | 25 | # Public subnet 26 | resource "aws_subnet" "vpc_public_sn" { 27 | vpc_id = "${aws_vpc.vpc_name.id}" 28 | cidr_block = "${var.vpc_public_subnet_cidr}" 29 | #availability_zone = "${lookup(var.availability_zone, var.vpc_region)}" 30 | tags = { 31 | Name = "OperationsaasPublicSubnet" 32 | } 33 | } 34 | 35 | # Private subnet 36 | resource "aws_subnet" "vpc_private_sn" { 37 | vpc_id = "${aws_vpc.vpc_name.id}" 38 | cidr_block = "${var.vpc_private_subnet_cidr}" 39 | #availability_zone = "${vpc_region} 40 | tags = { 41 | Name = "OperationsaasPrivateSubnet" 42 | } 43 | } 44 | 45 | # Routing table for public subnet 46 | resource "aws_route_table" "vpc_public_sn_rt" { 47 | vpc_id = "${aws_vpc.vpc_name.id}" 48 | route { 49 | cidr_block = "0.0.0.0/0" 50 | gateway_id = "${aws_internet_gateway.dev_ig.id}" 51 | } 52 | tags = { 53 | Name = "operationsaasrt" 54 | } 55 | } 56 | 57 | # Associate the routing table to public subnet 58 | resource "aws_route_table_association" "vpc_public_sn_rt_assn" { 59 | subnet_id = "${aws_subnet.vpc_public_sn.id}" 60 | route_table_id = "${aws_route_table.vpc_public_sn_rt.id}" 61 | } 62 | 63 | # Security group 64 | resource "aws_security_group" "vpc_public_sg" { 65 | name = "dev_pubic_sg" 66 | description = "dev public access security group" 67 | vpc_id = "${aws_vpc.vpc_name.id}" 68 | 69 | ingress { 70 | from_port = 22 71 | to_port = 22 72 | protocol = "tcp" 73 | cidr_blocks = [ 74 | "${var.vpc_access_from_ip_range}"] 75 | } 76 | 77 | ingress { 78 | from_port = 0 79 | to_port = 0 80 | protocol = "tcp" 81 | cidr_blocks = [ 82 | "${var.vpc_public_subnet_cidr}"] 83 | } 84 | 85 | egress { 86 | # allow all traffic to private SN 87 | from_port = "0" 88 | to_port = "0" 89 | protocol = "-1" 90 | cidr_blocks = [ 91 | "0.0.0.0/0"] 92 | } 93 | tags = { 94 | Name = "operationsaaseg" 95 | } 96 | } 97 | 98 | resource "aws_security_group" "vpc_private_sg" { 99 | name = "dev_private_sg" 100 | description = "dev security group to access private ports" 101 | vpc_id = "${aws_vpc.vpc_name.id}" 102 | 103 | # allow memcached port within VPC 104 | ingress { 105 | from_port = 11211 106 | to_port = 11211 107 | protocol = "tcp" 108 | cidr_blocks = [ 109 | "${var.vpc_public_subnet_cidr}"] 110 | } 111 | 112 | 113 | 114 | # allow mysql port within VPC 115 | ingress { 116 | from_port = 3306 117 | to_port = 3306 118 | protocol = "tcp" 119 | cidr_blocks = [ 120 | "${var.vpc_public_subnet_cidr}"] 121 | } 122 | 123 | egress { 124 | from_port = "0" 125 | to_port = "0" 126 | protocol = "-1" 127 | cidr_blocks = [ 128 | "0.0.0.0/0"] 129 | } 130 | tags = { 131 | Name = "operationsaaseg" 132 | } 133 | } 134 | 135 | output "vpc_region" { 136 | value = var.vpc_region 137 | } 138 | 139 | output "vpc_id" { 140 | value = "${aws_vpc.vpc_name.id}" 141 | } 142 | 143 | output "vpc_public_sn_id" { 144 | value = "${aws_subnet.vpc_public_sn.id}" 145 | } 146 | 147 | output "vpc_private_sn_id" { 148 | value = "${aws_subnet.vpc_private_sn.id}" 149 | } 150 | 151 | output "vpc_public_sg_id" { 152 | value = "${aws_security_group.vpc_public_sg.id}" 153 | } 154 | 155 | output "vpc_private_sg_id" { 156 | value = "${aws_security_group.vpc_private_sg.id}" 157 | } 158 | -------------------------------------------------------------------------------- /code-stream/ABX_Rest.http: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Pipeline Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | 36 | # CAS API Token 37 | @refreshToken = "CHANGE TOKEN" 38 | 39 | @bearer = {{login.response.body.token}} 40 | 41 | ### login 42 | # @name login 43 | POST https://api.mgmt.cloud.vmware.com/iaas/login HTTP/1.1 44 | Accept: application/json 45 | Content-Type: application/json 46 | 47 | {"refreshToken": {{refreshToken}} } 48 | 49 | ### 50 | 51 | get https://api.mgmt.cloud.vmware.com/blueprint/api/blueprints/4e815666-1eaf-4ed5-bed2-73bf7187e54b 52 | Accept: application/json 53 | Content-Type: application/json 54 | Authorization: Bearer {{bearer}} 55 | 56 | #### Get Blueprint 57 | 58 | https://api.mgmt.cloud.vmware.com/blueprint/api/blueprint-requests 59 | Accept: application/json 60 | Content-Type: application/json 61 | Authorization: Bearer {{bearer}} 62 | 63 | 64 | 65 | 66 | ### - Get all ABX actions 67 | 68 | GET https://api.mgmt.cloud.vmware.com/abx/api/resources/actions/?projectId=cb858ff2-f31c-481f-a69f-34ad0ef35cd3 69 | Authorization: Bearer {{bearer}} 70 | 71 | 72 | ### - Get ABX action - Route53 Update Alias 73 | GET https://api.mgmt.cloud.vmware.com/abx/api/resources/actions/8a7689dd6badd9cb016bb5014cb908ab?projectId=7ea6e1b3-660f-49c9-8937-4f6323cbb096 74 | Accept: application/json 75 | Content-Type: application/json 76 | Authorization: Bearer {{bearer}} 77 | 78 | 79 | ### Execute - Route53 Alias update 80 | # @name route53 81 | POST https://api.mgmt.cloud.vmware.com/abx/api/resources/actions/8a7689dd6badd9cb016bb5014cb908ab/action-runs 82 | Accept: application/json 83 | Content-Type: application/json 84 | Authorization: Bearer {{bearer}} 85 | 86 | { 87 | "projectId": "7ea6e1b3-660f-49c9-8937-4f6323cbb096", 88 | "inputs": { 89 | "name": "tito.vmwapj.com", 90 | "region": "ap-southeast-2", 91 | "zoneId": "Z1DXP5AZ44Z4IY", 92 | "DNSName": "dualstack.titoloadbalancer-mcm588524-11053-178741500.ap-southeast-2.elb.amazonaws.com", 93 | "aliasHostedZoneId": "Z1GM3OXH4ZPM65" 94 | } 95 | } 96 | 97 | 98 | ### 99 | // https://api.mgmt.cloud.vmware.com/abx/api/resources/action-runs/8a7699176bbd0aef016bceca702f0f2f" 100 | GET https://api.mgmt.cloud.vmware.com/{{route53.response.body.selfLink}} 101 | Accept: application/json 102 | Content-Type: application/json 103 | Authorization: Bearer {{bearer}} 104 | 105 | 106 | ### 107 | 108 | 109 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/PluginBasedDesign/[v5]DynamicallyConfiguredInstancesAndVolume/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2023 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | # two plug-in based AWS instances and a plug-in based AWS volume, attached to 36 | # one of the instances, all of which dynamically configured with the same 37 | # Allocation Helpers 38 | formatVersion: 1 39 | inputs: 40 | instance_name: 41 | type: string 42 | instance2_name: 43 | type: string 44 | volume_name: 45 | type: string 46 | resources: 47 | Allocations_Compute_1: 48 | type: Allocations.Compute 49 | properties: 50 | constraints: 51 | - tag: env:dev 52 | Allocations_Flavor_1: 53 | type: Allocations.Flavor 54 | properties: 55 | flavor: small 56 | Allocations_Image_1: 57 | type: Allocations.Image 58 | properties: 59 | image: ubuntu 60 | Allocations_Network_1: 61 | type: Allocations.Network 62 | properties: 63 | networkType: existing 64 | constraints: 65 | - tag: alternative-net 66 | Idem_AWS_EC2_INSTANCE_1: 67 | type: Idem.AWS.EC2.INSTANCE 68 | properties: 69 | name: ${input.instance_name} 70 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 71 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 72 | image_id: ${resource.Allocations_Image_1.selectedImageId} 73 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 74 | instance_type: ${resource.Allocations_Flavor_1.selectedInstanceTypeName} 75 | subnet_id: ${resource.Allocations_Network_1.selectedSubnet.id} 76 | Idem_AWS_EC2_INSTANCE_2: 77 | type: Idem.AWS.EC2.INSTANCE 78 | properties: 79 | name: ${input.instance2_name} 80 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 81 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 82 | image_id: ${resource.Allocations_Image_1.selectedImageId} 83 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 84 | instance_type: ${resource.Allocations_Flavor_1.selectedInstanceTypeName} 85 | subnet_id: ${resource.Allocations_Network_1.selectedSubnet.id} 86 | block_device_mappings: 87 | - volume_id: ${resource.Idem_AWS_EC2_VOLUME_1.resource_id} 88 | device_name: /dev/sdb 89 | Idem_AWS_EC2_VOLUME_1: 90 | type: Idem.AWS.EC2.VOLUME 91 | properties: 92 | name: ${input.volume_name} 93 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 94 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 95 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 96 | size: 10 97 | volume_type: io2 98 | iops: 100 99 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/DockerHost/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | version: 1.2 35 | name: bp-tito-dockerhost 36 | formatVersion: 1 37 | inputs: 38 | application: 39 | type: string 40 | default: tito 41 | readOnly: true 42 | environment: 43 | type: string 44 | description: App Environment 45 | default: production 46 | enum: 47 | - dev 48 | - test 49 | - production 50 | cloud_target: 51 | type: string 52 | description: Select target cloud 53 | enum: 54 | - 'target:aws' 55 | - 'target:azure' 56 | - 'target:gcp' 57 | - 'target:vsphere' 58 | azureresourcegrp: 59 | type: string 60 | description: Azure Resource Group 61 | default: '' 62 | enum: 63 | - '' 64 | - operationsaas 65 | - planes 66 | - test 67 | SSHkey: 68 | type: string 69 | description: VM SSH Key 70 | default: CHANGE SSH KEY 71 | resources: 72 | Public_Cloud_Network: 73 | type: Cloud.Network 74 | properties: 75 | name: PublicCloudNetwork 76 | networkType: existing 77 | constraints: 78 | - tag: publicsubnet 79 | - tag: '${input.environment}' 80 | machine: 81 | type: Cloud.Machine 82 | properties: 83 | image: im-ubuntu16046 84 | flavor: fl-small 85 | remoteAccess: 86 | authentication: publicPrivateKey 87 | sshKey: '${input.SSHkey}' 88 | resourceGroupName: '${input.azureresourcegrp}' 89 | constraints: 90 | - tag: '${input.cloud_target}' 91 | cloudConfig: | 92 | #cloud-config 93 | repo_update: true 94 | repo_upgrade: all 95 | packages: 96 | - git 97 | users: 98 | - name: dockeradmin 99 | ssh-authorized-keys: 100 | - ${input.SSHkey} 101 | sudo: ['ALL=(ALL) NOPASSWD:ALL'] 102 | groups: sudo 103 | shell: /bin/bash 104 | runcmd: 105 | - sed -i -e '$aAllowUsers dockeradmin' /etc/ssh/sshd_config 106 | - service ssh reload 107 | - curl -fsSL https://get.docker.com -o get-docker.sh; sh get-docker.sh 108 | - systemctl daemon-reload 109 | - systemctl restart docker 110 | write_files: 111 | - path: /etc/systemd/system/docker.service.d/override.conf 112 | permissions: '0644' 113 | content: | 114 | [Service] 115 | ExecStart= 116 | ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2375 117 | networks: 118 | - name: '${resource.Public_Cloud_Network.name}' 119 | network: '${resource.Public_Cloud_Network.id}' 120 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Welcome to cloud-automation-samples 4 | 5 | ## Overview 6 | 7 | The cloud-automation-samples github project contains code to provision and manage applications in a multi-cloud environment through VMware cloud solutions. The VMware cloud-automation-samples team invites you to use this code as is, modify it for your use cases, and to contribute new code and documentation that aligns to the purpose of this project. 8 | 9 | ## Navigating the Project 10 | 11 | cloud-automation-samples is organized by VMware Product name and third party products for easy navigation. Enter the product folder to review and download code that can be used immediately in the referenced products. For the full application deployment sample, multiple VMware and non-VMware products are used together to provision, manage, and monitor the TITO application through a Codestream CI/CD pipeline. 12 | 13 | ### Prerequisites 14 | 15 | To use this code to its fullest potential, you must have an account on the correct VMware Solutions as well as any third party products you wish to integration. If you do not have a VMware cloud solutions account, you can access the solution pages to obtain a free trial. 16 | 17 | VMware Cloud Assembly (https://cloud.vmware.com/cloud-assembly) 18 | 19 | VMware Code Stream (https://cloud.vmware.com/code-stream) 20 | 21 | Wavefront by VMware (https://cloud.vmware.com/wavefront) 22 | 23 | vRealize Orchestrator (https://www.vmware.com/products/vrealize-orchestrator.html) 24 | 25 | You must contact the non-VMware vendors directly to obtain access to their products. 26 | 27 | This code is written to deploy to multi-cloud environments. Therefore, having accounts in AWS, Azure, and GCP is a great way to unlock the full potential of Cloud Assembly's cloud agnositc infrastructure-as-code. However, it is not necessary. You can also use your current vSphere environment for many of the samples. 28 | 29 | 30 | ### Build & Run 31 | 32 | Each directory contains descriptive readme files to describe the code available and how it is used. The cloud-automation-samples team also creates white papers, blogs, and videos describing the purpose of and how to use the code available in this project. For more information you can review the documentation at the Cloud Automation Services website (https://cloud.vmware.com/cloud-automation-services/resources). 33 | 34 | 35 | ## Contributing 36 | 37 | The cloud-automation-samples project team welcomes contributions from the community. Before you start working with cloud-automation-samples, please 38 | read our [Developer Certificate of Origin](https://cla.vmware.com/dco). All contributions to this repository must be 39 | signed as described on that page. Your signature certifies that you wrote the patch or have the right to pass it on 40 | as an open-source patch. For more detailed information, refer to [CONTRIBUTING.md](CONTRIBUTING.md). 41 | 42 | ## License 43 | cloud-automation-samples 44 | Copyright (c) 2019 VMware, Inc. All rights reserved 45 | 46 | The BSD-2 license (the "License") set forth below applies to all parts of the cloud-automation-samples project. You may not use this file except in compliance with the License. 47 | 48 | BSD-2 License 49 | 50 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 51 | 52 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 53 | 54 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 55 | 56 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 57 | -------------------------------------------------------------------------------- /code-stream/Pipelines/BlueprintService.http: -------------------------------------------------------------------------------- 1 | # CAS API Token 2 | @refreshToken = "" 3 | 4 | @bearer = {{login.response.body.token}} 5 | 6 | ### login 7 | # @name login 8 | POST https://api.mgmt.cloud.vmware.com/iaas/login HTTP/1.1 9 | Accept: application/json 10 | Content-Type: application/json 11 | 12 | {"refreshToken": {{refreshToken}} } 13 | 14 | ### 15 | 16 | GET https://api.mgmt.cloud.vmware.com/blueprint/api/blueprints 17 | Accept: application/json 18 | Content-Type: application/json 19 | Authorization: Bearer {{bearer}} 20 | 21 | 22 | ### Get Titov3 blueprint 23 | 24 | GET https://api.mgmt.cloud.vmware.com/blueprint/api/blueprints/92881ec6-6672-4a77-9e24-32d0870c970f 25 | Accept: application/json 26 | Content-Type: application/json 27 | Authorization: Bearer {{bearer}} 28 | 29 | 30 | ### Get Versions 31 | 32 | GET https://api.mgmt.cloud.vmware.com/blueprint/api/blueprints/92881ec6-6672-4a77-9e24-32d0870c970f/versions 33 | Accept: application/json 34 | Content-Type: application/json 35 | Authorization: Bearer {{bearer}} 36 | 37 | ### get inputs for blueprint 38 | 39 | GET https://api.mgmt.cloud.vmware.com/blueprint/api/blueprints/92881ec6-6672-4a77-9e24-32d0870c970f/inputs-schema 40 | Accept: application/json 41 | Content-Type: application/json;;charset=UTF-8 42 | Authorization: Bearer {{bearer}} 43 | 44 | ### 45 | 46 | GET https://api.mgmt.cloud.vmware.com/blueprint/api/blueprint-requests 47 | Accept: application/json 48 | Content-Type: application/json 49 | Authorization: Bearer {{bearer}} 50 | ### 51 | 52 | ### 53 | POST https://api.mgmt.cloud.vmware.com/blueprint/api/blueprint-requests 54 | Accept: application/json 55 | Content-Type: application/json;charset=UTF-8 56 | Authorization: Bearer {{bearer}} 57 | 58 | { 59 | "projectId": "7ea6e1b3-660f-49c9-8937-4f6323cbb096", 60 | "reason": "test 1", 61 | "plan": false, 62 | "destroy": false, 63 | "ignoreDeleteFailures": false, 64 | "simulate": false, 65 | "tags": [], 66 | "blueprintId": "92881ec6-6672-4a77-9e24-32d0870c970f", 67 | "blueprintVersion": 1.4, 68 | "inputs": { 69 | "FECount": 1, 70 | "application": "Tito", 71 | "environment": "dev", 72 | "cloud_target": "platform:aws", 73 | "wavefront_proxy": "vmware.wavefront.com" 74 | } 75 | } 76 | 77 | ### 78 | 79 | 80 | get https://api.mgmt.cloud.vmware.com/blueprint/api/blueprint-requests/1cf2ca31-8458-484c-8e27-eb530adb905e 81 | Accept: application/json 82 | Content-Type: application/json;charset=UTF-8 83 | Authorization: Bearer {{bearer}} 84 | 85 | 86 | ### Get Deployment Details 87 | 88 | get https://api.mgmt.cloud.vmware.com/blueprint/api/blueprint-deployments/80fd1970-dc1b-4256-9581-3ed087b88b0d 89 | Accept: application/json 90 | Content-Type: application/json;charset=UTF-8 91 | Authorization: Bearer {{bearer}} 92 | 93 | ### 94 | 95 | 96 | get https://api.mgmt.cloud.vmware.com/deployment/api/deployments/80fd1970-dc1b-4256-9581-3ed087b88b0d?expandResources=true 97 | Accept: application/json 98 | Content-Type: application/json;charset=UTF-8 99 | Authorization: Bearer {{bearer}} 100 | 101 | 102 | ### 103 | get https://api.mgmt.cloud.vmware.com/blueprint/api/blueprint-deployments/80fd1970-dc1b-4256-9581-3ed087b88b0d 104 | Accept: application/json 105 | Content-Type: application/json;charset=UTF-8 106 | Authorization: Bearer {{bearer}} 107 | 108 | ### 109 | 110 | get https://api.mgmt.cloud.vmware.com/blueprint/api/blueprint-deployments/80fd1970-dc1b-4256-9581-3ed087b88b0d 111 | Accept: application/json 112 | Content-Type: application/json;charset=UTF-8 113 | Authorization: Bearer {{bearer}} 114 | 115 | ### Get Deployment actions 116 | 117 | GET https://api.mgmt.cloud.vmware.com/deployment/api/deployments/c2dd1d11-611b-4ae6-b2f9-cbd41ef4206f/actions 118 | Accept: application/json 119 | Content-Type: application/json;charset=UTF-8 120 | Authorization: Bearer {{bearer}} 121 | 122 | ### Deployment Update 123 | 124 | POST https://api.mgmt.cloud.vmware.com/deployment/api/deployments/c2dd1d11-611b-4ae6-b2f9-cbd41ef4206f/requests 125 | Accept: application/json 126 | Content-Type: application/json;charset=UTF-8 127 | Authorization: Bearer {{bearer}} 128 | 129 | { 130 | "actionId": "Deployment.Update", 131 | "inputs": { 132 | "FECount": 3, 133 | "application": "Tito", 134 | "environment": "dev", 135 | "cloud_target": "platform:aws", 136 | "wavefront_proxy": "vmware.wavefront.com" 137 | }, 138 | "reason": "scale out" 139 | } 140 | -------------------------------------------------------------------------------- /cloud-assembly/blueprints/WavefrontProxy/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2019 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | formatVersion: 1 36 | name: bp-tito-wavefrontproxy 37 | version: 1.3 38 | inputs: 39 | wavefrontURL: 40 | type: string 41 | default: vmware.wavefront.com 42 | wavefrontToken: 43 | type: string 44 | encrypted: true 45 | default: CHANGE TOKEN 46 | application: 47 | type: string 48 | default: tito 49 | readOnly: true 50 | environment: 51 | type: string 52 | description: App Environment 53 | default: production 54 | enum: 55 | - dev 56 | - test 57 | - production 58 | cloud_target: 59 | type: string 60 | description: Select target cloud 61 | enum: 62 | - 'target:aws' 63 | - 'target:azure' 64 | - 'target:gcp' 65 | - 'target:vsphere' 66 | azureresourcegrp: 67 | type: string 68 | description: Azure Resource Group 69 | default: '' 70 | enum: 71 | - '' 72 | - operationsaas 73 | - planes 74 | - test 75 | SSHkey: 76 | type: string 77 | description: VM SSH Key 78 | default: CHANGE SSH KEY 79 | resources: 80 | Cloud_LoadBalancer_1: 81 | type: Cloud.LoadBalancer 82 | properties: 83 | name: TITOLoadBalancer 84 | resourceGroupName: '${input.azureresourcegrp}' 85 | routes: 86 | - instancePort: 2878 87 | instanceProtocol: tcp 88 | protocol: tcp 89 | port: 2878 90 | network: '${resource.Public_Cloud_Network.name}' 91 | instances: 92 | - '${resource.wf_proxy.id}' 93 | internetFacing: true 94 | wf_proxy: 95 | type: Cloud.Machine 96 | properties: 97 | image: im-ubuntu16046 98 | flavor: fl-small 99 | remoteAccess: 100 | authentication: publicPrivateKey 101 | sshKey: '${input.SSHkey}' 102 | constraints: 103 | - tag: '${input.cloud_target}' 104 | networks: 105 | - name: '${resource.Public_Cloud_Network.name}' 106 | network: '${resource.Public_Cloud_Network.id}' 107 | cloudConfig: | 108 | #cloud-config 109 | users: 110 | - name: wavefront 111 | ssh-authorized-keys: 112 | - ${input.SSHkey} 113 | sudo: ['ALL=(ALL) NOPASSWD:ALL'] 114 | groups: sudo 115 | shell: /bin/bash 116 | runcmd: 117 | - 'sudo bash -c "$(curl -sL https://wavefront.com/install)" -- install --proxy --wavefront-url https://${input.wavefrontURL} --api-token ${input.wavefrontToken}' 118 | Public_Cloud_Network: 119 | type: Cloud.Network 120 | properties: 121 | name: PublicCloudNetwork 122 | networkType: existing 123 | constraints: 124 | - tag: publicsubnet 125 | - tag: '${input.environment}' 126 | -------------------------------------------------------------------------------- /code-stream/CustomIntegrations/SlackBotThreadedAttachments.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "description": "formatting fix", 4 | "status": "NONE", 5 | "yaml": "---\r\nruntime: \"nodejs\"\r\ncode: |\r\n var https = require('https');\r\n var context = require(\"./context.js\")\r\n \r\n //Get the entered message from task config page and assign it to message var\r\n var message = context.getInput(\"message\");\r\n var parentMessage = context.getInput(\"parentMessage\");\r\n var channel = context.getInput(\"channel\");\r\n var auth_token = context.getInput(\"authToken\");\r\n var slackThread = context.getInput(\"slackThread\");\r\n var colorHex = context.getInput(\"colorHex\");\r\n var messageHeading = context.getInput(\"messageHeading\");\r\n \r\n var slackPayload = JSON.stringify(\r\n {\r\n channel: channel, // Slack user or channel, where you want to send the message\r\n text: parentMessage,\r\n thread_ts: slackThread,\r\n attachments: [\r\n {\r\n \"fallback\": message,\r\n \"color\": colorHex,\r\n \"title\": messageHeading,\r\n \"text\": message,\r\n \"ts\": slackThread\r\n }\r\n ]\r\n });\r\n\r\n const options = {\r\n hostname: 'slack.com',\r\n port: 443,\r\n path: '/api/chat.postMessage',\r\n method: 'POST',\r\n headers: {\r\n 'Content-Type': 'application/json; charset=utf-8',\r\n 'Content-Length': Buffer.byteLength(slackPayload),\r\n \"Authorization\": \"Bearer \" + auth_token\r\n }\r\n };\r\n \r\n // Makes a https request and sets the output with statusCode which \r\n // will be displayed in task result page after execution\r\n \r\n const req = https.request(options, (res) => {\r\n // context.setOutput(\"statusCode\", res.statusCode);\r\n let data = '';\r\n\r\n // A chunk of data has been recieved.\r\n res.on('data', (chunk) => {\r\n data += chunk;\r\n });\r\n \r\n console.log(res.statusCode)\r\n context.setOutput(\"statusCode\", res.statusCode);\r\n \r\n \r\n res.on('end', () => {\r\n var response = JSON.parse(data);\r\n context.setOutput(\"slackThreadId\", response.ts)\r\n context.setOutput(\"slackResponse\", data);\r\n });\r\n\r\n });\r\n\r\n req.on('error', (e) => {\r\n console.error(e);\r\n });\r\n req.write(slackPayload);\r\n req.end();\r\ninputProperties:\r\n - name: message\r\n type: text\r\n title: Message\r\n placeHolder: Message for Slack Channel\r\n defaultValue: Hello Slack\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: This message would be posted to the Slack channel\r\n - name: parentMessage\r\n type: text\r\n title: parentMessage\r\n placeHolder: parentMessage for Slack Channel\r\n defaultValue: Hello Slack or null\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: This message would be posted to the Slack channel\r\n - name: channel\r\n type: text\r\n title: channel\r\n placeHolder: slack channel here\r\n defaultValue: slack channel here\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: slack channel here\r\n - name: authToken\r\n type: text\r\n title: authToken\r\n placeHolder: Bot authToken\r\n defaultValue: Bot authToken\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: Bot authToken\r\n - name: slackThread\r\n type: text\r\n title: slackThread\r\n placeHolder: slackThreadId\r\n defaultValue: slackThread or null\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: slackThread for reposting to same thread can also be null\r\n - name: messageHeading\r\n type: text\r\n title: messageHeading\r\n placeHolder: messageHeading\r\n defaultValue: slackThread or null\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: Message Heading\r\n - name: colorHex\r\n type: text\r\n title: colorHex\r\n placeHolder: colorHex\r\n defaultValue: colorHex\r\n bindable: true\r\n labelInfo: true\r\n labelMessage: Color in hex for color coding messages\r\noutputProperties:\r\n - name: slackResponse\r\n type: label\r\n title: slackResponse\r\n - name: slackThreadId\r\n type: label\r\n title: slackThreadId\r\n - name: statusCode\r\n type: label\r\n title: Status Code", 6 | "version": "draft", 7 | "name": "SlackBotThreadedAttachments", 8 | "kind": "CustomIntegration", 9 | "tags": [], 10 | "_link": "/pipeline/api/custom-integrations/bdbed50f9a071e7558b79f7c3c7e2", 11 | "_createdBy": "slynch", 12 | "_updatedBy": "slynch", 13 | "_updateTimeInMicros": 1560733314916000 14 | } -------------------------------------------------------------------------------- /cloud-assembly/blueprints/PluginBasedDesign/[v6]DynamicallyConfiguredInstancesVolumeAndKey/blueprint.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # VMware Cloud Automation Blueprint Sample 3 | # 4 | # Copyright 2023 VMware, Inc. All rights reserved 5 | # 6 | # The BSD-2 license (the "License") set forth below applies to all parts of the 7 | # Cloud-automation-samples Code project. You may not use this file except in compliance 8 | # with the License. 9 | # 10 | # BSD-2 License 11 | # 12 | # Redistribution and use in source and binary forms, with or without 13 | # modification, are permitted provided that the following conditions are met: 14 | # 15 | # Redistributions of source code must retain the above copyright notice, this 16 | # list of conditions and the following disclaimer. 17 | # 18 | # Redistributions in binary form must reproduce the above copyright notice, 19 | # this list of conditions and the following disclaimer in the documentation 20 | # and/or other materials provided with the distribution. 21 | # 22 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 26 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 27 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 28 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 29 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 30 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 31 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 32 | # POSSIBILITY OF SUCH DAMAGE. 33 | # 34 | 35 | # two plug-in based AWS instances, a plug-in based AWS volume, attached to 36 | # one of the instances and encrypted with a "classic" KMS key, all of which 37 | # dynamically configured with the same Allocation Helpers 38 | formatVersion: 1 39 | inputs: 40 | instance_name: 41 | type: string 42 | instance2_name: 43 | type: string 44 | volume_name: 45 | type: string 46 | resources: 47 | Allocations_Compute_1: 48 | type: Allocations.Compute 49 | properties: 50 | constraints: 51 | - tag: env:dev 52 | Allocations_Flavor_1: 53 | type: Allocations.Flavor 54 | properties: 55 | flavor: small 56 | Allocations_Image_1: 57 | type: Allocations.Image 58 | properties: 59 | image: ubuntu 60 | Allocations_Network_1: 61 | type: Allocations.Network 62 | properties: 63 | networkType: existing 64 | constraints: 65 | - tag: alternative-net 66 | Idem_AWS_EC2_INSTANCE_1: 67 | type: Idem.AWS.EC2.INSTANCE 68 | properties: 69 | name: ${input.instance_name} 70 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 71 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 72 | image_id: ${resource.Allocations_Image_1.selectedImageId} 73 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 74 | instance_type: ${resource.Allocations_Flavor_1.selectedInstanceTypeName} 75 | subnet_id: ${resource.Allocations_Network_1.selectedSubnet.id} 76 | Idem_AWS_EC2_INSTANCE_2: 77 | type: Idem.AWS.EC2.INSTANCE 78 | properties: 79 | name: ${input.instance2_name} 80 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 81 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 82 | image_id: ${resource.Allocations_Image_1.selectedImageId} 83 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 84 | instance_type: ${resource.Allocations_Flavor_1.selectedInstanceTypeName} 85 | subnet_id: ${resource.Allocations_Network_1.selectedSubnet.id} 86 | block_device_mappings: 87 | - volume_id: ${resource.Idem_AWS_EC2_VOLUME_1.resource_id} 88 | device_name: /dev/sdb 89 | Idem_AWS_EC2_VOLUME_1: 90 | type: Idem.AWS.EC2.VOLUME 91 | properties: 92 | name: ${input.volume_name} 93 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 94 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 95 | availability_zone: ${resource.Allocations_Compute_1.selectedPlacementCompute.id} 96 | size: 10 97 | volume_type: io2 98 | iops: 100 99 | encrypted: true 100 | kms_key_id: ${resource.Cloud_Service_AWS_KMS_Key_1.key_id} 101 | Cloud_Service_AWS_KMS_Key_1: 102 | type: Cloud.Service.AWS.KMS.Key 103 | properties: 104 | region: ${resource.Allocations_Compute_1.selectedRegion.id} 105 | account: ${resource.Allocations_Compute_1.selectedCloudAccount.name} 106 | -------------------------------------------------------------------------------- /third-party/Tito/asset/Deployment/CloudAssembly/titodb/mysql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export BIND_IP 4 | export DB_PORT=3306 5 | export DB_ROOT_USERNAME=root 6 | export DB_ROOT_PASSWORD=Tito2016 7 | export MYSQL_DOWNLOAD_URL=http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm 8 | 9 | ##### Variables from Script properties #### 10 | db_root_username=${DB_ROOT_USERNAME} 11 | db_root_password=${DB_ROOT_PASSWORD} 12 | mysql_download_url=${MYSQL_DOWNLOAD_URL} 13 | bind_ip=${BIND_IP} 14 | db_port=${DB_PORT} 15 | ##### 16 | 17 | ##### Dsiable SE Linux 18 | sed -i --follow-symlinks 's/^SELINUX=.*/SELINUX=disabled/g' /etc/sysconfig/selinux && cat /etc/sysconfig/selinux 19 | 20 | # Set global variables 21 | export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$JAVA_HOME/bin 22 | 23 | # FUNTION TO CHECK ERROR 24 | function check_error() 25 | { 26 | if [ ! "$?" = "0" ]; then 27 | error_display "$1"; 28 | fi 29 | } 30 | 31 | # FUNCTION TO DISPLAY ERROR 32 | function error_display() 33 | { 34 | echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2 35 | } 36 | 37 | # FUNCTION TO DISPLAY ERROR AND EXIT 38 | function error_exit() 39 | { 40 | echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2 41 | exit 1 42 | } 43 | 44 | # FUNCTION TO VALIDATE THE INTEGER 45 | function valid_int() 46 | { 47 | local data=$1 48 | if [[ $data =~ ^[0-9]{1,9}$ ]]; then 49 | return 0; 50 | else 51 | return 1 52 | fi 53 | } 54 | 55 | # FUNCTION TO VALIDATE NAME STRING 56 | function valid_string() 57 | { 58 | local data=$1 59 | if [[ $data =~ ^[A-Za-z]{1,}[A-Za-z0-9_-]{1,}$ ]]; then 60 | return 0; 61 | else 62 | return 1; 63 | fi 64 | } 65 | 66 | # FUNCTION TO VALIDATE PASSWORD 67 | function valid_password() 68 | { 69 | local data=$1 70 | length=${#data} 71 | if [ $length -le 5 ]; then 72 | check_error "PASSWORD MUST BE OF AT LEAST 5 CHARACTERS" 73 | else 74 | if [[ $data =~ ^[A-Za-z]{1,}[0-9_@!$%^+=]{0,}[A-Za-z0-9]{0,}$ ]]; then 75 | return 0; 76 | else 77 | return 1; 78 | fi 79 | fi 80 | } 81 | 82 | # PARAMETER VALIDATION 83 | echo "VALIDATING PARAMETERS..." 84 | if [ "x${db_root_username}" = "x" ]; then 85 | error_exit "DB_ROOT_USERNAME NOT SET." 86 | else 87 | if ! valid_string ${db_root_username}; then 88 | error_exit "INVALID PARAMETER DB_ROOT_USERNAME" 89 | fi 90 | fi 91 | if [ "x${db_root_password}" = "x" ]; then 92 | error_exit "DB_ROOT_PASSWORD NOT SET." 93 | else 94 | if ! valid_password ${db_root_password}; then 95 | error_exit "INVALID PARAMETER DB_ROOT_PASSWORD" 96 | fi 97 | fi 98 | echo "PARAMTER VALIDATION -- DONE" 99 | 100 | # INSTALLATION OF MySQL -- START 101 | echo "Install yum" 102 | yum install -y yum 103 | 104 | echo "Installation of MYSQL..." 105 | if [ -f /etc/redhat-release ] ; then 106 | REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//` 107 | DIST=`cat /etc/redhat-release |sed s/\ release.*//` 108 | ARCH=`uname -p` 109 | if [ $ARCH == "i686" ] ; then 110 | echo "$DIST 32 BIT MACHINE - v$REV" 111 | echo "ERROR: This script only works on RHEL 7 x64." 112 | exit 1 113 | else 114 | echo "$DIST 64 BIT MACHINE - v$REV" 115 | yum --nogpgcheck --noplugins -y clean all 116 | # INSTALLATION OF MySQl 117 | rpm -ivh $mysql_download_url 118 | check_error "ERROR WHILE INSTALLING MYSQL REPOSITORY" 119 | 120 | yum install -y mysql-server 121 | check_error "ERROR WHILE INSTALLING MYSQL" 122 | fi 123 | else 124 | echo "ERROR: This script only works on RHEL 7 x64." 125 | exit 1 126 | fi 127 | 128 | echo "DONE - INSTALL script of MYSQL Database" 129 | # INSTALLATION OF MySQl -- END 130 | 131 | # Start MySql configuration 132 | echo "Start mysqld" 133 | systemctl start mysqld 134 | 135 | # Start MySql Script 136 | echo "Configuration of MYSQL" 137 | 138 | # CONFIGURE MYSQL TO HANDLE BIG PACKETS 139 | sed -ie "s/\[mysqld\]/\[mysqld\]\n\max_allowed_packet=1024M/g" /etc/my.cnf 140 | 141 | # CONFIGURE MYSQL TO LISTEN ON PARTICULAR PORT 142 | sed -ie "s/\[mysqld\]/\[mysqld\]\n\port=$db_port/g" /etc/my.cnf 143 | 144 | # CONFIGURE MYSQL TO LISTEN ON PARTICULAR IP 145 | sed -i 's/bind-address.*/bind-address = $bind_ip/' /etc/my.cnf 146 | 147 | # ASSIGN A PASSWORD FOR MYSQL ADMIN ROOT USER 148 | mysqladmin -u $db_root_username password $db_root_password 149 | 150 | # If firewall is on, open the db_port 151 | if [ $(firewall-cmd --state) = "running" ]; then 152 | echo "Firewall is on, open the db_port $db_port in iptables..." 153 | VAR=$(firewall-cmd --zone=public --add-port=$db_port/tcp --permanent); 154 | if [ "$VAR"=“success” ] ; then 155 | echo "Port $db_port added on Firewall permanently." 156 | else 157 | echo "Add port $db_port on Firewall manually." 158 | fi 159 | 160 | VAR1=$(firewall-cmd --reload); 161 | if [ "$VAR1"=“success” ] ; then 162 | echo 'Firewall restarted successfully.' 163 | else 164 | echo 'Firewall restart failed.' 165 | fi 166 | else 167 | echo "Firewall status: $(firewall-cmd --state)" 168 | echo "Firewall is off, the db_port $db_port is open to accept connections." 169 | fi 170 | 171 | echo "DONE - CONFIGURE script for MYSQL Database" 172 | 173 | echo "Starting MYSQL" 174 | echo "Granting privileges for remote access." 175 | mysql -u $db_root_username -p$db_root_password < { 81 | // context.setOutput("statusCode", res.statusCode); 82 | let data = ''; 83 | 84 | // A chunk of data has been recieved. 85 | res.on('data', (chunk) => { 86 | data += chunk; 87 | }); 88 | 89 | console.log(res.statusCode) 90 | context.setOutput("statusCode", res.statusCode); 91 | 92 | 93 | res.on('end', () => { 94 | var response = JSON.parse(data); 95 | context.setOutput("slackThreadId", response.ts) 96 | context.setOutput("slackResponse", data); 97 | }); 98 | 99 | }); 100 | 101 | req.on('error', (e) => { 102 | console.error(e); 103 | }); 104 | req.write(slackPayload); 105 | req.end(); 106 | inputProperties: 107 | - name: message 108 | type: text 109 | title: Message 110 | placeHolder: Message for Slack Channel 111 | defaultValue: Hello Slack 112 | bindable: true 113 | labelInfo: true 114 | labelMessage: This message would be posted to the Slack channel 115 | - name: parentMessage 116 | type: text 117 | title: parentMessage 118 | placeHolder: parentMessage for Slack Channel 119 | defaultValue: Hello Slack or null 120 | bindable: true 121 | labelInfo: true 122 | labelMessage: This message would be posted to the Slack channel 123 | - name: channel 124 | type: text 125 | title: channel 126 | placeHolder: slack channel here 127 | defaultValue: slack channel here 128 | bindable: true 129 | labelInfo: true 130 | labelMessage: slack channel here 131 | - name: authToken 132 | type: text 133 | title: authToken 134 | placeHolder: Bot authToken 135 | defaultValue: Bot authToken 136 | bindable: true 137 | labelInfo: true 138 | labelMessage: Bot authToken 139 | - name: slackThread 140 | type: text 141 | title: slackThread 142 | placeHolder: slackThreadId 143 | defaultValue: slackThread or null 144 | bindable: true 145 | labelInfo: true 146 | labelMessage: slackThread for reposting to same thread can also be null 147 | - name: messageHeading 148 | type: text 149 | title: messageHeading 150 | placeHolder: messageHeading 151 | defaultValue: slackThread or null 152 | bindable: true 153 | labelInfo: true 154 | labelMessage: Message Heading 155 | - name: colorHex 156 | type: text 157 | title: colorHex 158 | placeHolder: colorHex 159 | defaultValue: colorHex 160 | bindable: true 161 | labelInfo: true 162 | labelMessage: Color in hex for color coding messages 163 | outputProperties: 164 | - name: slackResponse 165 | type: label 166 | title: slackResponse 167 | - name: slackThreadId 168 | type: label 169 | title: slackThreadId 170 | - name: statusCode 171 | type: label 172 | title: Status Code -------------------------------------------------------------------------------- /third-party/Tito/asset/js/parallax.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * parallax.js v1.4.2 (http://pixelcog.github.io/parallax.js/) 3 | * @copyright 2016 PixelCog, Inc. 4 | * @license MIT (https://github.com/pixelcog/parallax.js/blob/master/LICENSE) 5 | */ 6 | !function(t,i,e,s){function o(i,e){var h=this;"object"==typeof e&&(delete e.refresh,delete e.render,t.extend(this,e)),this.$element=t(i),!this.imageSrc&&this.$element.is("img")&&(this.imageSrc=this.$element.attr("src"));var r=(this.position+"").toLowerCase().match(/\S+/g)||[];if(r.length<1&&r.push("center"),1==r.length&&r.push(r[0]),("top"==r[0]||"bottom"==r[0]||"left"==r[1]||"right"==r[1])&&(r=[r[1],r[0]]),this.positionX!=s&&(r[0]=this.positionX.toLowerCase()),this.positionY!=s&&(r[1]=this.positionY.toLowerCase()),h.positionX=r[0],h.positionY=r[1],"left"!=this.positionX&&"right"!=this.positionX&&(this.positionX=isNaN(parseInt(this.positionX))?"center":parseInt(this.positionX)),"top"!=this.positionY&&"bottom"!=this.positionY&&(this.positionY=isNaN(parseInt(this.positionY))?"center":parseInt(this.positionY)),this.position=this.positionX+(isNaN(this.positionX)?"":"px")+" "+this.positionY+(isNaN(this.positionY)?"":"px"),navigator.userAgent.match(/(iPod|iPhone|iPad)/))return this.imageSrc&&this.iosFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;if(navigator.userAgent.match(/(Android)/))return this.imageSrc&&this.androidFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this;this.$mirror=t("
").prependTo("body");var a=this.$element.find(">.parallax-slider"),n=!1;0==a.length?this.$slider=t("").prependTo(this.$mirror):(this.$slider=a.prependTo(this.$mirror),n=!0),this.$mirror.addClass("parallax-mirror").css({visibility:"hidden",zIndex:this.zIndex,position:"fixed",top:0,left:0,overflow:"hidden"}),this.$slider.addClass("parallax-slider").one("load",function(){h.naturalHeight&&h.naturalWidth||(h.naturalHeight=this.naturalHeight||this.height||1,h.naturalWidth=this.naturalWidth||this.width||1),h.aspectRatio=h.naturalWidth/h.naturalHeight,o.isSetup||o.setup(),o.sliders.push(h),o.isFresh=!1,o.requestRender()}),n||(this.$slider[0].src=this.imageSrc),(this.naturalHeight&&this.naturalWidth||this.$slider[0].complete||a.length>0)&&this.$slider.trigger("load")}function h(s){return this.each(function(){var h=t(this),r="object"==typeof s&&s;this==i||this==e||h.is("body")?o.configure(r):h.data("px.parallax")?"object"==typeof s&&t.extend(h.data("px.parallax"),r):(r=t.extend({},h.data(),r),h.data("px.parallax",new o(this,r))),"string"==typeof s&&("destroy"==s?o.destroy(this):o[s]())})}!function(){for(var t=0,e=["ms","moz","webkit","o"],s=0;s=this.boxWidth){this.imageWidth=h*this.aspectRatio|0,this.imageHeight=h,this.offsetBaseTop=r;var a=this.imageWidth-this.boxWidth;this.offsetLeft="left"==this.positionX?0:"right"==this.positionX?-a:isNaN(this.positionX)?-a/2|0:Math.max(this.positionX,-a)}else{this.imageWidth=this.boxWidth,this.imageHeight=this.boxWidth/this.aspectRatio|0,this.offsetLeft=0;var a=this.imageHeight-h;this.offsetBaseTop="top"==this.positionY?r:"bottom"==this.positionY?r-a:isNaN(this.positionY)?r-a/2|0:r+Math.max(this.positionY,-a)}},render:function(){var t=o.scrollTop,i=o.scrollLeft,e=this.overScrollFix?o.overScroll:0,s=t+o.winHeight;this.boxOffsetBottom>t&&this.boxOffsetTop<=s?(this.visibility="visible",this.mirrorTop=this.boxOffsetTop-t,this.mirrorLeft=this.boxOffsetLeft-i,this.offsetTop=this.offsetBaseTop-this.mirrorTop*(1-this.speed)):this.visibility="hidden",this.$mirror.css({transform:"translate3d(0px, 0px, 0px)",visibility:this.visibility,top:this.mirrorTop-e,left:this.mirrorLeft,height:this.boxHeight,width:this.boxWidth}),this.$slider.css({transform:"translate3d(0px, 0px, 0px)",position:"absolute",top:this.offsetTop,left:this.offsetLeft,height:this.imageHeight,width:this.imageWidth,maxWidth:"none"})}}),t.extend(o,{scrollTop:0,scrollLeft:0,winHeight:0,winWidth:0,docHeight:1<<30,docWidth:1<<30,sliders:[],isReady:!1,isFresh:!1,isBusy:!1,setup:function(){if(!this.isReady){var s=t(e),h=t(i),r=function(){o.winHeight=h.height(),o.winWidth=h.width(),o.docHeight=s.height(),o.docWidth=s.width()},a=function(){var t=h.scrollTop(),i=o.docHeight-o.winHeight,e=o.docWidth-o.winWidth;o.scrollTop=Math.max(0,Math.min(i,t)),o.scrollLeft=Math.max(0,Math.min(e,h.scrollLeft())),o.overScroll=Math.max(t-i,Math.min(t,0))};h.on("resize.px.parallax load.px.parallax",function(){r(),o.isFresh=!1,o.requestRender()}).on("scroll.px.parallax load.px.parallax",function(){a(),o.requestRender()}),r(),a(),this.isReady=!0}},configure:function(i){"object"==typeof i&&(delete i.refresh,delete i.render,t.extend(this.prototype,i))},refresh:function(){t.each(this.sliders,function(){this.refresh()}),this.isFresh=!0},render:function(){this.isFresh||this.refresh(),t.each(this.sliders,function(){this.render()})},requestRender:function(){var t=this;this.isBusy||(this.isBusy=!0,i.requestAnimationFrame(function(){t.render(),t.isBusy=!1}))},destroy:function(e){var s,h=t(e).data("px.parallax");for(h.$mirror.remove(),s=0;s.sidebar-brand { 134 | height: 55px; 135 | font-size: 18px; 136 | line-height: 55px; 137 | } 138 | 139 | .sidebar-nav>.sidebar-brand a { 140 | color: #999; 141 | } 142 | 143 | .sidebar-nav>.sidebar-brand a:hover { 144 | color: #fff; 145 | background: none; 146 | } 147 | 148 | #menu-toggle { 149 | z-index: 1; 150 | position: fixed; 151 | top: 0; 152 | right: 0; 153 | } 154 | 155 | #sidebar-wrapper.active { 156 | right: 250px; 157 | width: 250px; 158 | -webkit-transition: all 0.4s ease 0s; 159 | -moz-transition: all 0.4s ease 0s; 160 | -ms-transition: all 0.4s ease 0s; 161 | -o-transition: all 0.4s ease 0s; 162 | transition: all 0.4s ease 0s; 163 | } 164 | 165 | .toggle { 166 | margin: 5px 5px 0 0; 167 | } 168 | 169 | 170 | /* Header */ 171 | 172 | .header { 173 | display: table; 174 | position: relative; 175 | width: 100%; 176 | height: 100%; 177 | background: url(../img/bgnew.jpg) no-repeat center center scroll; 178 | -webkit-background-size: cover; 179 | -moz-background-size: cover; 180 | background-size: cover; 181 | -o-background-size: cover; 182 | } 183 | 184 | 185 | /* About */ 186 | 187 | .about { 188 | padding: 50px 0; 189 | } 190 | 191 | 192 | /* Services */ 193 | 194 | .services { 195 | padding: 50px 0; 196 | } 197 | 198 | .service-item { 199 | margin-bottom: 30px; 200 | } 201 | 202 | 203 | /* Callout */ 204 | 205 | .callout { 206 | display: table; 207 | width: 100%; 208 | height: 400px; 209 | color: #fff; 210 | background: url(../img/callout.jpg) no-repeat center center scroll; 211 | -webkit-background-size: cover; 212 | -moz-background-size: cover; 213 | background-size: cover; 214 | -o-background-size: cover; 215 | } 216 | 217 | 218 | /* Portfolio */ 219 | 220 | .portfolio { 221 | padding: 50px 0; 222 | } 223 | 224 | .portfolio-item { 225 | margin-bottom: 30px; 226 | } 227 | 228 | .img-portfolio { 229 | margin: 0 auto; 230 | } 231 | 232 | .img-portfolio:hover { 233 | opacity: 0.8; 234 | } 235 | 236 | 237 | /* Call to Action */ 238 | 239 | .call-to-action { 240 | padding: 50px 0; 241 | } 242 | 243 | .call-to-action .btn { 244 | margin: 10px; 245 | } 246 | 247 | 248 | /* Map */ 249 | 250 | .map { 251 | height: 500px; 252 | } 253 | 254 | @media(max-width:768px) { 255 | .map { 256 | height: 75%; 257 | } 258 | } 259 | 260 | .map iframe { 261 | pointer-events: none; 262 | } 263 | 264 | 265 | /* Footer */ 266 | 267 | footer { 268 | padding: 100px 0; 269 | } 270 | 271 | #to-top { 272 | display: none; 273 | position: fixed; 274 | bottom: 5px; 275 | right: 5px; 276 | } 277 | 278 | 279 | /* 280 | CUSTOM 281 | */ 282 | 283 | .select-date { 284 | width: auto; 285 | margin: auto; 286 | margin-top: 5px; 287 | } 288 | 289 | 290 | /* 291 | Stat block 292 | */ 293 | 294 | .stat-block { 295 | min-height: 50px; 296 | color: white; 297 | margin-bottom: 10px; 298 | display: none; 299 | } 300 | 301 | .stat-block.stat-block-default { 302 | background: rgba(0, 0, 0, 0.5); 303 | border: 1px solid white; 304 | } 305 | 306 | .stat-block.stat-block-blue { 307 | background: rgb(93, 132, 225); 308 | } 309 | 310 | .stat-block.stat-block-yellow { 311 | background: rgb(201, 175, 84); 312 | } 313 | 314 | .stat-block.stat-block-black { 315 | background: rgb(100, 100, 100); 316 | } 317 | 318 | .stat-block.stat-block-green { 319 | background: rgb(81, 191, 121); 320 | } 321 | 322 | .stat-block h3 { 323 | margin-top: 30px; 324 | font-weight: bold; 325 | } 326 | 327 | .stat-block h1 { 328 | margin-top: 30px; 329 | margin-bottom: 3px; 330 | } 331 | 332 | @media(max-width:992px) { 333 | .stat-block h1, 334 | .stat-block p { 335 | text-align: center; 336 | } 337 | } 338 | 339 | .stat-block p { 340 | margin-top: 0px; 341 | margin-bottom: 20px; 342 | } 343 | 344 | table { 345 | color: white; 346 | } 347 | --------------------------------------------------------------------------------