Next Level Artifactory and Xray HA Data with PostgreSQL Containers – Steve Pousty, Crunchy Data

You run Artifactory or Xray in Kubernetes and you are wondering how to get the PostgreSQL behind it to be High Availability (HA). This talk will start with a bit of discussion around some of the considerations when running a RDBMS in containers. After that the rest of the talk will all be demo of:
1. Spinning up a HA PostgreSQL with Kubernetes Operators
2. Hooking Artifactory or Xray into that DB cluster
3. Scale up both the JFrog binaries AND the database.

By the end of this talk, you will see how easy and straightforward it is to run HA JFrog with HA PostgreSQL – all in Kubernetes.

VIDEO TRANSCRIPT

All right. That’s me. Crunchy Data, that’s the company I work for. We’re Postgres people. And that’s where you can find me, thesteve0. That’s a zero because I’m elite like that. Just to let you know… I’ll let you know as we go along. Everybody ready?

So the agenda… it’s a big one. Ready to write it all down? We’re going to talk DevOps and Kube a little… Kubernetes. How many of you are already using Kubernetes? Three… four… so about half the room. Five. Okay.

How many of you are actually Ops people? Raise your hand, really, if you’re Ops people? I need to see…

Okay. How many of you are actually Developers? And then those people who didn’t raise their hands, what are you… you’re DevOps or you’re in between or you’re SysAdmins unwittingly because no one else will do it? Is that kind of what you are?

You are like, “I’m a Developer but no one’s doing… okay.” Good.

And then demo. That’s the whole agenda. There’s a lot of rules. Get ready for these. You will ask questions. I know they said you can wait… you should wait until the end. What that just means is, I may cut you off because I only have the 45 minutes. So I may say, “Well, let’s talk about that later in the room.” But I like questions during the Sub Talk because if people are getting lost or have something… and there’ll be down times when we’re spinning up the demo when things are spinning up, where that would be a good time to ask questions as well. Okay?

And then the other part is to have fun. That’s the whole… those are the only two rules all right? So nobody be too serious.

So why Postgres? Now in the real talk. Why PostgreSQL? And I say seriously, you folks are all brilliant. You’re probably all using Postgres currently. Is that true? Who’s not using Postgres anywhere? Right. Exactly. So I don’t need to convince you to use Postgres, right?

I mean, even the JFrog stuff ships with Postgres by default out of the box. So this is a pretty natural fit. But why Kubernetes? So only half of you in the room said you were using Kubernetes. So let’s go into a little bit about… so before I was at Crunchy, I was at Red Hat and I worked on the OpenShift team which is Red Hat’s distribution of Kubernetes. So you get to hear a little bit of why I think that Kubernetes is actually a good thing. Because the main reason is it’s because it’s the level of abstraction you actually want to be working at. Right?

Most of us who are doing develop… especially those of you who are Developers who are also SysAdmins, you are definitely not working at the level of abstraction you are working at, right? You are reading how to install RPMs and do all these strange configurations and playing with network settings and playing around with storage and all these stuff you actually don’t really know… either know much about or want to spend much time doing. And so I’m going to go through some of the reasons why we love… please elaborate Steven on why this is the right level of abstraction, right?

And so, first it works with Containers. So you can work with Containers without Kubernetes but how many of you have worked with more than three or four Containers trying to orchestrate them? Has anybody tried that? No, because you’re smart, right?

Once you move past running a single Container, it goes sideways pretty quickly trying to get everything going. And so Kubernetes allows that. But the other nice part about Containers… the Red Hat guy who worked on SE Linux and putting it into the kernel, when I was with him at the first DockerCon, he said he doesn’t care about all this other stuff with Containers. What he loves about Containers is we can finally deliver software the way it’s supposed to be delivered. It’s not just putting down bits on your machine. Right? It’s not just, “Here’s an RPM.” And now you got bits and now you got to configure and do all these stuff.

