Skip to content

Commit 13ae001

Browse files
committed
minor fix
1 parent 9e967d7 commit 13ae001

File tree

10 files changed

+232
-9
lines changed

10 files changed

+232
-9
lines changed

custom-kubelet-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: machineconfiguration.openshift.io/v1
2+
kind: KubeletConfig
3+
metadata:
4+
name: set-max-pods
5+
spec:
6+
machineConfigPoolSelector:
7+
matchLabels:
8+
custom-kubelet: small-pods
9+
kubeletConfig:
10+
maxPods: 500
11+

ocp/4.15/upi_rhosp/README.adoc

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,11 @@ RHOSP Manila
301301

302302
[source,bash]
303303
----
304-
ansible-playbook ocp/4.15/upi_rhosp/ansible/50-ocp-storage-manila.yaml \
304+
ansible-playbook ocp/4.15/upi_rhosp/ansible/95-ocp-storage-manila-cleanup.yaml \
305305
-e @_local_config/network.yaml \
306306
-e @ocp/4.15/ansible/defaults/main.yaml \
307307
-e @ocp/4.15/upi_rhosp/ansible/defaults/main.yaml \
308-
-e @_local_config/${OCP_CLUSTER_NAME}/${OCP_CLUSTER_NAME}.yaml \
309-
-e rhosp_os_password="${RHOSP_OS_PASSWORD}"
308+
-e @_local_config/${OCP_CLUSTER_NAME}/${OCP_CLUSTER_NAME}.yaml
310309
----
311310

312311
To test the configuration execute the following configuration that will deploy
@@ -318,6 +317,24 @@ To test the configuration execute the following configuration that will deploy
318317
oc apply -f ocp/4.15/upi_rhosp/ansible/files/kubernetes-cloud-provider-openstack-manila-test.yaml
319318
----
320319

320+
Delete manila test.
321+
322+
[source,bash]
323+
----
324+
oc delete -f ocp/4.15/upi_rhosp/ansible/files/kubernetes-cloud-provider-openstack-manila-test.yaml
325+
----
326+
327+
Delete manila configuration.
328+
329+
[source,bash]
330+
----
331+
ansible-playbook ocp/4.15/upi_rhosp/ansible/95-ocp-storage-manila-cleanup.yaml \
332+
-e @_local_config/network.yaml \
333+
-e @ocp/4.15/ansible/defaults/main.yaml \
334+
-e @ocp/4.15/upi_rhosp/ansible/defaults/main.yaml \
335+
-e @_local_config/${OCP_CLUSTER_NAME}/${OCP_CLUSTER_NAME}.yaml
336+
----
337+
321338
References:
322339

323340
* https://github.com/kubernetes/cloud-provider-openstack

ocp/4.15/upi_rhosp/ansible/50-ocp-storage-manila.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
register: ocp_manila_resource_res
3131
loop: "{{ manila_resource_templates }}"
3232

33-
- name: "Create Manila Config Map"
34-
ansible.builtin.command: |
35-
oc apply -f /tmp/kubernetes-cloud-provider-openstack-manila-secret.yaml
36-
register: ocp_cinder_secret
33+
# - name: "Create Manila Config Map"
34+
# ansible.builtin.command: |
35+
# oc apply -f /tmp/kubernetes-cloud-provider-openstack-manila-secret.yaml
36+
# register: ocp_cinder_secret
3737

3838
- name: "Create Manila Storage Class"
3939
ansible.builtin.command: |
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
# - name: "Collect information"
3+
# import_playbook: _common_rhosp.yaml
4+
# when: ocp_cluster_id_tag is not defined
5+
6+
- name: "Delete RHOSP Cinder as storage Backend"
7+
hosts: "localhost"
8+
gather_facts: true
9+
vars:
10+
manila_resource_templates:
11+
- kubernetes-cloud-provider-openstack-manila-secret
12+
- kubernetes-cloud-provider-openstack-manila-cm
13+
k8s_maj_min_version: "{{ (k8s_version | split('.'))[0] }}.{{ (k8s_version | split('.'))[1] }}"
14+
15+
tasks:
16+
- name: "Apply Manifests"
17+
ansible.builtin.shell: |
18+
oc delete -f https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/heads/release-{{ k8s_maj_min_version }}/manifests/manila-csi-plugin/csidriver.yaml
19+
oc delete -f https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/heads/release-{{ k8s_maj_min_version }}/manifests/manila-csi-plugin/csi-nodeplugin-rbac.yaml
20+
oc delete -f https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/heads/release-{{ k8s_maj_min_version }}/manifests/manila-csi-plugin/csi-controllerplugin-rbac.yaml
21+
oc delete -f https://raw.githubusercontent.com/kubernetes/cloud-provider-openstack/refs/heads/release-{{ k8s_maj_min_version }}/examples/manila-csi-plugin/nfs/dynamic-provisioning/storageclass.yaml
22+
23+
- name: "Template manifests"
24+
ansible.builtin.template:
25+
src: "{{ item }}.yaml.j2"
26+
dest: "/tmp/{{ item }}.yaml"
27+
mode: 0600
28+
vars:
29+
rhosp_os_password: whocares
30+
loop: "{{ manila_resource_templates }}"
31+
32+
- name: "Create Manila resources"
33+
ansible.builtin.command: |
34+
oc delete -f /tmp/{{ item }}.yaml
35+
register: ocp_manila_resource_res
36+
loop: "{{ manila_resource_templates }}"
37+
38+
- name: "Create Manila Config Map"
39+
ansible.builtin.command: |
40+
oc delete -f /tmp/kubernetes-cloud-provider-openstack-manila-secret.yaml
41+
register: ocp_cinder_secret
42+
43+
...

