Skip to content
This repository was archived by the owner on Mar 1, 2020. It is now read-only.

Commit e80b21e

Browse files
author
earthmant
committed
first commit
0 parents  commit e80b21e

File tree

2 files changed

+166
-0
lines changed

2 files changed

+166
-0
lines changed

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
# Azure Example Network
3+
4+
### Resources Created
5+
6+
* A `resource_group`.
7+
* A `virtual_network`.
8+
* A `public_subnet`.
9+
* A `private_subnet`.
10+
11+
12+
## Compatibility
13+
14+
Tested with:
15+
* Cloudify 4.2
16+
17+
18+
## Pre-installation steps
19+
20+
Upload the required plugins:
21+
22+
* [Azure Plugin](https://github.com/cloudify-incubator/cloudify-azure-plugin/releases).
23+
24+
_Check the blueprint for the exact version of the plugin._
25+
26+
27+
If you do not provide your own `deployment inputs` below, you must add these secrets to your Cloudify Manager `tenant`:
28+
29+
* `azure_subscription_id`
30+
* `azure_tenant_id`
31+
* `azure_client_id`
32+
* `azure_client_secret`
33+
* `azure_location`, such as `eastus`.
34+
35+
36+
## Installation
37+
38+
On your Cloudify Manager, navigate to `Local Blueprints` select `Upload`.
39+
40+
[Right-click and copy URL](https://github.com/cloudify-examples/azure-example-network/archive/master.zip). Paste where it says `Enter blueprint url`. Provide a blueprint name, such as `examples-network` in the field labeled `blueprint name`. Select `simple-blueprint.yaml` from `Blueprint filename` menu.
41+
42+
After the new blueprint has been created, click the `Deploy` button.
43+
44+
Navigate to `Deployments`, find your new deployment, select `Install` from the `workflow`'s menu. At this stage, you may provide your own values for any of the default `deployment inputs`.
45+
46+
47+
## Uninstallation
48+
49+
Navigate to the deployment and select `Uninstall`. When the uninstall workflow is finished, select `Delete deployment`.

simple-blueprint.yaml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
tosca_definitions_version: cloudify_dsl_1_3
2+
3+
description: >
4+
Create an Example Azure Network.
5+
6+
imports:
7+
- http://www.getcloudify.org/spec/cloudify/4.2/types.yaml
8+
- http://www.getcloudify.org/spec/azure-plugin/1.5.1/plugin.yaml
9+
10+
inputs:
11+
12+
subscription_id:
13+
type: string
14+
default: { get_secret: azure_subscription_id }
15+
16+
tenant_id:
17+
type: string
18+
default: { get_secret: azure_tenant_id }
19+
20+
client_id:
21+
type: string
22+
default: { get_secret: azure_client_id }
23+
24+
client_secret:
25+
type: string
26+
default: { get_secret: azure_client_secret }
27+
28+
location:
29+
default: { get_secret: azure_location }
30+
31+
retry_after:
32+
default: 5
33+
34+
resource_prefix:
35+
default: cfy
36+
37+
resource_suffix:
38+
default: 0
39+
40+
public_subnet_cidr:
41+
default: 10.10.0.0/24
42+
43+
private_subnet_cidr:
44+
default: 10.10.1.0/24
45+
46+
dsl_definitions:
47+
48+
client_config: &client_config
49+
subscription_id: { get_input: subscription_id }
50+
tenant_id: { get_input: tenant_id }
51+
client_id: { get_input: client_id }
52+
client_secret: { get_input: client_secret }
53+
54+
node_templates:
55+
56+
resource_group:
57+
type: cloudify.azure.nodes.ResourceGroup
58+
properties:
59+
azure_config: *client_config
60+
name: { concat: [ { get_input: resource_prefix }, 'resource_group', { get_input: resource_suffix } ] }
61+
location: { get_input: location }
62+
63+
virtual_network:
64+
type: cloudify.azure.nodes.network.VirtualNetwork
65+
properties:
66+
azure_config: *client_config
67+
name: { concat: [ { get_input: resource_prefix }, 'vnet', { get_input: resource_suffix } ] }
68+
location: { get_input: location }
69+
retry_after: { get_input: retry_after }
70+
relationships:
71+
- type: cloudify.azure.relationships.contained_in_resource_group
72+
target: resource_group
73+
74+
public_subnet:
75+
type: cloudify.azure.nodes.network.Subnet
76+
properties:
77+
azure_config: *client_config
78+
name: { concat: [ { get_input: resource_prefix }, 'public_subnet', { get_input: resource_suffix } ] }
79+
location: { get_input: location }
80+
retry_after: { get_input: retry_after }
81+
resource_config:
82+
addressPrefix: { get_input: public_subnet_cidr }
83+
relationships:
84+
- type: cloudify.azure.relationships.contained_in_virtual_network
85+
target: virtual_network
86+
87+
private_subnet:
88+
type: cloudify.azure.nodes.network.Subnet
89+
properties:
90+
azure_config: *client_config
91+
name: { concat: [ { get_input: resource_prefix }, 'private_subnet', { get_input: resource_suffix } ] }
92+
location: { get_input: location }
93+
retry_after: { get_input: retry_after }
94+
resource_config:
95+
addressPrefix: { get_input: private_subnet_cidr }
96+
relationships:
97+
- type: cloudify.azure.relationships.contained_in_virtual_network
98+
target: virtual_network
99+
- type: cloudify.relationships.depends_on
100+
target: public_subnet
101+
102+
outputs:
103+
104+
resource_group:
105+
value: { get_attribute: [ resource_group, name ] }
106+
107+
virtual_network:
108+
value: { get_attribute: [ virtual_network, name ] }
109+
110+
public_subnet:
111+
value: { get_attribute: [ public_subnet, name ] }
112+
113+
private_subnet:
114+
value: { get_attribute: [ private_subnet, name ] }
115+
116+
location:
117+
value: { get_input: location }

0 commit comments

Comments
 (0)