You actually have running software ready to go inside of a Container. You say, “Docker run.” Or you run it and it’s all configured. So the good parts about this is it’s immutable. So if something goes wrong, what do you do? Do you have to reinstall, and do all that, and uninstall and figure out which settings you change? No. You basically just restart the Container because it’s ready to run. And the second part is, experts can make the Container and you can just consume them. Or your IT group can build on top of that Container. So it allows for good building. Is this useful to people? This discussion?

I don’t… if everybody is bored, I don’t want to keep talking about stuff that everybody’s bored. So everybody’s good with this?

The other nice part is it gives you multiple ways to describe the configuration of your Containers with the same concept. So the concepts don’t change, but you can choose your language. So you can do YAML or JSON if you want to. How many of you like working directly in YAML or JSON? No. You do? You guys are a rare breed.

You can work in Helm. Have any of you tried Helm? So Helm is a nice configuration manager and it’s what… I’ll show you the Artifactory Helm templates later. And then you can also write in Ansible. Are any of you using Ansible already in your company? All right, so if you already know Ansible you can use Ansible as a configuration management for your Kubernetes cluster. There’s probably other ones too that I’m just not aware of, I haven’t been in the ecosystem for over a year so everything’s different now.

Software providers can make self aware packaging. So rather than just delivering Containers you can actually make something called an Operator. Which includes Containers but these… an Operator knows actually how to upgrade itself, it knows how to scale itself up and down. For example when you scale up Postgres can you just spin up new replicas? Yes. Can you scale down replicas? No problem. What happens if the master goes away? Is that a simple problem? Can you just spin up a new master again? No. That’s a bad idea. Right? If it doesn’t have all the data, if it doesn’t have all the settings… So the Operator and I’ll show this to you later, has way of handling failure in a way that simple Containers, by themselves, cannot. So if you haven’t looked into Operators for Kubernetes yet, I highly recommend you look into Operators.

And then this is the part where I say it’s another part of the level of abstraction, is you install and manage software in a consistent manner. And you’ll see this later, in that when I install Artifactory and then when I install Postgres we’re working at the same level, I didn’t have to go learn how to install Postgres from Source or from RPMs. And then what that configuration and where it’s configuration files were. And I also don’t have to do the same thing with Artifactory, installing from RPMs and learn what it’s configuration file are and where it stores its secret. It’s all the same.So once you learn how to install and manage software in Kubernetes, all your software is installed in the same way. And that’s where I’m talking about that level of abstraction.

And finally, and this is since a lot of you work with Developers, either you support them or you are yourself, Kubernetes gives you a really clear separation of concern. So that last statement comes from my therapist, which is clear boundaries, infinite possibilities. Right? And if you remember nothing else from this entire talk, this is what I want you to remember because it’ll make you a better human being. And it’ll make the world a better place. So if you think about most of the places where you fight within your organization, where do most of them happen? It’s where most people… where two groups think that they own that thing and they are the ones who should decide what’s going on. Think about when you fight with your partner, your spouse, your kids, usually with your kids it’s that they don’t understand that the boundary is there and they think they can be there. But it’s where there is a shared boundary and it’s not clear who is in charge.

And the nice part about what Kubernetes does is it makes that boundary pretty darn clear. The person who maintains the cluster, can setup the cluster can specify the Containers and all that stuff, and the Developers you can set environment variable or you can set secrets, you can set environment variables and you can deploy things and that’s it. Right? You’re not going in and touching the networking. You’re not going in and changing the versions and Containers. Right? The people in charge say this is the software that’s approved and the Developers don’t actually care because it actually runs for them and they can just install stuff. So that’s all the reasons on why… the Box guy gave a ton of great reasons for Kubernetes as well. This last one is a great reason to sell your Developers on using Kubernetes. Because they can just do the things they want to do without having to muck around with software.

Okay, so that’s it for the intro. Any questions on that intro? Everybody’s going to go home that’s not using Kube and is going to use Kube from now on, correct? Okay, good.

Well wait, what is the one take home message?

Thank you, clear boundaries infinite possibilities. Apply that in your life. I’m telling you, I’m divorced and now I’m with someone for six years and that message has been one of the best messages for marital or relationship happiness you could ever have.