ocp/4.15/upi_rhosp/ansible/defaults/main.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,8 @@ rhosp_compute_node:
2828
6:
2929
flavor: b3-16
3030
7:
31-
flavor: b3-16
31+
flavor: c3-16
32+
# 8:
33+
# flavor: b3-16
34+
# 9:
35+
# flavor: b3-16
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
apiVersion: core.openstack.org/v1beta1
3+
kind: OpenStackControlPlane
4+
metadata:
5+
name: openstack-control-plane
6+
namespace: openstack
7+
spec:
8+
secret: osp-secret
9+
galera:
10+
enabled: true
11+
templates:
12+
openstack: 1
13+
storageRequest: 5G
14+
secret: cell0-secret
15+
replicas: 1
16+
openstack-cell1: 2
17+
storageRequest: 5G
18+
secret: cell1-secret
19+
replicas: 1
20+
openstack-cell2: 3
21+
storageRequest: 5G
22+
secret: cell2-secret
23+
replicas: 1
24+
...
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
apiVersion: core.openstack.org/v1beta1
2+
kind: OpenStackControlPlane
3+
metadata:
4+
name: openstack-control-plane
5+
namespace: openstack
6+
spec:
7+
swift:
8+
enabled: true
9+
template:
10+
swiftProxy:
11+
replicas: 2
12+
swiftRing:
13+
ringReplicas: 3
14+
swiftStorage:
15+
replicas: 3
16+
storageClass: swift-storage
17+
storageRequest: 100Gi
18+
...

ocp/storage/rook/ansible/README.adoc

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,52 @@ oc create -f ocp/storage/rook/ansible/files/rook-ceph-objectstore.yaml
5656

5757
* Object Storage: https://rook.io/docs/rook/latest-release/Storage-Configuration/Object-Storage-RGW/object-storage/
5858

59+
== Test
5960

61+
=== Block Storage
62+
63+
[source,bash]
64+
----
65+
oc create -f ocp/storage/rook/ansible/files/test-rook-bs.yaml
66+
----
67+
68+
[source,bash]
69+
----
70+
oc delete -f ocp/storage/rook/ansible/files/test-rook-bs.yaml
71+
----
72+
73+
=== CephFS
74+
To test the configuration execute the following configuration that will deploy
75+
an nginx pod with a volume attached to a PVC. The PVC should provision a PV
76+
automatically.
77+
78+
[source,bash]
79+
----
80+
oc apply -f ocp/storage/rook/ansible/files/test-rook-fs.yaml
81+
----
82+
83+
[source,bash]
84+
----
85+
oc get pvc
86+
----
87+
88+
[source,]
89+
----
90+
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
91+
pvc-rook-cephfs-test Pending rook-cephfs 11s
92+
----
93+
94+
Delete manila test.
95+
96+
[source,bash]
97+
----
98+
oc delete -f ocp/storage/rook/ansible/files/test-rook-fs.yaml
99+
----
60100
== References
61101

62102
* https://rook.io/docs/rook/latest-release/Getting-Started/ceph-openshift/
63103
* https://rook.io/docs/rook/latest-release/Getting-Started/quickstart/
64-
* Dashboard: https://rook.io/docs/rook/latest-release/Getting-Started/quickstart/#ceph-dashboard
104+
* Dashboard: https://rook.io/docs/rook/latest-release/Storage-Configuration/Monitoring/ceph-dashboard/
65105
Toolbox: https://rook.io/docs/rook/latest-release/Getting-Started/quickstart/#tools
66106

67107

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
name: pvc-rook-cephblock-test
5+
spec:
6+
accessModes:
7+
- ReadWriteMany
8+
resources:
9+
requests:
10+
storage: 1Gi
11+
storageClassName: rook-ceph-block
12+
---
13+
apiVersion: v1
14+
kind: Pod
15+
metadata:
16+
name: nginx-rook-cephblock-test
17+
spec:
18+
containers:
19+
- image: nginx
20+
imagePullPolicy: IfNotPresent
21+
name: nginx
22+
ports:
23+
- containerPort: 80
24+
protocol: TCP
25+
volumeMounts:
26+
- mountPath: /var/lib/www/html
27+
name: www
28+
volumes:
29+
- name: www
30+
persistentVolumeClaim:
31+
claimName: pvc-rook-cephblock-test
32+
readOnly: false
33+
---
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
name: pvc-rook-cephfs-test
5+
spec:
6+
accessModes:
7+
- ReadWriteMany
8+
resources:
9+
requests:
10+
storage: 1Gi
11+
storageClassName: rook-cephfs
12+
---
13+
apiVersion: v1
14+
kind: Pod
15+
metadata:
16+
name: nginx-rook-cephfs-test
17+
spec:
18+
containers:
19+
- image: nginx
20+
imagePullPolicy: IfNotPresent
21+
name: nginx
22+
ports:
23+
- containerPort: 80
24+
protocol: TCP
25+
volumeMounts:
26+
- mountPath: /var/lib/www/html
27+
name: www
28+
volumes:
29+
- name: www
30+
persistentVolumeClaim:
31+
claimName: pvc-rook-cephfs-test
32+
readOnly: false
33+
---

0 commit comments

Comments
 (0)