Skip to content

Commit 11f27c4

Browse files
authored
Merge pull request #70727 from sheriff-rh/OSDOCS-9146
2 parents 425e50b + bcbc6d0 commit 11f27c4

6 files changed

+198
-86
lines changed

installing/installing_openstack/installing-openstack-user.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ include::modules/installation-osp-accessing-api.adoc[leveloffset=+1]
3737
include::modules/installation-osp-accessing-api-floating.adoc[leveloffset=+2]
3838
include::modules/installation-osp-accessing-api-no-floating.adoc[leveloffset=+2]
3939
include::modules/installation-osp-describing-cloud-parameters.adoc[leveloffset=+1]
40+
include::modules/installation-osp-creating-network-resources.adoc[leveloffset=+1]
4041
include::modules/installation-initializing.adoc[leveloffset=+1]
4142

4243
[role="_additional-resources"]
@@ -61,11 +62,10 @@ After you deploy your cluster, you can attach pods to additional networks. For m
6162
include::modules/installation-user-infra-generate-k8s-manifest-ignition.adoc[leveloffset=+1]
6263
include::modules/installation-osp-converting-ignition-resources.adoc[leveloffset=+1]
6364
include::modules/installation-osp-creating-control-plane-ignition.adoc[leveloffset=+1]
64-
include::modules/installation-osp-creating-network-resources.adoc[leveloffset=+1]
65-
66-
Optionally, you can use the `inventory.yaml` file that you created to customize your installation. For example, you can deploy a cluster that uses bare metal machines.
65+
include::modules/installation-osp-updating-network-resources.adoc[leveloffset=+1]
6766

6867
include::modules/installation-osp-deploying-bare-metal-machines.adoc[leveloffset=+2]
68+
6969
include::modules/installation-osp-creating-bootstrap-machine.adoc[leveloffset=+1]
7070
include::modules/installation-osp-creating-control-plane.adoc[leveloffset=+1]
7171
include::modules/cli-logging-in-kubeadmin.adoc[leveloffset=+1]

modules/installation-osp-config-yaml.adoc

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
// * installing/installing_openstack/installing-openstack-installer-custom.adoc
44

55
[id="installation-osp-config-yaml_{context}"]
6-
= Sample customized `install-config.yaml` file for {rh-openstack}
6+
= Sample customized install-config.yaml file for {rh-openstack}
77

8-
This sample `install-config.yaml` demonstrates all of the possible {rh-openstack-first}
9-
customization options.
8+
The following example `install-config.yaml` files demonstrate all of the possible {rh-openstack-first} customization options.
109

1110
[IMPORTANT]
12-
This sample file is provided for reference only. You must obtain your
13-
`install-config.yaml` file by using the installation program.
11+
This sample file is provided for reference only. You must obtain your `install-config.yaml` file by using the installation program.
1412

13+
.Example single stack `install-config.yaml` file
14+
[%collapsible]
15+
====
1516
[source,yaml]
1617
----
1718
apiVersion: v1
@@ -49,3 +50,61 @@ endif::openshift-origin[]
4950
pullSecret: '{"auths": ...}'
5051
sshKey: ssh-ed25519 AAAA...
5152
----
53+
====
54+
55+
.Example dual stack `install-config.yaml` file
56+
[%collapsible]
57+
====
58+
[source,yaml]
59+
----
60+
apiVersion: v1
61+
baseDomain: example.com
62+
controlPlane:
63+
name: master
64+
platform: {}
65+
replicas: 3
66+
compute:
67+
- name: worker
68+
platform:
69+
openstack:
70+
type: ml.large
71+
replicas: 3
72+
metadata:
73+
name: example
74+
networking:
75+
clusterNetwork:
76+
- cidr: 10.128.0.0/14
77+
hostPrefix: 23
78+
- cidr: fd01::/48
79+
hostPrefix: 64
80+
machineNetwork:
81+
- cidr: 192.168.25.0/24
82+
- cidr: fd2e:6f44:5dd8:c956::/64
83+
serviceNetwork:
84+
- 172.30.0.0/16
85+
- fd02::/112
86+
networkType: OVNKubernetes
87+
platform:
88+
openstack:
89+
cloud: mycloud
90+
externalNetwork: external
91+
computeFlavor: m1.xlarge
92+
apiVIPs:
93+
- 192.168.25.10
94+
- fd2e:6f44:5dd8:c956:f816:3eff:fec3:5955
95+
ingressVIPs:
96+
- 192.168.25.132
97+
- fd2e:6f44:5dd8:c956:f816:3eff:fe40:aecb
98+
controlPlanePort:
99+
fixedIPs:
100+
- subnet:
101+
name: openshift-dual4
102+
- subnet:
103+
name: openshift-dual6
104+
network:
105+
name: openshift-dual
106+
fips: false
107+
pullSecret: '{"auths": ...}'
108+
sshKey: ssh-ed25519 AAAA...
109+
----
110+
====

