add multiple HOT

This commit is contained in:
Valentin Binotto 2025-05-02 11:00:31 +00:00
parent 813e87aac7
commit 36c8d41b8a
14 changed files with 122 additions and 61 deletions

1
heat/env/deploy.sh vendored Normal file
View file

@ -0,0 +1 @@
openstack stack create stack_name_001 --parameter "varkey=varvalue" -t basic-template.yaml

View file

@ -0,0 +1,16 @@
heat_template_version: 2021-04-16
description: "Identity Domain only"
parameters:
domain-0001-name:
type: string
label: "domain-0001 Name"
default: "os-cloud-0001.vty-valentin-vty.net"
resources:
domain-0001:
type: OS::Keystone::Domain
properties:
enabled: true
name: { get_param: domain-0001-name }

View file

@ -11,18 +11,28 @@ parameters:
network_0001_dns:
type: string
label: "Network 0001 DNS Name"
description: "DNS Name of Network 0001"
description: "DNS Name of Network 0001. Can be set under network-properties with dns_domain"
default: "network-0001.os-cloud-0001.vty-valentin-vty.net"
network_0001_subnet_0001_name:
type: string
label: "Subnet 0001 of Network 0001 Name"
description: "Name of Subnet 0001 in Network 0001"
default: "sn0001.network-0001.os-cloud-0001.vty-valentin-vty.net"
network_0001_subnet_0001_cidr:
type: string
label: "Subnet 0001 of Network 0001 CIDR (IPv4)""
description: "IPv4 CIDR of Subnet 0001 in Network 0001"
default: ""
network_0001_subnet_0002_cidr:
type: string
label: "Subnet 0002 of Network 0001 CIDR (IPv4)""
description: "IPv4 CIDR of Subnet 0002 in Network 0001"
default: ""
network_0001_subnet_0003_cidr:
type: string
label: "Subnet 0003 of Network 0001 CIDR (IPv6)""
description: "IPv6 CIDR of Subnet 0003 in Network 0001"
default: ""
network_0001_subnet_0004_cidr:
type: string
label: "Subnet 0004 of Network 0001 CIDR (IPv6)""
description: "IPv6 CIDR of Subnet 0004 in Network 0001"
default: ""
resources:
network_0001:
@ -30,72 +40,49 @@ resources:
properties:
admin_state_up: true
name: { get_param: network_0001_name }
dns_domain: { get_param: network_0001_dns }
network_0001_subnet_0001:
type: OS::Neutron::Subnet
properties:
host_routes:
- destination: "0.0.0.0/0"
nexthop: ""
dns_nameservers:
- "1.1.1.1"
name: { get_param: network_0001_subnet_0001_name }
name: subnet-0001-{ get_param: network_0001_name }
network: { get_resource: network_0001 }
ip_version: 4
cidr: { get_param: network_0001_subnet_0001_cidr }
enable_dhcp: true
gateway_ip: ""
network_0001_subnet_0002:
type: OS::Neutron::Subnet
properties:
host_routes:
- destination: "0.0.0.0/0"
nexthop: ""
dns_nameservers:
- "1.1.1.1"
name: { get_param: network_0001_subnet_0002_name }
name: subnet-0002-{ get_param: network_0001_name }
network: { get_resource: network_0001 }
ip_version: 4
cidr: { get_param: network_0001_subnet_0002_cidr }
enable_dhcp: true
gateway_ip: ""
network_0001_subnet_0003:
type: OS::Neutron::Subnet
properties:
host_routes:
- destination: "0.0.0.0/0"
nexthop: ""
dns_nameservers:
- "1.1.1.1"
name: { get_param: network_0001_subnet_0003_name }
name: subnet-0003-{ get_param: network_0001_name }
network: { get_resource: network_0001 }
ip_version: 4
ip_version: 6
cidr: { get_param: network_0001_subnet_0003_cidr }
enable_dhcp: true
gateway_ip: ""
network_0001_router_0001:
type: OS::Neutron::Router
network_0001_subnet_0004:
type: OS::Neutron::Subnet
properties:
external_gateway_info:
network:
enable_snat: true
admin_state_up: true
name:
name: subnet-0004-{ get_param: network_0001_name }
network: { get_resource: network_0001 }
ip_version: 6
cidr: { get_param: network_0001_subnet_0004_cidr }
dnszone_0001:
type: OS::Designate::Zone
properties:
name: "vty-valentin-vty.net."
email: "hostmaster@kges2.net"
email: "hostmaster@vty-valentin-vty.oscloud"
dnszone_0001_record_0001:
type: OS::Designate::RecordSet
properties:
zone:
zone: { get_resource: dnszone_0001 }
type: TXT
name: root
depends_on:
@ -119,26 +106,26 @@ resources:
remote_ip_prefix: "::/0"
port_range_min: 22
port_range_max: 22
name:
description:"allow ssh via ipv6 and ipv4 from everywhere"
name: "sg-0001"
description: "allow ssh via ipv6 and ipv4 from everywhere"
router_001:
type: OS::Neutron::Router
secgroup_0002:
type: OS::Neutron::SecurityGroup
properties:
external_gateway_info: { network: public }
rules:
- direction: ingress
ethertype: IPv4
remote_mode: remote_ip_prefix
remote_ip_prefix: "0.0.0.0/0"
- direction: ingress
ethertype: IPv6
remote_mode: remote_ip_prefix
remote_ip_prefix: "::/0"
name: "sg-0002"
description: "allow all traffic via ipv6 and ipv4 from everywhere"
router_interface_001:
type: OS::Neutron::RouterInterface
secgroup_0003:
type: OS::Neutron::SecurityGroup
properties:
router_id: { get_resource: router_001 }
subnet: { get_resource: subnet_001 }
name: "sg-0003"
description: "allow no traffic via ipv6 and ipv4"

