From cb7c8c3cdef8c70ee74c1ed7fe1737697b817763 Mon Sep 17 00:00:00 2001 From: aimbot31 Date: Tue, 6 Aug 2019 14:31:40 +0200 Subject: [PATCH 1/3] Fixed a dependency and added a directory for the config In order to have compatibility between cloudkitty and kubernetes, we need to have a repository for processing the config map. There where a problem with PyMySQL which where missing. Updated the readme to explain where to put the config --- CloudKitty/api/Dockerfile | 8 +++++--- CloudKitty/processor/Dockerfile | 2 +- README.md | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CloudKitty/api/Dockerfile b/CloudKitty/api/Dockerfile index 8b5f7cd..8007b7e 100644 --- a/CloudKitty/api/Dockerfile +++ b/CloudKitty/api/Dockerfile @@ -1,13 +1,15 @@ FROM python:3.7-slim-buster -RUN apt-get update \ +RUN apt-get update \ && apt-get install --no-install-recommends -y \ apache2 \ libapache2-mod-wsgi-py3 \ gcc \ python3-dev \ - && pip install cloudkitty \ - && mkdir /etc/cloudkitty \ + && pip install cloudkitty PyMySQL \ + && mkdir \ + /etc/cloudkitty \ + /etc/cloudkitty-config \ && apt-get purge -y \ gcc \ python3-dev \ diff --git a/CloudKitty/processor/Dockerfile b/CloudKitty/processor/Dockerfile index 1344d7e..a2179e6 100644 --- a/CloudKitty/processor/Dockerfile +++ b/CloudKitty/processor/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.7-buster -RUN pip install cloudkitty +RUN pip install cloudkitty PyMySQL CMD [ "cloudkitty-processor" ] \ No newline at end of file diff --git a/README.md b/README.md index c1b4f60..1a98967 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ This repository contains the Dockerfiles for Objectif Libre's official images. ## CloudKitty +If you wish to configure CloudKitty, the configuration files are located here : + +- `/etc/cloudkitty/metrics.yml` +- `/etc/cloudkitty/cloudkitty.conf` + +Please, refer to the [documentation of cloudkitty](https://docs.openstack.org/cloudkitty/latest/admin/configuration/configuration.html) if you don't know how to use theses files. + ### api Contains the Dockerfile for CloudKitty's API and its dependencies. From b26e64715205e5eff4762b8fb8c5bfe46c0b1252 Mon Sep 17 00:00:00 2001 From: aimbot31 Date: Tue, 13 Aug 2019 17:21:13 +0200 Subject: [PATCH 2/3] Reduced the size of processor image Instead of using python3 full image, switched to python:3.7-slim-buster. --- CloudKitty/processor/Dockerfile | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/CloudKitty/processor/Dockerfile b/CloudKitty/processor/Dockerfile index a2179e6..13aec55 100644 --- a/CloudKitty/processor/Dockerfile +++ b/CloudKitty/processor/Dockerfile @@ -1,5 +1,19 @@ -FROM python:3.7-buster +FROM python:3.7-slim-buster -RUN pip install cloudkitty PyMySQL +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + gcc \ + python3-dev \ + && pip install cloudkitty PyMySQL \ + && mkdir \ + /etc/cloudkitty \ + /etc/cloudkitty-config \ + && apt-get purge -y \ + gcc \ + python3-dev \ + && apt-get clean -y \ + && rm -rf /var/cache/apt \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /etc/cloudkitty CMD [ "cloudkitty-processor" ] \ No newline at end of file From a8c12966c0b912e1379eef73815ab42efc134fb4 Mon Sep 17 00:00:00 2001 From: aimbot31 Date: Fri, 6 Mar 2020 16:09:54 +0100 Subject: [PATCH 3/3] add redis dependency --- CloudKitty/api/Dockerfile | 2 +- CloudKitty/processor/Dockerfile | 5 ++--- README.md | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CloudKitty/api/Dockerfile b/CloudKitty/api/Dockerfile index 8007b7e..4b7347b 100644 --- a/CloudKitty/api/Dockerfile +++ b/CloudKitty/api/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update \ libapache2-mod-wsgi-py3 \ gcc \ python3-dev \ - && pip install cloudkitty PyMySQL \ + && pip install cloudkitty PyMySQL redis \ && mkdir \ /etc/cloudkitty \ /etc/cloudkitty-config \ diff --git a/CloudKitty/processor/Dockerfile b/CloudKitty/processor/Dockerfile index 13aec55..609fc28 100644 --- a/CloudKitty/processor/Dockerfile +++ b/CloudKitty/processor/Dockerfile @@ -4,7 +4,7 @@ RUN apt-get update \ && apt-get install --no-install-recommends -y \ gcc \ python3-dev \ - && pip install cloudkitty PyMySQL \ + && pip install cloudkitty PyMySQL redis \ && mkdir \ /etc/cloudkitty \ /etc/cloudkitty-config \ @@ -13,7 +13,6 @@ RUN apt-get update \ python3-dev \ && apt-get clean -y \ && rm -rf /var/cache/apt \ - && rm -rf /var/lib/apt/lists/* \ - && mkdir /etc/cloudkitty + && rm -rf /var/lib/apt/lists/* CMD [ "cloudkitty-processor" ] \ No newline at end of file diff --git a/README.md b/README.md index 1a98967..ae63962 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ If you wish to configure CloudKitty, the configuration files are located here : - `/etc/cloudkitty/metrics.yml` - `/etc/cloudkitty/cloudkitty.conf` -Please, refer to the [documentation of cloudkitty](https://docs.openstack.org/cloudkitty/latest/admin/configuration/configuration.html) if you don't know how to use theses files. +Please, refer to the [documentation of cloudkitty](https://docs.openstack.org/cloudkitty/latest/admin/configuration/configuration.html) if you don't know how to use these files. ### api