modules/installation-osp-creating-network-resources.adoc

Lines changed: 9 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,80 +10,26 @@ Create the network resources that an {product-title} on {rh-openstack-first} ins
1010

1111
.Prerequisites
1212

13-
* Python 3 is installed on your machine.
1413
* You downloaded the modules in "Downloading playbook dependencies".
1514
* You downloaded the playbooks in "Downloading the installation playbooks".
1615
1716
.Procedure
1817

19-
. Optional: Add an external network value to the `inventory.yaml` playbook:
18+
. For a dual stack cluster deployment, edit the `inventory.yaml` file and uncomment the `os_subnet6` attribute.
19+
20+
. On a command line, create the network resources by running the following command:
2021
+
21-
.Example external network value in the `inventory.yaml` Ansible playbook
22-
[source,yaml]
22+
[source,terminal]
2323
----
24-
...
25-
# The public network providing connectivity to the cluster. If not
26-
# provided, the cluster external connectivity must be provided in another
27-
# way.
28-
29-
# Required for os_api_fip, os_ingress_fip, os_bootstrap_fip.
30-
os_external_network: 'external'
31-
...
24+
$ ansible-playbook -i inventory.yaml network.yaml
3225
----
3326
+
34-
[IMPORTANT]
27+
[NOTE]
3528
====
36-
If you did not provide a value for `os_external_network` in the `inventory.yaml` file, you must ensure that VMs can access Glance and an external connection yourself.
29+
The API and Ingress VIP fields will be overwritten in the `inventory.yaml` playbook with the IP addresses assigned to the network ports.
3730
====
38-
39-
. Optional: Add external network and floating IP (FIP) address values to the `inventory.yaml` playbook:
40-
+
41-
.Example FIP values in the `inventory.yaml` Ansible playbook
42-
[source,yaml]
43-
----
44-
...
45-
# OpenShift API floating IP address. If this value is non-empty, the
46-
# corresponding floating IP will be attached to the Control Plane to
47-
# serve the OpenShift API.
48-
os_api_fip: '203.0.113.23'
49-
50-
# OpenShift Ingress floating IP address. If this value is non-empty, the
51-
# corresponding floating IP will be attached to the worker nodes to serve
52-
# the applications.
53-
os_ingress_fip: '203.0.113.19'
54-
55-
# If this value is non-empty, the corresponding floating IP will be
56-
# attached to the bootstrap machine. This is needed for collecting logs
57-
# in case of install failure.
58-
os_bootstrap_fip: '203.0.113.20'
59-
----
6031
+
61-
[IMPORTANT]
32+
[NOTE]
6233
====
63-
If you do not define values for `os_api_fip` and `os_ingress_fip`, you must perform postinstallation network configuration.
64-
65-
If you do not define a value for `os_bootstrap_fip`, the installer cannot download debugging information from failed installations.
66-
67-
See "Enabling access to the environment" for more information.
34+
The resources created by the `network.yaml` playbook are deleted by the `down-network.yaml` playbook.
6835
====
69-
70-
. On a command line, create security groups by running the `security-groups.yaml` playbook:
71-
+
72-
[source,terminal]
73-
----
74-
$ ansible-playbook -i inventory.yaml security-groups.yaml
75-
----
76-
77-
. On a command line, create a network, subnet, and router by running the `network.yaml` playbook:
78-
+
79-
[source,terminal]
80-
----
81-
$ ansible-playbook -i inventory.yaml network.yaml
82-
----
83-
84-
. Optional: If you want to control the default resolvers that Nova servers use, run the {rh-openstack} CLI command:
85-
+
86-
[source,terminal]
87-
----
88-
$ openstack subnet set --dns-nameserver <server_1> --dns-nameserver <server_2> "$INFRA_ID-nodes"
89-
----

