From 985f431a08d540e72abf75b2cb7ea36b350c3583 Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Thu, 23 Nov 2017 21:01:07 +0530 Subject: [PATCH 1/6] [WIP] Changes for monitoring support using tendrl project. - Add repos and install relevant packages. - enable relevant services - Expose corresponding ports Signed-off-by: Saravanakumar Arumugam --- CentOS/Dockerfile | 11 ++++++++++- CentOS/tendrl/tendrl-dependencies-epel-7.repo | 10 ++++++++++ CentOS/tendrl/tendrl-release-epel-7.repo | 10 ++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 CentOS/tendrl/tendrl-dependencies-epel-7.repo create mode 100644 CentOS/tendrl/tendrl-release-epel-7.repo diff --git a/CentOS/Dockerfile b/CentOS/Dockerfile index 539936e..210dba3 100644 --- a/CentOS/Dockerfile +++ b/CentOS/Dockerfile @@ -47,6 +47,15 @@ systemctl enable ntpd.service; \ systemctl enable glusterd.service; \ systemctl enable gluster-setup.service; -EXPOSE 2222 111 245 443 24007 2049 8080 6010 6011 6012 38465 38466 38468 38469 49152 49153 49154 49156 49157 49158 49159 49160 49161 49162 +RUN yum --setopt=tsflags=nodocs -y install epel-release; +ADD tendrl/tendrl-release-epel-7.repo /etc/yum.repos.d/tendrl-release-epel-7.repo +ADD tendrl/tendrl-dependencies-epel-7.repo /etc/yum.repos.d/tendrl-dependencies-epel-7.repo +RUN yum --setopt=tsflags=nodocs -y install tendrl-node-agent; + +RUN systemctl enable tendrl-node-agent +RUN sed -i.bak '/^etcd_connection/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml +RUN sed -i.bak '/^graphite_host/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml + +EXPOSE 2222 111 245 443 24007 2049 8080 6010 6011 6012 38465 38466 38468 38469 49152 49153 49154 49156 49157 49158 49159 49160 49161 49162 2379 2003 CMD ["/usr/sbin/init"] diff --git a/CentOS/tendrl/tendrl-dependencies-epel-7.repo b/CentOS/tendrl/tendrl-dependencies-epel-7.repo new file mode 100644 index 0000000..689ca41 --- /dev/null +++ b/CentOS/tendrl/tendrl-dependencies-epel-7.repo @@ -0,0 +1,10 @@ +[tendrl-dependencies] +name=Copr repo for dependencies owned by tendrl +baseurl=https://copr-be.cloud.fedoraproject.org/results/tendrl/dependencies/epel-7-$basearch/ +type=rpm-md +skip_if_unavailable=True +gpgcheck=1 +gpgkey=https://copr-be.cloud.fedoraproject.org/results/tendrl/dependencies/pubkey.gpg +repo_gpgcheck=0 +enabled=1 +enabled_metadata=1 \ No newline at end of file diff --git a/CentOS/tendrl/tendrl-release-epel-7.repo b/CentOS/tendrl/tendrl-release-epel-7.repo new file mode 100644 index 0000000..10f7770 --- /dev/null +++ b/CentOS/tendrl/tendrl-release-epel-7.repo @@ -0,0 +1,10 @@ +[tendrl-release] +name=Copr repo for release owned by tendrl +baseurl=https://copr-be.cloud.fedoraproject.org/results/tendrl/release/epel-7-$basearch/ +type=rpm-md +skip_if_unavailable=True +gpgcheck=1 +gpgkey=https://copr-be.cloud.fedoraproject.org/results/tendrl/release/pubkey.gpg +repo_gpgcheck=0 +enabled=1 +enabled_metadata=1 \ No newline at end of file From 1ab40127cd1ebcfadf03a94719dfe30d00ff50c7 Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Mon, 27 Nov 2017 18:19:04 +0530 Subject: [PATCH 2/6] Set selinux config as permissive. Add tendrl-collectd-selinux tendrl-selinux packages. Signed-off-by: Saravanakumar Arumugam --- CentOS/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CentOS/Dockerfile b/CentOS/Dockerfile index 210dba3..37da4c4 100644 --- a/CentOS/Dockerfile +++ b/CentOS/Dockerfile @@ -50,11 +50,12 @@ systemctl enable gluster-setup.service; RUN yum --setopt=tsflags=nodocs -y install epel-release; ADD tendrl/tendrl-release-epel-7.repo /etc/yum.repos.d/tendrl-release-epel-7.repo ADD tendrl/tendrl-dependencies-epel-7.repo /etc/yum.repos.d/tendrl-dependencies-epel-7.repo -RUN yum --setopt=tsflags=nodocs -y install tendrl-node-agent; +RUN yum --setopt=tsflags=nodocs -y install tendrl-node-agent tendrl-collectd-selinux tendrl-selinux; RUN systemctl enable tendrl-node-agent RUN sed -i.bak '/^etcd_connection/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml RUN sed -i.bak '/^graphite_host/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml +RUN sed -i.bak '/^SELINUX\b/s/=.*/=permissive/' /etc/selinux/config EXPOSE 2222 111 245 443 24007 2049 8080 6010 6011 6012 38465 38466 38468 38469 49152 49153 49154 49156 49157 49158 49159 49160 49161 49162 2379 2003 From c9db13ad06bfe363782bbdb9e0a0a258c577c6e4 Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Wed, 29 Nov 2017 17:49:27 +0530 Subject: [PATCH 3/6] Pre-install tendrl-gluster-integration instead of waiting till import(and then installing). Signed-off-by: Saravanakumar Arumugam --- CentOS/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/CentOS/Dockerfile b/CentOS/Dockerfile index 37da4c4..9585e21 100644 --- a/CentOS/Dockerfile +++ b/CentOS/Dockerfile @@ -51,6 +51,7 @@ RUN yum --setopt=tsflags=nodocs -y install epel-release; ADD tendrl/tendrl-release-epel-7.repo /etc/yum.repos.d/tendrl-release-epel-7.repo ADD tendrl/tendrl-dependencies-epel-7.repo /etc/yum.repos.d/tendrl-dependencies-epel-7.repo RUN yum --setopt=tsflags=nodocs -y install tendrl-node-agent tendrl-collectd-selinux tendrl-selinux; +RUN yum --setopt=tsflags=nodocs -y install tendrl-gluster-integration.noarch; RUN systemctl enable tendrl-node-agent RUN sed -i.bak '/^etcd_connection/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml From 29a0c7e535d4b1c6b9d6ecf1f123167084b21fbf Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Thu, 30 Nov 2017 16:28:03 +0530 Subject: [PATCH 4/6] Group all yum install under single RUN. Use COPY instead of ADD yum clean after install Signed-off-by: Saravanakumar Arumugam --- CentOS/Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/CentOS/Dockerfile b/CentOS/Dockerfile index 9585e21..e506fe9 100644 --- a/CentOS/Dockerfile +++ b/CentOS/Dockerfile @@ -47,11 +47,12 @@ systemctl enable ntpd.service; \ systemctl enable glusterd.service; \ systemctl enable gluster-setup.service; -RUN yum --setopt=tsflags=nodocs -y install epel-release; -ADD tendrl/tendrl-release-epel-7.repo /etc/yum.repos.d/tendrl-release-epel-7.repo -ADD tendrl/tendrl-dependencies-epel-7.repo /etc/yum.repos.d/tendrl-dependencies-epel-7.repo -RUN yum --setopt=tsflags=nodocs -y install tendrl-node-agent tendrl-collectd-selinux tendrl-selinux; -RUN yum --setopt=tsflags=nodocs -y install tendrl-gluster-integration.noarch; +COPY tendrl/tendrl-release-epel-7.repo /etc/yum.repos.d/tendrl-release-epel-7.repo +COPY tendrl/tendrl-dependencies-epel-7.repo /etc/yum.repos.d/tendrl-dependencies-epel-7.repo +RUN yum --setopt=tsflags=nodocs -y install epel-release; \ +yum --setopt=tsflags=nodocs -y install tendrl-node-agent tendrl-collectd-selinux tendrl-selinux; \ +yum --setopt=tsflags=nodocs -y install tendrl-gluster-integration.noarch; \ +yum clean all; RUN systemctl enable tendrl-node-agent RUN sed -i.bak '/^etcd_connection/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml From 6e67ae9bee03714c826e912780a979e883ac73c6 Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Fri, 1 Dec 2017 12:19:03 +0530 Subject: [PATCH 5/6] Combine multiple RUNs into one. Signed-off-by: Saravanakumar Arumugam --- CentOS/Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CentOS/Dockerfile b/CentOS/Dockerfile index e506fe9..232f150 100644 --- a/CentOS/Dockerfile +++ b/CentOS/Dockerfile @@ -52,12 +52,11 @@ COPY tendrl/tendrl-dependencies-epel-7.repo /etc/yum.repos.d/tendrl-dependencies RUN yum --setopt=tsflags=nodocs -y install epel-release; \ yum --setopt=tsflags=nodocs -y install tendrl-node-agent tendrl-collectd-selinux tendrl-selinux; \ yum --setopt=tsflags=nodocs -y install tendrl-gluster-integration.noarch; \ -yum clean all; - -RUN systemctl enable tendrl-node-agent -RUN sed -i.bak '/^etcd_connection/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml -RUN sed -i.bak '/^graphite_host/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml -RUN sed -i.bak '/^SELINUX\b/s/=.*/=permissive/' /etc/selinux/config +yum clean all; \ +sed -i.bak '/^etcd_connection/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml; \ +sed -i.bak '/^graphite_host/s/:.*/:\ tendrlserver/' /etc/tendrl/node-agent/node-agent.conf.yaml; \ +sed -i.bak '/^SELINUX\b/s/=.*/=permissive/' /etc/selinux/config; \ +systemctl enable tendrl-node-agent EXPOSE 2222 111 245 443 24007 2049 8080 6010 6011 6012 38465 38466 38468 38469 49152 49153 49154 49156 49157 49158 49159 49160 49161 49162 2379 2003 From b30106a276618a2acf77c10e1747484f8e948f2b Mon Sep 17 00:00:00 2001 From: Saravanakumar Arumugam Date: Sat, 2 Dec 2017 18:24:59 +0530 Subject: [PATCH 6/6] combine COPY statements Signed-off-by: Saravanakumar Arumugam --- CentOS/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CentOS/Dockerfile b/CentOS/Dockerfile index 232f150..04f5818 100644 --- a/CentOS/Dockerfile +++ b/CentOS/Dockerfile @@ -47,8 +47,10 @@ systemctl enable ntpd.service; \ systemctl enable glusterd.service; \ systemctl enable gluster-setup.service; -COPY tendrl/tendrl-release-epel-7.repo /etc/yum.repos.d/tendrl-release-epel-7.repo -COPY tendrl/tendrl-dependencies-epel-7.repo /etc/yum.repos.d/tendrl-dependencies-epel-7.repo +COPY tendrl/tendrl-release-epel-7.repo \ +tendrl/tendrl-dependencies-epel-7.repo \ +/etc/yum.repos.d/ + RUN yum --setopt=tsflags=nodocs -y install epel-release; \ yum --setopt=tsflags=nodocs -y install tendrl-node-agent tendrl-collectd-selinux tendrl-selinux; \ yum --setopt=tsflags=nodocs -y install tendrl-gluster-integration.noarch; \