All right, so the scenario is Artifactory HA right? So, as I said to those people who have come in later, what I said in the beginning is originally the title said Artifactory or Xray, it’s all the same. Basically, the way JFrog handles it is, we do the app software, Artifactory, XRay… you’re going to give us a database… we can give you one but if you want high availability that’s up to you. And it’s the same process for either one. You spin up a high availability database and just plug it in, right?

So I’m just going to show Artifactory today, but the process would be the same for Xray. I don’t know if it is for their whole new metadata big suite. I was furiously texting [inaudible 00:09:17] beforehand saying, “Hey, hey, hey. Does this work the same for that whole big suite?” But he never answered.

So, you count on Artifactory for mission-critical work. Right? If developers can’t get their packages, how happy are they?

Thank you. That wasn’t a hard question. Actually for you, I have a sticker. For volunteering, yeah. You’re welcome. Oops, sorry.

So, the problem is… as I just said, not only do you want the servers to be HA but you also need the data to be HA. How many of you have had your database fail under an Artifactory? Yeah, and what happens with Artifactory once the database goes away? Everything stops, right? So that’s great that you’ve got six Artifactory servers, but if you don’t have database servers behind it that can stay up like that, you’re dead. Right? So were actually going to do that today.

This is what I just said. So how do we get PostgresQL to be HA? So I’m going to use Kubernetes and Operators to show you the simplest possible way to do this. All right?

So Crunchy Data, that’s us, we’re going to use our PostgresQL Operator. That’s the sticker symbol, is the hippo, that’s our symbol. I like this one because it’s judging, and as a New Yorker I like to judge, right?

So demo time, we’re going to… because I was on OpenShift for so long, we’re going to use OpenShift as your Kubernetes distribution, but all of this stuff works in plain vanilla Kubernetes. So you don’t need to… it’s just the interface won’t be as nice. Okay? We’re going to start from a blank namespace/project. For those who are not using Kubernetes, a namespace is what you do all your work in. Right, it’s kind of like a Sandbox and in OpenShift it’s called a project rather than a namespace. Cool? Good? Because I want to prove to you that you could do this and we’re going to do it in less than 45 minute. Some pieces take a little bit, we’re spinning up servers, right? But that’s a good time to ask me questions. Or we’re just going to stand here quietly and awkwardly and I’ll babble on about other relationship hits. So, let’s get going.

All right, switch. So first, I will show you, here’s OpenShift. Really complicated front end which I always complained about when I worked there. This is our project or namespace. What’s in it? Nothing. Ready? Let’s go.

So… oh and here’s the Helm chart, I’ll show that to you in a bit though. So let’s get started. The first thing we need to do is, we’re going… I’ve already installed the Postgres Operator into a Postgres namespace. And the Postgres Operator is basically like a little rest service that knows how to manage installing and watching clusters. So, I don’t want to expose that to the outside world so I’m going to actually set up some port forwarding to talk to that. Otherwise I won’t be able to talk to it.

So here’s my command. Yes you can’t see this, that’s okay, because I will show it here. Is that big enough for everybody? Yeah? Okay. So what I’m doing here is I just set up port forwarding to a Pod. For those who are not Kubernetes fluent, you can think of a Pod as a Container. Okay, it’s more than that, but it’s a Container in this case. And we’ve just set up port forwarding to eight, four, four, three. So we can talk to the Operator.

So now, is that still big enough? Okay. Let’s spin up a Postgres cluster. And the reason I have a script, because no one likes watching the presenter put in a typo, right? So… so I’ll hit it and then we’ll talk about it. So, what I’m saying here is, “Hey, PGO is our Operator command line.” Were saying, “Create a cluster, name it A Cluster.” Because I’m really witty. “I don’t want backrest.” Which is the backup piece in there, don’t put that in there. And the replica count, I want to have one master and one replica. And the namespace I want to put it into is Artifactory. And so it says, “Okay, great. I’m off doing that.”

So now, if we go look at our cluster. It’s already spinning it up. So this is the Pod, the A-Cluster by itself is the master. Is that big enough? No, no one can… can you see that in the back?

