Skip to content

Commit 35d87e5

Browse files
authored
Merge pull request #2 from stackhpc/examples
Add some examples
2 parents 04ab0e1 + 57657fb commit 35d87e5

File tree

9 files changed

+510
-0
lines changed

9 files changed

+510
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,8 @@ ansible/*.retry
109109
ansible/roles/*\.*/
110110
# Galaxy collections
111111
ansible/collections/**/
112+
113+
# Editors
114+
*~
115+
.*.swp
116+
.*sw?

examples/container-clusters.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
###############################################################################
3+
# Configuration of Magnum container clusters.
4+
5+
# List of magnum cluster templates. Format is as required by the
6+
# stackhpc.os-container-clusters role.
7+
openstack_container_clusters_templates:
8+
- "{{ openstack_container_clusters_template_k8s_fedora_coreos }}"
9+
10+
# Kubernetes magnum cluster template.
11+
openstack_container_clusters_template_k8s_fedora_coreos:
12+
labels: "heat_container_agent_tag=ussuri-stable-1,kube_tag=v1.18.9,cloud_provider_tag=v1.18.2,monitoring_enabled=true,auto_scaling_enabled=true,auto_healing_enabled=true,auto_healing_controller=magnum-auto-healer,magnum_auto_healer_tag=latest,master_lb_floating_ip_enabled=true,cinder_csi_enabled=true,ingress_controller=octavia"
13+
external-network: "external"
14+
master-flavor: "m1.medium"
15+
flavor: "m1.medium"
16+
image: "FedoraCoreOS32"
17+
name: "k8s-fedora-coreos-32"
18+
coe: "kubernetes"
19+
network-driver: "calico"
20+
docker-storage_driver: "overlay2"
21+
volume-driver: "cinder"
22+
server-type: "vm"
23+
master-lb-enabled:
24+
floating-ip-enabled:
25+
public:
26+
dns-nameserver: "8.8.8.8"

examples/flavors-ironic.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
###############################################################################
3+
# Configuration of nova flavors for openstack.
4+
5+
# List of nova flavors in the openstack demo project. Format is as required by the
6+
# stackhpc.os-flavors role.
7+
openstack_flavors:
8+
- "{{ openstack_flavor_baremetal_A }}"
9+
10+
# Bare metal compute node.
11+
openstack_flavor_baremetal_A:
12+
name: "baremetal-A"
13+
ram: 65536
14+
disk: 0
15+
vcpus: 64
16+
extra_specs:
17+
"resources:CUSTOM_BAREMETAL_A": 1
18+
"resources:VCPU": 0
19+
"resources:MEMORY_MB": 0
20+
"resources:DISK_GB": 0

examples/flavors.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
###############################################################################
3+
# Configuration of nova flavors for openstack.
4+
5+
# List of nova flavors in the openstack demo project. Format is as required by the
6+
# stackhpc.os-flavors role.
7+
openstack_flavors:
8+
- "{{ openstack_flavor_m1_tiny }}"
9+
- "{{ openstack_flavor_m1_small }}"
10+
- "{{ openstack_flavor_m1_medium }}"
11+
- "{{ openstack_flavor_m1_large }}"
12+
- "{{ openstack_flavor_m1_xlarge }}"
13+
14+
# Virtual machine flavors.
15+
openstack_flavor_m1_tiny:
16+
name: "m1.tiny"
17+
ram: 512
18+
disk: 1
19+
vcpus: 1
20+
21+
openstack_flavor_m1_small:
22+
name: "m1.small"
23+
ram: 2048
24+
disk: 20
25+
vcpus: 1
26+
27+
openstack_flavor_m1_medium:
28+
name: "m1.medium"
29+
ram: 4096
30+
disk: 40
31+
vcpus: 2
32+
33+
openstack_flavor_m1_large:
34+
name: "m1.large"
35+
ram: 8192
36+
disk: 40
37+
vcpus: 4
38+
39+
openstack_flavor_m1_xlarge:
40+
name: "m1.xlarge"
41+
ram: 16384
42+
disk: 100
43+
vcpus: 8

