-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added pre-config file to test autoscaling on OSP18
- Loading branch information
Showing
1 changed file
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
#!/usr/bin/env ansible-playbook | ||
--- | ||
# Pre-config steps to setup autoscaling for OSP18 | ||
|
||
- hosts: localhost | ||
become: no | ||
name: Pre-config steps for Autoscaling on OSP18 | ||
|
||
tasks: | ||
- name: Install openstackclient dependencies | ||
shell: | ||
cmd: | | ||
oc exec -ti openstackclient -- python3 -m ensurepip --upgrade | ||
oc exec -ti openstackclient -- python3 -m pip install --upgrade aodhclient | ||
oc exec -ti openstackclient -- python3 -m pip install python-observabilityclient | ||
- name: Install Cluster Observability Operator(COO) | ||
ansible.builtin.shell: | ||
cmd: | | ||
oc create -f - <<EOF | ||
apiVersion: operators.coreos.com/v1alpha1 | ||
kind: Subscription | ||
metadata: | ||
name: cluster-observability-operator | ||
namespace: openshift-operators | ||
spec: | ||
channel: development | ||
installPlanApproval: Automatic | ||
name: cluster-observability-operator | ||
source: redhat-operators | ||
sourceNamespace: openshift-marketplace | ||
EOF | ||
changed_when: false | ||
register: result | ||
failed_when: result.rc >= 1 | ||
|
||
- name: Wait for the installation to succeed | ||
pause: | ||
minutes: 1 | ||
|
||
- name: Verify COO is installed successfully | ||
ansible.builtin.command: | ||
cmd: | | ||
oc wait --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators | ||
register: result | ||
changed_when: false | ||
failed_when: '"condition met" not in result.stdout' | ||
|
||
- name: Add content to a spec file in home dir | ||
copy: | ||
dest: $HOME/spec.yaml | ||
content: | | ||
spec: | ||
customContainerImages: | ||
aodhAPIImage: quay.io/podified-master-centos9/openstack-aodh-api:current-podified | ||
aodhEvaluatorImage: quay.io/podified-master-centos9/openstack-aodh-evaluator:current-podified | ||
aodhListenerImage: quay.io/podified-master-centos9/openstack-aodh-listener:current-podified | ||
aodhNotifierImage: quay.io/podified-master-centos9/openstack-aodh-notifier:current-podified | ||
heatAPIImage: quay.io/podified-master-centos9/openstack-heat-api:current-podified | ||
heatCfnapiImage: quay.io/podified-master-centos9/openstack-heat-api-cfn:current-podified | ||
heatEngineImage: quay.io/podified-master-centos9/openstack-heat-engine:current-podified | ||
- name: Update the openstackversions CR to run master images for aodh and heat | ||
ansible.builtin.shell: | ||
cmd: | | ||
oc patch openstackversions openstack-galera-network-isolation --type merge --patch-file $HOME/spec.yaml | ||
register: result | ||
|
||
... |
7b4bc42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the required changes