Yes, no. You’re… you’re more in my age group and you don’t have glasses on. How about that? Is that better? Okay.

So the master spun up. The master is running, notice that the replica did not spin up. Notice how it’s light blue. Can you see that? Let me click on that. See how it’s light blue? Oops. It’s still light blue, good. It’s light blue that means it’s… we’ve pulled down the Container, but it’s not ready to serve content yet. So the master was light blue and then it became dark blue. Yeah?

With no data. We did make a database by default with the same name as the project’s name.

There is one scheme in. We put a scheme in… oop, we put a blank scheme in, it’s just database, no DDL. We haven’t done any other DDL on it.

And now it’s up, right? That’s how much it takes to spin up a HA cluster for Postgres. How long would that have… have any of you spun up HA Postgres before? Yeah, how fun was it?

Yeah, and how much did you enjoy reading all that stuff and doing all that stuff?

Yeah, all right. So how does it work? I’ll just show you one quick thing. Services in Kubernetes is the… Kubernetes has this concept where there’s Containers and then it’s going to build a service that you want to talk into a Container with. Right? Into those Containers. It’s basically a load balance. It’s a proxy and a load balancer. Because you don’t want to… if you spin up multiple replicas, you don’t want to keep track of all those different Pods that are spinning up, or Containers. You just always want to talk through that service. Right? And that IP address for that service is guaranteed for the life of the cluster.

So we just spun up that service. That got created as well. There’s a service for the replica, and a service for the master. If I click on the master, you can see that it’s routing things to the Pod, that you probably can’t see, because that’s really small. You can see here, it’s routing to that Pod, the A-cluster pod, not the… if I go back here. It’s routing to the A-cluster pod, right? Not the… the A-cluster pod, not the A-cluster-FPYZ Pod. Got it? Is that relatively clear, as mud? As mud, no. Not as mud? Good, thank you.

All right, so we’ve got our cluster running. So now, we’re going to spin up Artifactory. And again, this is where I was saying things are really easy in the Kubernetes world. So I go to my script… oh first I find… oh, Artifactory has a Helm chart. Awesome. I’m already added the Helm Repo and the Helm command line, and I’m just going to install the chart now. And so, we originally were going to do the HA Artifactory but somehow we couldn’t get the licensing team to give me the correct license in time for the talk. So I can spin up HA, I just couldn’t get a license for it in time. So…

We’ll just show the single, but it’s the same thing with the HA one. Sorry. All right, so I’ll paste it and then we’ll watch what’s going on.

So, we’re saying… you can say upgrade dash dash install. Which means if it’s there upgrade it, otherwise install it. And then, the rest of this stuff says, “Name it Artifactory Single, use the Jfrog Artifactory Helm Chart, put it into the namespace Artifactory, and I’ve got a YAML file where I want you to read all the internal configurations.” Right? And I didn’t show you that. And how are we doing on time? What does that mean?

22 minutes left? If we have time towards the end I’ll show you the YAML files, I’ve got them here. That I don’t know how in gedit to make them bigger, but I’ve got the YAML files and will figure out how to make the font bigger and we can go through them if they want. Let me just go all the way through… well actually, Artifactory takes a while to come up.

What?

Yeah, oh Command Plus? No.

It’s not a Mac. Oh, who uses a… I’m all about Open Source.

No. I’m trying Control Plus, Shift Plus. No.

Yeah? No. No.

I’ll put it into a different editor. How about that?

Well actually, while we’re waiting for VS Code to spin up, let’s go back over here and show what’s happening. So we’ve started up two different things here, and this is actually an important point. This is another nice part about Kubernetes spinning stuff up. They are using a StatefulSet, which is a precursor to the Operator. We’ve already spun up the Artifactory. How many of you have spun up Artifactory on your own from the Command Line?

Even though the Container’s up, what still has to come up?