modules/installation-osp-downloading-playbooks.adoc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ $ xargs -n 1 curl -O <<< '
2222
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/common.yaml
2323
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/compute-nodes.yaml
2424
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/control-plane.yaml
25-
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/inventory.yaml
26-
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/network.yaml
27-
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/security-groups.yaml
2825
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-bootstrap.yaml
2926
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-compute-nodes.yaml
3027
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-control-plane.yaml
31-
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-load-balancers.yaml
3228
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-network.yaml
3329
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-security-groups.yaml
34-
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-containers.yaml'
30+
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/down-containers.yaml
31+
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/inventory.yaml
32+
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/network.yaml
33+
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/security-groups.yaml
34+
https://raw.githubusercontent.com/openshift/installer/release-{product-version}/upi/openstack/update-network-resources.yaml'
3535
----
3636
3737
The playbooks are downloaded to your machine.

modules/installation-osp-fixing-subnet.adoc

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,39 @@ The IP range that the installation program uses by default might not match the N
1212
.Prerequisites
1313

1414
* You have the `install-config.yaml` file that was generated by the {product-title} installation program.
15+
* You have Python 3 installed.
1516
1617
.Procedure
1718

18-
. On a command line, browse to the directory that contains `install-config.yaml`.
19+
. On a command line, browse to the directory that contains the `install-config.yaml` and `inventory.yaml` files.
1920

2021
. From that directory, either run a script to edit the `install-config.yaml` file or update the file manually:
2122

