Simple (but useful) Ansible reporting with ara
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 287 | |
Author | ||
Contributors | ||
License | CC Attribution 2.0 Belgium: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/56831 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
FOSDEM 202225 / 287
2
4
6
8
12
17
21
23
31
35
37
41
44
45
46
47
50
62
65
66
67
68
71
73
81
84
85
86
90
92
94
100
102
105
111
114
115
116
117
118
121
122
124
127
131
133
135
137
139
140
141
142
145
149
150
156
164
165
167
169
170
171
172
174
176
178
180
183
184
189
190
192
194
198
205
206
207
208
210
218
220
224
225
229
230
232
235
236
238
239
240
242
243
244
245
246
249
250
253
260
262
264
267
273
274
277
282
283
287
00:00
PlastikkartePatch (Unix)Web pageLoginOrder (biology)System administratorRevision controlSoftwareNP-hardVideo game consoleTask (computing)Goodness of fitWordVideo gameProcess (computing)First-person shooterProjective planeInheritance (object-oriented programming)FamilyMessage passingLine (geometry)Physical lawCore dumpOpen setEndliche ModelltheorieCellular automatonVirtualizationSystem callHypermediaComplex (psychology)Order (biology)Graphics tabletOffice suiteOperator (mathematics)Revision controlSoftware testingMultiplication signTwitterDifferent (Kate Ryan album)Installation artSoftware engineeringMetreGroup actionPatch (Unix)CollaborationismPrincipal idealPressureResultantDreizehnTask (computing)Lattice (order)Product (business)Coefficient of determinationNeuroinformatikUniform resource locator1 (number)Natural numberUsabilityShooting methodPhysical systemOnline chatMatrix (mathematics)Video game consoleNP-hardLoginFront and back endsWeb browserSoftware maintenanceAbstractionGreen's functionRow (database)DiagramEngineering drawing
07:36
Table (information)Random matrixVideo game consoleFunction (mathematics)Cross-site scriptingMathematicsLoginArmInheritance (object-oriented programming)BlogPolygonDatabasePlug-in (computing)Task (computing)StatisticsClient (computing)Parameter (computer programming)Key (cryptography)Front and back endsServer (computing)Common Language InfrastructureUniform resource locatorNoise (electronics)NumberHypermediaSystem callInsertion lossClient (computing)Execution unitSet (mathematics)Row (database)Task (computing)DatabaseRational numberResultantInheritance (object-oriented programming)FamilyGraph coloringMultiplication signBitPhysical lawFunction (mathematics)Endliche ModelltheorieRoboticsVideo game consoleVirtual realityInformationComputer configurationGroup actionTable (information)Server (computing)LaptopMathematicsState of matterComputer fileImage resolutionContent (media)Data storage deviceVapor barrierLine (geometry)Plug-in (computing)Context awarenessEvent horizonHookingStandard deviationBinary multiplierProfil (magazine)Installation artLetterpress printingDifferent (Kate Ryan album)BuildingDirection (geometry)XML
15:05
Front and back endsCommon Language InfrastructureServer (computing)Plug-in (computing)VolumeDirectory serviceDatabaseComputer-generated imageryTraffic reportingInterface (computing)Operator (mathematics)Multi-agent systemInternet service providerSample (statistics)Data modelPhysical systemInformationInterior (topology)Integrated development environmentNetwork topologyTask (computing)Electronic meeting systemRandom matrixApplication service providerVirtual machineComputer fileProcess (computing)Multiplication signHuman migrationPlug-in (computing)Row (database)Installation artServer (computing)Uniform resource locatorClient (computing)Default (computer science)Virtual realityResultantTowerGroup actionOperator (mathematics)Profil (magazine)MereologyVelocityFunction (mathematics)DatabaseDirectory serviceMedical imagingTask (computing)Level (video gaming)Set (mathematics)Web 2.0Regular graphStreaming mediaRepository (publishing)Event horizonDemo (music)MultiplicationReal-time operating systemGame controllerMaxima and minimaGastropod shellInformation securityCategory of beingWordLine (geometry)Survival analysisInterface (computing)Execution unitComputer-assisted translationSuite (music)Computer animation
22:34
Task (computing)Insertion lossRandom matrixCivil engineeringRootPlanningReal numberTask (computing)Traffic reportingService (economics)Video gameServer (computing)Group actionDefault (computer science)MathematicsDirectory serviceOperator (mathematics)Computer file
24:32
Device driverMusical ensemblePlane (geometry)Control flowComputer-generated imageryOperator (mathematics)Software testingComputer hardwareInformationGame controllerAliasingConfiguration spaceBackupRollenbasierte ZugriffskontrolleProxy serverService (economics)CloningRevision controlKey (cryptography)OberflächenströmungRootEmailBit rateRunge's theoremSimulationArithmetic meanSoftware as a serviceMetropolitan area networkComputer fileRevision controlMedical imagingOperator (mathematics)Data managementGame controllerIntegrated development environmentDefault (computer science)NamespaceLoginGastropod shellFunction (mathematics)Multiplication signStaff (military)SpacetimeHypermediaError messageMaizeComputer virusPoint (geometry)Electronic mailing listPRINCE2Row (database)Line (geometry)Server (computing)Source code
27:47
Row (database)Task (computing)Computer-generated imageryServer (computing)Plug-in (computing)DatabaseDirectory serviceUncertainty principleReal numberBit rateBuildingComputer fileLocal ringHuman migrationBoolean algebraMedical imagingIntegrated development environmentSet (mathematics)Server (computing)CodeRight angleMultiplication signDatabasePlug-in (computing)Uniform resource locatorLibrary (computing)Directory serviceGastropod shellQuicksortSoftware testingArithmetic progressionInheritance (object-oriented programming)CASE <Informatik>RootComputer clusterPoint (geometry)Virtual realityObservational studyStudent's t-testCondition numberDemosceneElectronic mailing listSource code
31:50
DatabaseService (economics)Server (computing)Web browserTable (information)Source code
32:30
SynchronizationGamma functionIntegrated development environmentComputer-generated imageryPlane (geometry)MereologyPasswordMultiplication signTemplate (C++)WordMedical imagingComputer virusIntegrated development environmentMobile appSystem administratorProcess (computing)Projective planeComputer animation
34:29
SynchronizationDemo (music)Template (C++)Message sequence chartGoodness of fitDemo (music)Right angleAutomatic differentiationServer (computing)Set (mathematics)Process (computing)Variable (mathematics)Sheaf (mathematics)Traffic reportingTerm (mathematics)Integrated development environmentComputer animation
36:02
Template (C++)SynchronizationType theoryDemo (music)Term (mathematics)Function (mathematics)BitServer (computing)Rule of inferenceMedical imagingProcess (computing)Computer animationSource code
36:57
Task (computing)Group actionDemo (music)Projective planeDemo (music)BlogLink (knot theory)Server (computing)Computer animation
37:49
GEDCOMUncertainty principleWeb pageYouTubePlug-in (computing)Real numberTask (computing)Magnetoresistive random-access memoryLink (knot theory)Right angleContext awarenessTask (computing)Open setGame controller
38:48
Boom (sailing)Demo (music)Task (computing)Traffic reportingRow (database)Arithmetic progressionView (database)Demo (music)PhysicalismRule of inferenceHypermediaClosed setSource code
39:58
Electronic mailing listPrice indexDemo (music)TwitterOnline chatComputer networkLink (knot theory)Software frameworkVector potentialBitProjective planeMultiplication signBridging (networking)Link (knot theory)Online chatTwitterDemo (music)Video GenieOnline helpInternet forumComputer animation
41:27
Computer virusOnline chatMultiplication signRational numberComputer animation
42:17
Server (computing)Plug-in (computing)Set (mathematics)Basis <Mathematik>Matrix (mathematics)ImplementationResultantMereologyCategory of beingMultiplication signConfiguration spaceDatabaseGame controller2 (number)Meeting/Interview
43:53
Computer animation
Transcript: English(auto-generated)
00:15
Hello everyone. Today, I'll be presenting simple but useful Ansible recording with ARA.
00:22
I've never actually been to a Fuzzdom conference before, but I have a lot of friends who have, and they've told me great things about it so I'm very much looking forward to joining you in person one day. In the meantime, please enjoy this recording. I will be in the Fuzzdom chat room, if you want to chat or have any questions, feel free to fire away throughout the presentation.
00:42
And with that, let's begin. Let me start by saying that parrots are smart dinosaurs. So if you would picture a T-Rex, the way that they would walk with wings, that's kind of like how a parrot would walk, it's kind of funny.
01:01
But anyway, they're very smart, they can repeat after you, they can mimic sounds and whistles and words, but they can also be pretty loud and noisy. So now, why am I telling you this? Well, it's because I happen to have a parrot at home, and he's the unofficial mascot for the project.
01:21
His name is Yoshi, like the green dinosaur from Super Mario. And so if you hear any parrot sounds in the background, well then you'll know that it's Yoshi. Yoshi is not actually a Nara, which are far bigger and more colorful birds.
01:45
So he's not a Nara, but you know, he's still the mascot. So who am I? Well, I'm David Marusimard. You can reach out to me on matrix in Twitter, amongst other places. I am recording this from Montreal in Canada.
02:01
I have a background that is around system administration, DevOps, SRE, CICD. It's kind of what I've been doing this past decade. Right now, I'm a principal software engineer in the instable community team at Red Hat. I have been an instable user and contributor at least as far back as 2014. I don't remember exactly.
02:27
So nowadays I take care of releasing the instable package to PyPI in collaboration with the community working group. So it includes a bunch of collections, so-called batteries included on top of instable core.
02:45
More generally speaking, I try to make life of people easier by improving tooling, workflows, processes for users, contributors, or maintainers alike, trying to make their work easier.
03:04
So before telling you all about Aura, how it works, how you can use it, how to get started, I wanted to tell you a little bit, a story, why the project was created and how it might be helpful for you.
03:22
I used to do a lot of OpenStack, both as an operator, as a developer, as a contributor to the OpenStack community. And I can tell you that testing OpenStack is hard. It's hard because, well, there's a lot of projects. There's a lot of ways to deploy them.
03:41
There's a lot of backends. There's a lot of Linux distros that you can install it on. And there's a lot of different installers as well. So you could picture testing all of these with maybe different versions of Python even. And so it makes for a pretty complicated thing to test.
04:01
I used to do a lot of puppet at the time. My puppet is rusty nowadays. But I saw instable grow in popularity in the OpenStack community. There came installers, there came instable modules to deploy things on top of OpenStack. And to me, at least, instable felt like a breath of fresh air.
04:22
It was simple. It didn't require an agent. It executed things in the order that you wrote them. It didn't need an agent. And so I learned a lot about instable back then. And so as people started using it more and more, it made some challenges obvious.
04:44
So what was challenging? Well, I told you there were a lot of projects, right? There were thousands of CI jobs across hundreds of projects. You know, we're talking about several hundred thousand job builds every month, right?
05:02
And so, well, by the nature of CI, things will fail. Because, well, if things are always green, you should probably worry about that. And so when things fail, you need to triple shoot them. And when there are so many things that can go wrong, it makes it pretty hard, right?
05:23
The CI jobs were not in a single location. Some of them were in Jenkins. Some of them were in Zul, which is what the OpenStack community uses for driving CI. It's a pretty cool project. Check it out. And so, you know, we have jobs physically in various places.
05:42
When you have a job that runs for 30 minutes, 60 minutes, or even more, you would wind up with, you know, 50,000 lines in the console log. So if something failed, you had to open it up in your browser. And if your browser did not crash, you could maybe do like Control-F and then search for failed.
06:03
And, you know, maybe you would find something in there. But it was a lot of things to sift through. A question that people had, so if I send a patch to a project and I have some CI job failures, is it related to my patch? Or could it be a flaky test?
06:23
Or could it be infrastructure related? Maybe it's a repository that's not responding. It could be anything, right? So when I have a CI job failure, I want to know, is it because of my patch? If I do find a problem or something that is noteworthy and I want to share it with someone,
06:44
well, I could copy paste the relevant bits, I guess. But otherwise, I would link the console and then tell the person, you know, search for this string or at this line. And so it would make it hard to share specific stuff with others.
07:03
A lot of the things, all of those previous challenges made it hard for new contributors. Pretend that you're someone new to OpenStack, maybe even new to Ansible. You have, you send a patch and there's a failure. Oh no, how am I going to troubleshoot that?
07:22
Right? Because, well, OpenStack abstracts complex technologies, you know, storage, networking, virtualization. So it's not just Ansible that can go wrong. It can be like pretty much anything, right? So all these challenges made it really hard for newcomers. So what did we try?
07:41
Well, the thing that people tend to do is to increase verbosity. And so instead of, you would have a lot of text, basically, because everything was super verbose. So while you might have more information or context around, you know, what is going on, it multiplies the amount of text that you need to search through.
08:08
We enabled the profile task callback, which is pretty cool. I'll talk a little bit about it later. But in summary, it provides the duration and the date for the tasks,
08:21
and it prints that into the console. So it's still useful today. Another thing that we had was called human log. And so when you increase the verbosity in Ansible, it will start printing JSON. And well, it's in line, right?
08:41
It's not pretty printed. And so what human log did at the time was to take this JSON and pretty print it. So, well, humans could read it. An appropriate name, let's say. And then I came across different callback plugins that wrote the results in HTML tables.
09:02
So like for every task, you would write a new row in the table. So it worked. It was not, I would say, super pretty. But it eventually gave me the idea for ARA because, well, while you're, if you're recording data into, writing data into HTML files,
09:23
you might as well write it to a database and then have it organized in such a way that you can build things on top of it. So you know what the Ansible console output looks like. It will tell you, okay, changed. But it doesn't tell you what it's actually doing, right?
09:44
It's just like, okay, don't worry. If you keep Verbotity up a notch and enable profile tasks, you'll see here, you know, there's dates and durations. So if you're sending your console output to a log, it will provide some extra context there.
10:01
But you see, we don't have just okay anymore. We have the host. And then what actually happened for this task? So it's a slight improvement. I tend to run with VV still, but if we increase the Verbotity much further, you know, you have all these blue text,
10:21
which makes it very, I mean, if you're troubleshooting or debugging something complicated, it might be useful. And in fact, unless you're running with VVV, Ansible will eat the Python trace back. So if you have a module failure, and you don't have VVV,
10:40
you're not going to know why there was a trace back. So what did we end up doing? Well, spoiler alerts, we turned down the Verbotity and enabled Aura instead. So this is for the OpenStack Ansible project. So since there was Aura to record
11:02
what happened throughout the playbook, it didn't feel useful to have all of these, you know, 50,000 lines of output. So we toned down the Verbotity, and then you see it's almost 50,000 lines less, right? So that made it, that made the console much easier to read for humans,
11:23
you know, less noise. The noise to signal ratio was much better. And so what does Aura actually do? Well, it records Ansible playbooks. It makes them easier to understand and troubleshoot. It also happens that it's another recursive acronym.
11:43
So let's look into how it actually works. I like to think that it's simple enough. You know, there are some steps involved. I mean, you still need to do something, but it's simple enough, I think.
12:00
Let's dig in. So this is what the recording workflow looks like. Here you might have a human, AWS, Ansible full, Ansible runner, anything that can run an Ansible playbook. It could be in GitLab CI, it could be in GitHub Action, it could be in Jenkins and Rundeck, anywhere where you run an Ansible playbook.
12:22
Aura can also record playbooks. Only last night now. So something runs an Ansible playbook. In Ansible Core, there's the concept of callback plugins. So, callback plugins fire hooks for every event. For every task, it will fire a hook.
12:44
A non-rec callback, it's a regular and standard Ansible callback. It will intercept those hooks, organize the data a little bit, send it to an API server. This API server will save it to a database, and then it continues like this, you know,
13:01
for every task until the playbook ends. So what do Ansible callback plugins actually look like? So you could go on GitHub to find out what are other examples of callback plugins, but in a sense, they provide these kind of methods.
13:21
So you could do something every time a task starts, for example. And this is Python, so you can write whatever you want. Earlier I was talking about writing to HTML tables. This is how it happened. And so what ARA happens to do is to take this data and send it to an API server so it can be saved to a database.
13:44
So, you know, playbook on start, get the path to the callback plugin, get the CLI options, the Ansible playbook command, create a playbook with that, and then in the other hooks, we will save individual task results for each host.
14:02
So how do you get started? If you're on your laptop, it doesn't need to run on the server or anything. You install Ansible in ARA as well as the server dependencies. You configure Ansible to enable the callback plugin,
14:21
the ARA callback plugin. What this command does is it just returns the path to the ARA callback plugin. Why this exists? Well, it's because depending on how you install ARA or where it's installed, the location will change. Maybe it will be installed to usr-lib,
14:42
maybe it will be installed to usr-local, maybe it will be installed in your home directory, maybe in a virtual environment. So ARA knows where the callback plugin is, so there's this helper command here so you don't need to bother about searching where the callback is.
15:01
It just returns the path directly. Then there's no other steps involved. Talking about simplicity, you run your playbook, as usual, and then it's recorded. You can query the results with the CLI or start the embedded web server to browse the results.
15:24
I could do this on my laptop, I could do this on a server, it doesn't matter. It doesn't need anything else to run. If you do want to run a server, which might be useful for aggregating data from multiple locations. Earlier, when I was talking about the recording workflow,
15:43
I said it doesn't matter where you run your playbooks. You can run it from different tools, and so ARA can provide this single looking glass in which every playbook is recorded in a single location. How we might do that? There are different ways to deploy a server.
16:02
Here, it's a simple container image. I create a directory where the SQLite database and the settings file will exist. I don't judge. I prefer Podman personally, but if you run Docker, it works too. There are container images on both Docker and Docker Hub and quay.io.
16:26
You run that and that's it. You have a server running on port 8000 and you can send data to it from other locations. How might I send data to the server? It's roughly the same process.
16:40
I install Ansible in ARA. This time around, I don't need the server dependencies because the server is already running somewhere. I enable the callback plugin. Then I tell ARA to use the HTTP API client because we're sending data to a server somewhere else.
17:01
Then I specify the location of this API server. That's it. I run a playbook like usual. If I go to the server afterwards, the data will be there. It's recorded in real time. That's that. I wanted to do a live demo for you.
17:23
We'll record an Ansible playbook from AWX. AWX is the upstream to Ansible Automation Controller, which was previously known as Ansible Tower. Let's look at how this will go down. We will first deploy a Kubernetes node with KTS Ansible.
17:45
AWX is deployed in Kubernetes nowadays. We'll send a Kubernetes node with KTS. We will run a NARA server so it can receive results from AWX jobs.
18:00
We will deploy AWX using the AWX operator. It's a Kubernetes operator that takes care of deploying AWX for you. We will configure AWX to record results with ARA. Then we'll try to run a playbook and find out if that actually works.
18:23
Let's do that. Let me switch to my shell here. I already have prepared a Vandalar regular CentOS H stream virtual machine here. I have...
18:41
Oh, in fact, let me go to KTS Ansible here. It deploys KTS with Ansible, which you have guessed. It supports CentOS, which is great for us. That's what we're going to be deploying on. It provides a simple inventory.
19:01
The inventory looks like this, a master, a node. We will be running it on a single node, so we'll just declare it a master. Then there are some group vars here that we can tune before deploying. Let's try that.
19:22
I have the KTS repository here. I have prepared an inventory. I'll be deploying on this node. I'm deploying on local host, so I don't need to use SSH.
19:43
Let's do that. I have already installed a virtual environment in which ARA and Ansible are already installed. I would have otherwise run pip install Ansible
20:00
in an ARA server. We can run that again, but it's already installed. Then I can run the command that I told you about earlier, ara setup callback plugins. That's what it does. It prints the path callback plugin.
20:20
Now I will export the output of that command, ara setup callback plugins. This is done. That's all I need to do. Now I can go here, and I will run the Ansible playbook.
20:47
The playbook is site.yaml. ARA takes care of creating the SQLite database automatically by default.
21:01
This is just some minor initial SQL migration. The setup is running. It's pretty short. Let's wait until it finishes.
21:28
Oh no, we got a failure. This is what profile tasks does.
21:41
It gives you a quick top ten or so, the longest tasks. Pretty useful. The important part is it's not noisy as much as increasing the velocity all the way up. Let's look at what happened here. Film to look up user Debian. Oh no, this is the group vars that we forgot to edit.
22:01
I kind of did that on purpose because I wanted to show you what it looks like if I fire up the server. I'm going to need to edit the server settings file first. I'm going to add an extra allowed host here because I want to reach the server on this level.
22:20
I'm going to fire up a server. I'm going to listen it on all interfaces. This is running. Let me go back to Firefox. Then I can go. I have the failed playbook that I just ran. If I look at the reports,
22:42
it will filter automatically for failures if there are any failures by default. I have the failure here. It failed at creating a new directory. Let's find out what happened here. Yes, there's no Debian user we're running on CentOS. We'll need to fix that.
23:01
This is what ARA saved for it. If I click here, it will lead me directly to the task in the role file where it failed. Let's fix that. Let me go back to the shell
23:21
here. We can kill the server. We will do inventory, simple, group of bars. Then we'll change that to send. Let's try that again. It should work this time around.
23:50
Live demos, it's always going to go. If something goes wrong, you know how ARA is here to help us out.
24:07
Perfectly this time around. Let's find out. Oh, no. Service. There you go. Would there be any deployments? I don't know.
24:20
The service is up. It should be good. Now that we have Kubernetes running, we can run AWS operator. Let me go back here. AWS operator. You can read me that it suggests using Minikube for that purposes.
24:41
We're using K3S here, but it's mostly all the same. We will need to install the operator. We can do this with the make deploy command. Let me go back to the shell.
25:01
I already have checked out the AWS operator. I will go back to two variables. We want to deploy in the default namespace because we don't need to deploy it in another one. We'll declare a version
25:20
for the AWS operator. I know this one works. It was the latest back when I tested it. Then we'll do make deploy. There you go. It created the Kubernetes customer resource definitions, the role bindings,
25:41
the deployments. I can see that the AWS operator controller manager is up. Not quite. Let me watch that. There it is. Cool. Now that we have the AWS operator up and running, we can pass it
26:01
a deployment file. I have a deployment file here ready. It's simple enough. Let me show you as an example how you might configure this. This is what we have. We'll do kubectl
26:21
apply-f. Then we'll run that. While this runs, we can follow the status of the deployment by tailing the logs. I have a command here that does that. What you'll notice
26:44
is that the AWS operator underneath uses the Ansible operator from the operator SDK in Kubernetes. Once upon a time, I actually tried recording output
27:01
Ansible playbooks from the operator. I can tell you that it works. It's the same principle where you need to have ARA installed in the operator image and send the data somewhere. While this runs, it will take a little bit.
27:20
We'll come back to it later. I will tell you about execution environments. eWx runs Ansible playbooks and container images called execution environments. We will need to have ARA installed in the container image so that we can send data
27:41
to a server. Switch here. The way that I did it, I already have one prepared in the best interest of time. The way that I did it, I installed podman as well as Ansible builder, which takes care of building.
28:01
I have an execution environment definition file here. It starts with a base image and lists. I'm not the one who built that. It was already available for me. You can use an Ansible CFG file to specify the settings that you want. Here in the requirements.txt file,
28:21
I've added ARA to it so it will automatically install it in the container image. Then I didn't need to, but I did it anyway. I installed the Ansible package inside the container image. The Ansible package contains code that's been included from various Ansible collections.
28:42
It gives you a lot of plugins and modules to work with. I've installed it, so it would be available for test purposes. Going back here, I will click on the progress. All right.
29:00
It's migrating the BlueX database right now, doing database migrations. This is the longest step. We'll come back to it again. I do have the image here for the execution environment.
29:20
I will do podman run. Oops. I need IT in there. Then I will run the same command as earlier, R-as the callback plugins, because I will need to tell AWX to use the callback command back at the location
29:40
inside the container image. See? It's a USR local lib. Not the same as our virtual environment, right? If I would have put this path in AWX, it wouldn't have worked, because that's not where R is. There you go.
30:01
We have this. We also need to stand up at an R server. We'll do that using the R server. Switching here to kway.io, I have the commands ready to do it. We already have podman installed,
30:22
and we already have a server directory in fact, because we recorded some playbooks locally, remember? What I will do before standing up the server, I will edit some settings here. It's not going to be in
30:42
slash root, slash ara. It will be in opt-ara. Like this. Inside the container image, it's in opt-ara, the settings. That'll be spelled. That's where it's expected.
31:01
Here I'm using SQLite, but I could also use MySQL or R++. Then, oh no, I was not in the shell. Damn it. Let me go back here. Sorry about that. What I was doing here,
31:22
I was adding, I was changing the path to the database file. Just change it from slash root, slash ara, slash opt, slash ara. Sorry about that. Let me start the container here.
31:41
I'm in PS. I have the server running. If I go here, I have a server running. This is from the container image, the same database.
32:02
All right. Let's find out if table access finished deploying. It's finished. Now what I can do, CTL get service. I will have
32:20
a back to my browser. Well, it's always random port. Then I have awx. Now I need the admin password.
32:40
There is a command that we can use for that. It's stored in the Kubernetes secret. We just need to carry the secret and get it. Where did I get it? Here it is.
33:07
kubectl get secret. This password, it will have changed by the time that you buy it. Going back to Firefox,
33:21
let's log in. password. I will first go in the execution environment. I want to add a new execution environment. We will call it Ansible with our
33:41
image. One that we had earlier. We want to pull the image if it's not present. And that's it.
34:01
We've created the execution environment. Now we need to go in the job template. Where is this? We have a demo here. We will edit the template. We will tell it must use Ansible
34:21
with our app. Let's save that. Oh, this project needs to be updated. I've run into this before. I'm not sure why. I need to run a project. Let's do that. Live demo. That's running. It shouldn't take too long.
34:41
It's the demo thing. There you go. It's successful. Let's go back to the demo. Try that again. With our good. Save that. So this will use the right. The other thing that we need
35:01
to do is to go in the AWX settings. We'll go to the job setting. Here at the bottom, we have a section for Ansible callback plugins, extra environment variables. We will edit those. In terms of Ansible callback plugins, we will add
35:20
the path that we got earlier. Let me find it here. Then, extra environment variables. We need to tell ARA to use
35:41
the API HTTP API client. ARA API server. Our server is tk3s-records-ansible.org reports 1000. We will save that.
36:02
Go back to our templates. Then, we can run it. We'll take a little bit to run. If we check on our server eventually to play with it,
36:26
I believe it will run.
36:46
It's probably pulling the container image in the meantime. It's spawning a pod in Kubernetes. This container image has been running the actual job. Here we go. Going back to the server here, I see I can go in here.
37:03
It's just another world. It worked. It's great. That concludes the demo for AWS. Let us go back. In fact, I have another brief live demo that I want to show
37:20
you. In the meantime, you can read more about this. There will be a link in the slides. It's on the ARA blog. This was my holiday project where I just wanted to get it going and see. Another brief live demo.
37:41
Demo. Ansible.org is here. This is a demo deployment that I have. It's been running for a few minutes already with the same data. It has playbooks going as far back as a long time ago.
38:02
I could search for something. Let's say I want to search for OpenStack Ansible. I could search for Ansible's version, a specific controller, the name of a playbook or a label. Here I want to search if there's any playbooks that failed. I have these playbooks here.
38:22
I could spin it up and see, oh, it failed. That was back in July. It's here. If I click here, the same thing as earlier, I would have the failure right away. I can send this link to someone to share all the context around
38:42
not just this one task but our playbook. I have a host. This is a playbook view. There's a row per playbook, physically. Maybe you're interested in a particular host.
39:00
You could search for a host. I'll search here for a local host. Maybe I want to search for a local host, but only those that had failures. I will include all the playbook reports. By default, it only searches for the latest one. There you go.
39:22
Oh, that was me when I was building Invincible release. What was the failure back then? Oh, yeah. I was missing the Python that failed. There's also a new tasks tab, which is actually a work in
39:41
progress. It's not released yet, but it's available in the demo. The same way that you can search for a playbook or host, you can also search for a particular task, either by name or by module. This will be in the next release of ARA. Then I can reach the API with
40:00
this tab here and poke around. This is provided for free by Press Framework. That was that for the demo. It is deployed with the ARA Insible collection with GUnicorn, Nginx, and MariaDB. It works very well.
40:21
If what you've seen was interesting to you and you would like to help, the project could use help. My time and skills are limited. I see so much potential in the project. It could be prettier. It could be better.
40:40
Do please reach out if you would be interested in helping out. With that, that is it. I will turn it over to the chat room and moderator, I guess, for questions. If you do want to stay up to date with the project, there's the website. There's a Twitter account from which I do updates and technical
41:01
bits from time to time. We have a chat room on Libra.Chat, which is bridge to matrix. There is also a Slack server, which is not here. I forgot it. You can find the link to these slides and many more from the general TensorFlow community.
41:21
Thank you for listening. See you around.
41:44
I hope you enjoyed the talk. We don't have a lot of time. Hello. Thank you, David, for the talk. There were a few questions in the chat. The first one that I remember seeing was the one about the
42:06
callbacks being synchronous or asynchronous. Yes. Someone asked are callbacks synchronous? You can maybe go over that. Yes. Does it affect playbook duration if RSR is down or
42:21
unresponsive? The callback plugins are synchronous, which means it is blocking. If the RSR happens to be down, it will slow down the playbook because it will eventually time out. It won't have a result on the playbook in that it won't fail
42:40
the playbook. This is part of why it's important to keep the latency between your Ansible control node, the RSR and the database server, if you have one, as small as possible. Even 15 milliseconds adds up to the RSR server of a larger playbook.
43:01
And then another question that I saw was are all the Django properties exposed in the R server configuration file? So not quite. We expose it only on a need basis. So every now and then someone else will come and have a particular need for a specific
43:22
setting. Django is mostly an implementation detail in the sense that we use as little as possible from Django. So it, the settings files, the settings files, sorry, contains what people need physically.
43:42
And with that, I don't believe we have more questions, but we're running out of time. So feel free to come chat in the chat room or on the IRC and matrix.