Skip to content

Commit b667b16

Browse files
authored
Merge pull request #688 from PureStorage-OpenConnect/px34
OCP 4.19 PX 3.4
2 parents 7d7cd4c + 22b3ef1 commit b667b16

4 files changed

Lines changed: 33 additions & 7 deletions

File tree

defaults.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ clusters: 1
44
nodes: 3
55
#ssh_pub_key: "ssh-rsa XXXXXXXXXXXXXXXXXXXXXX user@example"
66
k8s_version: 1.31.8
7-
px_version: 3.3.1.1
7+
px_version: 3.4.0.1
88
stop_after: 6
99
quiet: false
1010
tags: "project=pxdeploy"
@@ -56,7 +56,7 @@ vsphere_repo: "https://px-deploy.s3.eu-west-1.amazonaws.com/templates/"
5656
#vsphere_folder: ""
5757

5858
ocp4_domain: ""
59-
ocp4_version: 4.18.17
59+
ocp4_version: 4.19.9
6060
ocp4_credentials_mode: Mint
6161
ocp4_pull_secret: ""
6262

scripts/clusterpair

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,22 @@ if [ "$platform" = eks ] || [ "$platform" = ocp4 ]; then
4545
echo "waiting for remote portworx api lb service to respond http 200. ELB $REMOTE_EP"
4646
sleep 5
4747
done
48+
49+
LOCAL_PORT=$(kubectl get service portworx-api -n portworx -ojson | jq -r '.spec.ports[] | select(.name=="px-api") | .port')
50+
REMOTE_PORT=$(kubectl --kubeconfig /tmp/dest_kubeconfig get service portworx-api -n portworx -ojson | jq -r '.spec.ports[] | select(.name=="px-api") | .port')
51+
52+
LOCAL_EP="--src-ep $LOCAL_EP:$LOCAL_PORT"
53+
REMOTE_EP="--dest-ep $REMOTE_EP:$REMOTE_PORT"
54+
echo "LOCAL_EP has been set to $LOCAL_EP"
55+
echo "REMOTE_EP has been set to $REMOTE_EP"
56+
4857
#elif [ "$platform" = rancher ]; then
4958
#else
5059
# host=$(kubectl get nodes -l 'node-role.kubernetes.io/worker in (worker,true)' -o json |jq -r '.items[0].status.addresses[] | select(.type=="InternalIP") | .address')
5160
fi
5261

5362
#improvement: we may try to detect if DR licenses are enabled on both sides -> px api?
54-
kubectl pxc pxctl license list | grep PX-DR | grep -q yes && MODE=async-dr || MODE=migration
63+
/usr/bin/pxctl license list | grep PX-DR | grep -q yes && MODE=async-dr || MODE=migration
5564
echo Mode is $MODE
5665

5766
if [ "$platform" = eks ]; then
@@ -63,6 +72,6 @@ if [ "$platform" = eks ]; then
6372
fi
6473

6574
while : ; do
66-
storkctl create clusterpair remotecluster --namespace kube-system --dest-kube-file /tmp/dest_kubeconfig --src-kube-file /root/.kube/config --provider s3 --s3-endpoint s3.amazonaws.com --s3-access-key $AWS_ACCESS_KEY --s3-secret-key $AWS_SECRET_KEY --s3-region $BUCKET_REGION --bucket $DR_BUCKET --mode $MODE && break
75+
storkctl create clusterpair remotecluster --namespace kube-system $LOCAL_EP $REMOTE_EP --dest-kube-file /tmp/dest_kubeconfig --src-kube-file /root/.kube/config --provider s3 --s3-endpoint s3.amazonaws.com --s3-access-key $AWS_ACCESS_KEY --s3-secret-key $AWS_SECRET_KEY --s3-region $BUCKET_REGION --bucket $DR_BUCKET --mode $MODE && break
6776
sleep 5
6877
done

templates/ocp-kubevirt-single.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
description: Cluster OCP Virtualization Demo on a aws bare-metal
2+
scripts: ["install-awscli","install-px", "licenses", "ocp-kubevirt","kubevirt-apps"]
3+
aws_type: "c5n.metal"
4+
platform: "ocp4"
5+
cloud: "aws"
6+
clusters: 1
7+
env:
8+
cloud_drive: "type%3Dgp2%2Csize%3D150"
9+

terraform/aws/ocp4/ocp4-install-config.tpl

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,17 @@ platform:
3434
%{ for tag_key, tag_value in tpl_aws_tag ~}
3535
${tag_key} : ${tag_value}
3636
%{ endfor ~}
37-
subnets:
38-
- ${tpl_privsubnet}
39-
- ${tpl_pubsubnet}
37+
vpc:
38+
subnets:
39+
- id: ${tpl_privsubnet}
40+
roles:
41+
- type: ClusterNode
42+
- type: ControlPlaneInternalLB
43+
- id: ${tpl_pubsubnet}
44+
roles:
45+
- type: IngressControllerLB
46+
- type: BootstrapNode
47+
- type: ControlPlaneExternalLB
4048
pullSecret: '${tpl_ocp4pullsecret}'
4149
sshKey: '${tpl_sshkey}'
4250

0 commit comments

Comments
 (0)