[foreman-dev] Foreman iot platform plugin

2017-09-15 Thread Fairouz el ouazi
Hi , 

This question may sound to some of you stupid , But i want to know if i 
m developing a plugin on formean to manage all the embedded devices that 
are connected to my Iot platform (LIVE Objects ) do i need a smart proxy if 
yes why and whats is the main role of smart proxy ??

Thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] From Foreman to Iot Platforme

2017-09-13 Thread Fairouz el ouazi
With this suggestion do i need to make any changes on my platform . Because 
it's only reached by REST api / 

Le mercredi 13 septembre 2017 12:19:47 UTC+2, Ewoud Kohl van Wijngaarden a 
écrit :
>
> In that case I would start with foreman_hooks and perform the POST 
> request. You can even do this in bash with curl if you want. 
>
> https://github.com/theforeman/foreman_hooks#usage describes how you can 
> create your own hooks. 
>
> On Wed, Sep 13, 2017 at 02:39:58AM -0700, Fairouz el ouazi wrote: 
> >I m a beginner in ruby so that 's why i  felt a little bit a shame to 
>  put 
> >it in public im trying to make at first the plugin functional . For my 
> >case  i know that i want to make a post request to my platform by in the 
> >foreman side how can i do it .. 
> > 
> >Le mercredi 13 septembre 2017 11:31:33 UTC+2, Ewoud Kohl van Wijngaarden 
> a 
> >écrit : 
> >> 
> >> On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote: 
> >> > I m trying to develop a plugin in Foreman so i can manage  all 
> the 
> >> >devices that are connected to my IoT  platform . I can communicate 
> with 
> >> my 
> >> >IoT platform via REST API . In first place with GET request i can get 
> all 
> >> >the devices on Foreman with their parameters . My problem now is when 
> i 
> >> >change the parameters in foreman or deleting devices  I need to see 
> the 
> >> >changes on my IoT platform . i really need  help because  i m trying 
> to 
> >> >convince my colleague that Foreman can do  it . 
> >> 
> >> Is the plugin open source and available somewhere? That generally makes 
> >> it much easier to help. 
> >> 
> >> For inspiration it might be good to look at foreman_hooks. That has 
> >> triggers when an object is changed or deleted. You might even find that 
> >> just using foreman_hooks could be enough for your use case. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] From Foreman to Iot Platforme

2017-09-13 Thread Fairouz el ouazi
I m a beginner in ruby so that 's why i  felt a little bit a shame to  put 
it in public im trying to make at first the plugin functional . For my 
case  i know that i want to make a post request to my platform by in the 
foreman side how can i do it ..

Le mercredi 13 septembre 2017 11:31:33 UTC+2, Ewoud Kohl van Wijngaarden a 
écrit :
>
> On Wed, Sep 13, 2017 at 02:25:01AM -0700, Fairouz el ouazi wrote: 
> > I m trying to develop a plugin in Foreman so i can manage  all the 
> >devices that are connected to my IoT  platform . I can communicate with 
> my 
> >IoT platform via REST API . In first place with GET request i can get all 
> >the devices on Foreman with their parameters . My problem now is when i 
> >change the parameters in foreman or deleting devices  I need to see the 
> >changes on my IoT platform . i really need  help because  i m trying to 
> >convince my colleague that Foreman can do  it . 
>
> Is the plugin open source and available somewhere? That generally makes 
> it much easier to help. 
>
> For inspiration it might be good to look at foreman_hooks. That has 
> triggers when an object is changed or deleted. You might even find that 
> just using foreman_hooks could be enough for your use case. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[foreman-dev] From Foreman to Iot Platforme

2017-09-13 Thread Fairouz el ouazi
Hi everyone , 

 I m trying to develop a plugin in Foreman so i can manage  all the 
devices that are connected to my IoT  platform . I can communicate with my 
IoT platform via REST API . In first place with GET request i can get all 
the devices on Foreman with their parameters . My problem now is when i 
change the parameters in foreman or deleting devices  I need to see the 
changes on my IoT platform . i really need  help because  i m trying to 
convince my colleague that Foreman can do  it .
 THANKS 

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] CREATE host or hostgroup with new fields

