1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-06 18:47:19 +01:00
Commit Graph

80 Commits

Author SHA1 Message Date
Pierre Prinetti
17a547a3a7 OpenStack: Add Failure domains
Distribute Control plane machines across user-defined failure domains.

This feature is being release under a TechPreviewNoUpgrade FeatureSet.

Failure domains can be defined in the `controlPlane` machine-pool of
`install-config.yaml` as follows:

```yaml
controlPlane:
  name: master
  platform:
    openstack:
      type: ${CONTROL_PLANE_FLAVOR}
      failureDomains:
      - computeAvailabilityZone: 'nova-1'
        storageAvailabilityZone: 'cinder-1'
        portTargets:
        - id: storage
          network:
            id: 8db6a48e-375b-4caa-b20b-5b9a7218bfe6
      - computeAvailabilityZone: 'nova-2'
        storageAvailabilityZone: 'cinder-2'
        portTargets:
        - id: storage
          network:
            id: 39a7b82a-a8a4-45a4-ba5a-288569a6edd1
      - computeAvailabilityZone: 'nova-3'
        storageAvailabilityZone: 'cinder-3'
        portTargets:
        - id: storage
          network:
            id: 8e4b4e0d-3865-4a9b-a769-559270271242
```

Each `failureDomains` entry can take an optional
`computeAvailabilityZone` string, an optional `storageAvailabilityZone`
string, and an optional `portTargets` array.

Each `portTargets` entry requires an arbirtary `id`, which must be unique per
`failureDomain`. If `id` is exactly `control-plane`, then that
`portTarget` is used instead of the default primary subnet (or instead
of `machinesSubnet` if defined) as the first machine network.

Each `portTargets` entry takes an optional `network` object and an
optional `fixedIPs` array (not represented in the example).

The `network` object taks an optional `name` string and an optional `id`
string. `name` is ignored if `id` is passed.

Each `fixedIPs` entry takes a `subnet` object which syntax is [defined
in the `machinev1alpha1` spec as
`SubnetFilter`](d170fcdc0f/machine/v1alpha1/types_openstack.go (L230-L281)).

Note that unless an external load balancer is used, `portTargets` with
id `control-plane` must all have one single subnet and must all refer to
the same OpenStack subnet. As a consequence, the result will be similar
as setting a `machinesSubnet`, except that Compute nodes will not
follow.
2023-03-08 08:11:31 +00:00
Pierre Prinetti
9d873535df openstack: consistent TechPreview-only feature validation
With this change, filling in TechPreview-only configuration flags in
OpenStack throws similar errors as to what happens on other platforms.
2023-03-04 13:29:25 +00:00
Emilien Macchi
625932f5c3 Support for External LB as Tech Preview 2023-02-21 09:29:03 -05:00
Rafael Fonseca
80e02a974d chore: fix import order 2022-12-13 15:40:58 +01:00
Rafael Fonseca
66953cee79 go-fmt: apply formatting with golang 1.19 2022-10-19 18:55:10 +02:00
Sandhya Dasu
7202c95d1d Fix go fmt errors after golang version upgrade to 1.19 2022-10-13 14:25:17 -04:00
Martin André
3b3f19f4d2 OCPBUGS-963: OpenStack: Lift validation for 14 chars cluster names
The validation is no longer necessary now that we stopped using mDNS.
Instead, rely on cluster name validation common to all platforms for
length check and the on-prem cluster name validation for names
containing dots.

This aligns with other on-prem platforms.
2022-09-07 10:27:05 +02:00
Christoph Stäbler
0d5ece990c Mark API and Ingress VIPs required on OpenStack
Signed-off-by: Christoph Stäbler <cstabler@redhat.com>
2022-08-26 12:08:44 -05:00
Christoph Stäbler
a58ac55e8a Add VIPs fields for API and Ingress
Signed-off-by: Christoph Stäbler <cstabler@redhat.com>
2022-08-26 12:08:39 -05:00
Jamo Luhrsen
74486c10c6 Change defaultNetworkType to ovn-kubernetes
In 4.12, the default CNI will be OVNKubernetes.
This change will deploy ovnk by default as well
as adjust tests, docs and comments to reflect
the same.

Signed-off-by: Jamo Luhrsen <jluhrsen@gmail.com>
2022-07-28 22:26:08 -07:00
Martin André
a53ddd5206 Validate OpenStack supports resource tagging
Networking resources tagging is a hard requirement for OpenShift on
OpenStack and we should refuse from running the installer when the
underlying OpenStack platform does not support it.

Also, the destroy script may delete unmanaged resources when network
tagging is not available. With this patch, the destroy script will
refuse to work when network tagging is not available.

Fixes Bug 2013877

Co-authored-by: Martin André <m.andre@redhat.com>
Co-authored-by: Pierre Prinetti <pierreprinetti@redhat.com>
2021-10-26 15:43:12 +02:00
Pierre Prinetti
f6dbeccc70 openstack: Expose worker server group policy
With this change, Compute nodes within each MachineSet are automatically
created in a Server group, with a default policy of
"soft-anti-affinity".

