Skip to content

Commit

Permalink
Merge pull request #49719 from mburke5678/winc-add-gcp
Browse files Browse the repository at this point in the history
HOLD: OSDOCS4041: Support Windows Containers on GCP -- WMCO 7.0.0
  • Loading branch information
mburke5678 committed Jan 27, 2023
2 parents 252dc6d + e52929a commit 580561f
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _topic_maps/_topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2288,6 +2288,8 @@ Topics:
File: creating-windows-machineset-azure
- Name: Creating a Windows MachineSet object on vSphere
File: creating-windows-machineset-vsphere
- Name: Creating a Windows MachineSet object on GCP
File: creating-windows-machineset-gcp
- Name: Scheduling Windows container workloads
File: scheduling-windows-workloads
- Name: Windows node upgrades
Expand Down
1 change: 1 addition & 0 deletions modules/machine-api-overview.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-aws.adoc
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-azure.adoc
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-vsphere.adoc
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-gcp.adoc

:_content-type: CONCEPT
[id="machine-api-overview_{context}"]
Expand Down
1 change: 1 addition & 0 deletions modules/machineset-creating.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-aws.adoc
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-azure.adoc
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-vsphere.adoc
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-gcp.adoc

ifeval::["{context}" == "creating-windows-machineset-aws"]
:win:
Expand Down
80 changes: 80 additions & 0 deletions modules/windows-machineset-gcp.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Module included in the following assemblies:
//
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-gcp.adoc

[id="windows-machineset-gcp_{context}"]
= Sample YAML for a Windows MachineSet object on GCP

This sample YAML file defines a Windows `MachineSet` object running on Google Cloud Platform (GCP) that the Windows Machine Config Operator (WMCO) can use.

[source,yaml]
----
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
name: <infrastructure_id>-windows-worker-<zone_suffix> <2>
namespace: openshift-machine-api
spec:
replicas: 1
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-windows-worker-<zone_suffix> <2>
template:
metadata:
labels:
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
machine.openshift.io/cluster-api-machine-role: worker
machine.openshift.io/cluster-api-machine-type: worker
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-windows-worker-<zone_suffix> <2>
machine.openshift.io/os-id: Windows <3>
spec:
metadata:
labels:
node-role.kubernetes.io/worker: "" <4>
providerSpec:
value:
apiVersion: machine.openshift.io/v1beta1
canIPForward: false
credentialsSecret:
name: gcp-cloud-credentials
deletionProtection: false
disks:
- autoDelete: true
boot: true
image: <windows_server_image> <5>
sizeGb: 128
type: pd-ssd
kind: GCPMachineProviderSpec
machineType: n1-standard-4
networkInterfaces:
- network: <infrastructure_id>-network <1>
subnetwork: <infrastructure_id>-worker-subnet
projectID: <project_id> <6>
region: <region> <7>
serviceAccounts:
- email: <infrastructure_id>-w@<project_id>.iam.gserviceaccount.com
scopes:
- https://www.googleapis.com/auth/cloud-platform
tags:
- <infrastructure_id>-worker
userDataSecret:
name: windows-user-data <8>
zone: <zone> <9>
----
<1> Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. You can obtain the infrastructure ID by running the following command:
+
[source,terminal]
----
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
----
<2> Specify the infrastructure ID, worker label, and zone suffix (such as `a`).
<3> Configure the machine set as a Windows machine.
<4> Configure the Windows node as a compute machine.
<5> Specify the full path to an image of a supported version of Windows Server.
<6> Specify the GCP project that this cluster was created in.
<7> Specify the GCP region, such as `us-central1`.
<8> Created by the WMCO when it configures the first Windows machine. After that, the `windows-user-data` is available for all subsequent machine sets to consume.
<9> Specify the zone within the chosen region, such as `us-central1-a`.
6 changes: 6 additions & 0 deletions modules/wmco-prerequisites.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ a|* Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic
|VMware vSphere
|Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic/april-25-2022-kb5012637-os-build-20348-681-preview-2233d69c-d4a5-4be9-8c24-04a450861a8d[20348.681] or later

|Google Cloud Platform (GCP)
|Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic/april-25-2022-kb5012637-os-build-20348-681-preview-2233d69c-d4a5-4be9-8c24-04a450861a8d[20348.681] or later

|Bare metal or provider agnostic
a|* Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic/april-25-2022-kb5012637-os-build-20348-681-preview-2233d69c-d4a5-4be9-8c24-04a450861a8d[20348.681] or later
* Windows Server 2019, version 1809
Expand All @@ -52,6 +55,9 @@ Hybrid networking with OVN-Kubernetes is the only supported networking configura
|VMware vSphere
|Hybrid networking with OVN-Kubernetes with a custom VXLAN port

|Google Cloud Platform (GCP)
|Hybrid networking with OVN-Kubernetes

|Bare metal or provider agnostic
|Hybrid networking with OVN-Kubernetes
|===
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
:_content-type: ASSEMBLY
[id="creating-windows-machineset-gcp"]
= Creating a Windows `MachineSet` object on GCP
include::_attributes/common-attributes.adoc[]
:context: creating-windows-machineset-gcp

toc::[]

You can create a Windows `MachineSet` object to serve a specific purpose in your {product-title} cluster on Google Cloud Platform (GCP). For example, you might create infrastructure Windows machine sets and related machines so that you can move supporting Windows workloads to the new Windows machines.

[discrete]
== Prerequisites

* You installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
* You are using a supported Windows Server as the operating system image.

include::modules/machine-api-overview.adoc[leveloffset=+1]
include::modules/windows-machineset-gcp.adoc[leveloffset=+1]
include::modules/machineset-creating.adoc[leveloffset=+1]

[role="_additional-resources"]
[id="creating-windows-machineset-gcp-additional"]
== Additional resources

* For more information on managing machine sets, see xref:../../machine_management/index.adoc#overview-of-machine-management[Overview of machine management].

0 comments on commit 580561f

Please sign in to comment.