*** cliles has quit IRC | 00:15 | |
*** cliles has joined #ara | 00:38 | |
*** cuongnv has joined #ara | 01:24 | |
*** cuongnv has left #ara | 08:52 | |
*** karimb has joined #ara | 09:05 | |
*** permalac has quit IRC | 09:26 | |
*** permalac has joined #ara | 09:33 | |
*** openstackgerrit has quit IRC | 10:18 | |
*** karimb has quit IRC | 10:49 | |
*** karimb has joined #ara | 11:15 | |
*** karimb has quit IRC | 11:26 | |
*** karimb has joined #ara | 11:29 | |
*** Haros has joined #ara | 11:32 | |
Haros | hello | 11:33 |
---|---|---|
Haros | is anyone online? I have a quick question regarding ara and wsgi =) | 11:34 |
dmsimard | Haros: hey, go ahead | 11:49 |
Haros | hey dmsimard | 11:52 |
Haros | so I used to run ara with wsgi in a virtualenv like this: | 11:52 |
Haros | activate_this = '/home/tlpmgm/virtualenv/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) | 11:53 |
Haros | from ara import app as application | 11:53 |
Haros | but now it seems with the latest update (0.12.3) that it doesnt work anymore | 11:53 |
Haros | i get an ImportError: cannot import name app | 11:54 |
Haros | probabbly something is changed | 11:54 |
Haros | I have seen the new documentation about configuring ara on apache | 11:54 |
Haros | but I was wondering if my "old" method can still work. | 11:55 |
dmsimard | Hm, I haven't run ara from within a virtualenv, it would be great to get it working so we can document it | 11:55 |
*** karimb has quit IRC | 11:55 | |
Haros | with the previous version and my config everything was fine | 11:55 |
dmsimard | Haros: I believe the difference is that now you need to call create_app explicitely while before that may have not been necessary | 11:56 |
dmsimard | Can you look at https://github.com/openstack/ara/blob/master/ara/wsgi.py and compare ? | 11:56 |
*** karimb has joined #ara | 11:56 | |
dmsimard | Haros: ^ let me know if you're able to get it working | 12:17 |
Haros | yep. I am on it now. It seems more TRICKY than I thought :P | 12:18 |
Haros | ops caps sorry | 12:18 |
*** karimb has quit IRC | 12:24 | |
Haros | oh cool made it. just had to improt the right modules / calls | 12:29 |
Haros | import ara.webappapplication = ara.webapp.create_app() | 12:29 |
Haros | maybe I can send you in your e-mail or somethign a more detailed view of how I run it in a virtualenv | 12:30 |
Haros | in case you need it for documentation | 12:30 |
dmsimard | Haros: you could even submit a documentation update if you wanted to! :D | 12:31 |
*** karimb has joined #ara | 12:34 | |
*** karimb has quit IRC | 12:43 | |
*** karimb has joined #ara | 12:46 | |
*** openstackgerrit has joined #ara | 13:03 | |
openstackgerrit | Merged openstack/ansible-role-ara master: add apache+mod_wsgi support to ara https://review.openstack.org/435576 | 13:03 |
*** JakeDEvans has joined #ara | 13:15 | |
dmsimard | leifmadsen: o/ | 13:17 |
leifmadsen | dmsimard: ohai! | 13:17 |
dmsimard | I got JakeDEvans in here for this docker thing | 13:17 |
leifmadsen | JakeDEvans: ohai! | 13:18 |
dmsimard | there's four people working on docker things | 13:18 |
leifmadsen | heard you've been doing some good work on a Dockerfile | 13:18 |
JakeDEvans | heya | 13:18 |
leifmadsen | yea, let's coordinate :) | 13:18 |
dmsimard | so I figure I'd try to get people working together to do something great | 13:18 |
JakeDEvans | I have this... https://github.com/JakeDEvans/docker-ara | 13:18 |
leifmadsen | +1 | 13:18 |
JakeDEvans | you can decide if it's good or not | 13:18 |
JakeDEvans | first attempt at docker, be kind | 13:18 |
leifmadsen | JakeDEvans: so I have a small change to that which might be useful | 13:18 |
leifmadsen | all good, it looks sane enough :) | 13:18 |
leifmadsen | let me pastebin mine | 13:18 |
dmsimard | leifmadsen: can you poke doug to come in here too ? | 13:18 |
leifmadsen | you did show me yours... | 13:19 |
leifmadsen | dmsimard: yea! | 13:19 |
*** Ravi_ has joined #ara | 13:19 | |
leifmadsen | /invite dougbtv | 13:19 |
dmsimard | fail | 13:19 |
leifmadsen | oh maybe he's not in freenode, let me check | 13:19 |
dmsimard | leifmadsen: you prepended a space yo | 13:19 |
leifmadsen | yea, because otherwise it would have run :) | 13:19 |
leifmadsen | I'm not a channel o[ | 13:20 |
leifmadsen | op | 13:20 |
leifmadsen | so it won't work for me :) | 13:20 |
*** dougbtv has joined #ara | 13:20 | |
dougbtv | mornin'! | 13:20 |
dmsimard | dougbtv: o/ | 13:20 |
leifmadsen | hi! | 13:20 |
dmsimard | hey, so, I have an opinion | 13:20 |
dmsimard | is this ansible-container thing sort of ready for production yet ? I used it a while back but it wasn't really mature yet. | 13:20 |
leifmadsen | dmsimard: good question! I was looking at using it for TOAD maybe | 13:21 |
dougbtv | just talking about it yesterday :) haha | 13:21 |
dmsimard | it allows to build container images and deploy them with the same usual playbook and roles | 13:21 |
leifmadsen | JakeDEvans: https://paste.fedoraproject.org/paste/EAT5bNhXLT3QAahObNrqXV5M1UNdIGYhyRLivL9gydE= | 13:21 |
dougbtv | I'm not sure about maturity, though | 13:21 |
leifmadsen | same | 13:21 |
dmsimard | we have this ansible role for ara that's not quite ready for prime time (yet) but it's getting there | 13:21 |
leifmadsen | for our usecase here, I can't imagine it's so complicated that it won't work | 13:21 |
dmsimard | the thing that's great about ansible-container | 13:21 |
dmsimard | is that it doesn't require ansible o_O | 13:21 |
leifmadsen | in the container itself right? | 13:22 |
dmsimard | it builds a container with ansible in it and goes from there | 13:22 |
leifmadsen | and I assume it doesn't use ssh | 13:22 |
dmsimard | no, docker socket iirc | 13:22 |
leifmadsen | right right, that's good | 13:22 |
leifmadsen | that's our problem with TOAD right now, in that we have to enable ssh in the container | 13:22 |
leifmadsen | (not right) | 13:22 |
JakeDEvans | @leifmadsen just use that instead and push? | 13:22 |
leifmadsen | JakeDEvans: I do have a review open, but I have to update it | 13:23 |
dmsimard | leifmadsen: well, I mean, ansible-container bootstraps itself with ansible in a container it builds | 13:23 |
dmsimard | leifmadsen: after that it's free for all | 13:23 |
leifmadsen | because I was trying something else initially, where I wanted to run ARA in one container, and then execute from another container | 13:23 |
dmsimard | it can use ssh or whatever | 13:23 |
dmsimard | it just runs ansible from inside a container | 13:23 |
dmsimard | regular playbook and all | 13:23 |
leifmadsen | does it leave any remnants of ansible in the container post build? | 13:24 |
JakeDEvans | I would run ansible from a container but I need my ssh-key + kerberos tokens to pass though | 13:24 |
dmsimard | leifmadsen: let me make a drawing or something | 13:24 |
leifmadsen | ok! :) | 13:24 |
dmsimard | leifmadsen: ok I suck at drawing | 13:27 |
JakeDEvans | leifmadsen: do you know which starts first, entrypoint or cmd in dockerfile? | 13:27 |
dmsimard | let me type instead | 13:27 |
dougbtv | JakeDEvans, entrypoint iirc | 13:27 |
dougbtv | (you can parameterize your entry point with CMD) | 13:27 |
dmsimard | leifmadsen: so you do "pip install ansible-container", this installs ansible-container (this does not install ansible) | 13:27 |
JakeDEvans | leifmadsen: See I need to use that wait script if I'm using a mysql database, the app fails if it can't open that socket at boot | 13:28 |
dmsimard | leifmadsen: you then do ansible-container init which will bootstrap the directory tree, create sample yaml files (say, docker-compose.yml/playbook.yml) | 13:28 |
dmsimard | leifmadsen: and then you put your things, playbooks, roles, etc, just like a regular ansible thing | 13:28 |
dmsimard | leifmadsen: and then you run ansible-container build which will create a "special" container where it will install ansible inside and run ansible from there as if it was your laptop, basically | 13:29 |
dmsimard | and from the different ansible-container/compose.yml files, it defines what container images it will create and orchestrate | 13:29 |
dmsimard | you can only have it build the images but you can also deploy them | 13:30 |
dmsimard | leifmadsen: maybe this will help, it was a reproducer for a bug but to give you an idea https://github.com/dmsimard/ansible-service-issue | 13:30 |
dmsimard | https://github.com/dmsimard/ansible-service-issue/blob/master/ansible/main.yml is the playbook | 13:30 |
dmsimard | https://github.com/dmsimard/ansible-service-issue/blob/master/ansible/container.yml is the docker-compose thing | 13:31 |
dmsimard | that's it | 13:31 |
dmsimard | no need for docker files and whatnot | 13:31 |
dmsimard | am I making sense or did I lose everyone ? :p | 13:35 |
JakeDEvans | you lost me but that's irrelevent | 13:35 |
dougbtv | now I'm itching to use it | 13:36 |
dougbtv | I actually like Dockerfiles | 13:36 |
dmsimard | dougbtv: s/like/hate/ ? | 13:36 |
dougbtv | but in the context of a larger ansible project, ansible-container makes sense | 13:36 |
dougbtv | lolz | 13:36 |
dmsimard | dougbtv: so what I hate about Dockerfile is that it's just bash | 13:37 |
dmsimard | basically | 13:37 |
dmsimard | So you end up having to do a lot of ugly bash to do things | 13:37 |
JakeDEvans | like pulling scripts and running them... | 13:38 |
dmsimard | that you get for free in ansible -- i.e, distribution/OS dependant logic.. or dynamic variables, or whatever | 13:38 |
JakeDEvans | the constant need to 'fix' race conditions | 13:38 |
dougbtv | I know whatchya mean, but it's nice to be like "here's my image, here's the dockerfile that created it" the ansible abstracts it | 13:38 |
dougbtv | which ansible is nicer to use than say.... a million bash scripts | 13:38 |
dmsimard | dougbtv: sure | 13:38 |
dougbtv | so depending on the context, I think both have their place | 13:39 |
dmsimard | dougbtv: I mean you've seen kolla, right ? That's not just one Dockerfile :P | 13:39 |
dougbtv | rofl | 13:39 |
dougbtv | yeah, kolla is........ a piece of work | 13:39 |
* dougbtv understates heavily | 13:39 | |
dougbtv | so yeah, flip side of the coin is -- sometimes as a consumer of an image, who cares how it was created | 13:40 |
dougbtv | ...assuming you can trust it | 13:40 |
dmsimard | you mean docker is not secure by default ? | 13:40 |
dmsimard | what is this nonsense | 13:40 |
dougbtv | XD | 13:40 |
leifmadsen | JakeDEvans: I think the "right" way is to use docker compose and use depends_on along with a wait in the compose file to let mysql start first | 13:44 |
leifmadsen | sorry, I was gone, so now I'm reading scrollback | 13:44 |
JakeDEvans | lol no problem, working on adding 2000 lines of inventory to my ansible.... | 13:45 |
leifmadsen | sounds like someone needs a dynamic inventory ;) | 13:45 |
JakeDEvans | waiting on devs... | 13:45 |
JakeDEvans | you thought waiting on OP was bad | 13:45 |
leifmadsen | always. waiting. on. devs. | 13:45 |
leifmadsen | like i mean yesterday, I had to wait a whole 10 mins for dmsimard to fix something for me | 13:46 |
JakeDEvans | lol | 13:46 |
leifmadsen | the worst! | 13:46 |
JakeDEvans | It's been 4 months | 13:46 |
dmsimard | ten minutes | 13:46 |
dmsimard | damn | 13:46 |
JakeDEvans | ops must go on | 13:46 |
leifmadsen | dmsimard: you must really like me | 13:46 |
dmsimard | sorry | 13:46 |
dmsimard | leifmadsen: oh yeah btw I submitted something to clean up that config mess | 13:46 |
JakeDEvans | so that was the source of my question, do I just RUN the wait in compose or add a CMD line? | 13:47 |
dmsimard | https://review.openstack.org/#/c/445518/ | 13:47 |
dmsimard | leifmadsen: tested it myself from 2.1 through 2.3, lgtm | 13:47 |
JakeDEvans | or dmsimard could just allow that mysql socket to retry | 13:47 |
JakeDEvans | I mean, if wordpress can do it... | 13:47 |
dmsimard | JakeDEvans: you mean ara gives up if mysql isn't available ? | 13:48 |
JakeDEvans | correct | 13:48 |
JakeDEvans | just dies | 13:48 |
JakeDEvans | specify a VAR for the mysql database, and it's not there, socket fails, app dies | 13:48 |
dmsimard | JakeDEvans: yeah that should be improved, I haven't yet used ara extensively with mysql myself, I have a use case for it but I need to get going | 13:48 |
dmsimard | JakeDEvans: there's probably something built in in sqlalchemy to do that | 13:48 |
JakeDEvans | I have a dockerfile you can test with :) | 13:49 |
leifmadsen | dmsimard: merge away! :) | 13:49 |
JakeDEvans | yeah if you fix that we can just use entrypoint and drop a ton of hack/patch | 13:49 |
leifmadsen | so personally, I don't think you should build in ANY wait logic to the ARA container | 13:49 |
leifmadsen | the container needs to be dynamic, and the orchestration engine (whatever that is) should provide the spin up / control / orchestration for you | 13:50 |
leifmadsen | if you need to add it to the container, I consider that "doing it wrong" | 13:50 |
dmsimard | so, hang on just a sec | 13:50 |
dmsimard | how many containers are we talking about here | 13:50 |
JakeDEvans | leifmadsen: I literally had to install IIS SMTP on a box cause the dev expected a socket for smtp to ALWAYS be available and his api app was crashing his app | 13:51 |
dmsimard | i.e, 3 ? ara+ansible+callback, mysql, ara+webapp ? | 13:51 |
dougbtv | docker-compose sometimes isn't enough, like say.... on a first spin up of mysql, it's gonna take some time | 13:51 |
dougbtv | and another container might come up, try to connect, fail, and... wave goodbye | 13:51 |
JakeDEvans | dougbtv: did you look at the git repo I posted, it has a wait in the dockerfile for compose | 13:51 |
leifmadsen | dougbtv: I feel like I saw yesterday a "wait" command or something where it can do a health check, and until it passes, the next container doesn't start | 13:51 |
dougbtv | didn't know you can do that in compose! | 13:52 |
JakeDEvans | I tried the health check, might be a version issue on my end but it didn't work | 13:52 |
JakeDEvans | 2.1 you can | 13:52 |
dougbtv | kubernetes has readiness probes, which is what you use there | 13:52 |
JakeDEvans | dougbtv: https://docs.docker.com/engine/reference/run/#/healthcheck | 13:52 |
dougbtv | JakeDEvans, thank you! | 13:53 |
leifmadsen | https://docs.docker.com/compose/startup-order/ | 13:53 |
JakeDEvans | for that to work properly you then need to also add (to your container) some way to do a proper healthcheck, netcat isn't enough. | 13:53 |
leifmadsen | ah gotcha | 13:53 |
JakeDEvans | depends_on is nice, but it's not ready state | 13:53 |
leifmadsen | JakeDEvans: I think you can externalize your wait.sh script though | 13:54 |
dougbtv | healthcheck is tight, I had definitely used the wait-for-it as a crutcch for sure | 13:54 |
leifmadsen | so the command is run by compose, not the container | 13:54 |
JakeDEvans | hmm that would be good | 13:54 |
leifmadsen | see that link above | 13:54 |
leifmadsen | it's basically the same approach, but the command for wait.sh would be from compose, not the container | 13:54 |
JakeDEvans | I'll say it again, first time making docker | 13:54 |
leifmadsen | which is the "right" way to do this | 13:54 |
leifmadsen | all good, you seem to be doing fine | 13:54 |
leifmadsen | I had to google how to do this, I didn't "just know" :) | 13:54 |
leifmadsen | but I've used enough docker to know when I don't like something :D | 13:54 |
JakeDEvans | so that command is not containerized ? | 13:55 |
*** Ravi_ has quit IRC | 13:56 | |
leifmadsen | right, I think it would live with your docker-compose.yml | 13:57 |
leifmadsen | looks like there are scripts provided by the community you can use | 13:58 |
leifmadsen | https://github.com/vishnubob/wait-for-it | 13:58 |
leifmadsen | https://github.com/jwilder/dockerize | 13:59 |
dougbtv | oh snaaaap, you can use wait-for-it outside of the container? | 13:59 |
dougbtv | cause yeah I'd totally crutched it by putting those inside the containers | 13:59 |
leifmadsen | I think that's the intention yea | 13:59 |
leifmadsen | let docker compose (the host) run the command to know when to start the next container | 14:00 |
dougbtv | the example shows: `command: ["./wait-for-it.sh", "db:5432", "--", "python", "app.py"]` | 14:00 |
dougbtv | which implies it's in the container | 14:00 |
dougbtv | "These are small wrapper scripts which you can include in your application’s image" - These are small wrapper scripts which you can include in your application’s image | 14:00 |
dougbtv | dammnit, double paste | 14:00 |
leifmadsen | ugh | 14:00 |
dougbtv | tried to paste the url, it's the startup-order from docker-compose | 14:00 |
dmsimard | dougbtv: I want that second of my life back | 14:00 |
dougbtv | LOL | 14:00 |
leifmadsen | what if you created a wait-for-it container that you could run against? :D | 14:01 |
dougbtv | leifmadsen, this is why I go easy on you mom sometimes, that's such a nice idea | 14:01 |
leifmadsen | .glare | 14:01 |
dougbtv | :D | 14:01 |
leifmadsen | this docker stuff is just a fad anyways | 14:01 |
leifmadsen | hack away~! | 14:01 |
leifmadsen | oh so I had an idea... | 14:02 |
*** kvoz has joined #ara | 14:02 | |
dougbtv | the containers are nice, but, just like 15 iterations of puppet scripts, or 5 iterations of ansible scripts.... everyone makes a bunch of iterations getting their scheduling right for containers | 14:02 |
dougbtv | alright, welp... such good convo and thanks for the invite | 14:02 |
kvoz | If I have a suggestion for improvement, where do I leave that? | 14:02 |
leifmadsen | you could use a wait-for-it type container, and then use depends_on: wait-for-it, pass the wait-for-it container a command, and that would be used to signal a return, so that it would move to the next line in the depends_on? | 14:02 |
dougbtv | but, i gtg for a bit, I'll be back in a while | 14:02 |
leifmadsen | dougbtv: back to work! | 14:03 |
dougbtv | oh I'll be back, but only after I ski this wicked nice snow :D | 14:03 |
leifmadsen | lol | 14:04 |
leifmadsen | sweet pow pow | 14:04 |
dougbtv | gnar pow brah! | 14:04 |
leifmadsen | triggered | 14:04 |
dougbtv | XD | 14:04 |
* dougbtv gets pitted, so pitted | 14:04 | |
leifmadsen | right?! | 14:04 |
*** tbielawa has joined #ara | 14:04 | |
kvoz | It would be very nice if you were able to filter on specific playbooks in the report view | 14:05 |
JakeDEvans | dmsimard: ara_1 | sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'mysql' ([Errno 113] No route to host)") | 14:06 |
JakeDEvans | btw. | 14:06 |
leifmadsen | dmsimard: is github issues an appropriate place to file issues? | 14:06 |
JakeDEvans | ara doesn't have issues for me | 14:06 |
dmsimard | leifmadsen: kinda sorta, use storyboard if you don't mind https://storyboard.openstack.org/#!/project/843 | 14:06 |
leifmadsen | ah perfect | 14:07 |
leifmadsen | kvoz: ^^^ | 14:07 |
dmsimard | JakeDEvans: if you have an ubuntu launchpad, please use storyboard linked above ^ | 14:07 |
dmsimard | ubuntu launchpad account* | 14:07 |
dmsimard | JakeDEvans: otherwise I won't scold you if you file issues at github.com/dmsimard/ara (original upstream) | 14:07 |
dmsimard | kvoz: so there's a way to do that | 14:07 |
dmsimard | kvoz: it's not super convenient though -- depends on what you actually envision | 14:08 |
kvoz | dmsimard: Oh? How would I go about doing that? | 14:08 |
dmsimard | kvoz: There's a variable ARA_PLAYBOOK_OVERRIDE that allows you to customize which playbooks will be shown in the UI. It's what is used under the hood to generate a static html report for one or many specific playbooks. | 14:08 |
dmsimard | i.e, "ara generate html --playbook uuid" | 14:09 |
dmsimard | you get the playbooks uuid with something like "ara playbook list" | 14:09 |
dmsimard | If you mean being able to filter and search live in the UI, eh, maybe but I've sort of done an html/css/js overdose with the recent UI refactor so it might be a while unless someone else contributes it :) | 14:09 |
kvoz | dmsimard: ah okay. Yeah I suppose I could do that for a static page, but Yeah was more of a live search I had in mind :) | 14:10 |
dmsimard | kvoz: I created it for you here https://storyboard.openstack.org/#!/story/2000920 | 14:11 |
dmsimard | JakeDEvans: yeah, can you file an issue somewhere about needing to retry a bit | 14:11 |
*** tbielawa has quit IRC | 14:12 | |
JakeDEvans | dmsimard: https://github.com/dmsimard/ara/issues/118 | 14:12 |
leifmadsen | I have a crazy request that dmsimard isn't going to like :) | 14:12 |
leifmadsen | it probably doesn't even make any sense anyways | 14:12 |
leifmadsen | but I want an API for ARA so I can run commands remotely on a server that has ARA installed :) | 14:12 |
* leifmadsen is doing it wrong... | 14:12 | |
leifmadsen | ok gotta run, I need to eat | 14:12 |
leifmadsen | back soon | 14:12 |
JakeDEvans | leifmadsen: my docker doesn't like your entrypoint | 14:13 |
JakeDEvans | leifmadsen: ara-manage: error: too many arguments | 14:13 |
kvoz | dmsimard: Cool thank you :) It is so requested here that I might write it and submit for review myself | 14:13 |
dmsimard | kvoz: that would be super awesome, I'd help reviewing it. | 14:14 |
dmsimard | leifmadsen: an API is something I want to | 14:14 |
dmsimard | too* | 14:14 |
dmsimard | leifmadsen: ara is still mostly living off of the foundation of the early prototype. I eventually want to do a better split: callback, server, client, API | 14:15 |
leifmadsen | dmsimard: nice! | 14:15 |
dmsimard | That will take a lot of time and effort because while doing that, I want to keep ARA as simple as possible because that's one of advantages I want to keep. "pip install ara; ANSIBLE_CALLBACK_PLUGINS=ara" and go | 14:15 |
leifmadsen | JakeDEvans: I ran into that yesterday too... let me look at what I did wrong | 14:16 |
leifmadsen | I thought it was fixed though | 14:16 |
leifmadsen | hrmmmm | 14:16 |
leifmadsen | JakeDEvans: try: docker pull nfvpe/ara | 14:16 |
leifmadsen | see if that works | 14:16 |
JakeDEvans | it does | 14:17 |
JakeDEvans | might need to clean out my builds | 14:17 |
leifmadsen | ok so.... huh | 14:17 |
leifmadsen | it should work :\ | 14:17 |
JakeDEvans | oohh...can't with command | 14:18 |
JakeDEvans | so back to that issue | 14:18 |
leifmadsen | dmsimard: yea I'm mostly thinking for wanting to push logs into a server somewhere | 14:18 |
JakeDEvans | leifmadsen: beats! | 14:18 |
dmsimard | leifmadsen: push what where | 14:18 |
leifmadsen | JakeDEvans: actually that's probably right | 14:18 |
dmsimard | leifmadsen: cause I eventually want to try sending everything to logstash through the CLI | 14:18 |
leifmadsen | dmsimard: basically in my situation, I want to run oooq on a jenkins slave, and then push the logs to my infra | 14:18 |
JakeDEvans | leifmadsen: docker run -it nfvpe/ara /bin/bash = poop | 14:19 |
dmsimard | i.e, ara result list --all --format json |something > logstash | 14:19 |
leifmadsen | dmsimard: you don't even need logstash any more :) | 14:19 |
leifmadsen | filebeat can basically replace what logstash does | 14:19 |
dmsimard | leifmadsen: bah, upstream has logstash so that's free | 14:19 |
JakeDEvans | it can, but I like mutators | 14:19 |
leifmadsen | JakeDEvans: I was under the impression that was all added to the latest filebeat | 14:19 |
leifmadsen | and that I could mutate at the host | 14:19 |
leifmadsen | I haven't tried the latest though | 14:19 |
JakeDEvans | leifmadsen: you may be right, I can't keep track with the major changes in minor version of elastic | 14:20 |
leifmadsen | I wrote a gnarly regex to parse Ansible output | 14:20 |
leifmadsen | JakeDEvans: +1 | 14:20 |
leifmadsen | I don't even ELK bro :) | 14:20 |
JakeDEvans | that's another fight, get all devs to log json, and proper json | 14:20 |
JakeDEvans | friggen 3 tier nested crap | 14:20 |
leifmadsen | ok really out, but JakeDEvans I tested latest Dockerfile and it started for me with: docker create --name ara nfvpe/ara ; docker start ara | 14:21 |
leifmadsen | I did break out some of the args into CMD but that was the only change, and I know I tested the ENTRYPOINT one | 14:21 |
leifmadsen | might just be that you're using another image hash? | 14:22 |
JakeDEvans | I dunno, I'll mess with it later. | 14:22 |
JakeDEvans | or I could wait for devs | 14:23 |
JakeDEvans | dmsimard: (that issue I submitted, ;) ) | 14:23 |
dmsimard | pfff | 14:26 |
dmsimard | it'll take like 10 minutes | 14:26 |
dmsimard | or not | 14:26 |
*** Haros has quit IRC | 14:27 | |
openstackgerrit | David Moreau Simard proposed openstack/ansible-role-ara master: Clean up ansible-role-ara https://review.openstack.org/445984 | 14:28 |
dmsimard | JakeDEvans: okay, saw the issue -- I'll eventually look into it (not now, sorry) | 14:29 |
JakeDEvans | that's fine, I'll pull the patch from my dockerfile when it's fixed, then maybe we can get an official compose/dockerfile in the repo | 14:30 |
JakeDEvans | we ops like using docker for testing apps before we use them at scale/production | 14:31 |
dmsimard | Yeah, I'd be down for supporting something "official" -- I mean it's obviously requested a lot | 14:31 |
dmsimard | For python stuff I just use virtualenvs | 14:31 |
dmsimard | ¯\_(ツ)_/¯ | 14:31 |
JakeDEvans | most people do, and for consultants using ansible it's perfect, but I have a dozen people running ansible in a mix of local, remote, jumpboxes, all over | 14:32 |
openstackgerrit | Merged openstack/ara master: Cleanup ARA configuration module https://review.openstack.org/445518 | 14:34 |
leifmadsen | I haz done that returning thing! | 14:48 |
*** tbielawa has joined #ara | 14:56 | |
*** tbielawa has quit IRC | 15:01 | |
*** tbielawa has joined #ara | 15:04 | |
*** tready has joined #ara | 15:13 | |
tready | I'm trying to use nginx instead of apache & it's got me all turned around - has anyone done this setup? | 15:15 |
JakeDEvans | did you follow https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-16-04 | 15:16 |
tready | I was following this one: https://www.digitalocean.com/community/tutorials/how-to-set-up-uwsgi-and-nginx-to-serve-python-apps-on-ubuntu-14-04 | 15:17 |
tready | I'll try that one | 15:17 |
JakeDEvans | personally I'd try with an galaxy role | 15:18 |
JakeDEvans | https://galaxy.ansible.com/Stouts/wsgi/ | 15:18 |
JakeDEvans | but I haven't done that with ara yet | 15:18 |
dmsimard | tready: hey o/ | 15:18 |
dmsimard | tready: the easy way with nginx is to reverse proxy to the embedded development server | 15:18 |
openstackgerrit | Leif Madsen proposed openstack/ara master: [WIP] Add Dockerfile for building ARA https://review.openstack.org/445058 | 15:19 |
dmsimard | tready: I haven't come up with documentation to do it with nginx and wsgi yet (i.e, proxy to uwsgi) | 15:19 |
dmsimard | tready: I'd be happy to accept a proposal for documentation on how to do it :) | 15:19 |
tready | dmsimard: if I can manage it, I'll certainly let you know | 15:19 |
dmsimard | tready: if I had to do it, I'd probably set up uwsgi (with the provided ara-wsgi script) and then have nginx reverse proxy to uwsgi | 15:20 |
dmsimard | there's probably other ways and that's okay too | 15:20 |
dmsimard | ideally no supervisor :) | 15:20 |
dmsimard | tready: what's probably the important bit is that you *need* to pass an ANSIBLE_CONFIG env variable somewhere or the application won't know where to find/bootstrap it's configuration | 15:22 |
dmsimard | i.e, https://github.com/openstack/ara/blob/master/ara/wsgi.py#L22 | 15:22 |
dmsimard | and http://ara.readthedocs.io/en/latest/webserver.html#apache-configuration (see SetEnv) | 15:23 |
*** kvoz has quit IRC | 15:40 | |
openstackgerrit | David Moreau Simard proposed openstack/ansible-role-ara master: Clean up ansible-role-ara https://review.openstack.org/445984 | 15:41 |
*** gundalow has quit IRC | 15:55 | |
*** gundalow has joined #ara | 15:55 | |
openstackgerrit | David Moreau Simard proposed openstack/ansible-role-ara master: Clean up ansible-role-ara https://review.openstack.org/445984 | 16:04 |
*** karimb has quit IRC | 16:15 | |
openstackgerrit | David Moreau Simard proposed openstack/ansible-role-ara master: Clean up ansible-role-ara https://review.openstack.org/445984 | 16:25 |
openstackgerrit | David Moreau Simard proposed openstack/ansible-role-ara master: Clean up ansible-role-ara https://review.openstack.org/445984 | 16:28 |
rattboi | hi all. We just started using ara a few days ago. Is there a preferred way to purge older data from the run database? | 17:02 |
rattboi | we have a 15-minute cron that runs ansible, and so ARA already has 370 separate runs in just the last few days. | 17:04 |
rattboi | we are investigating running ansible more based on update events instead of time-based, but in the meantime, it'd be useful if we could purge older runs from the db. | 17:04 |
rattboi | oh, I see there's a "playbook delete" in the cli | 17:05 |
leifmadsen | dmsimard: I would consider the PR 445058 "ready" at this point (I'll update the WIP tag") | 17:11 |
leifmadsen | the real question will be whether you want a Dockerfile at all | 17:11 |
leifmadsen | I suppose it's harmless until we determine if ansible-container is better or not | 17:11 |
openstackgerrit | Leif Madsen proposed openstack/ara master: Add Dockerfile for building ARA https://review.openstack.org/445058 | 17:12 |
leifmadsen | done | 17:12 |
*** dougbtv_ has joined #ara | 17:34 | |
*** dougbtv has quit IRC | 17:34 | |
*** dougbtv__ has joined #ara | 17:44 | |
*** dougbtv_ has quit IRC | 17:46 | |
dmsimard | rattboi: hey, yeah, there is a playbook delete command | 17:56 |
rattboi | yeah, I just tried it and had some success | 17:56 |
dmsimard | rattboi: there's no logic to delete playbooks based on their age (although this has been requested before) | 17:56 |
dmsimard | rattboi: but you could implement your own logic, say -- "ara playbook list |logic |xargs ara playbook delete" | 17:56 |
rattboi | I removed the oldest 20 plays, and it worked | 17:56 |
rattboi | I was surprised that each removal took ~30 seconds, maybe more | 17:57 |
rattboi | also, since the sqlite backend doesn't implement auto-vacuum, I had to go back in after the fact and run a sqlite vacuum | 17:57 |
rattboi | to recover any space | 17:57 |
dmsimard | rattboi: is there a lot of data for each playbook ? how many tasks/hosts/results ? | 17:58 |
dmsimard | Deleting a playbook isn't just deleting a playbook, it's a hierarchical delete that needs to also clean up everything that is tied to the playbook | 17:58 |
rattboi | it also pegged the CPU at 100% :P | 17:58 |
rattboi | dmsimard: http://contrasjc-bastion.portbleu.com/ara/reports/ | 17:59 |
rattboi | I don't know what is considered a lot | 17:59 |
dmsimard | Say I wanted to delete that first playbook, that's 5 hosts (and their facts), 8 plays, 37+1 files, 402 tasks, 612 results | 18:00 |
dmsimard | I can see how that can take a bit of time, maybe it can be improved | 18:00 |
rattboi | we can just cron to remove the oldest hour or something for now | 18:02 |
dmsimard | sure | 18:03 |
rattboi | I have another question. We have this architecture where we have a script called ansible-runner that runs on a cron every 15 minutes, checking out the newest changes from our repo, then ansibling. It runs as a root cron to self-ansible the bastion, and as a less privileged user to ansible a handful of other hosts from the bastion | 18:05 |
rattboi | if you look at the ara link above, you'll see install-ci.yml vs bastion.yml | 18:06 |
rattboi | bastion runs as root, install-ci runs as cideploy | 18:06 |
rattboi | I had some difficulty getting ara working because of perms related around that | 18:07 |
dmsimard | "getting ara working" = what ? the ansible callback ? the web application ? | 18:07 |
rattboi | yes, both | 18:07 |
*** tbielawa is now known as tbielawa|lunch | 18:08 | |
dmsimard | oh I think I understand | 18:08 |
rattboi | for the callback, there was a bootstrapping problem | 18:08 |
dmsimard | yeah, both the web application and the callback expect read/write permissions to the database | 18:08 |
rattboi | because there's not a good shared place to set local_tmp | 18:08 |
rattboi | so right now, I'm not even setting that, and I suspect that ara_log doesn't work because the little RPC file write would fail | 18:09 |
dmsimard | local_tmp is only really required for the callback, it's where ara ends up writing temporary files | 18:09 |
dmsimard | there could probably be a dependency on it from the web application context but it doesn't use it -- maybe I can look into that | 18:09 |
dmsimard | the "dir" config is where the database and logs would be read/written from | 18:10 |
rattboi | I also had a lot of problems trying to use your wsgi example from the docs, because we installed into a venv | 18:10 |
rattboi | I ended up using uwsgi instead, and had better success | 18:10 |
dmsimard | rattboi: ah, someone asked about venv deployment this morning too -- maybe it can help: http://eavesdrop.openstack.org/irclogs/%23ara/%23ara.2017-03-15.log.html#t2017-03-15T11:33:19 | 18:11 |
dmsimard | I'd welcome docs around deployment in venv and uwsgi(+nginx) | 18:11 |
rattboi | yeah, I acutally did uwsgi + apache because we already have a solid apache role | 18:11 |
rattboi | but it should be minor differences | 18:12 |
dmsimard | Sure, that's fine -- docs are there to get you started | 18:12 |
dmsimard | I just don't want to document *everything* and every deployment scenario or else it doesn't end :) | 18:12 |
rattboi | yeah, for sure. | 18:12 |
dmsimard | I think I'd be happy to have embedded webserver, apache+mod_wsgi, nginx+uwsgi and venv somewhere in there | 18:12 |
dmsimard | that way people have somewhere to start | 18:13 |
rattboi | since really 3 users need access to the ansible.sqlite file, I ended up having to chmod 666 the dir, which I'm not thrilled with | 18:13 |
rattboi | but yeah, we're happy with ara so far. Just gotta get it tuned in. | 18:14 |
dmsimard | rattboi: maybe mysql would be a better fit ? | 18:18 |
rattboi | yeah, maybe | 18:25 |
rattboi | sqlite was the easiest to get somethign going | 18:25 |
*** karimb has joined #ara | 18:33 | |
*** karimb has quit IRC | 18:52 | |
*** JakeDEvans has quit IRC | 19:00 | |
*** tready has quit IRC | 19:14 | |
*** tbielawa|lunch is now known as tbielawa | 19:15 | |
*** dougbtv__ is now known as dougbtv | 19:56 | |
*** tbielawa has quit IRC | 20:58 | |
*** tready has joined #ara | 21:24 | |
dmsimard | leifmadsen: hey I'll look at your stuff tomorrow | 21:38 |
leifmadsen | sounds good | 22:31 |
leifmadsen | no rush :) | 22:31 |
leifmadsen | dmsimard: if we merge that Dockerfile in, then we could just setup a Docker hub link to build it for us | 22:32 |
leifmadsen | at least until we determine if ansible-container is the way forward | 22:32 |
dmsimard | leifmadsen: I thought those automated build things were a paid feature ? | 22:41 |
leifmadsen | pretty sure you can trigger builds with webhooks and such | 22:41 |
leifmadsen | https://docs.docker.com/docker-hub/github/ | 22:42 |
leifmadsen | as long as the repo is public, everything should be free | 22:42 |
dmsimard | okay | 22:42 |
leifmadsen | I've already got an NFVPE organization if you want to piggy back on that? | 22:42 |
dmsimard | leifmadsen: oh that's not gonna work | 22:42 |
leifmadsen | (basically, I could set it up) | 22:42 |
leifmadsen | oh? | 22:42 |
dmsimard | don't have access to openstack repo settings | 22:42 |
leifmadsen | oh right | 22:43 |
dmsimard | but | 22:43 |
dmsimard | I guess on the openstack end we could have a post-merge job that'd build the container and push it to dockerhub or something | 22:43 |
dmsimard | so the other way around | 22:43 |
*** tready has quit IRC | 22:44 | |
dmsimard | I'll try and come up with a POC tomorrow, there's too much snow today I *have* to go snowboarding | 22:44 |
leifmadsen | yea, or could just make it part of the release process and "docker build -t foo/ara:<tag> ; docker push foo/ara" | 22:44 |
leifmadsen | not like releases happen daily :) | 22:44 |
*** tready has joined #ara | 23:20 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!