These are chat archives for allegro/ralph

23rd
Aug 2018
Alberto Valdes
@albercuba__twitter
Aug 23 2018 05:25
@vi4m yes that's what I did. I created a rack called something-floor
by the way guys. Why is it the nventory number required when adding Licenses? We don't have inventory numbers in our licenses
Alberto Valdes
@albercuba__twitter
Aug 23 2018 07:46

Anyone here using LDAP auth?

the docs say:

You will need to install pip install -r requirements/prod_ldap.txt. Then add LDAP as an authentication backend in your local settings:

Which local settings. which file?

✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 07:47
there are some settings in /opt directory you can use
Alberto Valdes
@albercuba__twitter
Aug 23 2018 07:49
@vi4m under /opt I have 3 folders: media, ralph, static
no files under /opt
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 07:49
/opt/ralph/
Alberto Valdes
@albercuba__twitter
Aug 23 2018 07:51
@vi4m but which file contains the local settings?
I don't find any settings.py in any folder under /opt/ralph
unless I need to add the configuration in setup.py
Fabian Krack
@onibox
Aug 23 2018 08:14
Hi. I can't find any hint about supported configuration management systems, and how they can be integrated. Is that part missing in RalphNG?
Only found old issues on github which did not had the 'ng' tag attached.
Sorry, old issues regarding puppet :-)
Alberto Valdes
@albercuba__twitter
Aug 23 2018 08:21
modifying the setup.py file just broke my docker image. So that's not the way to configure LDAP AUth
Alberto Valdes
@albercuba__twitter
Aug 23 2018 08:43
So, anyone here using LDAP Auth in Ralph?
Alberto Valdes
@albercuba__twitter
Aug 23 2018 08:58
Against AD?
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 09:28
yes, there where some LDAP discussions on this channel (please search)
Alberto Valdes
@albercuba__twitter
Aug 23 2018 09:29
search on the channel? I searched online. I found the file, just having some problem with the filters
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 09:29
on this channel
Zrzut ekranu 2018-08-23 o 11.29.48.png
i think @ziompaul was the guy who configured it recently
we use LDAP/AD all the time at Allegro as well
Alberto Valdes
@albercuba__twitter
Aug 23 2018 09:33
I already managed to connect with my AD server. But I am having problems setting up filters so it doesn't read all the users
AUTH_LDAP_USER_FILTER = '(|(memberOf=CN=_gr_ralph_group1,OU=something,'\
    'DC=mygroup,DC=domain)(memberOf=CN=_gr_ralph_group2,OU=something else,'\
    'DC=mygroups,DC=domain))'
Roman Prykhodchenko
@romcheg
Aug 23 2018 09:43
@onibox are you refering to SCM status for dc assets?
Fabian Krack
@onibox
Aug 23 2018 10:40
@romcheg No. Beside other things it is said that Alegro is also a CMDB. I thought this stands for Configuration Management Data Base.
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 11:55
Yes it is CMDB :) it’s meant to be integrated with tools such as Puppet, Ansible
older versions of Ralph (2.x) was highly integrated with Puppet
so if you didn’t have something in Puppet, it wouldn’t show in Ralph
community didn’t like this behaviour, because sometimes you have assets outside of puppet territory (offline parts)
second reason we relaxed connections with SCM was - every puppet installation out there was highly customized by 3rd parties
so the idea is - you have ralph API, and ralph-cli (if you don’t like API), you can discover servers components (ram, operating system) through the Puppet DB API, and put it to ralph
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 12:00
of course, puppet cannot discover barcodes, positions(IPMI), so it’s only part of the story
Fabian Krack
@onibox
Aug 23 2018 12:35
@vi4m ok, thanks for the info. what is the status of an integration of CM support in RalphNG then?
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 12:51
how should it work, then? :) how do you see it ?
diedriko
@diedriko
Aug 23 2018 13:00
Hello, I have a little question, we've are setting up a test environment for ralph, all assets have been entered into ralph, so now we would like to test some freatures like export to a dhcp config, ldap, ... For dhcp, is the python script still usable to do an export and if so are there any requirements linked to this?
Alberto Valdes
@albercuba__twitter
Aug 23 2018 14:20
export to dhcp?
@diedrikvdd one question about LDAP. DO you use Active Directory or some other ldap system?
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 14:26
@diedrikvdd yes we have script to feed DHCP file
i just have to check if it’s in open source codebase ;)
this is simple script with 0 dependencies, python2 and python3 compatible
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 14:31
it generates DHCP config file from Ralph database
Fabian Krack
@onibox
Aug 23 2018 14:31
@vi4m I have to think about it, but i think one can use the 'custom objects' per host to define some sort of 'role' which the CM then can fetch via the Ralph API. Will have a look into the old Ralph 2 Code how the Puppet integration was done there.
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 14:31
it has two options: ('-H', '--host', help='Ralph instance host.’) and ('-k', '--key', help='Ralph API key.')
@onibox yes - it’s really close to what we’re using :)
basically, puppet runs our script to fetch „class” to apply for each host
this „class” is exposed via Ralph API as a „Configuration path”
Zrzut ekranu 2018-08-23 o 16.35.56.png
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 14:38
we just wrote really simple puppet external classifier as described here: https://puppet.com/docs/puppet/5.5/nodes_external.html
Fabian Krack
@onibox
Aug 23 2018 14:38
@vi4m Which CM are you using?
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 14:39
puppet
Fabian Krack
@onibox
Aug 23 2018 14:39
ok thx
diedriko
@diedriko
Aug 23 2018 17:45
@albercuba__twitter openldap
diedriko
@diedriko
Aug 23 2018 17:52
@vi4m we mainly use static entries in our dhcp, will ralph produce something similar?
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 18:04
yes, it will generate static MAC = IP entry table
diedriko
@diedriko
Aug 23 2018 18:24
@vi4m I suppose that dhcp and ralph have to be on same server to be effective?
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 18:38
no, the opposite would be most reliable. config is served throught the ralph API
see yourself, client script gets this url: http://ralph-demo.allegro.tech/dhcp/entries?dc=DC2
✪ vi4m Marcin Kliks
@vi4m
Aug 23 2018 18:44
i need to prepare some demo data, since this DC doesn’t have entires
basically, this API endpoint is the complete DHCP server config file