2017-08-08 Thread Fairouz el ouazi


Le jeudi 3 août 2017 13:03:22 UTC+2, Greg Sutcliffe a écrit :
>
> On Wed, 2017-08-02 at 05:15 -0700, Fairouz el ouazi wrote: 
> > Hi Greg , 
> >I did sent you a message i don't know if you get it ? 
>
> You sent it to me personally instead of to the mailing list, and it got 
> filtered to a folder I don't often look at. Make sure you're replying 
> to the list rather than privately :) 
>
> You say you've not published the code - that makes it very difficult to 
> help you. It's almost impossible to say what the issue might be without 
> it - there are just too many unknowns. 
>  I m really a beginner in ruby and i know it's embarrassing to publish 
> a code 

with many faults .  
My problem is that i don't know how create a host with many global 
Parameters
I can do it with one paramater . 
   Host.create :name=> test , :manage=> false , :build=> false  , 
:host_parameters_attributes => [:name => 'dfdfd' , :value => 'hj'h' ]
Now if i want to make more host_parameters_attributes  i don't know the 
syntax ?

Thanks again , 

>
> Unless you have specific business reasons not to publish it, then I 
> would suggest grabbing a Git repo on GitHub or Gitlab, storing the code 
> then, and then replying with a link to where you're seeing issues in 
> your code. You've really nothing to lose, and everything to gain. 
>
> Cheers 
> Greg 
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] CREATE host or hostgroup with new fields

2017-08-02 Thread Fairouz el ouazi
Hi, 
  First thank you for  the response , For my situation i m trying to 
develop a plugin for foreman .. and i need to create a list of hosts 
automatically From my platform to Foreman ..The bridge is my plugin so 
instead of using a rest Api of foreman  and creating  host by host with 
making the parameters manually  .. i want to call just a method from 
foreman that create a host and then look to automatize the operation .
   I did in my plugin controller .
   Host.create :name=> test , :manage=> false , :build=> false 
  Hostgroup.create :name=> testgroup 
  So i want to know how can add parameters to the host and hostgroup 
creation 
   
   I tried to do 
   Host.create :name=> test , :manage=> false , :build=> false , 
operatingsystem_id => 1 
  but it doesn't work ??
  
Thanks again for your help 
   

Le mercredi 2 août 2017 08:09:39 UTC+2, oprazak a écrit :
>
> Hi,
> I am not sure what you are trying to do and where you call your method, 
> but it may be a strong parameter issue. We create host(group) by passing it 
> parameters and calling 'save' on it [1]. 
> Notice the 'hostgroup_params' method. It comes from a concern [2] that 
> takes care of whitelisting the params that we want to update. So if you add 
> new fields, you need to make sure they do not get filtered out.
>
> Hope this helps,
> Ondrej Prazak
>  
> [1] 
> https://github.com/theforeman/foreman/blob/develop/app/controllers/hostgroups_controller.rb#L42-L43
> [2] 
> https://github.com/theforeman/foreman/blob/develop/app/controllers/concerns/foreman/controller/parameters/hostgroup.rb
>
> On Tue, Aug 1, 2017 at 10:06 AM, Fairouz el ouazi <elouazi...@gmail.com 
> > wrote:
>
>> Hi everyone !!
>>
>>  My questions will sound a  bit stupide but i don't know how to call the 
>> method create Host or hostgroup with new fields from my new plugin  ? all i 
>> know is with name and when i add fields value like operating_system id it 
>> doesn't' appears on  foreman UI ? 
>>   
>> Thanks in advance for you help 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "foreman-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to foreman-dev...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] Re: plugin configuration management

2017-07-19 Thread Fairouz el ouazi
HI, 
  I already use  NET::HTTP library but i want to know where to add my 
request on my new plugin wich file do i have to add require Net::https ...