examples/host-aggregates.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
###############################################################################
3+
# Configuration of nova host aggregates for openstack.
4+
5+
# List of nova host aggregates. Format is as required by the
6+
# stackhpc.os_host_aggregates role.
7+
8+
openstack_host_aggregates:
9+
- "{{ openstack_example_aggregate }}"
10+
11+
openstack_example_aggregate:
12+
name: "example_aggregate"
13+
hosts:
14+
- host1
15+
- host2
16+
metadata:
17+
type: example_cluster

examples/images.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
###############################################################################
3+
# Configuration of Glance software images.
4+
5+
# List of Glance images. Format is as required by the stackhpc.os-images role.
6+
openstack_images:
7+
- "{{ openstack_image_centos_stream8 }}"
8+
9+
openstack_image_centos_stream8:
10+
name: "CentOS-stream8"
11+
type: raw
12+
elements:
13+
- "centos"
14+
- "cloud-init"
15+
- "selinux-permissive"
16+
- "dhcp-all-interfaces"
17+
- "vm"
18+
- "grub2"
19+
- "stable-interface-names"
20+
is_public: True
21+
env:
22+
YUM: dnf
23+
DIB_RELEASE: "8-stream"
24+
properties:
25+
os_type: "linux"
26+
os_distro: "centos"
27+
os_version: "8-stream"
28+
29+
# List of Diskimage Builder (DIB) elements paths to include in image builds.
30+
openstack_image_elements:
31+
- "{{ openstack_image_stackhpc_elements }}/elements"
32+
33+
# This creates a git checkout in the local user's home directory
34+
openstack_image_stackhpc_elements: "{{ ansible_env.PWD }}/stackhpc-image-elements"
35+
36+
# List of Diskimage Builder (DIB) elements Git repositories to use in image
37+
# builds.
38+
openstack_image_git_elements:
39+
- repo: "https://github.com/stackhpc/stackhpc-image-elements.git"
40+
local: "{{ openstack_image_stackhpc_elements }}"

