Perl 6 - the future is here, just unevenly distributed

IRC log for #salt, 2013-11-03

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:15 jdenning joined #salt
00:20 cnelsonsic joined #salt
00:34 shinylasers joined #salt
00:37 [1]VertigoRay joined #salt
00:45 jalbretsen joined #salt
01:10 cachedout joined #salt
01:17 jacksontj joined #salt
01:19 elfixit joined #salt
01:19 jacksontj_ joined #salt
01:27 anti joined #salt
01:48 mattyo joined #salt
01:51 ipmb joined #salt
01:55 mwillhite joined #salt
02:34 juicer2 joined #salt
02:39 diegows joined #salt
02:45 [1]VertigoRay joined #salt
02:45 matty joined #salt
02:46 matty seem to be having trouble with the virtualenv state.  anybody here ?
02:46 helderco joined #salt
02:47 helderco Hey guys. I need to add some lines to .bashrc with salt. How would I go about doing that?
02:48 matty do you want to manage the whole file with salt or just add some lines to the end of an already exsisting one ?
02:48 helderco ah, I see there's a salt.states.file.append state
02:48 helderco Yeah, just append to the end of a file
02:49 linuxnewbie joined #salt
02:50 helderco Was worried the lines would be appended over and over but I can see salt makes is smart
02:50 matty neat.  never saw that before
02:52 helderco The blockreplace is pretty neat too
02:54 matty so I seem to be having more upgrade issues.  git virtualenv state is giving me this error: http://paste.ubuntu.com/6350635/ from here: http://irclog.perlgeek.de/salt/2013-10-23/text it appears that its a module loading issue.
02:56 matty however the fix is removing virtualenv.py from the salt modules directory.  And I already seem to not have that file in that directory.  thoughts ?
02:58 ajw0100 joined #salt
03:03 anuvrat joined #salt
03:12 joehh matty: looks like it is finding/importing virtualenv.py from somewhere else on your python path
03:14 joehh can you find out the minions pythonpath?
03:14 joehh I think grains.item pythonpath will get it, but haven't checked yet
03:27 matty sure
03:32 joehh if a virtualenv.py is in one of those directories, it could be loading it
03:35 matty http://paste.ubuntu.com/6350769/
03:36 [1]VertigoRay joined #salt
03:36 matty just used the python repl to get python path
03:40 joehh does /usr/local/lib/python2.7/dist-packages/virtualenv.py contain virtualenv_version near the top?
03:40 joehh probably worth getting it from grains as depending on your os/installation method, it could differ
03:41 matty yep
03:42 joehh so it is obviously not that one that is being found/imported
03:43 joehh is there one somewhere else?
03:43 matty that is the weird part.  did a find / -name virtualenv.py and only the file that is found is the std lib one
03:43 joehh odd
03:44 joehh could the minion be old - ie have imported virtualenv in the past and not been restarted?
03:44 matty unless there is a import virtualenv_mod as virtualenv somewhere
03:44 matty ill restart the minion.  was fixing a weird half installed virtualenv state before
03:46 jankowiak joined #salt
03:52 matty found salt/modules/virtualenv.pyc on the minion could be part of the problem
03:53 LLKCKfan My friend who showers twice a day and use Secret clinic strenght is telling me that her underarms still smell bad. Is there anything she can wash with that will help the smell disappear? I do not want to know what caused it as I do not care. And cannot change her diet.
03:56 matty kind of a dumb question.  is there a reason why salt will end silently with not output of success?
03:57 karlgrz joined #salt
03:58 joehh matty: I reckon that will be it
03:58 karlgrz hey all, anyone here work with rvm in salt much?
03:58 joehh matty: not too sure on the last question - is it a timeout thing?
04:00 matty I don't know.  it just ends in a very unixy way.  no message at all.  just get the command prompt back.
04:00 joehh does it take about ten seconds or so before it does?
04:01 matty yea.  most of the time after a while
04:01 joehh that is probably the timeout, it will wait to hear a response from all minions it is expecting
04:02 joehh if it doesn't hear anything, it will just end as yuo have described
04:02 matty ok
04:02 joehh if you give it a -t argument, it will wait longer
04:02 matty minion is timing out
04:03 joehh if if you press ctrl-c part way through, then it will give you the job id which you can use to check when the job finishes
04:04 matty possible on the requirements option.  installing them
04:04 matty virtualenv requirements.  not sure if it tries to install them everytime or not.  would suspect so
04:15 jetblack joined #salt
04:16 oz_akan_ joined #salt
05:03 lemao joined #salt
05:09 tulu joined #salt
05:15 karlgrz Is there a good example of a state calling rake using rvm?
05:15 oz_akan__ joined #salt
05:22 tulu Comment:   Service nginx is already enabled, and is dead
05:25 tulu sombody hint for me above problem?
05:44 tulu joined #salt
05:44 NV is there any way using the py or pydsl renderer to test for the existance of a state without erroring?
05:45 NV or alternatively, include and not error if it doesnt' exist
05:46 NV with pillar i can (ab)use the fact that the pillars are run on the master, not the minion so i can just use __file__ and check if it exists on the local filesystem
05:46 NV but that doesn't work on the minion as it only pulls down required files
05:52 smkelly joined #salt
06:03 pdayton joined #salt
06:03 pdayton joined #salt
06:04 pdayton joined #salt
06:21 oz_akan_ joined #salt
07:04 lemao joined #salt
07:10 matanya joined #salt
07:22 oz_akan_ joined #salt
07:38 linjan__ joined #salt
07:58 hjubal joined #salt
07:58 hjubal joined #salt
08:00 anuvrat joined #salt
08:08 matanya joined #salt
08:16 ajw0100 joined #salt
08:23 oz_akan_ joined #salt
08:39 matanya joined #salt
08:53 LabMan joined #salt
09:04 lemao joined #salt
09:09 sebgoa joined #salt
09:24 oz_akan_ joined #salt
09:25 oz_akan_ joined #salt
10:02 derelm joined #salt
10:14 jhermann joined #salt
10:15 n00bz joined #salt
10:18 n00bz hi, do any of you use salt in production?
10:20 joehh n00bz: yes
10:23 n00bz could salt be used as a replacement for jenkins / rundeck for automated deployments and is anybody here doing so, would like to know the best way to use salt for this going forward
10:24 n00bz do you think halite will have granular acl controls like rundeck in thenear future?
10:26 oz_akan_ joined #salt
10:29 linuxnewbie joined #salt
10:41 jhermann joined #salt
10:56 tonthon joined #salt
11:08 lemao_ joined #salt
11:17 tulu joined #salt
11:27 oz_akan_ joined #salt
11:42 Sypher joined #salt
12:23 matanya joined #salt
12:27 oz_akan_ joined #salt
12:32 jjasinski__ joined #salt
12:56 mapu joined #salt
12:57 ipmb joined #salt
13:01 tulu joined #salt
13:12 diegows joined #salt
13:13 seanz joined #salt
13:14 Jahkeup joined #salt
13:24 jslatts joined #salt
13:28 oz_akan_ joined #salt
13:34 totte joined #salt
13:36 polaco_zZz joined #salt
13:43 totte joined #salt
13:50 jjasinski__ joined #salt
13:55 helderco joined #salt
14:01 jslatts joined #salt
14:25 liwen joined #salt
14:28 elfixit joined #salt
14:28 cachedout joined #salt
14:29 oz_akan_ joined #salt
14:36 mike251 joined #salt
14:38 * mike251 says hi to all salters
14:38 jumperswitch joined #salt
14:40 cachedout joined #salt
14:42 jumperswitch joined #salt
14:52 godog joined #salt
14:52 godog joined #salt
15:01 Jahkeup_ joined #salt
15:10 hjubal joined #salt
15:10 hjubal joined #salt
15:11 linuxnewbie joined #salt
15:11 linuxnewbie joined #salt
15:12 cachedout joined #salt
15:16 Jahkeup joined #salt
15:16 liwen joined #salt
15:16 mwillhite joined #salt
15:21 jetblack joined #salt
15:22 gamingrobot joined #salt
15:28 Jahkeup_ joined #salt
15:40 whitepaws joined #salt
15:44 Furao joined #salt
15:44 Furao left #salt
15:56 amahon joined #salt
16:06 mattyo joined #salt
16:11 gwar99991 joined #salt
16:16 crocante joined #salt
16:31 oz_akan_ joined #salt
16:33 prooty joined #salt
16:45 xinkeT joined #salt
16:54 steveoliver so salt minion don't get highstate automatically after their key is accepted?
16:54 steveoliver has to be called?
16:54 Jahkeup_ yep its a manual call :)
16:55 Jahkeup_ salt minion_name state.highstate
16:55 Jahkeup_ make sure your pillar/top.sls and salt/top.sls reflect what you want to be run
16:55 steveoliver does it make sense to use some other (reactor?) system to fire such salt commands after events such as key acceptance?
16:56 Jahkeup_ um I can't really say, I haven't played with the reactor much not at all really..
16:56 steveoliver ok, thx
16:56 * steveoliver gets back to docs on that then
16:56 Jahkeup_ heh best place to look!
16:58 helderco joined #salt
17:20 Jahkeup joined #salt
17:31 smccarthy joined #salt
17:31 oz_akan_ joined #salt
17:37 noob2 joined #salt
17:37 noob2 salt: when you call LocalClient.cmd_async and get back a job ID what do you do with it?  I don't see a way to query for the job status
17:40 Jahkeup noob2: you can use something like salt-run jobs.lookup_jid 20131103124032150663
17:41 Jahkeup to check the log of the run
17:41 noob2 ok so i could do another LocalClient.cmd and lookup the job id
17:42 Jahkeup can't say I've use LocalClient.cmd directly so I couldn't tell you :C
17:42 noob2 i'm using it a little bit.  it's pretty nice
17:42 Jahkeup noob2: looking at the docs that runs a salt \* func
17:43 noob2 right
17:43 Jahkeup so I don't think the lookup will work that way, but hey! who know? can always find out :)
17:43 noob2 i can't decide if if the localclient is right for this use case where i'm running a different command on each host
17:43 noob2 the cmd to gather up things on  my cluster is a no brainer for salt
17:43 Jahkeup yeah so what are you trying to do exactly?
17:44 noob2 trying to run a salt command on a bunch of different hosts to start docker containers
17:44 noob2 the docker module is still beta for salt
17:44 Jahkeup oh! hey metoo pretty soon ;)
17:44 Jahkeup unfortunately :/
17:44 noob2 oh yeah?
17:44 noob2 i'm thinking of open sourcing this project if you're interested
17:45 Jahkeup yep :) I'm pretty stoked build container right now but yeah that'd be awesome!
17:45 Jahkeup *building
17:45 noob2 nice :D
17:45 Jahkeup sigh tired
17:45 noob2 haha
17:45 Jahkeup back to your predicament thouhg
17:45 noob2 it uses etcd to get a list of hosts that support docker and then queries the cluster for the current load
17:45 noob2 sorts by load and then distributes how ever many containers you want amongst them
17:45 Jahkeup okay now that's pretty sweet.
17:45 noob2 the gathering load portion was easy
17:46 noob2 it would then save the results back to etcd so you could validate that the cluster is in the desired state
17:46 noob2 or have a command migrate containers if a host dies
17:47 noob2 i'm at the step of kicking off the docker run commands and each host is going to have a slightly different command
17:47 Jahkeup depending on ports and such right?
17:47 Jahkeup port mapping that is
17:47 noob2 right
17:47 mwillhite joined #salt
17:47 noob2 ports, drive mappings, hostnames, etc
17:48 Jahkeup then I think you're on the right path with LocalClient from what I'm reading
17:48 noob2 yeah LocalClient was the right thing to gather up load stats
17:48 noob2 i was hoping to have all the containers created at once
17:48 noob2 instead of doing one command and waiting
17:49 Jahkeup hmm you could run a threaded controller instead of depending on salt to do it
17:49 noob2 threaded controller?
17:50 Jahkeup well whatever you are using to run LocalClient
17:50 noob2 oh kick it off in threads
17:50 noob2 i see
17:50 Jahkeup yea :)
17:50 noob2 not bad :)
17:50 Jahkeup might be cumbersome as it grows though :/
17:50 noob2 then i could do a join on the thread list and wait for results
17:51 noob2 yeah
17:51 noob2 with 100 containers it might get messy :D
17:51 noob2 i think it'll be ok though
17:51 noob2 how often does one spin up 100 containers
17:51 Jahkeup hmm idk? unless of course you're dotCloud ;F
17:51 Jahkeup :D
17:51 noob2 true
17:52 noob2 that'd be nice
17:52 noob2 dotCloud's pricing is crazy high i thought when i saw their stuf
17:52 noob2 they've got the cheapest infra around
17:52 Jahkeup oh wait they're Docker, Inc. now xD
17:52 Jahkeup haven't really looked into them for IaaS/PaaS
17:52 Jahkeup or w.e they offer these days :)
17:53 Jahkeup I'm working on Openstack stuff for $dayjob
17:53 noob2 oh i didn't know they were docker inc now
17:53 noob2 oh cool
17:53 Jahkeup noob2: http://blog.docker.io/2013/10/dotcloud-is-becoming-docker-inc/
17:53 noob2 i believe docker containers are supported in open stack
17:53 Jahkeup few days ago ;D
17:53 Jahkeup yeah that's new in havana which I'm in the process of deploying
17:53 noob2 oh ok
17:53 noob2 i have great respect for you
17:53 Jahkeup moving to use containers heavily :)
17:54 noob2 i found openstack hard to deploy with all the moving parts
17:54 Jahkeup hey thank :>
17:54 Jahkeup yeah its a pain :/ but well worth it
17:54 noob2 that was 2012 though maybe it's better now
17:54 Jahkeup its gotten *much* better since Folsom
17:55 Jahkeup Gizzly was nice and now havana + ubuntu is a dream
17:55 noob2 oh that's good
17:55 noob2 i was hoping it would go that way
17:55 noob2 it'll enable more adoption
17:55 noob2 if my job was just to deploy openstack i could've done it.  but i had other admin jobs to do as well so it was too much
17:56 Jahkeup yeah definitely :) yeah I'm a student + sysadmin + sys engineer
17:56 Jahkeup fun times
17:56 Jahkeup I put time where I can, but salt has been awesome for everything.
17:56 Jahkeup use it for anything I can nowadays
17:56 noob2 yup
17:56 noob2 it's a great general purpose tool
17:57 Jahkeup and now with serf coming in the picture oh man I'm excited
17:57 noob2 serf?
17:57 mike251 serf?
17:57 Jahkeup yup :D
17:57 mike251 hey guys,.. i just joined the chat :)
17:57 Jahkeup not integrated with salt :P
17:57 noob2 ah
17:57 Jahkeup http://www.serfdom.io/
17:57 mike251 hat is serf?
17:57 Jahkeup I wish!
17:57 mike251 thanks
17:57 Jahkeup maybe I'll do that one of these days
17:57 noob2 sounds like etcd
17:58 Jahkeup can't think of a use though..
17:58 Jahkeup yeah!
17:58 Jahkeup kinda like etcd but a realtime system
17:58 noob2 etcd can be real time if you setup listeners
17:58 mike251 but isn't that what salt is already doing?
17:58 noob2 this seems to be already integrated
17:58 noob2 yeah i think with reactor you can get the same effect
17:59 mike251 could be
17:59 Jahkeup noob2: true!
17:59 matanya joined #salt
18:00 noob2 yeah i think people want to dump zookeeper
18:00 noob2 it's waay too heavy
18:00 Jahkeup hrm I shall have to investigate further its only an initial thought :)
18:00 Jahkeup I gotta run, I'll be around later!
18:00 noob2 later
18:04 djn joined #salt
18:05 smkelly So I'm doing the thing where I try Puppet, salt, and ansible. What is the pattern for making a salt module that would distribute all my ssh host keys to each others' known hosts file
18:06 smkelly mine.send ssh.host_keys didn't work
18:06 krichardson joined #salt
18:07 noob2 smkelly: not sure what you mean
18:08 smkelly I want all the dsa, rsa, ecdsa, etc host public keys (/etc/ssh/*.pub) to go into /etc/ssh/known_hosts on every other server
18:08 smkelly so all my hosts know each other's ssh host keys
18:08 noob2 ok
18:09 noob2 setup a state file to manage the key files
18:09 noob2 in the top file do a '*' match and run the state file
18:09 smkelly yeah, was going to make a ssh.hostkeys state
18:09 noob2 ok that sounds good
18:09 noob2 you can have salt serve the files from the salt:// directory
18:09 noob2 like salt://etc/ssh/host_1.pub
18:10 noob2 you'll probably want to do a jinja for loop to fill in all your public key names
18:10 smkelly I'd like to automate the process where the key from each host makes it back up into the master
18:11 noob2 you might want to take a look at the reactor system
18:12 UtahDave joined #salt
18:12 noob2 if you want you can write your module with straight python and do a directory list on the pub directory
18:12 noob2 i mean your state file not module*
18:14 whitepaws joined #salt
18:15 smkelly any idea why this returns False? salt '*' mine.send ssh.host_keys /etc/ssh/
18:15 smkelly salt '*' ssh.host_keys /et/cssh returns stuff
18:16 noob2 i've not used min.send before
18:18 djn joined #salt
18:19 VertigoRay joined #salt
18:20 whitepaws i'd like to be able to send minions customized files, where some file contents are based on membership in nodegroups. is this supported?
18:24 keen joined #salt
18:25 oz_akan_ joined #salt
18:28 terminalmage joined #salt
18:31 mike251 joined #salt
18:36 jtrucks joined #salt
18:38 sebastienl joined #salt
18:42 f47h3r joined #salt
18:44 jtrucks joined #salt
18:46 sebastienl joined #salt
18:47 sebastienl left #salt
18:51 DanGarthwaite joined #salt
18:52 DanGarthwaite I can finally automate the ancient Windows 2000 server.  Thanks for the 0.17.1 bugfix guys.
18:52 jtrucks joined #salt
18:52 DanGarthwaite ( over salt-ssh )
18:53 mike251 :) looking into that myself as well
18:54 mwmnj joined #salt
18:54 DanGarthwaite I needed to remote desktop into the server and /usr/bin/rebaseall (via a dash shell) to get t all working.  Oh, and had to duplicate the Administrator line in /etc/passwd to rename it 'root'.
18:55 redondos joined #salt
18:55 redondos joined #salt
18:56 honestly whiteinge: fork me into salt-formulas! https://github.com/duk3luk3/template-formula https://github.com/duk3luk3/dirty-user-sync-formula https://github.com/duk3luk3/openvpn-client-formula
18:59 linuxnewbie joined #salt
18:59 linuxnewbie joined #salt
19:00 karlgrz joined #salt
19:01 karlgrz I'm having a problem with rvm and running rake commands with a particular gemset using salt, any familiar with that?
19:04 cnelsonsic joined #salt
19:05 [1]VertigoRay joined #salt
19:07 Katafalkas joined #salt
19:08 jjasinski__ joined #salt
19:11 diegows joined #salt
19:13 eintr joined #salt
19:16 jdenning joined #salt
19:17 staticshock joined #salt
19:30 Vivek joined #salt
19:35 mwmnj joined #salt
19:38 Katafalkas joined #salt
19:43 helderco Doesn't an include run the contents of a state file?
19:45 ckao joined #salt
19:52 helderco I don't get why mine don't same to take effect
19:52 helderco *don't seam
19:56 karlgrz helderco, no it doesn't, it just makes it available to the state that includes it
19:56 karlgrz such as for a require or watch
20:01 smccarthy joined #salt
20:02 matanya joined #salt
20:03 helderco karlgrz: I see... was doing it wrong then
20:04 karlgrz Why do gems not install to the gemset I am specifying in a state?
20:05 karlgrz I'm using ruby: 1.9.3@mygemset in the gem.installed state and they still end up in the global set
20:05 helderco If I have a vim/top.sls, and a requirements/essential.sls, how do I run vim from essential?
20:06 mwmnj joined #salt
20:06 mapu joined #salt
20:08 matanya joined #salt
20:09 karlgrz helderco, you'd have to add the name of a step in your vim/top.sls state to a require: <namehere> directive in one of your essential states
20:10 helderco There's not actually a dependency, it was just for organizational purposes
20:10 helderco I would like for vim to be installed from essential but it's in it's own folder
20:14 smkelly I'm still struggling to figure out the proper design pattern here. Am I missing something obvious? I just want to take a data point from all minions and make a list of them all in another file on each minion. ssh/ssh_key.pub -> ssh/known_hosts
20:18 giantlock joined #salt
20:30 karlgrz Ok, either rvm is completely f***ing broken in salt or I am doing something really wrong.
20:32 jslatts joined #salt
20:33 rgarcia_ joined #salt
20:39 mackstick smkelly: use the mine functionality to store the ssh keys and then write an iterator over the data?
20:39 pviktori_ joined #salt
20:39 ajw0100 joined #salt
20:39 smkelly I tried that. mine.send ssh.host_keys /etc/ssh is returning False
20:39 smkelly also that will send the privkeys too
20:48 mackstick using "ssh.recv_known_host 'localhost'" would probably get around the private key issue
20:54 smkelly well I was able to mine.send that, but now mine.get doesn't want to play ball
20:55 smkelly there we go
20:55 smkelly thanks!
20:56 smkelly One problem with mine is that it doesn't seem to store the argument. so I couldn't store a ssh.recv_known_host for two different hosts
20:57 cewood joined #salt
21:02 mackstick mine items are stored per host
21:11 mackstick http://pastebin.com/6BsFK8aB - this is roughly what I was thinking about
21:11 cachedout joined #salt
21:12 mackstick although you'll have to fixup the jinja code a bit to sort out the spacing
21:14 smkelly yeah that makes sense, though I just noticed that /etc/ssh/ssh_known_hosts appears to be a diff format according to sshd(8)
21:14 smkelly Each line in these files contains the following fields: markers
21:14 smkelly (optional), hostnames, bits, exponent, modulus, comment.  The fields are
21:14 smkelly separated by spaces.
21:15 pentabular joined #salt
21:15 smkelly hm maybe not
21:20 mackstick seems to work fine with just the "hostname type key" with OpenSSH 5.3 and 5.9
21:24 druonysus joined #salt
21:24 druonysus joined #salt
21:28 druonysus joined #salt
21:36 redondos joined #salt
21:38 scott_w joined #salt
22:01 druonysus joined #salt
22:01 foxx joined #salt
22:01 honestly oh this is fun
22:02 honestly when I sync a private key to a minion it shows the key in the output
22:02 honestly lol
22:03 druonysuse joined #salt
22:03 scott_w joined #salt
22:05 imaginarysteve joined #salt
22:07 druonysuse joined #salt
22:07 druonysuse joined #salt
22:10 ajw0100 joined #salt
22:15 redondos joined #salt
22:29 scott_w joined #salt
22:30 druonysus joined #salt
22:33 mapu joined #salt
22:35 forrest joined #salt
22:47 ajw0100 joined #salt
22:49 mapu left #salt
22:49 fllr joined #salt
22:50 fllr Hey guys. I'm using salty vagrant to configure my local dev. I now wanna deploy my stuff. I got a salt master installed in one of my machines, and I created a hosts file pointing to my minions to be. Now, what is the next step?
22:51 fllr I'm getting a little bit confused about minion id generation. Do I have to copy my hosts file around manually?
22:55 mike251 your minions should know who the master is
22:55 jdenning joined #salt
22:55 mike251 what i do ... on the minions... /etc/hosts file have the 192.168.xx.yy salt
22:56 mike251 that points to the salt(master)
22:56 mike251 minions like to call the master .. salt
22:56 mike251 fllr: am i making any sense?
22:56 fllr so far so good...
22:56 mike251 did you install the app on the minion?
22:56 mike251 salt-minion?
22:56 mike251 is it runnning?
22:57 fllr I installed it...
22:57 fllr I don't know if it's running
22:57 mike251 i haven't used salt ... in 2 months so i kinda forgot about it.
22:57 mike251 run : ps -ef |grep salt
22:57 fllr looks like it is: /usr/bin/python /usr/bin/salt-minion
22:57 forrest depending on how you installed it the minion service doesn't automatically start, don't forget you need to accept the key on the master.
22:58 mike251 anyway ... the next step is on the master.... to check if the minion wants to connect to the master...and you need to accept that key from the master
22:58 fllr But how does the master know which minion is which?
22:58 forrest it's based on the key data
22:58 forrest it knows that key x is associated with server x
22:58 mike251 each minion has it's own unique key
22:58 forrest because each key is unique
22:58 mike251 nice to see you again forrest ... i was away for almost 2 months
22:59 * mike251 is back
22:59 forrest Hah, work pulling you away or vacation? :P
22:59 fllr Ok, but what I mean is, how does it know x is my web server, and y is my db server?
22:59 forrest it doesn't fllr
22:59 forrest YOU tell it that
22:59 mike251 well... forrest - i just moved to Germany... so i have changed my entire life
22:59 fllr How do I do that?
22:59 forrest by saying 'I want database states applied to servers with this specific name'
22:59 honestly mike251: welcome!
22:59 forrest mike251, oh nice, I was looking at jobs over there a while back
23:00 forrest fllr http://docs.saltstack.com/ref/states/top.html
23:00 mike251 i am in Frankfurt.
23:00 forrest the top file
23:00 honestly germany > all
23:00 honestly oh wait
23:00 mike251 honestly: ?
23:00 honestly nevermind, just a horrible, horrible joke
23:00 mike251 honestly: thanks
23:00 forrest have you gone through the tutorial fllr?
23:00 forrest it's quite comprehensive
23:00 forrest http://docs.saltstack.com/topics/tutorials/walkthrough.html
23:00 mike251 honestly:  i am up for any joke ... i am romanian :)
23:01 mike251 fllr: forrest is wright ... follow and read the docs.. i have been reading them for 1 week before i even started installing salt
23:01 forrest some of the Germans in here were telling me that Germany actually DOES have hot soft pretzels, not just the crappy old ones. You need to find a good local bakery mike251
23:01 forrest I'm not saying we can't help fllr, but the docs are very thorough and make it quite easy to understand as they have examples to walk you through each part.
23:01 mike251 forrest:  :) not a lot of time to do that, but will keep that in mind
23:02 forrest It's a beautiful country, I didn't get to Frankfurt when I was there, I'd like to go visit there sometime. Someone who is usually in here is from Frankfurt, I don't remember who though :\
23:03 mike251 forrest: .... well i am here in Frankfurt... since last week... not sure yet if i will like it :D
23:03 forrest haha
23:03 mike251 still need 1-2 months to .. figure it out :D
23:03 forrest are you just working a contract gig?
23:03 mike251 the BEST part forrest.. is that the job here... part of it is SALT
23:03 forrest oh nice
23:03 mike251 forrest: is a steady job.
23:03 ipmb joined #salt
23:03 forrest I actually have seen a few job postings for places using salt
23:04 forrest made me pretty happy
23:04 mike251 so i will be asking a lot of stupid questions these days :)
23:04 forrest lol
23:04 mike251 forrest:  is a nice tool :) ... my task is to prove that salt is better than ansible :D
23:04 forrest LOL
23:04 forrest 'Do you only want remote execution via SSH? No? Ok Salt is better.'
23:04 mike251 :))
23:05 mike251 i wanted to say the same thing... but i will prove it .. in a demo environment.
23:05 forrest yea should be easy
23:05 mike251 should be :) the tasks are pretty easy just file management... + maybe some jinja to make it look nice and more professional
23:05 forrest Well, since you've been gone a month
23:05 forrest you need to check out jinja maps
23:06 forrest https://github.com/gravyboat/fail2ban-formula
23:06 mike251 what is that?  :)
23:06 forrest so it's basically a way to store OS based data, to reduce the complexity of your states
23:06 forrest so you store that in the map.jinja file: https://github.com/gravyboat/fail2ban-formula/blob/master/fail2ban/map.jinja
23:06 mike251 os data is stored in grains
23:06 forrest right
23:06 forrest but what this does, is based on the OS data, sets variables in the map
23:07 forrest so you don't have to do it in every state
23:07 forrest then your defaults live in the pillar https://github.com/gravyboat/fail2ban-formula/blob/master/pillar.example
23:07 mike251 ah AWESOME!!!
23:07 mike251 what the f**k ... is incredible
23:07 forrest and you can do something like this https://github.com/gravyboat/fail2ban-formula/blob/master/fail2ban/config.sls
23:07 forrest it's so much cleaner than with the constant grain lookup, whiteinge came up with it a month or two ago
23:07 mike251 pff ... awesome... my hat is off... AGAIN
23:07 mike251 incredible
23:08 mike251 thanks AGAIN forrest.. you are a GREAT help as always
23:08 forrest Yea, it's really nice. Here's a full blown project using it: https://github.com/terminalmage/djangocon2013-sls
23:08 forrest I also use it for my static blog, it's awesome
23:08 forrest yea np! It's too awesome not to share
23:08 mike251 indeed!
23:08 forrest When I saw it the first time I was so happy, it's like puppet resources, but better.
23:09 Gifflen joined #salt
23:09 forrest err not resources, external node lookup?
23:09 Gifflen_ joined #salt
23:09 forrest I can't remember, the equivalent of that in puppet
23:09 mike251 i am still looking into the exmaple you gave me
23:09 mike251 to understand it
23:10 forrest cool, let me know if you need help, the formula is a bit easier to understand than that big project example
23:10 forrest but it's implemented the same way in both.
23:10 mike251 set map .. sets the map variable with pkg, service etc?
23:10 mike251 and it merges the salt.pillar?
23:10 mike251 this is what is confusing me
23:11 forrest so the pillar is just the defaults
23:11 mike251 yeah i see that
23:11 __number5__ forrest: is there a standard way to include formula in your own sls tree?
23:11 mike251 pillar is clean
23:12 forrest __number5__, what do you mean? You should be able to incorporate the idea of a formula into anything that is self contained.
23:13 forrest mike251, yea so the map is basically used JUST for our unique items
23:13 forrest so for example on https://github.com/gravyboat/fail2ban-formula/blob/master/fail2ban/config.sls#L13
23:13 mike251 yeah
23:14 forrest that's using the data from https://github.com/gravyboat/fail2ban-formula/blob/master/fail2ban/map.jinja#L5#
23:14 forrest or from line 11
23:14 forrest depending on the OS
23:14 mike251 ah right
23:14 mike251 i didn't see that line ... L#13
23:14 forrest ahh ok
23:15 forrest the usage in line 13 really helps clear it up
23:15 mike251 it would have been better if the .... https://github.com/gravyboat/fail2ban-formula/blob/master/fail2ban/config.sls#L2  was in a map too
23:15 __number5__ I mean if I want to use a formula on https://github.com/saltstack-formulas, do I need to include it as a gitfs?
23:15 mike251 forrest: yeah.. i missed line 13 :D
23:16 forrest mike251, yea that is probably a good idea if that is in the map as well, not sure why I didn't do that, I'll have to update it and test.
23:16 forrest I think I realized afterwards that debian and redhat had different confs and just slapped it in
23:16 forrest but it also kind of works as a good example of 'here is how I use everything!'
23:16 mike251 one more Q: ... merge=salt['pillar.get']('fail2ban:lookup')) %}  .. what does this do?
23:16 mike251 yeah is a GREAT example!
23:17 forrest __number5__, oh yea, you could include it as a gitfs, I believe there are actually some docs that talk about doing that...
23:17 mike251 the merge thing is confusing me now :)
23:17 __number5__ forrest: cool, will dig into docs :)
23:18 forrest mike251, the point of the merge is basically to set the lookup data I think? I'd have to look at the docs, I haven't touched this in a while
23:19 mike251 i think some things are redundant there.. in the pillar file
23:19 mike251 https://github.com/gravyboat/fail2ban-formula/blob/master/pillar.example
23:19 forrest They may be, this was pretty much copying what was from that example terminalmage had right when this idea was brand new
23:19 mike251 you have config and jail... but you already have some config and jail in the map :)
23:20 mike251 anyway - i can sort it out :) i have to re-read the docs anyway these days
23:20 forrest ahh yea, so the point of the config and jail, is in the event the OS isn't one of those two
23:20 mike251 aaaaah ... ok
23:20 forrest so it says 'hey in the event that it is not this type of machine, use these by default'
23:20 forrest so it doesn't crash out
23:25 mike251 forrest:  is anything in the docs related to maps?
23:25 mike251 I love reading the docs :D
23:25 forrest Yes, there is actually an entire doc page on this now: http://docs.saltstack.com/topics/conventions/formulas.html
23:25 forrest merge isn't explained in there though, so I need to remember exactly what it does and update the docs.
23:25 mike251 would be great if you could...
23:26 forrest yea I'll email myself
23:26 mike251 the merge in your example... correct me if i am wrong...
23:26 mike251 overwrites the pkg and the service in the pillar and adds the config and jail ?
23:26 mike251 into the fail2ban:lookup area?
23:27 helderco how do you do mulitiple state decs in the same file? E.g. I want to symlink and manage (set mode) a file.
23:28 forrest mike251, from what I remember yes
23:28 mike251 good :) i am getting there :)
23:28 forrest :P
23:28 forrest I'm creating an issue now, and also emailing myself to hopefully update these this week if I have time.
23:28 mike251 i can test though myself... but i have no salt environment yet
23:28 mike251 IS a very good and easy example..
23:29 forrest yea, a LOT of the formulas over here: https://github.com/saltstack-formulas
23:29 forrest are now formatted like that
23:29 mike251 awesome
23:29 mike251 i am glad.. i am 2 months LATE :D
23:29 honestly forrest: are you a contributor in saltstack-formulas?
23:30 mike251 so i don't have to redo
23:30 forrest helderco, http://docs.saltstack.com/ref/states/all/salt.states.file.html#operations-on-regular-files-special-files-directories-and-symlinks
23:30 forrest honestly, no, whiteinge is planning to add me at some point I believe.
23:30 honestly ok
23:30 forrest why?
23:30 mike251 forrest: is a nice person that is just willing to share
23:30 honestly I have three formulas ready to be added
23:30 forrest if I was building formulas all day I'd hope I had a fuller understanding :P
23:30 forrest honestly, ahh yea, talk to whiteinge when he's online tomorrow, he should be able to add you to the org.
23:31 nahamu anyone around who could cherry pick https://github.com/saltstack/salt/commit/5b4055db403ea5719991928d209f7ab67741768c onto 0.17 branch?
23:31 honestly forrest: pff, do I look like I want to do all the work? I just want him to fork the formulas into the repo
23:31 honestly :P
23:31 forrest lol
23:32 forrest nahamu, I haven't seen any of the guys around yet today, did you just put in that merge request?
23:32 forrest mike251, https://github.com/saltstack/salt/issues/8239
23:32 helderco forrest: so I can't... have to create separate declarations
23:32 forrest hopefully' I'll update it this week.
23:33 forrest helderco, is it not the same file?
23:33 mike251 forrest:  you are the man :)
23:33 forrest I'm sorry, I thought you were trying to modify the perms on a symlink
23:33 forrest mike251, Making those big open source dollars! :P
23:33 helderco I want to call more then one state in the same file
23:33 forrest what do you mean by more than one state
23:33 forrest more than one .sls file?
23:33 forrest as a requires?
23:34 helderco like create a symlink and right after manage its permissions
23:35 forrest just use file.symlink. http://docs.saltstack.com/ref/states/all/salt.states.file.html#salt.states.file.symlink
23:35 forrest create the symlink, and set the user/group/mode all in one thing
23:36 helderco Oh, below the description there's only name, target, force and makedirs
23:36 helderco Didn't notice in the function declaration there's more
23:36 scott_w joined #salt
23:36 forrest yea usually that's because when it's something that 'everything' has from something like file for example, it doesn't get included a ton of times
23:36 nahamu forrest: I haven't put in a merge request. I probably will tomorrow.
23:36 forrest nahamu, ahh ok
23:37 helderco forrest: ok, thanks
23:37 forrest and you're talking about develop? Or the old 0.17 branch?
23:37 nahamu I'm talking about something in develop getting into 0.17
23:37 forrest helderco, https://gist.github.com/gravyboat/7296063
23:38 forrest nahamu, but you mean the old 0.17 branch?
23:38 forrest as in the actual 0.17 tag
23:40 Gareth so the cmd module has support for runas...does anyone know if any other module has something similar?  Specifically allows a bit of python code to run as another user.
23:40 fllr joined #salt
23:40 forrest virtualenv does Gareth
23:41 mike251 forrest:  the mysql-formula made me understand the merge thing.
23:41 forrest ok, does it work as expected with the overwrite?
23:41 mike251 is a bit cleaner (no offense pleasse)
23:41 forrest lol no offense taken :)
23:41 * Gareth looks
23:42 mike251 yeah forrest... it actually uses the data in the map ... and overrides the pillar lookup area
23:42 forrest awesome
23:42 forrest I'm looking at it as well right now, makes sense.
23:42 mike251 the lookup area in the pillar... is just to have an AREA where you know you have possible values that are different depending on the os.. and you know  to look for them in the mnap
23:42 Gareth forrest: looks like virtualenv uses the cmd module :)
23:43 forrest Gareth, oh does it? Sorry
23:43 Gareth no worries.
23:43 forrest mike251, ahh right, that makes sense.
23:43 nahamu forrest: I mean the 0.17 branch, not any of the tags. I'm assuming that 0.17.2 will get cut from the 0.17 branch...
23:43 mike251 forrest:  it makes sense for me as well :) it's good to be back in the salt area
23:43 * mike251 .... goes to bed.. is close to 1 am ...
23:44 mike251 forrest:  again... tons of thanks for helping around!
23:44 mike251 forrest:  if you are still looking for a job in Frankfurt.. let me know.. i might help (the company where i work is looking)
23:45 forrest mike251, Hah, it would be a little bit more expensive to transplant from the states I think!
23:45 forrest mike251, but thanks, I will keep it in mind.
23:45 mike251 my boss is from US
23:45 forrest oh ok
23:45 mike251 is a very international team
23:45 forrest that's cool
23:45 mike251 he moved from the states here...
23:50 elfixit joined #salt
23:50 mike251 left #salt
23:59 v0id_ joined #salt

| Channels | #salt index | Today | | Search | Google Search | Plain-Text | summary