22-
** To set the value by using a script, run:
23+
** To set the value by using a script, run the following command:
2324
+
2425
[source,terminal]
2526
----
26-
$ python -c '
27-
import yaml;
28-
path = "install-config.yaml";
29-
data = yaml.safe_load(open(path));
30-
data["networking"]["machineNetwork"] = [{"cidr": "192.168.0.0/18"}]; <1>
27+
$ python -c 'import yaml
28+
path = "install-config.yaml"
29+
data = yaml.safe_load(open(path))
30+
inventory = yaml.safe_load(open("inventory.yaml"))["all"]["hosts"]["localhost"]
31+
machine_net = [{"cidr": inventory["os_subnet_range"]}]
32+
api_vips = [inventory["os_apiVIP"]]
33+
ingress_vips = [inventory["os_ingressVIP"]]
34+
ctrl_plane_port = {"network": {"name": inventory["os_network"]}, "fixedIPs": [{"subnet": {"name": inventory["os_subnet"]}}]}
35+
if inventory.get("os_subnet6"): <1>
36+
machine_net.append({"cidr": inventory["os_subnet6_range"]})
37+
api_vips.append(inventory["os_apiVIP6"])
38+
ingress_vips.append(inventory["os_ingressVIP6"])
39+
data["networking"]["networkType"] = "OVNKubernetes"
40+
data["networking"]["clusterNetwork"].append({"cidr": inventory["cluster_network6_cidr"], "hostPrefix": inventory["cluster_network6_prefix"]})
41+
data["networking"]["serviceNetwork"].append(inventory["service_subnet6_range"])
42+
ctrl_plane_port["fixedIPs"].append({"subnet": {"name": inventory["os_subnet6"]}})
43+
data["networking"]["machineNetwork"] = machine_net
44+
data["platform"]["openstack"]["apiVIPs"] = api_vips
45+
data["platform"]["openstack"]["ingressVIPs"] = ingress_vips
46+
data["platform"]["openstack"]["controlPlanePort"] = ctrl_plane_port
47+
del data["platform"]["openstack"]["externalDNS"]
3148
open(path, "w").write(yaml.dump(data, default_flow_style=False))'
3249
----
33-
<1> Insert a value that matches your intended Neutron subnet, e.g. `192.0.2.0/24`.
34-
35-
** To set the value manually, open the file and set the value of `networking.machineCIDR` to something that matches your intended Neutron subnet.
50+
<1> Applies to dual stack (IPv4/IPv6) environments.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * installing/installing_openstack/installing-openstack-user.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="installation-osp-updating-network-resources_{context}"]
7+
= Updating network resources on {rh-openstack}
8+
9+
Update the network resources that an {product-title} on {rh-openstack-first} installation on your own infrastructure requires.
10+
11+
.Prerequisites
12+
13+
* Python 3 is installed on your machine.
14+
* You downloaded the modules in "Downloading playbook dependencies".
15+
* You downloaded the playbooks in "Downloading the installation playbooks".
16+
17+
.Procedure
18+
19+
. Optional: Add an external network value to the `inventory.yaml` playbook:
20+
+
21+
.Example external network value in the `inventory.yaml` Ansible Playbook
22+
[source,yaml]
23+
----
24+
...
25+
# The public network providing connectivity to the cluster. If not
26+
# provided, the cluster external connectivity must be provided in another
27+
# way.
28+
29+
# Required for os_api_fip, os_ingress_fip, os_bootstrap_fip.
30+
os_external_network: 'external'
31+
...
32+
----
33+
+
34+
[IMPORTANT]
35+
====
36+
If you did not provide a value for `os_external_network` in the `inventory.yaml` file, you must ensure that VMs can access Glance and an external connection yourself.
37+
====
38+
39+
. Optional: Add external network and floating IP (FIP) address values to the `inventory.yaml` playbook:
40+
+
41+
.Example FIP values in the `inventory.yaml` Ansible Playbook
42+
[source,yaml]
43+
----
44+
...
45+
# OpenShift API floating IP address. If this value is non-empty, the
46+
# corresponding floating IP will be attached to the Control Plane to
47+
# serve the OpenShift API.
48+
os_api_fip: '203.0.113.23'
49+
50+
# OpenShift Ingress floating IP address. If this value is non-empty, the
51+
# corresponding floating IP will be attached to the worker nodes to serve
52+
# the applications.
53+
os_ingress_fip: '203.0.113.19'
54+
55+
# If this value is non-empty, the corresponding floating IP will be
56+
# attached to the bootstrap machine. This is needed for collecting logs
57+
# in case of install failure.
58+
os_bootstrap_fip: '203.0.113.20'
59+
----
60+
+
61+
[IMPORTANT]
62+
====
63+
If you do not define values for `os_api_fip` and `os_ingress_fip`, you must perform postinstallation network configuration.
64+
65+
If you do not define a value for `os_bootstrap_fip`, the installation program cannot download debugging information from failed installations.
66+
67+
See "Enabling access to the environment" for more information.
68+
====
69+
70+
. On a command line, create security groups by running the `security-groups.yaml` playbook:
71+
+
72+
[source,terminal]
73+
----
74+
$ ansible-playbook -i inventory.yaml security-groups.yaml
75+
----
76+
77+
. On a command line, update the network resources by running the `update-network-resources.yaml` playbook:
78+
+
79+
[source,terminal]
80+
----
81+
$ ansible-playbook -i inventory.yaml update-network-resources.yaml <1>
82+
----
83+
<1> This playbook will add tags to the network, subnets, ports, and router. It also attaches floating IP addresses to the API and Ingress ports and sets the security groups for those ports.
84+
85+
. Optional: If you want to control the default resolvers that Nova servers use, run the {rh-openstack} CLI command:
86+
+
87+
[source,terminal]
88+
----
89+
$ openstack subnet set --dns-nameserver <server_1> --dns-nameserver <server_2> "$INFRA_ID-nodes"
90+
----
91+
92+
. Optional: You can use the `inventory.yaml` file that you created to customize your installation. For example, you can deploy a cluster that uses bare metal machines.

0 commit comments

Comments
 (0)