├── .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 = $(`