The JAVA app. Right? So even though the Container is up and that’s why it’s dark blue, we’re still waiting for the JAVA app to start. So that’s why, the NGINX Pod is showing I’m not ready yet. Because, if we go to the NGINX Pod, it’s actually ready, if I look at the logs for it, it’s been up for awhile. But if I show you, the events… it’s hard to see it when I’m all the way… if I show you the events on this one, we’re getting unhealthy. So Kubernetes has this idea of liveness probes and readiness probes and if you do a HTTP one, if you get back at 404 or anything other than 200 to 399, it’s going to say, “I’m not good.”

So what’s the JAVA app returning at this point?

Either returning nothing or it’s giving a 500 error message because the app server is not up, it’s doing stuff. So NGINX is saying, “I’m not ready to serve content, I’m not going to start serving content until the app server is actually up and ready to serve content.”

So this way, why is that good for you?

Because you don’t sit there and spin stuff up and put it into production before it’s actually really ready to show stuff in production. Right? It’s actually holding off. So let’s see if it’s done now. It’s done.

So if I want to see this one, I’m going to leave that one alone. I go to applications, services. So we have this Artifactory NGINX, here’s an IP address, I could make a… I could make a, which will have a name, but this is good enough for now.

It’s the proxy in front of the Artifactory.

You don’t have to think about it, right? You’ve probably read, “Oh, I should really proxy Artifactory behind something.” And you’re like, “Oh, I don’t want to deal with that connector and I don’t want to learn yet another software package.” This is again… the experts at Jfrog, [inaudible 00:21:01] said, “I’m going to build a Helm Chart that does all the thing properly to bring you Artifactory and NGINX all configured. Not starting up, when it’s really starting up. You just install the Helm Chart and I’ll make magic happen for you.”

So it worked. So we just spun up Artifactory… yeah?

The Helm Chart knows where to pull it from.

But is it?

No, this is all running up in a cluster, running in Google. So it’s an OpenShift cluster that I set up in Google. While, I didn’t set it up, my Ops team did, because I hate the admin part. I’m a Dev person. But I’ll take credit for it. I should’ve. I totally set that up.

All right, so next, ready?

That’s not what I wanted to see right now. If we have time. Okay, here’s our license. I got the license. But now I have one more ALT TAB to do. Got to remember that. We’re licensed, let’s make a password. Oh, just so you know, if you put in a password that does not pass the… if it’s weak, it will not let you put that password in. Just to let you know. Someone might have figured that out while they were doing this. I don’t have a proxy server, let’s make a generic one because that’s the easiest for one when you work with. But let’s make this one. Let’s try one of the new ones. Anybody doing R at their company?

No? Yeah, but you’re at Jfrog. How about anyone doing Docker at their company? That’s not one of the new ones is it? What was one of the… oh, Conda, anybody doing Conda? Python? No what was another one of the new ones you guys announced?

What?

Go.

Go. Is anybody doing Go?

Okay, because of him we’ll put a Go repository in there too. There we go, so we’re finished. Awesome. Look, we’ve got all our repositories set to go.

So let’s go to generic local. Oh, I can’t talk to the Operator now. So let me just go back. Because if we have time, I’ll clean it all up at the end to show you how easy it is to delete everything. So let me go here. Redo the port forward. Okay.

So, here put in my password. Have you guys seen this screen before? Do I need to make it bigger or does everybody know what I’m doing? Does everybody know what I’m doing? Okay, because I just want to upload something generic.

So, let’s go ahead and upload something generic. I’ve got something in my home directory. Let’s clear this screen. Paste this. And then the name of the file is helloswamp.txt, you guys are amazed at my originality, aren’t you? Between a cluster and helloswamp… okay. Uploaded a file, let’s go see it. So we go here. Generic local, and there’s our file. Okay, so have I proved to everybody that this Artifactory repository is working? Okay.

Ready? Disaster time. So we’ve got our… I’ve just set up a… so first of all, is that faster than you usually set up an Artifactory cluster? And easier? I hope I’ve proved why Kubernetes, there’s no more discussion on why you should be moving to Kubernetes, right? Because that to me is amazing. All right, but, let’s go ahead and show you now why you should run an HA.

