From fd7aded10ebd8caaa30be968b0b83590054fe3e7 Mon Sep 17 00:00:00 2001 From: aujjwal-redhat Date: Mon, 22 Feb 2021 14:37:08 +0530 Subject: [PATCH 1/7] Added setup.py in the main directory. Package created: Name: odinControl Sub-directory: odinControl Signed-off-by: aujjwal-redhat --- odinControl/__init__.py | 1 + setup.py | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 odinControl/__init__.py create mode 100644 setup.py diff --git a/odinControl/__init__.py b/odinControl/__init__.py new file mode 100644 index 0000000..2f53dd0 --- /dev/null +++ b/odinControl/__init__.py @@ -0,0 +1 @@ +import rexe from ../rexe \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0db9366 --- /dev/null +++ b/setup.py @@ -0,0 +1,11 @@ +from setuptools import setup + +setup(name='odinControl', + version='0.1', + description='Remote execution of commands from local machine both in sequential and parallel', + url='https://github.com/srijan-sivakumar/odinControl', + author='Srijan Sivakumar', + author_email='ssivakum@redhat.com', + license='GNU General Public License', + packages=['odinControl'], + zip_safe=False) \ No newline at end of file From 7edaa80fb64979b43de8865d0d3ffc07379bf697 Mon Sep 17 00:00:00 2001 From: aujjwal-redhat Date: Mon, 22 Feb 2021 14:46:46 +0530 Subject: [PATCH 2/7] Added the path rexe was defined in the outer module. Added sys to use the Rexe class. Signed-off-by: aujjwal-redhat --- odinControl/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/odinControl/__init__.py b/odinControl/__init__.py index 2f53dd0..638211d 100644 --- a/odinControl/__init__.py +++ b/odinControl/__init__.py @@ -1 +1,3 @@ -import rexe from ../rexe \ No newline at end of file +import sys +sys.path.append("../") +from rexe import Rexe \ No newline at end of file From ead34faf10764b65cdd1382a001d7cfe487ffba5 Mon Sep 17 00:00:00 2001 From: aujjwal-redhat Date: Mon, 22 Feb 2021 17:14:38 +0530 Subject: [PATCH 3/7] Refactored the code and package creation as per the needs sample => package docs=> docs for odinControl example=> the example folder tests => test cases Signed-off-by: aujjwal-redhat --- .gitignore | 4 +++- {odinControl => sample}/__init__.py | 2 +- setup.py | 16 +++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) rename {odinControl => sample}/__init__.py (60%) diff --git a/.gitignore b/.gitignore index 4e7a707..dfc4af0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.log -Utilities \ No newline at end of file +Utilities +*/__pycache__/ +__pycache__/ \ No newline at end of file diff --git a/odinControl/__init__.py b/sample/__init__.py similarity index 60% rename from odinControl/__init__.py rename to sample/__init__.py index 638211d..6f86ba8 100644 --- a/odinControl/__init__.py +++ b/sample/__init__.py @@ -1,3 +1,3 @@ import sys sys.path.append("../") -from rexe import Rexe \ No newline at end of file +from rexe import Rexe \ No newline at end of file diff --git a/setup.py b/setup.py index 0db9366..8e4c161 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,17 @@ -from setuptools import setup +from setuptools import setup, find_packages -setup(name='odinControl', +with open('README.md') as f: + readme = f.read() + +with open('LICENSE') as f: + license = f.read() + +setup(name='rexe', version='0.1', - description='Remote execution of commands from local machine both in sequential and parallel', + description=readme, url='https://github.com/srijan-sivakumar/odinControl', author='Srijan Sivakumar', author_email='ssivakum@redhat.com', - license='GNU General Public License', - packages=['odinControl'], + license=license, + packages=['sample'], zip_safe=False) \ No newline at end of file From b4fa919e682e214a2236732b9c990f213252d9b5 Mon Sep 17 00:00:00 2001 From: aujjwal-redhat Date: Mon, 22 Feb 2021 17:45:05 +0530 Subject: [PATCH 4/7] refactoring --- sample/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sample/__init__.py b/sample/__init__.py index 6f86ba8..2a698bf 100644 --- a/sample/__init__.py +++ b/sample/__init__.py @@ -1,3 +1 @@ -import sys -sys.path.append("../") -from rexe import Rexe \ No newline at end of file +import rexe From bb6a0b47fc14dbdfa5ab69b7bfc0eb4059e9e4ef Mon Sep 17 00:00:00 2001 From: aujjwal-redhat Date: Mon, 22 Feb 2021 19:21:21 +0530 Subject: [PATCH 5/7] Adding comm_exec to start gluster Added the commands that can help in running gluster from Source Code Signed-off-by: aujjwal-redhat --- example/comm_exec.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 example/comm_exec.yaml diff --git a/example/comm_exec.yaml b/example/comm_exec.yaml new file mode 100644 index 0000000..3012222 --- /dev/null +++ b/example/comm_exec.yaml @@ -0,0 +1,40 @@ +name: Command Execution +description: Gets the container gluster-ready +gluster-download: + - dnf install automake autoconf libtool flex bison openssl-devel libxml2-devel python-devel libaio-devel libibverbs-devel librdmacm-devel readline-devel lvm2-devel glib2-devel userspace-rcu-devel libcmocka-devel libacl-devel sqlite-devel fuse-devel redhat-rpm-config rpcgen libtirpc-devel make python3-devel + - dnf install ctags cscope + - mkdir -p /Sourcecode/ + # - git clone + - cd /Sourcecode/upstream/glusterfs/ + - make uninstall + - make clean + - make distclean + - rm -rf /usr/local/var/log/glusterfs + - rm -rf /usr/local/var/run/gluster* + - rm -rf /usr/local/etc/glusterfs + - rm -rf /usr/local/lib/glusterfs + - rm -rf /usr/local/include/glusterfs + - rm -rf /usr/local/share/glusterfs + - rm -rf /usr/local/libexec/glusterfs + - rm -rf /usr/local/lib/ocf/resource.d/glusterfs + - rm -rf /usr/local/share/doc/glusterfs + - rm -rf /usr/local/share/doc/glusterfs/benchmarking + - rm -rf /usr/local/var/lib/glusterd + - rm -rf /usr/local/var/lib/misc/glusterfsd + - rm -rf /var/log/glusterfs + - rm -rf /var/run/gluster* + - rm -rf /var/lib/misc/glusterfsd + - rm -rf /var/lib/glusterd + - rm -rf /etc/glusterfs + - rm -rf /usr/lib/glusterfs + - rm -rf /usr/include/glusterfs + - rm -rf /usr/share/glusterfs + - rm -rf /usr/libexec/glusterfs + - rm -rf /usr/lib/ocf/resource.d/glusterfs + - rm -rf /usr/share/doc/glusterfs + - rm -rf /usr/share/doc/glusterfs/benchmarking + - ./autogen.sh + - ./configure --enable-fusermount --enable-debug + - make CFLAGS="-Wall -DDEBUG -g3 -O0" install 1>/dev/null + - systemctl daemon-reload + - systemctl start glusterd From 3d3c1e5a2cd02bb59f29ae532bc11cf955cf35ea Mon Sep 17 00:00:00 2001 From: aujjwal-redhat Date: Mon, 22 Feb 2021 19:24:20 +0530 Subject: [PATCH 6/7] Removal of upstream --- example/comm_exec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/comm_exec.yaml b/example/comm_exec.yaml index 3012222..5285917 100644 --- a/example/comm_exec.yaml +++ b/example/comm_exec.yaml @@ -5,7 +5,7 @@ gluster-download: - dnf install ctags cscope - mkdir -p /Sourcecode/ # - git clone - - cd /Sourcecode/upstream/glusterfs/ + - cd /Sourcecode/glusterfs/ - make uninstall - make clean - make distclean From 54060ea3a62ff254eb00e63fed73674cb7aa1ff9 Mon Sep 17 00:00:00 2001 From: aujjwal-redhat Date: Tue, 23 Feb 2021 09:40:35 +0530 Subject: [PATCH 7/7] Removed the comm_exec file Will generate a new PR for this separately. Signed-off-by: aujjwal-redhat --- example/comm_exec.yaml | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 example/comm_exec.yaml diff --git a/example/comm_exec.yaml b/example/comm_exec.yaml deleted file mode 100644 index 5285917..0000000 --- a/example/comm_exec.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Command Execution -description: Gets the container gluster-ready -gluster-download: - - dnf install automake autoconf libtool flex bison openssl-devel libxml2-devel python-devel libaio-devel libibverbs-devel librdmacm-devel readline-devel lvm2-devel glib2-devel userspace-rcu-devel libcmocka-devel libacl-devel sqlite-devel fuse-devel redhat-rpm-config rpcgen libtirpc-devel make python3-devel - - dnf install ctags cscope - - mkdir -p /Sourcecode/ - # - git clone - - cd /Sourcecode/glusterfs/ - - make uninstall - - make clean - - make distclean - - rm -rf /usr/local/var/log/glusterfs - - rm -rf /usr/local/var/run/gluster* - - rm -rf /usr/local/etc/glusterfs - - rm -rf /usr/local/lib/glusterfs - - rm -rf /usr/local/include/glusterfs - - rm -rf /usr/local/share/glusterfs - - rm -rf /usr/local/libexec/glusterfs - - rm -rf /usr/local/lib/ocf/resource.d/glusterfs - - rm -rf /usr/local/share/doc/glusterfs - - rm -rf /usr/local/share/doc/glusterfs/benchmarking - - rm -rf /usr/local/var/lib/glusterd - - rm -rf /usr/local/var/lib/misc/glusterfsd - - rm -rf /var/log/glusterfs - - rm -rf /var/run/gluster* - - rm -rf /var/lib/misc/glusterfsd - - rm -rf /var/lib/glusterd - - rm -rf /etc/glusterfs - - rm -rf /usr/lib/glusterfs - - rm -rf /usr/include/glusterfs - - rm -rf /usr/share/glusterfs - - rm -rf /usr/libexec/glusterfs - - rm -rf /usr/lib/ocf/resource.d/glusterfs - - rm -rf /usr/share/doc/glusterfs - - rm -rf /usr/share/doc/glusterfs/benchmarking - - ./autogen.sh - - ./configure --enable-fusermount --enable-debug - - make CFLAGS="-Wall -DDEBUG -g3 -O0" install 1>/dev/null - - systemctl daemon-reload - - systemctl start glusterd