Browse Source

Remove unused playbooks adhoc metrics_setup files #2717

Stéphane Klein 8 years ago
parent
commit
d3930f7779

+ 0 - 25
playbooks/adhoc/metrics_setup/README.md

@@ -1,25 +0,0 @@
-## Playbook for adding [Metrics](https://github.com/openshift/origin-metrics) to Openshift
-
-See OSE Ansible [readme](https://github.com/openshift/openshift-ansible/blob/master/README_OSE.md) for general install instructions.  Playbook has been tested on OSE 3.1/RHEL7.2 cluster
-
-
-Add the following vars to `[OSEv3:vars]` section of your inventory file
-```
-[OSEv3:vars]
-# Enable cluster metrics
-use_cluster_metrics=true
-metrics_external_service=< external service name for metrics >
-metrics_image_prefix=rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/
-metrics_image_version=3.1.0
-```
-
-Run playbook
-```
-ansible-playbook -i $INVENTORY_FILE playbooks/install.yml
-```
-
-## Contact
-Email: hawkular-dev@lists.jboss.org
-
-## Credits
-Playbook adapted from install shell scripts by Matt Mahoney

+ 0 - 37
playbooks/adhoc/metrics_setup/files/metrics-deployer-setup.yaml

@@ -1,37 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
-# and other contributors as indicated by the @author tags.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-apiVersion: "v1"
-kind: "List"
-metadata:
-  name: metrics-deployer-setup
-  annotations:
-    description: "Required dependencies for the metrics deployer pod."
-    tags: "infrastructure"
-labels:
-  metrics-infra: deployer
-  provider: openshift
-  component: deployer
-items:
--
-  apiVersion: v1
-  kind: ServiceAccount
-  metadata:
-    name: metrics-deployer
-  secrets:
-  - name: metrics-deployer

+ 0 - 116
playbooks/adhoc/metrics_setup/files/metrics.yaml

@@ -1,116 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2014-2015 Red Hat, Inc. and/or its affiliates
-# and other contributors as indicated by the @author tags.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-apiVersion: "v1"
-kind: "Template"
-metadata:
-  name: metrics-deployer-template
-  annotations:
-    description: "Template for deploying the required Metrics integration. Requires cluster-admin 'metrics-deployer' service account and 'metrics-deployer' secret."
-    tags: "infrastructure"
-labels:
-  metrics-infra: deployer
-  provider: openshift
-  component: deployer
-objects:
--
-  apiVersion: v1
-  kind: Pod
-  metadata:
-    generateName: metrics-deployer-
-  spec:
-    containers:
-    - image: ${IMAGE_PREFIX}metrics-deployer:${IMAGE_VERSION}
-      name: deployer
-      volumeMounts:
-      - name: secret
-        mountPath: /secret
-        readOnly: true
-      - name: empty
-        mountPath: /etc/deploy
-      env:
-        - name: PROJECT
-          valueFrom:
-            fieldRef:
-              fieldPath: metadata.namespace
-        - name: IMAGE_PREFIX
-          value: ${IMAGE_PREFIX}
-        - name: IMAGE_VERSION
-          value: ${IMAGE_VERSION}
-        - name: PUBLIC_MASTER_URL
-          value: ${PUBLIC_MASTER_URL}
-        - name: MASTER_URL
-          value: ${MASTER_URL}
-        - name: REDEPLOY
-          value: ${REDEPLOY}
-        - name: USE_PERSISTENT_STORAGE
-          value: ${USE_PERSISTENT_STORAGE}
-        - name: HAWKULAR_METRICS_HOSTNAME
-          value: ${HAWKULAR_METRICS_HOSTNAME}
-        - name: CASSANDRA_NODES
-          value: ${CASSANDRA_NODES}
-        - name: CASSANDRA_PV_SIZE
-          value: ${CASSANDRA_PV_SIZE}
-        - name: METRIC_DURATION
-          value: ${METRIC_DURATION}
-    dnsPolicy: ClusterFirst
-    restartPolicy: Never
-    serviceAccount: metrics-deployer
-    volumes:
-    - name: empty
-      emptyDir: {}
-    - name: secret
-      secret:
-        secretName: metrics-deployer
-parameters:
--
-  description: 'Specify prefix for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set prefix "openshift/origin-"'
-  name: IMAGE_PREFIX
-  value: "hawkular/"
--
-  description: 'Specify version for metrics components; e.g. for "openshift/origin-metrics-deployer:v1.1", set version "v1.1"'
-  name: IMAGE_VERSION
-  value: "0.7.0-SNAPSHOT"
--
-  description: "Internal URL for the master, for authentication retrieval"
-  name: MASTER_URL
-  value: "https://kubernetes.default.svc:443"
--
-  description: "External hostname where clients will reach Hawkular Metrics"
-  name: HAWKULAR_METRICS_HOSTNAME
-  required: true
--
-  description: "If set to true the deployer will try and delete all the existing components before trying to redeploy."
-  name: REDEPLOY
-  value: "false"
--
-  description: "Set to true for persistent storage, set to false to use non persistent storage"
-  name: USE_PERSISTENT_STORAGE
-  value: "true"
--
-  description: "The number of Cassandra Nodes to deploy for the initial cluster"
-  name: CASSANDRA_NODES
-  value: "1"
--
-  description: "The persistent volume size for each of the Cassandra nodes"
-  name: CASSANDRA_PV_SIZE
-  value: "1Gi"
--
-  description: "How many days metrics should be stored for."
-  name: METRIC_DURATION
-  value: "7"

+ 0 - 45
playbooks/adhoc/metrics_setup/playbooks/install.yml

@@ -1,45 +0,0 @@
----
-- include: master_config_facts.yml
-- name: "Install metrics" 
-  hosts: masters
-  vars:
-     metrics_public_url: "https://{{ metrics_external_service }}/hawkular/metrics"
-  tasks:
-  - name: "Add metrics url to master config"
-    lineinfile: "state=present dest=/etc/origin/master/master-config.yaml regexp='^\ \ metricsPublicURL' insertbefore='^\ \ publicURL' line='\ \ metricsPublicURL: {{ metrics_public_url }}'"
-
-  - name: "Restart master service"
-    service: name=atomic-openshift-master state=restarted
-
-  - name: "Copy metrics-deployer yaml to remote"
-    copy: "src=../files/metrics-deployer-setup.yaml dest=/tmp/metrics-deployer-setup.yaml force=yes" 
-
-  - name: "Add metrics-deployer"
-    command: "{{item}}"
-    run_once: true
-    register: output
-    failed_when: ('already exists' not in output.stderr) and (output.rc != 0)
-    with_items:
-      - oc project openshift-infra
-      - oc create -f /tmp/metrics-deployer-setup.yaml    
-
-  - name: "Give metrics-deployer SA permissions"
-    command: "oadm policy add-role-to-user edit system:serviceaccount:openshift-infra:metrics-deployer"
-    run_once: true
-
-  - name: "Give heapster SA permissions"
-    command: "oadm policy add-cluster-role-to-user cluster-reader system:serviceaccount:openshift-infra:heapster"
-    run_once: true
-
-  - name: "Create metrics-deployer secret"
-    command: "oc secrets new metrics-deployer nothing=/dev/null"
-    register: output
-    failed_when: ('already exists' not in output.stderr) and (output.rc != 0)
-    run_once: true
-
-  - name: "Copy metrics.yaml to remote"
-    copy: "src=../files/metrics.yaml dest=/tmp/metrics.yaml force=yes" 
-
-  - name: "Process yml template"
-    shell: "oc process -f /tmp/metrics.yaml -v MASTER_URL={{ masterPublicURL }},REDEPLOY=true,HAWKULAR_METRICS_HOSTNAME={{ metrics_external_service }},IMAGE_PREFIX={{ metrics_image_prefix }},IMAGE_VERSION={{ metrics_image_version }},USE_PERSISTENT_STORAGE=false | oc create -f -"
-    run_once: true

+ 0 - 10
playbooks/adhoc/metrics_setup/playbooks/master_config_facts.yml

@@ -1,10 +0,0 @@
----
-- name: "Load master config"
-  hosts: masters
-  vars:
-    master_config_file: "/tmp/ansible-metrics-{{ ansible_hostname }}"
-  tasks:
-    - name: "Fetch master config from remote"
-      fetch: "src=/etc/origin/master/master-config.yaml dest={{ master_config_file }} flat=yes"
-    - name: "Load config"
-      include_vars: "{{ master_config_file }}"

+ 0 - 16
playbooks/adhoc/metrics_setup/playbooks/uninstall.yml

@@ -1,16 +0,0 @@
----
-- name: "Uninstall metrics"
-  hosts: masters
-  tasks:
-  - name: "Remove metrics url from  master config"
-    lineinfile: "state=absent dest=/etc/origin/master/master-config.yaml regexp='^\ \ metricsPublicURL'"
-
-  - name: "Delete metrics objects"
-    command: "{{item}}"
-    with_items:
-      - oc delete all --selector=metrics-infra
-  #    - oc delete secrets --selector=metrics-infra
-  #    - oc delete sa --selector=metrics-infra
-      - oc delete templates --selector=metrics-infra
-      - oc delete sa metrics-deployer
-      - oc delete secret metrics-deployer