Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ This repository consists of additional ansible playbooks for the following:
1. Verify IPI day2 operations
1. Deploy Openshift Data Foundation operator
1. Enabling Kdump
1. Validate Autoscaling of nodes on IPI cluster

## Assumptions:

Expand Down
4 changes: 4 additions & 0 deletions examples/all.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
---

## node-autoscaling required vars
autoscaling_enabled: false


## clusterresourceoverride-operator role variables
cro_role_enable: false
cro_e2e: false
Expand Down
2 changes: 2 additions & 0 deletions examples/ocp_node_autoscaling_vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## node-autoscaling required vars
autoscaling_enabled: false
3 changes: 3 additions & 0 deletions playbooks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
- import_playbook: ocp-node-autoscaling.yml
when: ocp-node-autoscaling is defined and ocp-node-autoscaling

- import_playbook: ocp-scale.yml
when: scale_test_enabled

Expand Down
5 changes: 5 additions & 0 deletions playbooks/ocp-node-autoscaling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: Validate autoscaling of nodes on PowerVS IPI
hosts: localhost
roles:
- ocp-node-autoscaling
48 changes: 48 additions & 0 deletions playbooks/roles/ocp-node-autoscaling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
OCP Autoscaling of Nodes on IPI (Installer Provision Infrastructure) cluster
=========
This ansible playbook can be used for Validating the autoscaling of nodes, by scaling up and down the machines using machineAutoscaler and clusterAutoscaler functions.

This playbook verifies two Autoscaling functions:
1. Scale Up
2. Scale Down


Requirements
------------

- Access to the cluster as a user with the cluster-admin role.
- The cluster is in a known good state, without any errors.


Role Variables
--------------

| Variable | Required | Default | Comments |
|-----------------------------|----------|--------------------------------------------|-----------------------------------------------------|
| autoscaling_enabled| no | false | Flag to be set to true to run this playbook |

Dependencies
------------

- None

Example Playbook
----------------
```
---
- name: Validate autoscaling of nodes on PowerVS IPI
hosts: localhost
roles:
- ocp-node-autoscaling
```

License
-------

See LICENCE.txt

Author Information
------------------

[email protected]

2 changes: 2 additions & 0 deletions playbooks/roles/ocp-node-autoscaling/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# node-autoscaling required vars
autoscaling_enabled: false
42 changes: 42 additions & 0 deletions playbooks/roles/ocp-node-autoscaling/files/busybox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: busybox
name: busybox-deployment
namespace: test
spec:
progressDeadlineSeconds: 600
replicas: 2
revisionHistoryLimit: 10
selector:
matchLabels:
app: busybox
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: busybox
spec:
containers:
- name: busybox
image: busybox:latest
command:
- sleep
- "3600"
resources:
requests:
cpu: "4"
memory: 14G
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
Loading