Hi David, Sorry for the delayed reply, as I couldn't get online sooner. Great work in getting the Puppet modules to work on RHEL! I guess we'd have to include a conditional statement in the Puppet manifest to install different packages based on the OS. I've opened a JIRA [1] for this as we can include this as future improvement.
[1] - https://issues.apache.org/jira/browse/STRATOS-1427 Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Sun, May 24, 2015 at 7:43 PM, Gayan Gunarathne <gay...@wso2.com> wrote: > Hi David, > > Great to hear that you have configure Stratos in RHEL 6.5. > > I guess you have use the same init.sh and you have done the changes > "apt-get update" command of the stratos_base/manifests/init.pp. > > Thanks, > Gayan > > On Sun, May 24, 2015 at 8:18 AM, david hbase <davidhb...@gmail.com> wrote: > >> I have fixed it. The application can be deploy with RHEL 6.5 now. >> >> Thanks >> -D >> >> >> On Sat, May 23, 2015 at 7:33 PM, david hbase <davidhb...@gmail.com> >> wrote: >> >>> After fixed multiple python modules, and got the following error, Any >>> suggestion? >>> Thanks >>> -D >>> >>> [root@locker002-472 tmp]# cat agent.screen.log >>> Traceback (most recent call last): >>> File "agent.py", line 21, in <module> >>> from modules.subscriber.eventsubscriber import EventSubscriber >>> File >>> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/subscriber/eventsubscriber.py", >>> line 20, in <module> >>> import paho.mqtt.client as mqtt >>> ImportError: No module named paho.mqtt.client >>> [root@locker002-472 tmp]# >>> [root@locker002-472 tmp]# >>> [root@locker002-472 tmp]# ll >>> total 20 >>> -rw-r--r-- 1 root root 351 May 24 02:03 agent.screen.log >>> drwxr-xr-x 2 root root 4096 May 23 23:33 payload >>> -rw-r--r-- 1 root root 169 May 23 23:33 puppet-init.log >>> -rw-r--r-- 1 root root 0 May 24 02:01 test2 >>> -rw------- 1 root root 2744 May 24 01:53 >>> yum_save_tx-2015-05-24-01-53_0ooKJ.yumtx >>> -rw------- 1 root root 2744 May 24 01:53 >>> yum_save_tx-2015-05-24-01-53oz8vGj.yumtx >>> [root@locker002-472 tmp]# >>> >>> On Sat, May 23, 2015 at 6:08 PM, david hbase <davidhb...@gmail.com> >>> wrote: >>> >>>> Sorry, need correct the error message as following: >>>> >>>> [root@214823051543 ~]# puppet agent --test >>>> Info: Retrieving pluginfacts >>>> Info: Retrieving plugin >>>> Info: Loading facts >>>> Info: Caching catalog for >>>> 214823051543.default.locker.stratos41beta2a.test.com >>>> Info: Applying configuration version '1432429504' >>>> Notice: Installed package: unzip >>>> Notice: >>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[unzip]/Notify[unzip]/message: >>>> defined 'message' as 'Installed package: unzip' >>>> Notice: Installed package: nano >>>> Notice: >>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[nano]/Notify[nano]/message: >>>> defined 'message' as 'Installed package: nano' >>>> Notice: Installed package: git >>>> Notice: >>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[git]/Notify[git]/message: >>>> defined 'message' as 'Installed package: git' >>>> Notice: Installed package: wget >>>> Notice: >>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[wget]/Notify[wget]/message: >>>> defined 'message' as 'Installed package: wget' >>>> Notice: Installed package: curl >>>> Notice: >>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[curl]/Notify[curl]/message: >>>> defined 'message' as 'Installed package: curl' >>>> Notice: /Stage[main]/Stratos_base/Exec[base-update-apt]/returns: >>>> executed successfully >>>> Notice: /Stage[main]/Stratos_base/Package[nano]/ensure: created >>>> Notice: Installed package: zip >>>> Notice: >>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[zip]/Notify[zip]/message: >>>> defined 'message' as 'Installed package: zip' >>>> Notice: Installed package: tar >>>> Notice: >>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[tar]/Notify[tar]/message: >>>> defined 'message' as 'Installed package: tar' >>>> *Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list python-pip' >>>> returned 1: Error: No matching Packages to list* >>>> Error: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Package[python-pip]/ensure: >>>> change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 >>>> -y list python-pip' returned 1: Error: No matching Packages to list >>>> Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list python-dev' >>>> returned 1: Error: No matching Packages to list >>>> Error: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Package[python-dev]/ensure: >>>> change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 >>>> -y list python-dev' returned 1: Error: No matching Packages to list >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Package[gcc]/ensure: >>>> created >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-paho]: Dependency Package[python-dev] has failures: true >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-paho]: Dependency Package[python-pip] has failures: true >>>> Warning: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-paho]: Skipping because of failed dependencies >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-GitPython==0.3.1-beta2]: Dependency Package[python-dev] has >>>> failures: true >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-GitPython==0.3.1-beta2]: Dependency Package[python-pip] has >>>> failures: true >>>> Warning: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-GitPython==0.3.1-beta2]: Skipping because of failed dependencies >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-psutil]: Dependency Package[python-dev] has failures: true >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-psutil]: Dependency Package[python-pip] has failures: true >>>> Warning: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-psutil]: Skipping because of failed dependencies >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-gittle]: Dependency Package[python-dev] has failures: true >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-gittle]: Dependency Package[python-pip] has failures: true >>>> Warning: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-gittle]: Skipping because of failed dependencies >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-pexpect]: Dependency Package[python-dev] has failures: true >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-pexpect]: Dependency Package[python-pip] has failures: true >>>> Warning: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[pip >>>> installs-pexpect]: Skipping because of failed dependencies >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[creating_target_for_python_cartridge-agent]: >>>> Dependency Package[python-dev] has failures: true >>>> Notice: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[creating_target_for_python_cartridge-agent]: >>>> Dependency Package[python-pip] has failures: true >>>> Warning: >>>> /Stage[main]/Python_agent/Python_agent::Initialize[cartridge-agent]/Exec[creating_target_for_python_cartridge-agent]: >>>> Skipping because of failed dependencies >>>> >>>> On Sat, May 23, 2015 at 2:54 PM, david hbase <davidhb...@gmail.com> >>>> wrote: >>>> >>>>> Hi, Chamila >>>>> >>>>> Thanks for your update. I did the following updates: >>>>> 1. changed the stratos_base/manifests/init.pp, >>>>> 2. built from source, >>>>> 3. copy the apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT.zip >>>>> to /etc/puppet/modules/python_agent/files/ >>>>> 4. rebuild the cartridge. >>>>> 5. deploy new app >>>>> >>>>> But still got same error with puppet agent --test >>>>> >>>>> [root@test002-2ca bin]# puppet agent --test >>>>> Info: Retrieving pluginfacts >>>>> Info: Retrieving plugin >>>>> Info: Loading facts >>>>> Info: Caching catalog for 458223051524.default.test.com >>>>> Info: Applying configuration version '1432415126' >>>>> Notice: Installed package: unzip >>>>> Notice: >>>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[unzip]/Notify[unzip]/message: >>>>> defined 'message' as 'Installed package: unzip' >>>>> Notice: Installed package: nano >>>>> Notice: >>>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[nano]/Notify[nano]/message: >>>>> defined 'message' as 'Installed package: nano' >>>>> Notice: Installed package: git >>>>> Notice: >>>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[git]/Notify[git]/message: >>>>> defined 'message' as 'Installed package: git' >>>>> Notice: Installed package: wget >>>>> Notice: >>>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[wget]/Notify[wget]/message: >>>>> defined 'message' as 'Installed package: wget' >>>>> Notice: Installed package: curl >>>>> Notice: >>>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[curl]/Notify[curl]/message: >>>>> defined 'message' as 'Installed package: curl' >>>>> Error: Could not find command 'apt-get' >>>>> Error: /Stage[main]/Stratos_base/Exec[base-update-apt]/returns: change >>>>> from notrun to 0 failed: Could not find command 'apt-get' >>>>> Notice: /Stage[main]/Stratos_base/Package[git]: Dependency >>>>> Exec[base-update-apt] has failures: true >>>>> Warning: /Stage[main]/Stratos_base/Package[git]: Skipping because of >>>>> failed dependencies >>>>> Notice: /Stage[main]/Stratos_base/Package[wget]: Dependency >>>>> Exec[base-update-apt] has failures: true >>>>> Warning: /Stage[main]/Stratos_base/Package[wget]: Skipping because of >>>>> failed dependencies >>>>> Notice: /Stage[main]/Stratos_base/Package[zip]: Dependency >>>>> Exec[base-update-apt] has failures: true >>>>> Warning: /Stage[main]/Stratos_base/Package[zip]: Skipping because of >>>>> failed dependencies >>>>> Notice: /Stage[main]/Stratos_base/Package[curl]: Dependency >>>>> Exec[base-update-apt] has failures: true >>>>> Warning: /Stage[main]/Stratos_base/Package[curl]: Skipping because of >>>>> failed dependencies >>>>> Notice: /Stage[main]/Stratos_base/Package[nano]: Dependency >>>>> Exec[base-update-apt] has failures: true >>>>> Warning: /Stage[main]/Stratos_base/Package[nano]: Skipping because of >>>>> failed dependencies >>>>> Notice: Installed package: zip >>>>> Notice: >>>>> /Stage[main]/Stratos_base/Stratos_base::Printpackages[zip]/Notify[zip]/message: >>>>> defined 'message' as 'Installed package: zip' >>>>> >>>>> >>>>> -D >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Fri, May 22, 2015 at 10:15 PM, Chamila De Alwis <chami...@wso2.com> >>>>> wrote: >>>>> >>>>>> Hi David, >>>>>> >>>>>> The Puppet modules are mostly Debian specific, using flavor specific >>>>>> commands such as "apt-get". This is a shortcoming as of now and we need >>>>>> to >>>>>> make the modules more generic. However, the modules can be modified by a >>>>>> DevOps as well, since we are only providing the basic flow of the Puppet >>>>>> modules. >>>>>> >>>>>> Could you verify this by replacing "apt-get update" in >>>>>> "puppet3/modules/stratos_base/manifests/init.pp" by "yum update" and >>>>>> trying >>>>>> again? >>>>>> >>>>>> >>>>>> Regards, >>>>>> Chamila de Alwis >>>>>> Software Engineer | WSO2 | +94772207163 >>>>>> Blog: code.chamiladealwis.com >>>>>> >>>>>> >>>>>> >>>>>> On Sat, May 23, 2015 at 8:57 AM, david hbase <davidhb...@gmail.com> >>>>>> wrote: >>>>>> >>>>>>> Hi, Dev >>>>>>> >>>>>>> Yes, Exactly, When I execute the puppet agent and got this error. I >>>>>>> am trying to deploy the Stratos 4.1 with production POC. >>>>>>> But this is a blocker now. etc: without the Python Cartridge Agent, >>>>>>> Stratosn 4.1 can not sync the cartridge status. >>>>>>> >>>>>>> Need help, >>>>>>> >>>>>>> Thanks >>>>>>> -D >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Fri, May 22, 2015 at 7:50 PM, Udara Liyanage <ud...@wso2.com> >>>>>>> wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I guess this error is encountered when you execute puppet agent. >>>>>>>> Does our puppet master supports CentOS? >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > > > -- > > Gayan Gunarathne > Technical Lead > WSO2 Inc. (http://wso2.com) > email : gay...@wso2.com | mobile : +94 766819985 > >