With this change, a "serverGroupPolicy" can be set in install-config, on
the worker MachinePool and/or in the platform default.

Implements OSASINFRA-2570

Co-Authored-By: Matthew Booth <mbooth@redhat.com>
2021-10-04 18:05:15 +02:00
Pierre Prinetti
4a5b29ced0 openstack: Expose master server group policy
Prior to this change, the Control plane nodes are created in a server
group with the hardcoded policy "soft-anti-affinity".

This change adds a new configuration knob in the OpenStack-specific
MachinePool configuration of `install-config.yaml`.

The new property `controlPlane.platform.openstack.serverGroupPolicy`
defines the policy that will be applied to the Control Plane server
group.

Acceptable values are:

* `affinity`
* `anti-affinity`
* `soft-affinity`
* `soft-anti-affinity`

Defaults to `soft-anti-affinity`, to match the previous hardcoded
behaviour.

Validation will fail if the property is set on the Compute MachinePool.
2021-06-28 15:02:30 +02:00
Mike Fedosin
81ffe6bb37 OpenStack: Add Volume AZs to MachineProviderSpec
This commit allows to generate OpenStack Machine and MachineSet
assets considering Root Volume zones parameter from the install
config.
2021-04-08 13:57:09 +02:00
Mike Fedosin
d1df8f262b OpenStack: Add Zones to Root Volume
This commit adds a new optional list of strings parameter called
Zones to OpenStack's Root Volume. When it's set, OpenShift will create
instance root volumes in the specified availability zones.
2021-04-08 13:37:15 +02:00
Mike Fedosin
05453ef0df Bug 1813949: ignore local env variables when we create a service client
This commit explicitly disables reading auth data from env variables
by setting an invalid EnvPrefix. By doing this, we make sure that the
data from clouds.yaml is enough to authenticate.

After this change we don't have to unset OS_CLOUD env variable explicitly
anymore.

Ref https://issues.redhat.com/browse/OSASINFRA-2152
2021-01-11 13:00:11 +01:00
OpenShift Merge Robot
8f859376c5 Merge pull request #4321 from Fedosin/deprecate_computeflavor
Deprecate computeFlavor in OpenStack platform
2020-12-06 16:59:27 -05:00
Mike Fedosin
7014333a1a Deprecate computeFlavor in OpenStack platform 2020-12-05 05:11:34 +01:00
Adolfo Duarte
efc5c80c88 Adds clusterOSImageProperties to install-config.yaml
ClusterOSImageProperties is a list properties to be added
to the installer-uploaded ClusterOSImage in Glance.

The default is to not set any properties.

Co-Authored-By: Martin André <m.andre@redhat.com>
2020-12-04 20:45:55 +01:00
Mike Fedosin
712799df0d Rename lbFloatingIP to apiFloatingIP 2020-10-07 18:15:48 +02:00
Mike Fedosin
956ce5747f Bug 1873123: omit deprecated parameters during config generation 2020-08-27 16:13:27 +02:00
OpenShift Merge Robot
169765e862 Merge pull request #4029 from Fedosin/optional_external_network
Bug 1867519: make externalNetwork optional
2020-08-12 05:49:04 -04:00
Mike Fedosin
b3404878a5 Bug 1867530: mark deprecated parameters as optional 2020-08-10 12:30:55 +02:00
Mike Fedosin
7f3044ddcd Bug 1867519: make externalNetwork optional
Despite the fact `externalNetwork` is considered as an
optional parameter, installations fails if it's not specified.

This commit makes this and related parameters truly optional.
2020-08-10 11:35:52 +02:00
Emilio Garcia
5f791b38a6 Fixes machinepools to add the correct number of machines to pool. Also updates code to handle empty zones more correctly. 2020-08-05 13:43:38 -04:00
Mike Fedosin
f6b076bd70 Bug 1864280: set AZs default for machine pool in the right place 2020-08-03 23:10:47 +02:00
Emilio Garcia
ee9535732a OpenStack Availibility Zones
Following suit with AWS, OpenStack is adding support for custom AZs
for installer machine pools. Users can pass a list of zones to use
and the nodes in that machine pool will be spread across them.
2020-07-31 16:31:29 -04:00
Mike Fedosin
09678f0cac Bug 1857158: OpenStack: validate there is no . in the cluster name 2020-07-21 15:58:12 +02:00
Adolfo Duarte
127f467a0d Make externalnetwork and lbfloating ip optional
- Removes floating ip binding from bootstrap server
if external network is not used
- Added documentation for optional externalNetwork
- Modifies gather to handle when floating ips are not used
2020-07-21 09:24:50 +02:00
OpenShift Merge Robot
23d73eb37d Merge pull request #3855 from iamemilio/ingress_fip
Option to pass floating IP to ingress port
2020-07-20 18:05:10 -04:00
Emilio Garcia
ecda20e348 Option to pass Floating IP for Ingress entrypoint
To make the user experience more cohesive, we are adding this feature to
allow users to pass a floating IP to be attached to the ingress port. This
mirrors the way users add the floating ip for the API port.
2020-07-16 09:56:02 -04:00
Mike Fedosin
6f9de8873b [OpenStack] get rid of valid values fetcher
This commit removes unnecessary ValidValuesFetcher interface and
all related implementations. Now we collect all required data before
the validation and pass cloud info values to the validation functions
after that. It simplifies the architecture and makes these functions
static.