Le mardi 18 juillet 2017 13:07:01 UTC+2, Marek Hulán a écrit :
>
> On úterý 18. července 2017 12:15:37 CEST Fairouz el ouazi wrote: 
> > HI, 
> >PLease howa can make  GET or Post request on my new plugin ? 
> > 
> > Le mercredi 12 juillet 2017 17:21:49 UTC+2, Fairouz el ouazi a écrit : 
> > > Hi , 
> > > 
> > > I want to know if foreman plugin (ansible or chef )   
> communicate 
> > > 
> > > with the configuration management server or platform (chef or ansible 
> ) 
> > > using theirs rest Api  ? 
> > > 
> > > Thanks 
>
> You can use any Ruby library but I would recommend using Rest client as 
> it's 
> used elsewhere already. See rest-client documentation [1] for more 
> details. 
> Alternatively you can use Net::HTTP library which is built-in Ruby stdlib 
> [2]. 
>
> However this is not Foreman related so I suggest you consult generic Ruby 
> related queries at Ruby support channels. 
>
> [1] https://github.com/rest-client/rest-client 
> [2] http://ruby-doc.org/stdlib-2.4.1/libdoc/net/http/rdoc/Net/HTTP.html 
>
> Hope this helps 
>
> -- 
> Marek 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] Re: Plugins configuration managment platform

2017-07-06 Thread Fairouz el ouazi
Hi , i don't have a knowledge about ruby or Ruby on Rails and I see that my 
plugin need to be developed in Ruby on Rails ..I want to know where to start 
because when I try to use plugin example on the Manual I don't see anything on 
foreman .. When I run rails server it show me to do rails new App Path ... So 
do you think that I have to follow a ruby rails tutorial or just start with the 
example and because ruby is near to Python I could make it 

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] Re: Plugins configuration managment platform

2017-07-03 Thread Fairouz el ouazi

Hello , 
  

My platform  is a software suite for IoT / M2M solution integrators 
offering a set of tools to facilitate the interconnection between *devices* 
(or connected *« things »*) and *business applications*:

   - 
   
   *Connectivity Interfaces* (public and private) to collect data, send 
   command or notification from/to IoT/M2M devices,
   - 
   
   *Device Management* (supervision, configuration, resources, firmware, 
   etc.),
   - 
   
   *Message Routing* between devices and business applications,
   - 
   
   *Data Management*: *Data Storage* with *Advanced Search* features.
   
Every device has a particular parameters with a mix of communication modes 
. The devices use MQTT protocol to communicate with  the platform . 

