From c31c02cdbb9c360cc05492453ddbbc4b20009999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Thu, 7 Dec 2017 18:25:50 +0100 Subject: [PATCH] install prometheus --- playbooks/configure-openshift-access-control.yml | 3 +++ playbooks/site.yml | 5 ++++- prod.hosts | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/playbooks/configure-openshift-access-control.yml b/playbooks/configure-openshift-access-control.yml index 003c0f4..ff01173 100644 --- a/playbooks/configure-openshift-access-control.yml +++ b/playbooks/configure-openshift-access-control.yml @@ -6,3 +6,6 @@ tasks: - name: Remove authenticated users the right to create projects command: oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth + + - name: Give the monitoring rights to nicolas + command: oc adm policy add-role-to-user view nicolas.masse@itix.fr -n openshift-metrics diff --git a/playbooks/site.yml b/playbooks/site.yml index 8f48483..17db5d1 100644 --- a/playbooks/site.yml +++ b/playbooks/site.yml @@ -5,10 +5,13 @@ - include: "preparation.yml" # Launch the OpenShift Installer Playbook - - include: "../openshift-ansible/playbooks/byo/config.yml" + - include: "../openshift-ansible/playbooks/byo/openshift-clister/config.yml" - include: "post-install.yml" + # Install Prometheus + - include: "../openshift-ansible/playbooks/byo/openshift-cluster/openshift-prometheus.yml" + - include: "provision-global-templates-and-imagestreams.yml" - include: "configure-openshift-access-control.yml" diff --git a/prod.hosts b/prod.hosts index 46267b3..0f0e730 100644 --- a/prod.hosts +++ b/prod.hosts @@ -35,6 +35,12 @@ nodes etcd [OSEv3:vars] +# Deploy Prometheus +openshift_hosted_prometheus_deploy=true +openshift_prometheus_storage_type='pvc' +openshift_prometheus_alertmanager_storage_type='pvc' +openshift_prometheus_alertbuffer_storage_type='pvc' + # # Starting with 3.6, default templates and imagestreams can be left out # see https://bugzilla.redhat.com/show_bug.cgi?id=1506578