Teamcity - Combine ldap properties into a single line in ldap-config.properties - teamcity

I have a teamcity instance connecting to an LDAP server (AD) and I need to configure my VCS user name to be in the following format:
firstname.surname
I know that I need to modify the following configuration entry in the ldap-config.properties file to do this
teamcity.users.property.plugin:vcs:anyVcs:anyVcsRoot
I know that I need to use the following two ldap properties: givenName, sn.
However, I'm struggling to understand the syntax for doing this in the config. I've tried different combinations, and whilst the properties work on their own, I cannot find a way of concatenating them together. Even the following (which misses out the full stop in the middle) does not work
(&(givenName)(sn))

Fix is to use the following syntax:
%ldap.userEntry.%
(as per line 160 - 161 in the ldap-config.properties.dist file)
So for my example, where I want firstname then a full stop then the surname, my entire config line would be the following:
teamcity.users.property.plugin\:vcs\:anyVcs\:anyVcsRoot=%ldap.userEntry.givenName%.%ldap.userEntry.sn%

Related

How to run pelias with custom data

I have millions of Bangladesh address data. They are clean and well structured ( Poi, House,Road,Area,Postcode,latitude,longitude,etc )
Now I want to load them into pelias geocoder. Can you help me by suggesting the steps with installation process.
Note: I also have my own pbf
You can use the csv-import component.
See: https://github.com/pelias/csv-importer
An example I've used in the csv file:
name,source,layer,lon,lat,number,street,unit,city,district,region,postcode,id,addendum_json_custom
123 JACKSON AVE,custom,address,-86.66,40.7666,344,JACKSON AVE,,PERU,,IN,46970,651ds651d651,"{ ""customInfo"":""Something Custom"" }"
123 S 600 E,custom,address,-86.66,40.7666,4503,S 600 E,,PIERCETON,,IN,46562,651ewd2332e,"{ ""customInfo"":""Something Custom"" }"
Be sure to use the double quotes in the addendum json as specified in the documentation.
If you are doing Points of Interest, then you may choose a different layer like venue.
You will have to configure the pelias.conf with the source of the files for inport and the api target to specify the source > layer.
As for installation, I've found the dockerized situation to be best for getting started.
https://github.com/pelias/docker

Am I misunderstanding something about using the List and Fetch combination?

I am trying to understand the combination of List and Fetch processors.
I have a directory with three JSON files and I get the ListAzureDataLakeStorage to list them. But when I connect a FetchAzureDataLakeStorage with which I intend to take only one of the files, the Fetch takes the same file three times. In summary, it takes the file whose azure.filename matches with the value that I put in the File Name property, but as many times as there are files in the listed directory.
I really want to use a single List and connect three Fetches to it, each one to take a different file, and thus use them for different streams.
In each Fetch I put in the "File Name" property the name of the file that I want to take. For example:
File Name: fileName1.json
I have also tried putting in "File Name" with Expression Language the following:
FileName: $ {azure.filename: equals ('fileName1.json')}. But this option causes a 404 empty body error.
But there is no way. Am I misunderstanding something about using the List and Fetch combination?
If you are statically entering file names and you want to respond to each one differently, then the ListX processors aren't very beneficial to your flow.
The easier option would be to use a GenerateFlowFile processor with the appropriate schedule to trigger a corresponding FetchX processor.
If you're only doing this for 3 files, it's not too much manual overhead. You could also achieve something similar using RouteOnContent/Attribute.

yml mapping values are not allowed here (syntax)

I have removed half of what I wanted in this yaml file trying to find a way to get it to build my mkdocs test site and I have gotten down to one error.
'''
mkdocs.yml
doc/
Scaling-Issue.md
FreeSwitch.md
User-Sessions.md
nav:
-Common Issues:
-Scaling Issue:'Scaling-Issue.md'
-FreeSwitch:'FreeSwitch.md'
-User Sessions:'User-Sessions.md'
'''
Error: 6:4 syntax error: mapping values are not allowed here
You appear to have a lot of stuff in your configuration file which does not belong. Your file should look like this:
site_name: 'Your Site Name'
nav:
- Common Issues:
- Scaling Issue:'Scaling-Issue.md'
- FreeSwitch:'FreeSwitch.md'
- User Sessions:'User-Sessions.md'
First of all, the site_name option is required. Of course, you can change the actual name to whatever you want.
While nav is optional, it is recommended. I have cleaned up the indentation (four spaces is recommended rather than the one you were using). Also, you should have a space after each hyphen in your list items.
The other things do not go in the file. For example, the name of the file should not be included in the file. And I'm not sure where the three dots come from. Finally, the list of files is not something that goes in the file. I realize that all of those things may exist in documentation, but those are showing examples of what the file structure looks like, they are not things to add to the configuration file.

WebSphere: Unable to change both stderrfilname and stdoutfilename at same time

In WebSphere Application Server 8.5.5 I'm having problems setting the native_stdout and native_stderr log paths from wsadmin jython script.
Everytime I set one path, the other is blanked out. i.e. set to null.
I presume I need to form a line of code that sets both paths simultaneously but have been unable to create the correct syntax, if this is at all possible.
The code to produce one path change looks like:
srv = AdminConfig.getid('/Cell:mycell/Node:mynode/Server:server1/')
processDef = AdminConfig.list('JavaProcessDef', srv)
AdminConfig.modify(processDef, [['ioRedirect', [['stderrFilename', '${LOG_ROOT}/server1/new_stderr.log']]]])
AdminConfig.save()
This works fine but when I then use the same script to set the stdoutFilename, it blanks the stderrFilename previously set.
It seems to make no difference at which point I commit the changes using save.
Any help with this issue would be greatly received!
You're right, even though the manual elsewhere warns that AdminConfig.modify() might append to lists when you don't expect it to. I observed the same thing.
Here's the pattern you want to be safe, clear it out and set both properties at the same time:
AdminConfig.modify(processDef, [['ioRedirect', []]])
AdminConfig.modify(processDef, [['ioRedirect', [['stderrFilename', '${SERVER_LOG_ROOT}/my_stderr.log'], ['stdoutFilename', '${SERVER_LOG_ROOT}/my_stdout.log']]]])
After this, you can do this for a simple verification:
print AdminConfig.showall(processDef)
But watch the output closely as it is not pretty-printed

LDAP Script Help - Put ldapserach command results in single quotes

The following script works, but I need help with one change. Right now using lday serach, and a little utility called GETPASS, this script will pull a listy users, from a specified context out of an LDAP directory, compare their LDAP password, to an unused attribute, If different, add it to the unused attribute called carLicense, and then send it in SHA 1 format, up our google APPS domain, with Google Apps directory sync. The one problem, is that it when it returns the ldapsearch, it works fine with a user in this format:
cn=joebloe,ou=googletest,o=someorg
However, if the usename has a space in it like this:
cn=joe bloe,ou=googletest,o=someorg
the script will fail as it does not know how to deal with that space. In this situations, a single quote, around the DN will solve the issue IE:
'cn=joe blow,ou=googletest,o=someorg'
However, I have tried to alter the script to address this need of mine, and I am failing miserably, please see a copy of the script in Pasetebin below. Any help with be deeply and GREATLY appreciated, as this is currently my only stumbling block to success.
http://pastebin.com/htWxsNXj
Replace the first line of generating result file (in your pasting is line 66) with:
echo "dn: '$RESULT'" >> $SCRIPTPATH/gadspwsync.ldif
If it won't help, don't remove the file in line 75. Check the content, show us the first line, then show the expected content.

Resources