So here I am back in my Kubernetes cluster and we’re going to go to overview. And we said again, this Pod, the A-cluster one is our master, right? If we look at the name again, here I’ll actually look at the Pod, see it’s like dash six six nine blah blah blah blah blah blah. That’s actually going to be the same as this here. So the service routes to that Pod, that’s our master, right? And the service name for the master, is A-cluster. Figure that’s the same name as our project.

Now, I’m not going to cheat by doing some sort of Kubernetes kill. Right? What I’m actually going to do is test everybody here’s knowledge. How do I kill a Container? Within the Container? This is just Container knowledge.

Nice. Sticker for you. So basically you kill across the main process and the Container says, “Oh my main process is dead, I need to start over. All right, restart the Container.” Which is great if you don’t have stateful stuff, but is a database stateful? Very much so. So you don’t… I’ll do this first. PS-AUXW the process for post… can I make this smaller just so I can see what’s going on? Let’s do that one more time. Okay, I want to kill this Postgres process, which is 110. PS-9 110, watch what happens. PS… not PS… where was the programming here folks? Kill dash 9. And what happens immediately? The terminable is disconnected, that Container is dying. If I go back to the overview, here’s our A-cluster. You’ll notice this is no longer ready. That dark blue is it killing it. That Container is gone.

Now, watch what’s going to happen. Should I spin up… why didn’t we make this master? Actually this should already be master. Let’s see if it’s changed it. Yeah. Look what happened to this service. Can you see that? What Pod is it pointing to now? A different one. The Operator knew, and if I had been fast enough, you would’ve seen while that Pod was dying… until that Pod was completely gone for the original master, it would not have swapped the service. Have any of you had a master die and spun up another master too quickly? Have you ever tried that? It’s called split in Postgres, where it doesn’t know which is the real master and the whole cluster is now hosed.

So the Operator knows, “Na-uh, I’ve got to wait until that thing is completely dead and then I switch the service over.” So this is our new master now. It’s using that one as our master. And it should’ve by this point, spun up another replica. Right? This is our old one, which is now our master. And this is now our replica. So we have a…. not only did we failover that fast, but we have another replica in case we fail again.

And so, just to prove that it’s still running, I will refresh this page. And it is still running. Okay? How many beepers went off? Zero. How much work did I have to do, other than killing the Pod to make it fail? Zero. Right? So for those… especially for those like my friend here who is unwittingly being SysAdmin and you as well, I think you were as well. Aren’t you like half-wittingly a SysAdmin. This is perfect. No beepers went off. Nobody got upset except for maybe five seconds while the failover was happening and they were like, “Oh I was down, oh I refresh, it’s back.”

Right, so we’ve set… in a couple minutes we set up a HA availability at the data level as well. Should I scale up my replicas? Do you want me to scale up the replicas? Does anybody want to that that? Yes? Who said yes, you did again. I already gave you a sticker. Someone else has to speak up.

So that’s simple. That should be… let me see if I can memorize this one. PGO scale… is it PGO scale… yeah I think so. And then there was a cluster. And it says, “Are you sure?” And I say, “Yes.” And it said, “Great.” And then I go back here and now I have another one that’s spinning up. Right? So there’s a lot of load, there’s a lot of load I just scaled. And, if I kill that main one again, it’ll keep two up at all time now.

How about adding a… do you want to add a… a port, not a port folder, a connection port? So suppose we say, “Oh.” Suppose this was just a normal development cluster, do you see how easy it would be to one of your Developers to spin up now an HA cluster. So that when they’re actually doing their Dev work they can see what it feels like. They could actually do reads from the replicas and writes to the master. Build the right architectural pattern right from the beginning. Because once you’ve been the Operator in the cluster, anybody can use this.

So if I want to add… now I want to add a connection pool. I’m going to add PgBouncer. So all I say is create PgBouncer in that cluster. Does everybody know what PgBouncer is? It’s a service connection pool, so rather than connection pooling in your application you actually… let me show you that it’s up first and then I’ll explain it. Because then you’ll be like, “Oh, he was just talking while it took forever to spin up.” It’s there already. Right?