Additionally, all validations that require calls to the OpenStack cloud
were moved from pkg/types/openstack to pkg/asset/installconfig/openstack.
2020-07-15 23:58:53 +02:00
Emilio Garcia
cfcb100c88 cleaning up the validations to improve readability and high level flow 2020-07-13 10:58:02 -04:00
Mike Fedosin
0a6cd8a49a Update validvaluesfetcher_generated
Generated by:
./hack/go-genmock.sh
2020-07-09 16:27:55 +02:00
Mike Fedosin
c72ce8317f Remove unused functions
GetNetworkExtensionsAliases and GetServiceCatalog are not used
anymore, so we can delete them.
2020-07-09 16:27:55 +02:00
Mike Fedosin
91af3a0ca6 Deprecate TrunkSupport and OctaviaSupport in the config
These values are calculated automatically, and the user can't define
them.
2020-07-09 16:27:55 +02:00
Mike Fedosin
3800fa6ec4 OpenStack: Do not modify platform values during validation
Now, we we validate the platform values, we also modify two of them:
"TrunkSupport" and "OctaviaSupport".

It doesn't make sense, because we set them during generation of the
installconfig and they cannot be defined by the user.
2020-07-09 16:27:54 +02:00
OpenShift Merge Robot
5face7c5dd Merge pull request #3492 from mandre/openstack-dns-vip
Bug 1841066: OpenStack: Remove DNS VIP
2020-06-05 03:02:49 -04:00
Pierre Prinetti
b284bf60de Add reviewers to the OpenStack directories
Ref.: https://github.com/openshift/installer/pull/3640
2020-06-02 12:21:04 +02:00
Martin André
1aedcd8aa9 OpenStack: Remove DNS VIP
Depends on https://github.com/openshift/machine-config-operator/pull/1666
2020-04-22 10:42:57 +02:00
Emilio Garcia
588d5dadcc Add feature to enable users to pass custom subnets to use as the node subnets
Users want to re-use and customize their networking infrastructure during IPI
installs, so to enable them, we are allowing them to pass custom subnets to the
installer.
2020-04-17 10:07:43 -04:00
OpenShift Merge Robot
e11c2b8f54 Merge pull request #3291 from Fedosin/secondary_vnics
OpenStack: allow to specify additional networks and security groups for masters and workers
2020-04-09 01:35:28 +02:00
Emilio Garcia
ecf8a2cfbf custom API and Ingress vip addresses
co-authored-by: Fedosin mfedosin@redhat.com
2020-04-08 09:33:55 -04:00
Mike Fedosin
c1329de152 Add type validations
This commit adds validations that all provided network and security
group ids are UUID v4 strings.
2020-04-03 20:32:58 +02:00
Mike Fedosin
5654769a4a Allow to specify additional networks and security groups 2020-04-03 20:32:45 +02:00
Mike Fedosin
beec1ab1eb OpenStack: support "file" scheme for custom image urls
Now we support http(s) schemes only, but for disconnected installs
it's very convenient to specify the local file path to the image file.

This commit adds "file" scheme support, so users can set the location as
"file:///path/to/image".
2020-03-26 22:25:55 +01:00
Mike Fedosin
3294a021b3 OpenStack: allow to overwrite default os image in the install config 2020-02-26 12:59:47 +01:00
gryf
8ec7103055 Don't fail on unavailable features on OpenStack.
Currently if we are looking for extensions for Neutron or try to list
services, it might happen, that underlying OpenStack cloud doesn't
support listing either extension or services. This patch is fixing it,
and assumption is, that trunk support is disabled in a case of
inability of listing Neutron extensions, and/or octavia support is
disabled in case of inability of listing services, instead of aborting
installation.
2020-02-10 07:45:24 +01:00
Clayton Coleman
103098955c types: Replace MachineCIDR with MachineNetwork, an array of CIDRs
For IPv6 dual-stack support we need to support multiple
machine networks in order to register both an IPv4 machine prefix
and an IPv6 prefix (Azure in particular requires the user to define
a prefix which could conflict with the service or pod networks).

Update core types and validation to react to the change from a
single field to an array. Update the validation messages to be
consistent with the field the user would see (a "machine network")
instead of using "subnets" or "machineCIDR".
2019-12-19 14:57:46 -05:00
Fabiano Franz
961a2e6090 Log credentials loading for AWS, Azure, GCP, OpenStack 2019-12-03 14:02:58 -03:00