I m looking for a device management that can offer me more functionalities 
so the clients can have more visibility for their  devices . For example i 
want to modify a parameter on multiple devices at the same time : ex: 
device Group . I want to manage different devices with different constraint 
, I want to supervise my devices and  their evolution and it will be just 
great if i could do auto-provisioning (my devices get  automatically an 
existent  configuration and having inventory .




Le lundi 3 juillet 2017 09:16:05 UTC+2, Marek Hulán a écrit :
>
> Hello 
>
> the smart proxy chef plugin is only a proxy between Foreman - chef-client 
> and 
> Foreman - chef-server. Most of Foreman functionality proxies the 
> communication 
> through smart-proxy, the idea is that Foreman is running on one place e.g. 
> in 
> office while you need to talk to many hosts in datacenters. These hosts 
> might 
> not be accessible from outside network so you put smart-proxy to the 
> datacenter and make this as the only available endpoint. 
>
> It's totally up to you if you decide to go this path, if this is not your 
> case, you can just add one plugin on foreman side. For iot devices it 
> really 
> depends on what you're trying to achieve. Describing that on few examples 
> would help me understand what you need. 
>
> -- 
> Marek 
>
> On pátek 30. června 2017 14:40:53 CEST Fairouz el ouazi wrote: 
> > Hi , it's me again im really sorry for asking a lot of question but when 
> > take a look to the documetation i didn't get a clear idea about the real 
> > job of smart proxy chef plugin and why on chef we have a client plugin 
>  and 
> > on salt we don't have it ?? and if my platform is not agent less would 
> it 
> > be necessary to have 3 plugin one on foreman and other one on smart 
> proxy 
> > foreman and the third on my  iot devices ? 
> > 
> > Le mercredi 28 juin 2017 11:50:40 UTC+2, Fairouz el ouazi a écrit : 
> > > Hi everyone , 
> > > 
> > >  I'm a beginner in using foreman ,So before in take the adventure 
> i 
> > > 
> > > want to know if the fact that it exists a plugin for managing chef is 
> > > there 
> > > any chance to develop a new one that will manage my own platform  X 
> > > (PLatform that manage IOT  devices ) . So  at place of having chef 
> client 
> > > i 
> > > will have foreman dealing with the devices of my X platform . ??? 
> > > 
> > > I really need your help or some ideas or if anyone has face the 
> same 
> > > 
> > > uses cases ? 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[foreman-dev] Re: Plugins configuration managment platform

2017-06-30 Thread Fairouz el ouazi
Hi , it's me again im really sorry for asking a lot of question but when 
take a look to the documetation i didn't get a clear idea about the real 
job of smart proxy chef plugin and why on chef we have a client plugin  and 
on salt we don't have it ?? and if my platform is not agent less would it 
be necessary to have 3 plugin one on foreman and other one on smart proxy 
foreman and the third on my  iot devices ?
Le mercredi 28 juin 2017 11:50:40 UTC+2, Fairouz el ouazi a écrit :
>
> Hi everyone ,
>
>  I'm a beginner in using foreman ,So before in take the adventure i 
> want to know if the fact that it exists a plugin for managing chef is there 
> any chance to develop a new one that will manage my own platform  X 
> (PLatform that manage IOT  devices ) . So  at place of having chef client i 
> will have foreman dealing with the devices of my X platform . ???
>
> I really need your help or some ideas or if anyone has face the same 
> uses cases ? 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [foreman-dev] Plugins configuration managment platform

2017-06-29 Thread Fairouz el ouazi
Hi, thank for  your answer , my  platform  can communicate over REST API . 
you said that it would be quite easy to develop a plugin for my cfgmgmt . 
Can you give me a point from where to start . or documentation . 


Le mercredi 28 juin 2017 13:58:10 UTC+2, Marek Hulán a écrit :
>
> On středa 28. června 2017 11:34:00 CEST Fairouz el ouazi wrote: 
> > Hi everyone , 
> > 
> >  I'm a beginner in using foreman ,So before in take the adventure i 
> > want to know if the fact that it exists a plugin for managing chef is 
> there 
> > any chance to develop a new one that will manage my own platform  X 
> > (PLatform that manage IOT  devices ) . So  at place of having chef 
> client i 
> > will have foreman dealing with the devices of my X platform . ??? 
> > 
> > I really need your help or some ideas or if anyone has face the same 
> > uses cases ? 
>
> I'm not sure if I understand the question but maybe a generic answer will 
> help. You can create a plugin that introduces any kind of new object in 
> Foreman. The simple plugins such as chef/salt/ansible adds new cfgmgmt 
> support 
> and can be used as an example how to parse reports and facts of any new 
> similar tool. If your IOT device can send some kind of report, it should 
> be 
> quite easy to add a plugin for that. 
>
> If you want to go futher and let's say create IOT devices as different 
> objects 
> than hosts, it's also entirely possible but obviously more complicated. 
>
> Hope this helps 
>
> -- 
> Marek 
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[foreman-dev] Re: Plugins configuration managment platform

2017-06-29 Thread Fairouz el ouazi
Hi, thank for  your answer , my  platform  can communicate over REST API . 
you said that it would be quite easy to develop a plugin for my cfgmgmt . 
Can you give me a point from where to start . or documentation . 

Le mercredi 28 juin 2017 11:50:40 UTC+2, Fairouz el ouazi a écrit :
>
> Hi everyone ,
>
>  I'm a beginner in using foreman ,So before in take the adventure i 
> want to know if the fact that it exists a plugin for managing chef is there 
> any chance to develop a new one that will manage my own platform  X 
> (PLatform that manage IOT  devices ) . So  at place of having chef client i 
> will have foreman dealing with the devices of my X platform . ???
>
> I really need your help or some ideas or if anyone has face the same 
> uses cases ? 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"foreman-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.