So what it is, it’s a server that runs as a connection pool. So rather than putting in your app… because if you put the connection pool in your app and you want to change anything about your connection pool what do you have to do? You have to bounce your app, which may not be a good idea. With this, you can actually have the connection pool outside of your app. And you could make a bouncer both for the replica and a bouncer for the reads and the writes as well if you wanted to. Okay? And you can actually… you don’t even have to bounce the “bouncer” to get it to do connection settings. You can actually make rest calls to it and have it change configurations on the fly.

Okay, so that’s how easy it was to add it. Or you could add multiple ones and chain them together or whatever. But the point was, there was no… how many instruction manuals did I have to read to do that? One. And it says how to add the bounce PGO, create bouncer. And then once I memorized that, I’m done. So that’s the beauty of an Operator. Okay?

So if you’re using Postgres for your apps as well. I highly recommend moving to the Operator. All right? All right, so I think… oh you want me to kill it, the cluster? Want to see how easy it is to kill. Let’s kill the database first. And I can show you… it takes a little while on this one, but it already made all the PVC claims for those of you that use Kubernetes this is how it asks for storage. And it will even clean up its own storage.

So we’re just going to say… did I put it in the script? I don’t think I did. No. For the PGO, it’s PGO delete dash D dash B a cluster, so the dash D says clean up your data storage too. Because you don’t always necessarily want to clean up your data storage, right? The Container might be bad, or you might want to somehow get that data back. What did I do wrong? Oh right. No. What did I do wrong? PGO delete, oh right. I actually want to delete a cluster. Because you can delete the bouncer or whatever you wanted to.

So now if I go back here, I’m going to make this a bit smaller, just because you don’t really have to read it, you can just watch what’s happening. So, you can see it’s kill already a couple of the replicas, it’s killing the masters… it’s killing the master and it’s killing the other ones. They’re all gone. My database is gone. Completely gone. To prove it, let’s reload Artifactory and that’s where we’re going to stay with Artifactory now. Right? And if I go back here and look at storage, you can see that most of the storage has been reclaimed. Kubernetes is a little weird about timing and reclaiming storage but it will eventually all get reclaimed. See it just got rid of another one of the storages. Should we get rid of our Artifactory now too? How about we do that? Let’s do that.

So we say Helm purge, I think I called it… what did I call it, Artifactory Single? Artifactory Single, I think this is the right command. No. Oh, Helm… sorry, Helm delete dash dash purge Artifactory Single. And so now if I go back to my cluster again, we’re back to our original empty project.

So final message on why this makes Kubernetes and Operators and Helm charts great? You want to play with Mongo, you’re not using Mongo in your company. No, you don’t want to play with Mongo, Mongo is disgusting. You want to play with Node, Node is awesome. And so you want to play with Node, you don’t have to learn how to install any of that stuff. And you don’t have to learn how to clean up after yourself. You have Operators, you have Postgres and then you’re done. Right? And you spin it up, your Developers can spin it up, you as the SysAdmin can say, “Here’s the Containers I want you to use and the Helm chart.” And the Developers like, “Awesome, I don’t have to learn how to install all of this.” And you’re psyched because you’re like, “I know exactly what version they’re going to be using and I can tell them to set up Postgres HA so it’ll be exactly like I’m going to have it in production. So there’s no weird configuration movements.”

So that’s it. We’re done. I can do the wrap up. Hold on and they I can do questions. Let’s just do the wrap up.

Oh it’s this one. So wrap up. Oh, I didn’t animate it. Kubernetes make your DevOps and Developers life much easier. It was really easy to get Artifactory or XRAY to be truly HA. And then the crunchy ProsgresQ Operator really helps you level up your PostgresQL skills. So don’t tell anybody you’re using the Operator, just start using it and be like, “Yeah, I’m totally awesome at Postgres. I spent a couple weeks and extra hours doing that. So I’m going to do some comp time at the beach, because I worked so hard on learning all that Postgres stuff.” Okay?

And then, there’s the slide deck again if you want to come back to the slide deck. And that’s how you contact me.

And now… oh and on the deck at the end, if you do decide you want Crunchy stuff, I’m not going to talk about it, but it talks about who Crunchy is as a person. Okay? Or as a company. Not really… I am crunchy, no just kidding. It’s a pretty big company.