View file

@ -0,0 +1,17 @@
heat_template_version: 2021-04-16
description: "Neutron Network only"
parameters:
network-0001-name:
type: string
label: "network-0001 Name"
default: "network-0001.os-cloud-0001.vty-valentin-vty.net"
resources:
network-0001:
type: OS::Neutron::Net
properties:
admin_state_up: true
shared: true
name: { get_param: network-0001-name }

View file

@ -0,0 +1,33 @@
heat_template_version: 2021-04-16
description: "Provider Networking Setup"
parameters:
provider_net_0001:
type: string
label: "ProviderNet 0001 Name"
description: "Name of ProviderNet 0001"
default: "provnet-0001.os-cloud-0001.vty-valentin-vty.net"
provider_net_0001_domain:
type: string
label: "ProviderNet 0001 Domain"
description: "Domain of ProviderNet 0001"
default: "provnet-0001.os-cloud-0001.vty-valentin-vty.net"
provider_net_0001_phypro:
type: string
label: "ProviderNet 0001 Physical network name"
default: "br-provider"
resources:
provider_net_0001:
type: OS::Neutron::ProviderNet
properties:
network_type: flat
admin_state_up: true
dns_domain: { get_param: provider_net_0001_domain }
name: { get_param: provider_net_0001 }
shared: true
physical_network: { get_param: provider_net_0001_phypro }
# network_type can be "flat", "local", "vlan", "vxlan", "gre", "geneve"

2
oscli/identity/domain.sh Normal file
View file

@ -0,0 +1,2 @@
openstack --os-identity-api-version=3 domain create os-cloud-0001.vty-valentin-vty.net
openstack domain create os-cloud-0001.vty-valentin-vty.net

View file

@ -0,0 +1 @@
openstack project create --domain os-cloud-0001.vty-valentin-vty.net pr-0001.os-cloud-0001.vty-valentin-vty.net

2
oscli/identity/role.sh Normal file
View file

@ -0,0 +1,2 @@
openstack role create --domain os-cloud-0001.vty-valentin-vty.net rl-0001
openstack role add --project pr-0001.os-cloud-0001.vty-valentin-vty.net --user valentin rl-0001

2
oscli/identity/user.sh Normal file
View file

@ -0,0 +1,2 @@
openstack user create --domain os-cloud-0001.vty-valentin-vty.net --password-prompt --email valentin@cloudopn.oscloud valentin
openstack user create --domain os-cloud-0001.vty-valentin-vty.net --project pr-0001.os-cloud-0001.vty-valentin-vty.net --project-domain os-cloud-0001.vty-valentin-vty.net --password PASSWORD --email valentin@cloudopn.oscloud valentin

View file

@ -1 +0,0 @@
openstack network create --share --project PR-XYZ --project-domain default --internal NET00001NAME

1
oscli/network/network.sh Normal file
View file

@ -0,0 +1 @@
openstack network create --share --project XYZ --project-domain default.internal --internal network-0001.os-cloud-0001.vty-valentin-vty.net