examples/networks-ironic.yml

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
###############################################################################
3+
# Configuration of networks, subnets and routers for openstack.
4+
5+
# List of networks in the openstack system. Format is as required by the
6+
# stackhpc.os-networks role.
7+
openstack_networks:
8+
- "{{ openstack_network_internal }}"
9+
- "{{ openstack_network_provision }}"
10+
- "{{ openstack_network_cleaning }}"
11+
- "{{ openstack_network_inspection }}"
12+
13+
# openstack internal network name.
14+
openstack_network_internal_name: "internal"
15+
16+
# openstack internal network.
17+
openstack_network_internal:
18+
name: "{{ openstack_network_internal_name }}"
19+
project: "admin"
20+
provider_network_type: "vlan"
21+
provider_physical_network: "physnet1"
22+
provider_segmentation_id: 65
23+
shared: false
24+
# Subnet configuration.
25+
subnets:
26+
- "{{ openstack_subnet_internal }}"
27+
28+
# openstack internal subnet.
29+
openstack_subnet_internal:
30+
name: "{{ openstack_network_internal_name }}"
31+
project: "admin"
32+
cidr: "10.65.0.0/16"
33+
enable_dhcp: false
34+
allocation_pool_start: "10.65.0.2"
35+
allocation_pool_end: "10.65.0.4"
36+
37+
# openstack provision network name.
38+
openstack_network_provision_name: "provision-net"
39+
40+
# openstack provision network.
41+
openstack_network_provision:
42+
name: "{{ openstack_network_provision_name }}"
43+
project: "admin"
44+
provider_network_type: "vlan"
45+
provider_physical_network: "physnet1"
46+
provider_segmentation_id: 69
47+
shared: false
48+
# Subnet configuration.
49+
subnets:
50+
- "{{ openstack_subnet_provision }}"
51+
52+
# openstack provision subnet.
53+
openstack_subnet_provision:
54+
name: "{{ openstack_network_provision_name }}"
55+
project: "admin"
56+
cidr: "10.69.0.0/16"
57+
enable_dhcp: false
58+
allocation_pool_start: "10.69.0.1"
59+
allocation_pool_end: "10.69.0.1"
60+
61+
# openstack cleaning network name.
62+
openstack_network_cleaning_name: "cleaning-net"
63+
64+
# openstack cleaning network.
65+
openstack_network_cleaning:
66+
name: "{{ openstack_network_cleaning_name }}"
67+
project: "admin"
68+
provider_network_type: "vlan"
69+
provider_physical_network: "physnet1"
70+
provider_segmentation_id: 70
71+
shared: false
72+
# Subnet configuration.
73+
subnets:
74+
- "{{ openstack_subnet_cleaning }}"
75+
76+
# openstack cleaning subnet.
77+
openstack_subnet_cleaning:
78+
name: "{{ openstack_network_cleaning_name }}"
79+
project: "admin"
80+
cidr: "10.70.0.0/16"
81+
enable_dhcp: false
82+
allocation_pool_start: "10.70.0.1"
83+
allocation_pool_end: "10.70.0.1"
84+
85+
# openstack inspection network name.
86+
openstack_network_inspection_name: "inspection-net"
87+
88+
# openstack inspection network.
89+
openstack_network_inspection:
90+
name: "{{ openstack_network_inspection_name }}"
91+
project: "admin"
92+
provider_network_type: "vlan"
93+
provider_physical_network: "physnet1"
94+
provider_segmentation_id: 71
95+
shared: false
96+
# Subnet configuration.
97+
subnets:
98+
- "{{ openstack_subnet_inspection }}"
99+
100+
# openstack inspection subnet.
101+
openstack_subnet_inspection:
102+
name: "{{ openstack_network_inspection_name }}"
103+
project: "admin"
104+
cidr: "10.71.0.0/16"
105+
enable_dhcp: false
106+
allocation_pool_start: "10.71.0.1"
107+
allocation_pool_end: "10.71.0.1"
108+
109+
# List of routers in the openstack demo project. Format is as required by the
110+
# stackhpc.os-networks role.
111+
openstack_routers:
112+
- "{{ openstack_router_provision }}"
113+
- "{{ openstack_router_cleaning }}"
114+
- "{{ openstack_router_inspection }}"
115+
116+
# openstack bare metal provisioning router.
117+
openstack_router_provision:
118+
- name: "provision"
119+
project: "admin"
120+
interfaces:
121+
- net: "{{ openstack_network_internal_name }}"
122+
subnet: "{{ openstack_network_internal_name }}"
123+
portip: "10.65.0.2"
124+
- net: "provision-net"
125+
subnet: "provision-net"
126+
portip: "10.69.0.1"
127+
128+
# openstack bare metal cleaning router.
129+
openstack_router_cleaning:
130+
- name: "cleaning"
131+
project: "admin"
132+
interfaces:
133+
- net: "{{ openstack_network_internal_name }}"
134+
subnet: "{{ openstack_network_internal_name }}"
135+
portip: "10.65.0.3"
136+
- net: "cleaning-net"
137+
subnet: "cleaning-net"
138+
portip: "10.70.0.1"
139+
140+
# openstack bare metal inspection router.
141+
openstack_router_inspection:
142+
- name: "inspection"
143+
project: "admin"
144+
interfaces:
145+
- net: "{{ openstack_network_internal_name }}"
146+
subnet: "{{ openstack_network_internal_name }}"
147+
portip: "10.65.0.4"
148+
- net: "inspection-net"
149+
subnet: "inspection-net"
150+
portip: "10.71.0.1"

0 commit comments

Comments
 (0)