Any questions?

I know but we have time.

If we run out of time…

Now? Can we answer it here, because then I can put it on the video? Please, dad?

Can we take a vote?

Yeah. How many people want to answer questions right here, right now? How many people want to wait until we go to the other room? So nobody. All right, so the majority wins. Because everybody else is like, “I’d really like to go early, so I can get myself a snack.”

You can leave now if you want, we’re done with the talk. So it’s just questions.

Yeah?

Okay, so the question was, I’ve already got Artifactory set up with one Postgres, how easy would it be to actually spin this up and then plug it in?

So I don’t know how you set up Artifactory.

You used Helm as well? I’m not a Helm expert, I think you can do… you change your PGO YAML to point to the new cluster.

Oh, yeah, yeah, yeah. So first what you’d have to do is declare a service window. Right? Stop writes to the database. You can allows reads, but stop writes. Do a dump. Set up the cluster restore to the new cluster. Right? Just to the master, because it will automatically send everything to the replicas and then point to the new one.

Yeah, I don’t either. That… So I’m assuming… If there’s something… I don’t think it should be special it should just be you should dump and restore. But there are some great Jfrog people here who would I’m sure would know what’s inside that data. I just run the databases, we don’t look at what’s inside.

You have done that same thing? That’s what you would do. He’s done it. So actually if you have questions, forget the Jfrog people, just ask this guy.

He deserves a sticker, yeah?

Yeah, he gets a sticker for all the work he’s going to do. You get a sticker for that. For volunteering yourself to answer everybody. That’s so nice of you. God, you’re the best.

All right, any other questions? Yeah?

How am I connecting them? Thank you.

All right so, I did start up this. You can see my company’s beginnings of a cultural guide to slack. How many of you guys have slack at your company? How many find it a source of contention within your company? Because some people hate it and some people love it. So that’s what we’re trying to do.

Okay, so we’re on the desktop. I think I’ve… yeah, Artifactory Single the YAML. So this is the YAML file that I patched in and then the way that I set that up is if you go down here… no not in NGRES, that’s… Artifactory, okay we’re setting up Artifactory. Oh, where is it? Going, going, going, going, going, going. Okay. So… no, that’s not it. Where is it? It’s after the Postgres… there’s the data store resources. I gave it more memory there, just so you know. There’s NGINX, what where did the database stuff go? There’s this thing… you guys should’ve been like, “There’s this thing called Postgres.”

Okay, network policy. That’s not the right one. 16. Here we go. So first thing we had to do to people on the video, I’m going to this whole beginning section. I had to set enable defaults, because this Postgres stanza here, this is for the default one that comes with Artifactory. So you’re saying, “Yup, I don’t want that one.” Right?

So I could’ve deleted this, that entire section after that, because all that stuff pertains to the included one. So here, now there’s another section called database, and in there I say PostgresQL. And then the host, I pointed to the service name inside the Kubernetes cluster. Right? I want to use the name not the IP… I mean, I could use the IP but the service name is better. And that service name will always route to that IP address which is great.

Steve, what did I tell you about the questions? Where they should be?

They’re here, because I need to show them the stuff.

You can show them the stuff upstairs.

We still have time. I’m not over time.

No, you are, as of now you are.

Okay, one more minute. So then the last thing, because this is the last thing I want to show which is the normal stuff. But here, this is another great part about Kubernetes, my cluster actually made the secrets when I spun up the Operator. The cluster… the Operator made the secrets for the username and password. And so, now as long as I say this, as long as I keep calling my cluster, A-cluster, this will always work. Does that make sense? Because the service name is the same and this is the same.

If I change the name of my cluster, then I need to change this name, this name, this name and that name and then everything will still work. But that… see again, common Operating plane. It’s just changing the YAML files and referring to secrets, it’s not some weird everything else in UNIC sockets and things I don’t want to know about.

All right, thanks everybody. Now we’ll go and answer questions there too [inaudible 00:40:56].

Yes.

Try JFrog for free in the cloud!