You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Red Hat Enterprise Linux CoreOS (RHCOS)](#red-hat-enterprise-linux-coreos-rhcos)
29
29
-[API and Ingress Floating IP Addresses](#api-and-ingress-floating-ip-addresses)
30
+
-[Network identifier](#network-identifier)
30
31
-[Create network, API and ingress ports](#create-network-api-and-ingress-ports)
31
32
-[Install Config](#install-config)
32
33
-[Configure the machineNetwork.CIDR apiVIP and ingressVIP](#configure-the-machinenetworkcidr-apivip-and-ingressvip)
@@ -270,6 +271,23 @@ api.openshift.example.com. A 203.0.113.23
270
271
271
272
They will need to be available to your developers, end users as well as the OpenShift installer process later in this guide.
272
273
274
+
## Network identifier
275
+
276
+
Resources like network, subnet (or subnets), router and API and ingress ports need to have unique name to not interfere with other deployments running on the same OpenStack cloud.
277
+
Please, keep in mind, those OpenStack resources will have different name scheme then all the other resources which will be created on next steps, although they will be tagged by the infraID later on.
278
+
Let's create environment variable `OS_NET_ID` and `netid.json` file, which will be used by ansible playbooks later on.
$ echo"{\"os_net_id\": \"$OS_NET_ID\"}"| tee netid.json
284
+
```
285
+
<!--- e2e-openstack-upi: INCLUDE END --->
286
+
287
+
Make sure your shell session has the `$OS_NET_ID` environment variable set when you run the commands later in this document.
288
+
289
+
Note, this identifier has nothing in common with OpenShift `infraID` defined later on.
290
+
273
291
## Create network, API and ingress ports
274
292
275
293
Please note that value of the API and Ingress VIPs fields will be overwritten in the `inventory.yaml` with the respective addresses assigned to the Ports. Run the following playbook to create necessary resources:
@@ -336,22 +354,39 @@ values:
336
354
337
355
<!--- e2e-openstack-upi: INCLUDE START --->
338
356
```sh
339
-
$ python -c 'import yaml
357
+
$ python -c 'import os
358
+
import sys
359
+
import yaml
360
+
import re
361
+
re_os_net_id = re.compile(r"{{\s*os_net_id\s*}}")
362
+
os_net_id = os.getenv("OS_NET_ID")
363
+
path = "common.yaml"
364
+
facts = None
365
+
for _dict in yaml.safe_load(open(path))[0]["tasks"]:
366
+
if "os_network" in _dict.get("set_fact", {}):
367
+
facts = _dict["set_fact"]
368
+
break
369
+
if not facts:
370
+
print("Cannot find `os_network` in common.yaml file. Make sure OpenStack resource names are defined in one of the tasks.")
0 commit comments