Learn Python with Talk Python's 270 hours of courses

#33: OpenStack: Cloud computing built on Python Transcript

Recorded on Friday, Oct 16, 2015.

00:00 You've probably heard of infrastructure-as-a-service cloud providers such as Amazon AWS and, to a lesser degree, Microsoft's Azure cloud platform.

00:08 But have you heard of OpenStack?

00:10 It's an incredibly powerful infrastructure-as-a-service platform where you can buy it as a service or install it in your own data center to build your own private cloud.

00:19 Yeah, private clouds. That's a thing.

00:21 Flavio Percoco, who works at Red Hat and spends his days writing Python code for OpenStack, is here to tell us all about it.

00:29 This is Talk Python2Me, episode number 33, recorded October 16th, 2015.

00:59 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem, and the personalities.

01:06 This is your host, Michael Kennedy. Follow me on Twitter where I'm @mkennedy.

01:10 Keep up with the show and listen to past episodes at talkpython.fm, and follow the show on Twitter via at Talk Python.

01:17 Let me introduce Flavio. Flavio Percoco is a software engineer at Red Hat, where he spends his days working on OpenStack.

01:24 In his spare time, he speaks at conferences, contributes to Rust, plays with MongoDB, smokes his coffee, and drinks his pipe.

01:32 Flavio, welcome to the show.

01:34 Thank you, Michael. Thanks for having me here. It's really exciting.

01:37 Yeah, it's really exciting, and it's great to catch up with you. It's been a few years since we've met up at the last MongoDB Master Summit in New York City, right?

01:44 Yeah, it is. I think it's exactly like two years from there, yeah.

01:48 Yeah, almost. Cool.

01:50 So we're not going to talk about MongoDB today, even though it is excellent.

01:54 We're going to talk about OpenStack and your work at Red Hat and cloud computing and all that kind of stuff, right?

02:00 Yeah. I'm really excited about sharing more stuff about OpenStack.

02:05 I spend most of my time there, honestly, so I have a lot to say.

02:09 Yeah, that's excellent.

02:11 So before we get into what OpenStack is and all the details, what's your story? How did you get into programming?

02:17 I guess my story about how I got into programming is not like...

02:22 I guess there are many people like me out there, but it's not like most of the cases where you just like...

02:26 You were born knowing that you wanted to be a programmer.

02:28 In my case, I actually didn't know what I wanted to do until very late.

02:33 And I started digging into different areas.

02:36 I went to study medicine, and then I went to be a psychologist, and then I wanted to learn foreign languages.

02:43 And at some point I said, like, let me...

02:46 Like, I saw this lump course that I...

02:50 Somewhere, and it's like, okay, like doing webpages.

02:53 It sounds cool.

02:54 And I just gave it a try.

02:57 And I just fell in love with it and started doing more.

03:00 And I guess that's how I actually started.

03:04 I tried to go to college, and it just didn't work for me, actually.

03:08 And I just like...

03:10 I dropped out of college at some point, and actually it was very early in my career, in my studies there.

03:16 And I just went straight to working.

03:19 And I already knew how to program, and I had done a couple of courses anyway.

03:23 And I got into my first job and started improving and learning a lot from open source.

03:28 And so I guess, like, it would be fair to say that, like, my background in programming is actually just open source.

03:35 I started learning from other projects and sharing everything I did.

03:40 I joined IRC channels and spent a lot of time there and learned from others.

03:44 Many good people out there.

03:46 And I guess I just made my way through it and got where I'm at today.

03:52 Yeah, that's excellent.

03:54 And, you know, I had a similar path in that I sort of became an accidental programmer.

03:59 I just learned programming because I was trying to do something else, and I needed to know it.

04:03 And I realized, wait, this is way better.

04:04 So, yeah, there's a lot of us out there like that.

04:07 Yeah, I feel really lucky to have just sort of stumbled into such a cool area.

04:12 Yeah, same here.

04:14 Yeah, so that's how you got into programming.

04:15 How did you get into Python?

04:16 Well, like I said, like, my first approach to programming was that LAMP course I did a long time ago.

04:25 So that obviously means that I learned PHP there.

04:28 And from PHP, I just decided that I wanted to create my own web browser.

04:32 So I started learning C Sharp for some reason because I didn't know enough back then.

04:37 And I just, like, started playing with it, and I had all the plugins and stuff.

04:40 And then I realized that that wasn't actually a very good idea.

04:44 And I found Python through a friend of mine.

04:46 And he just started explaining it to me.

04:49 And I also attended, like, a small, like, Python 101.

04:52 And I just, like, took off from there.

04:56 And my first job was actually on Python.

04:59 And it allowed me to learn way more about it and, you know, like, improve my skills.

05:06 And I just kept doing Python ever since then.

05:09 Yeah, that's excellent.

05:10 And today you get paid to write open source code with Python, right?

05:15 Yeah.

05:16 That's awesome.

05:17 So what do you do?

05:18 I get paid to write open source code.

05:21 And it's, like, 100 upstream.

05:23 So I'm even happier because I'm just, I feel like I'm giving back to all those guys that, at some point, they gave me a lot.

05:30 And they allowed me to learn.

05:31 And so I like, like, one of the things I love is not just the technology I'm working on, but the fact that I know that it will be used by some other people to learn how to program.

05:40 And I'm also part of all the, like, you know, like, mentoring other people.

05:45 And there are several programs in OpenStack to do that.

05:47 And I'm always, like, trying to participate there.

05:50 So that's part of, like, what excites me the most about my current job, actually.

05:54 Yeah, that's great.

05:55 And you work at Red Hat, right?

05:56 I work at Red Hat.

05:57 I'm a software engineer there.

06:00 And, like I said, I work 100% upstream on OpenStack, mostly oriented on storage projects.

06:07 Like, OpenStack has many pieces.

06:09 Like, it's huge right now.

06:11 There's something like 375 GitHub repositories or something like this, right?

06:16 Yeah, it is insane.

06:17 Like, many of those are services.

06:21 Tons of them, like, probably most of them are, like, libraries.

06:26 And then we have a lot of projects that we use for CI that we have written ourselves.

06:31 And there are many other projects that started off as part of OpenStack, but they just, like, improved and became, like, standalone services.

06:39 And some others that just died.

06:41 And we just kept the code there, obviously, because it's OpenStack, and why would you ever delete COVID?

06:46 Let's start with what is OpenStack.

06:50 And I just should tell everybody, like, I really don't know a whole lot about OpenStack.

06:54 I've looked at it a little bit, but I'm basically new to it as well.

06:58 So tell me, what is OpenStack?

07:00 I'm going to tell you how OpenStack started.

07:03 It started as an infrastructure as a service provider.

07:05 And it just focused a lot on making sure that you could use all the hardware you have to provide cloud services.

07:13 So it would use all your compute servers and power, sorry.

07:19 All your compute power, and it will just allow you to use it as a service.

07:22 And it will do the same for your networking routers and everything you have there.

07:27 And it will create, like, private networks for you, clouding IP addresses and everything that you would need to have a cloud.

07:34 And it will do the same with the storage and everything.

07:37 But it was very focused on infrastructure as a service.

07:39 So infrastructure as a service is basically using all your, like, metal to provide, like, a cloud service.

07:48 You would just reuse all that and make sure that you can run several services and virtual machines and everything in there.

07:54 If I had, like, Python web app I wanted to host, just, like, a simple blog or something, I probably wouldn't go to OpenStack.

08:01 But if I wanted to create a better data center or my hosting company or something like this, then I would look to use OpenStack to make that happen.

08:10 Is that accurate?

08:10 Right.

08:11 That's quite accurate.

08:13 But there's, and that's how it started, actually.

08:16 But there's more to it now.

08:17 And it's the fact that at some point, the community realized that there was more to OpenStack than just infrastructure.

08:24 And it just, I like to say, it just outgrow itself to the point that it just became a cloud provider, like, entire cloud provider, instead of just focusing on infrastructure.

08:36 And you now have a whole lot of other services that are required to actually maintain a cloud.

08:41 And this is something that I believe the community learned from its own experience while working on OpenStack.

08:50 And it's the fact that to run a cloud, you need more than just infrastructure.

08:53 If you want to be a good cloud provider or you want to have a cloud that you can manage easily without suffering a lot on maintenance and controlling it and ops and everything, you need more than that.

09:06 You need, like, DNS.

09:07 You need to make your networking easy to use.

09:09 You probably need a database as a service.

09:11 You need to make your own database if you have a big, like, you know, developer's team and you want those steps to be able to create databases easily without, like, spending much time maintaining those.

09:21 But there's, like, you can use that in production as well.

09:24 So there are many other services that are not necessarily infrastructure.

09:27 Like, you even have, like, web search as a service.

09:30 So you can store all your files and things into your cloud.

09:35 So there's a lot into cloud development, into cloud management and cloud services than just infrastructure.

09:41 So that's something, like, the community learned by itself while working on OpenStack.

09:45 And it just became more than infrastructure.

09:48 It's now, like, a cloud provider.

09:49 That's how I like to think about it.

09:51 That's how I like to present OpenStack.

09:53 It is a cloud provider, and it will give you everything you need to run your cloud.

09:56 To me, it feels somewhat on par with something like EC2 and the related services at AWS, much more so than, like, somewhere where you can just go get a virtual machine.

10:09 You know, somewhere like DigitalOcean, where they have great virtual machines, but there's not, like, there's not a lot more than that around to help you, right?

10:17 There's not.

10:18 Exactly.

10:19 Exactly.

10:19 Exactly.

10:20 The virtual private networks and the load balancing and the storage and the persistent disks across machines and all that kind of stuff, right?

10:28 That is correct.

10:30 And I've been giving this talk, like, this year.

10:34 It's called Infrastructure as a Service Beyond Infrastructure.

10:38 Well, like, I kind of, like, talk about what I think your cloud should have in order for it to be considered a cloud, which doesn't mean that companies or services like DigitalOcean are not good.

10:51 But they're, like, they're not exactly clouds.

10:53 They just provide a different kind of service.

10:55 Like, DigitalOcean basically just provides you virtual private services, like servers, sorry.

11:00 So you create your server and you have to manage it yourself.

11:03 You don't have everything that you would need to run a cloud right there, right?

11:08 And if you want to put your application in a cloud, you would just go to either OpenSack or other cloud providers that have all those services that you would need to run your application and don't die while trying to run it.

11:23 Yeah, so I feel like services like DigitalOcean are excellent, but if you build increasingly complex and large-scale systems, you're probably going to, at some point, outgrow them.

11:36 And then you're going to start looking around and say, okay, well, I need more than just a bunch of good VMs.

11:42 I need, you know, all this orchestration and putting it together.

11:45 And a lot of people go to places like EC2 or maybe Azure.

11:51 But OpenStack, is there like an online service I can go pay a monthly fee and get access to the system?

12:01 Or is this something I've got to put on just my data centers?

12:03 Oh, not at all.

12:04 There are many public cloud providers running OpenStack right now.

12:08 A good example, probably one of, well, I'm actually not sure if it is the oldest one.

12:14 It's probably one of the oldest one.

12:15 It is Rackspace itself.

12:17 They run OpenStack.

12:18 There's also HP Cloud.

12:20 There's VEX Host.

12:22 There are tons of them.

12:23 There's Enter Cloud in Italy as well.

12:27 So there are many cloud providers, public cloud providers running OpenStack right now.

12:32 They have different versions.

12:33 They're not all running the latest version.

12:36 When you have to decide whether you want to go to AWS, Azure, or just use OpenStack, you have to ask yourself many questions.

12:48 One of the things that I believe make OpenStack the best solution for you is the fact that OpenStack is interpretable.

12:58 Whatever you write on, whatever your application looks like, if you're running it in an OpenStack cloud and you want to migrate it from this cloud to another cloud and it is still OpenStack, you are guaranteed to be able to do that in a painless way.

13:14 Because different OpenStack versions are interpretable.

13:18 They keep backwards compatibility.

13:19 So you can be sure that whatever works in HP, an HP cloud will also work in Rackspace cloud.

13:24 If you write scripts on top of it and everything.

13:29 Yeah, that's a pretty unique proposition because AWS is entirely proprietary, even though internally it runs a ton of open source stuff.

13:39 It's all behind the scenes, super secret.

13:41 Same thing with Windows Azure and some of the other hosting places, right?

13:46 So the fact that you can take this maybe from a cheap hosting company over to Rackspace and then maybe even later into your own data center, if you really wanted to do that.

13:59 Right.

13:59 Right.

13:59 But that's a possibility that you don't really have to worry about, right?

14:02 Because it's all OpenStack.

14:03 Exactly.

14:05 And you don't just have to...

14:07 It's not just about migrating your application from one cloud to another cloud.

14:11 It also applies to using several clouds at the same time because not all public clouds are supposed to run all the services in order for them to be OpenStack compliant.

14:21 I can decide to have my own public cloud running just Trove, which is database as a service.

14:28 And there are other clouds like HP Cloud that did run all OpenStack, right?

14:31 But as a user, if I want to have my internal cloud...

14:37 So let me give you an example.

14:39 Let me put it in another way.

14:41 I may want to have all my web heads and my compute nodes running in one of the public clouds, like let's say Rackspace, right?

14:50 Or HP Cloud.

14:51 I want to have them there.

14:52 But I want all my data to be in my cloud.

14:54 So I can use my own servers and install my database as a service there or whatever, my own database and have a hybrid cloud.

15:01 So it is not just a matter of deciding whether you want to have, whether you want to use a public cloud or a private cloud.

15:08 But it's the fact that you can also mix them together and you are going to be guaranteed that they will be interpretable and they can all use the same service with the same data and everything.

15:20 Really interesting point.

15:21 I hadn't thought of just taking an individual piece and running that locally.

15:26 But yeah, that makes a lot of sense.

15:28 So cloud computing is, of course, important to Python developers.

15:33 But OpenStack is especially relevant to Python developers because Python is used a little bit inside the development, right?

15:42 Yeah.

15:43 I normally say that OpenStack right now, well, when I joined OpenStack, it's probably not true anymore.

15:53 When I joined OpenStack, it was like 500% Python.

15:56 And there was like this 0.0001% of JavaScript because we have a UI dashboard.

16:03 And I say it's not true anymore because we now also maintain like puppet manifests ourselves.

16:11 And that's not Python, obviously.

16:12 We keep like we maintain Ansible scripts.

16:15 Like there are teams focusing a lot on operations and making OpenStack installable and easy to manage and reduce the maintenance more than from users.

16:27 So it's not just like 500% Python anymore.

16:30 But I can say like all the services right now are written in Python and they are mostly pure Python.

16:38 There are some services doing some experiments with Google as well.

16:41 But most of them are Python, yeah.

16:43 Like the community is definitely 100% Python oriented.

16:47 And there are like obviously other tastes for other programming languages.

16:52 Yeah, of course.

16:54 So that's really excellent.

16:55 And I think that's a great testament to Python itself, right?

16:58 That you can build such an amazing infrastructure as a service system with it, right?

17:04 Yeah, it is.

17:05 And I would say it even goes beyond that.

17:09 It's not just the fact that you can build such a cloud system with Python, but the fact that it has allowed us to make it in an easy enough way and to be more welcoming as a community.

17:24 Like to welcome more people because Python is easier to learn because Python is, it has a big, well, it has a quite big community.

17:33 It is even for beginners.

17:35 Like we have many people like just still in college or right out of college coming to OpenStack saying, okay, like I still don't have a job, but I want to do something interesting.

17:48 And they apply for all these mentorship programs.

17:50 They're like Google, Google Summer of Code or Outreach.

17:53 And they will just learn as they go from OpenStack itself.

17:58 So, and all the CI system and the fact that we can test all the programs, all the services easily and run like the number of jobs, of CI jobs that we run daily is insanely high.

18:14 And I already forgot the exact number, but when I heard it the first time, I was like, that's insane.

18:20 Like you wouldn't be able to do that with other programming languages like that would require you to compile the software before you can actually test it, for instance.

18:28 It's interesting to compare OpenStack against places like AWS, where if you're wondering how some service works, you really could go in there and look.

18:39 And it's out there for everybody to see what's going on, right?

18:43 Yeah, it is.

18:45 And one other thing that I like, and I also hate at the same time about OpenStack is the fact that it is non-opinionated in many different areas.

18:54 And by non-opinionated, I mean that you have, let's talk about Nova, for instance.

18:59 Nova is the compute service, and it's the one that will allow you to create virtual machines, right?

19:04 But there are many hypervisors out there.

19:07 So most of the services, several of the services in OpenStack are just provisioning services.

19:11 They would sit on top of something else, and they would just manage that.

19:16 So the default hypervisor for Nova right now is like LibWare to KVM.

19:23 But you can also have Hyper-V and VMware.

19:29 You can have different hypervisors under the hood, and you would just pick whatever you want when you want to deploy OpenStack.

19:39 And what it gives you is that it gives you the opportunity to pick your own flavor of what the underlying virtualization layer should look like,

19:52 and run whatever you prefer there.

19:54 It is good to some extent because it just gives you all that flexibility.

20:00 And the part that I don't really like a lot is because it just forces you to create more and more abstractions on top of that,

20:06 which I don't think is necessarily bad in many areas, but there are some other areas where being more opinionated would be good.

20:15 And the reason I'm saying this is because I'm pretty sure AWS is just focused on any single hypervisor,

20:21 whereas in OpenStack you can also look at how you can orchestrate not only a cloud service,

20:26 but also a cloud service that can run on top of several different underlying technologies

20:32 that would allow you to just pick your favorite flavor and just run with it.

20:38 Yeah, that's interesting.

20:40 You know, that kind of stuff is good for the flexibility, but it also makes it potentially harder for people who are getting started to know what to choose, right?

20:48 Because they've got to make a decision instead of just following some opinionated sort of guidance, right?

20:55 Exactly.

20:55 And you just made a very good point, and that's something that we started looking at in the last, I would say, two cycles probably.

21:04 And it's the fact that we wanted to have some kind of like starter kit for people that are coming to OpenStack

21:12 and they say, okay, okay, I've heard OpenStack is cool, so where should I start?

21:17 And this starter kit is like four services running in a very simple and tiny that's lightweight,

21:28 let's say lightweight.

21:28 And so that you can just run those four, you can play with OpenStack a little bit,

21:35 but you're not going to hit a dead end because as soon as you start liking it

21:41 and you want to grow OpenStack and your own development and your own deployment, I'm sorry,

21:46 you can just start from there and just install more services or change some configurations parameter and make it just better.

21:54 So that starter kit is really important because it just lets you know where to start from

21:59 and what are the kind of like essential services to actually have a cloud.

22:04 Yeah, that sounds really helpful.

22:06 Excellent.

22:06 I'll link to that in the show notes as well.

22:08 Awesome.

22:09 This episode is brought to you by Hired.

22:23 Hired is a two-sided, curated marketplace that connects the world's knowledge workers

22:28 to the best opportunities.

22:29 Each offer you receive has salary and equity presented right up front and you can view the offers to accept or reject them before you even talk to the company.

22:39 Typically, candidates receive five or more offers in just the first week and there are no obligations ever.

22:45 Sounds pretty awesome, doesn't it?

22:47 Well, did I mention there's a signing bonus?

22:49 Everyone who accepts a job from Hired gets a $2,000 signing bonus.

22:53 And as Talk Python listeners, it gets way sweeter.

22:57 Use the link Hired.com slash Talk Python to me and Hired will double the signing bonus to $4,000.

23:06 Opportunity's knocking.

23:07 Visit Hired.com slash Talk Python to me and answer the call.

23:19 So, speaking of starter kits and so on, when would it make sense to think,

23:25 okay, it's time for me to stop just running a virtual machine here and there and try to focus on

23:32 maybe bringing OpenStack into my software deployment data center type scenario?

23:39 What kind of apps do I run?

23:41 I guess what sort of experiences you have with people getting started and then growing into this?

23:47 That's actually a very good question because many people think that in order to run OpenStack,

23:52 the requirement for running OpenStack is having a huge public cloud service.

24:00 And that is not true.

24:01 Like, we have people running small deployments of OpenStack.

24:07 I myself run a small deployment of OpenStack in my test environment.

24:11 And that's what I used to create, new virtual machines where I would test OpenStack and everything I'm doing.

24:16 So, and I would say, like, the moment you start needing more than just one virtual machine,

24:23 and that would be a good moment for you to start considering something like OpenStack.

24:28 Or even starting from the moment where you need a virtual machine.

24:32 And the reason I'm saying this is because if you're working on a service,

24:35 you're likely going to scale it at some point.

24:38 It's not going to scale enough within a single virtual machine, and you'll need more compute power or storage or network.

24:46 At least for durability, right?

24:48 Exactly.

24:50 Yeah.

24:50 Exactly.

24:51 And so you likely need something that will allow you to add more compute or whatever to your deployment.

25:02 And from that moment, you already need something like OpenStack, like a cloud provider.

25:08 And if you're starting, you definitely don't want to give money to other people.

25:14 But obviously, like OpenStack, it doesn't run on air.

25:19 It obviously needs some compute.

25:21 And it really depends on what your needs are in that case.

25:26 But seriously, when you start needing virtual machines to deploy yourself,

25:30 that's probably a very good moment to start using OpenStack.

25:33 Because it will allow you to do that easily, and it will manage all the virtual machines for you.

25:38 And the fact that you don't have to care about it, the fact that you don't have to worry about starting the virtual machine yourself,

25:46 about making sure that it is running there, and that your data is in the right volume or whatever,

25:52 and that you're networking, setting up all of your networking, which is very painful.

25:57 All those things that OpenStack makes easier for you, they will pay off later by saving you a lot of time on development and maintenance and deployment.

26:08 Yeah, that's good advice.

26:10 And one of the things that OpenStack has that I'm not entirely sure that AWS has,

26:17 I haven't seen it, maybe I'm wrong, is like a local dev version of OpenStack.

26:24 So if I'm disconnected from the internet or whatever, I just want to build out something, I could actually do that locally, right?

26:30 Yeah.

26:31 Yeah, you can do that locally with OpenStack.

26:33 You can install OpenStack on your own laptop and just have it there running.

26:38 And that's something that's also very helpful in OpenStack, like the fact that you can just run it there and start not only playing with it,

26:48 but also using it for your own purposes and make something good out of it.

26:55 That's something you don't get from AWS or any other public cloud that are managed by private companies.

27:03 Because, well, okay, obviously they don't want to allow you to access the code

27:07 and install it locally.

27:08 That's their business, I guess.

27:10 Yeah, it is their business.

27:12 But I think that's a really cool advantage because I haven't seen anything like this for AWS.

27:17 And you're usually on the internet, but at the same time, there's certainly situations where you have spotty connectivity

27:25 and you'd rather be able to just work, right?

27:28 But also you don't necessarily want to pay for that, depending on whether the company's paying, you're paying, right?

27:33 That might or might not be a consideration.

27:36 Sure.

27:38 I mean, it's not just about paying.

27:39 Paying is definitely a big point here, but it's not just about paying.

27:45 It's also about using your resources wisely, and by resources I also mean time.

27:50 Like, you don't need...

27:53 The other thing is that people think that you need a lot of power to run up the stack.

27:57 It might have been true in the past, but it has come a long way on using less resources

28:06 from your computing nodes to the point where you can also just run OpenStack on top of Docker.

28:13 And instead of using a hypervisor, you could use just Docker and create Linux containers

28:22 which are cheaper for your laptop.

28:25 Yeah, that's awesome.

28:27 Yeah, I definitely want to come back and talk about Docker.

28:30 But maybe before we do, maybe we should talk about the various building blocks of OpenStack

28:35 because if people are kind of new to it, they maybe don't know what it offers, what it doesn't.

28:40 If we start from top to bottom from a user perspective, I guess the first service that a user would get is Keystone,

28:49 which is the one that provides authentication.

28:51 Whenever you want to log into OpenStack Cloud, you're likely going to talk to Keystone

28:56 to get a token or something that will...

28:59 create a session for you so that you can talk to other services and use that as an authenticated user

29:04 and get your goal and all the information you need from there.

29:07 Sure.

29:07 And you guys have a web front-end, like a UI and a command-line interface and an API, right?

29:13 That is correct.

29:15 Okay.

29:16 That is correct.

29:17 I would say we have a UI and an API.

29:21 We have a lot of CLI tools, but you could also write your own in your own language if you want, right?

29:29 And the CLI tool is super useful and we all use it and we tend to think about it as the reference to access OpenStack,

29:38 but the actual reference is the API that is deployed and then that's the way you actually talk to OpenStack.

29:45 And so we have a UI.

29:46 It used to be based in Django and now they moved a lot of things to just JavaScript.

29:53 And it allows you to access all the services you have deployed.

29:56 Your OpenStack deployment, you don't need to have them all deployed to use the UI.

30:02 You can just deploy the UI service and just have a few of the OpenStack services running in the ground

30:08 and it will just show you the tabs, so to speak, for those services that you have enabled.

30:13 But even to log in into the UI, you need to access Keystone, which is the one that provides your authentication.

30:19 So then you have the UI, like I said, and then you have a whole bunch of other services

30:25 that will provide that cloud thing for you.

30:29 One of them is Nova.

30:32 Nova is the one that provides, that manages all the hypervisors and compute resources for you.

30:37 And then you have Neutron.

30:40 Neutron is the one responsible for doing all the networking.

30:44 It will create networks, routers, and it has different support for different network layers.

30:51 I'm honestly not a network expert, so right now I'm just saying the things I know there are in Neutron,

30:58 but I probably don't necessarily know what all those things mean.

31:02 And then you also have Cinder, which is the one that provides block devices,

31:07 and it takes different storage devices, and it allows you to also attach those devices,

31:14 those volumes to the virtual machines you're running, so you have all your data persisted in your storage.

31:23 What else?

31:24 You also have Swift, which is an object store, and it's pretty much like S3,

31:31 in case people are not very familiar with object store.

31:35 It provides, it has its own API, but it also has support for the S3 API,

31:41 so if you have a service that, a script that talks to S3, and you want to give Swift a try,

31:46 you can just install Swift, install the Swift S3 layer, and you can talk to S3,

31:52 even using the Boto library.

31:53 Oh, that's cool.

31:54 That's a nice feature.

31:55 Yeah, yeah, there is.

31:58 Some of the services have, yeah, some of the services have that as well,

32:02 but some others have dropped it.

32:05 I also, I forgot one of the current services is Glance.

32:08 The fun fact is I'm the technical leader of that project, and I just forgot about it.

32:13 So, Glance is the service that provides images for your cloud, so whenever you want to start a virtual machine,

32:23 you've got to tell Nova what image you want to run, and you've got to tell Nova,

32:28 hey, I want to run this Fedora image.

32:30 Can you boot it for me?

32:32 And in that moment, Nova will talk to Glance, and it will say, hey, Glance,

32:36 you have this image.

32:37 Like, I was asked to boot this image with this ID, and then Glance will just provide the image to Nova,

32:42 and Nova will do all the magic.

32:44 So, Glance is an image registry.

32:47 You will have all your images there, and whenever you create a snapshot from your virtual machine,

32:52 the snapshot will be created in the form of an image, and it will be uploaded back to Glance

32:56 so that you can boot it afterwards whenever you need it.

33:01 Nice.

33:02 Can you make images, like, locally on your machine, and then upload them to be booted?

33:06 Absolutely.

33:07 Yes.

33:07 That's cool.

33:08 Yeah, and it has support for different, for different images formats.

33:13 It is not tied to a single format.

33:15 You can upload raw images, cue call images, VHDs, whatever image format you want to upload there.

33:21 As long as your hypervisor knows how to run those, I think you're going to be just fine.

33:26 Yeah, very nice.

33:27 So, those are all the services involved in sort of running and creating the virtual machines.

33:31 And then you also have, like, some deployment tools.

33:34 You said there's actually people working just almost dedicated to Ansible and Chef and Puppet work.

33:42 Yeah, there are many, there are many, many other services.

33:45 So, the ones that help with all the operations of maintaining and deploying OpenStack,

33:51 probably, we just, we have, like, Puppet manifest, we have Ansible, we have a service called Triple O,

33:57 which is, it's Triple O because it's called OpenStack on OpenStack.

34:01 It basically means it's using OpenStack to deploy OpenStack.

34:04 What else?

34:05 We have other, well, there are several installers around the community maintained by different companies as well

34:14 that will allow you to install OpenStack.

34:17 And the fun fact about OpenStack is that the problem is not just installing it.

34:23 Installing OpenStack was, hard at the beginning.

34:27 It has come a long way.

34:28 But the, what really matters and what, what, what's really interesting is the,

34:34 like, the life cycle of an OpenStack deployment.

34:37 It's not just installing it, but also upgrading it.

34:40 Like, making sure it runs well, making sure that there are not pieces falling,

34:45 falling apart in some, in some of the OpenStack areas.

34:48 So, all that life cycle of OpenStack is, is what, what installers are specializing themselves now.

34:55 Yeah, that can be a real challenge in infrastructure as a service scenarios,

34:59 right?

35:00 Right, especially because you are running actual software on top of it.

35:04 Like, you're running your production environments in many cases, or test or whatever,

35:08 analysis environments, and you want to make sure that your virtual machines don't die,

35:13 out of the blue, and that your data is still persisted, and that you're going to be able to access it afterwards,

35:20 and it's not going to die in one of the upgrades, from one version to another.

35:24 And, and in many cases, and there are many, there, there, there are a couple of folks working on this around the communities,

35:31 that is, is to provide, live upgrades, live migrations, for, for, for some of their resources,

35:38 like live migrating virtual machines from, from one compute node to another compute node,

35:42 like migrating, volumes from, from one storage to another storage.

35:46 those are very, very interesting things.

35:49 Yeah, that, that is a, a big challenge, but really super valuable if you get it done right,

35:54 yeah?

35:54 Yeah.

35:55 Yeah.

35:55 This episode is brought to you by Codeship.

36:13 Codeship has launched organizations, create teams, set permissions for specific team members,

36:19 and improve collaboration in your continuous delivery workflow.

36:22 Maintain centralized control of your organization's project, projects, and teams with Codeship's new organizations plan.

36:28 And as Talk Python listeners, you can save 20% off any premium plan for the next three months.

36:33 Just use the code TALKPYTHON, all caps, no spaces.

36:37 Check them out at Codeship.com and tell them thanks for supporting the show on Twitter,

36:41 where they're at Codeship.

36:42 So all of that sounds like infrastructure as a service, but then on top of that,

36:53 you have some more, you know, platform as a service type of things like queuing and DNS and so on,

37:00 right?

37:00 Do you want to talk about what you got there a little bit?

37:02 Absolutely.

37:03 So other services that are in the OpenStack, what we call the OpenStack Big Tent,

37:09 and it's like this huge Big Tent where we welcome projects that are, that are targeting to making the cloud better.

37:19 we have, we have Trove, which is database as a service.

37:22 We have Zakar, which is messaging as a service.

37:25 We have Q, which is also, which is brokers as a service.

37:33 Instead of providing messaging as a service, it provides, it provisions brokers for you,

37:38 so you don't have to maintain your own rabbit and you run it, but it will maintain it for you and it allows you to create clusters and everything.

37:44 What else we've got?

37:47 We've got DNS as a service.

37:48 We've got load balances as a service.

37:52 We've got telemetry and metering services so that you can monitor your cloud environment.

37:57 And so every OpenStack service, or most of them, emit notifications every time something happens within the service.

38:08 Like whenever you put a new virtual machine, it will say, hey, I'm putting a new virtual machine with this image.

38:12 Whenever you do that with a blog device, it will do the same.

38:15 And then there's this metering service that will just get all those notifications

38:22 and will create statistics for you.

38:25 It will allow you to see what's going on in your cloud, when all those virtual machines were started or not.

38:30 And it will also allow you to build on top of that.

38:32 Based on that information, you can build users.

38:34 Like you've been using a lot of like, like and virtual machines and compute resources or storage,

38:39 or you've been using these images.

38:41 And you can also even build based on the images they're using and all like different features that can be enabled or disabled in a cloud environment.

38:49 What else?

38:50 Oh, Jesus.

38:52 There are many others and I just forgot about that.

38:54 Yeah, there's a lot, aren't there?

38:55 Yeah.

38:56 So could you maybe walk us through what it's like?

38:58 So I've already got my OpenStack all set up, but I would like to have a database and I'd like to have three web frontends

39:05 and a load balancer in a virtual private network.

39:08 Like what are the steps to make that happen?

39:09 So you want to have a database, you want to have a load balancer, and you want to have like three web heads.

39:16 Yeah, exactly.

39:17 Something like this.

39:17 So I guess the first step would, would be creating your database so that you get your,

39:22 your URLs connected to your database.

39:24 Okay.

39:24 and after that, you would create obviously your private network, so that whenever you,

39:32 put your virtual machines, they will connect, they will use a network and they will,

39:37 get some IP assigned, IPs assigned based, from that network.

39:42 and once you have your network, you will also, you will start your virtual machines.

39:47 You'll deploy your web heads there.

39:50 obviously they will talk to, your newly created database.

39:54 And then you'll create your, you'll configure your load balancer, to, to balance the load across those three web heads.

40:03 And you can do all that without installing, like, I'm, I'm trying to make sure I'm not saying something wrong here.

40:11 That you can, you can do that all that without installing any single service that is not open stack.

40:19 Like you can do that by using just CLI tools and say like, give me a load balancer,

40:24 balance load across these three, three nodes.

40:26 Give me three virtual machines.

40:28 And you don't have to install a single service yourself, but you don't have to install,

40:33 I don't know, HAProxy yourself or NGINX.

40:36 You don't have to do that.

40:37 you can do that all using, like just using open stack tools, which is, it just like,

40:43 it just blew my mind right now.

40:45 Yeah.

40:45 That's, that's really cool.

40:47 And could I actually put all that together in like an Ansible playbook and just run it and make it all happen?

40:53 Oh yeah.

40:53 That just makes it even better.

40:54 like you, you can just script that, because, every single CLI tool is, like the client libraries in open stack,

41:04 they're all written in Python, right now, but there are also some other outside,

41:09 the repos that are written in other languages.

41:11 Anyway, I digress.

41:12 you can, you can get your libraries and you can write scripts on top of that and make that all scriptable and,

41:20 and either using Ansible, pop it or even your own script because you don't want to use any of those tools.

41:25 Yeah.

41:25 Yeah.

41:26 That's, that's cool.

41:27 That it's, it's amazing times we live in, right?

41:30 Absolutely.

41:31 Like I, I normally talk about this and I say like, you know, you know, if your clouds,

41:36 if your cloud don't provide, if your cloud doesn't provide you a load balance as a service,

41:42 I believe your cloud is incomplete.

41:43 And now that you just asked me to build that change of events, how they would work.

41:49 I'm just like, whoa, I mean, the fact that you can do it actually, like just using CLI tools and you can get your application running in,

41:56 in no time, basically.

41:57 It's just amazing.

41:59 Yeah, it really is.

42:00 So what's Red Hat's involvement in OpenStack?

42:03 Like why you work for Red Hat, but you work on OpenStack.

42:06 What's the story there?

42:07 The story is Red Hat is full, immersed in OpenStack.

42:13 Like we are 100% on, on the project and we believe 100% on it.

42:20 And we are, we are betting a lot on cloud and, and different flavors and versions of clouds and whatever will make it.

42:29 make your cloud better and your development workflows better.

42:33 And that will allow you to scale your application and, and your environments,

42:38 either private or public, which basically means that when we see something like OpenStack,

42:43 we say, we gotta be there.

42:46 And that's, that's what we did.

42:47 We, we just jumped into OpenStack and we started working on OpenStack full time

42:51 upstream right away.

42:53 We got developers and we just put them there.

42:55 And that's, that's actually my case as well.

42:58 And that I'm part of, of that upstream only team that dedicates full time to making,

43:05 or trying to make OpenStack better every day.

43:08 That's a great mission.

43:09 Then we talked a little bit about why OpenStack, why it's good for OpenStack to be built with Python.

43:16 It has this great community.

43:18 It's easy for newcomers to, to come on board and sort of learn from OpenStack,

43:23 but also contribute to it.

43:24 But what, what I recently learned that I thought was pretty interesting is it works the

43:29 other way as well.

43:30 Like Python is benefiting from OpenStack, right?

43:33 It is.

43:34 It is.

43:34 It is.

43:35 I believe one of the good things that OpenStack is giving back, to Python is actually Python.

43:43 and is the fact that we, the community, the OpenStack community is huge.

43:48 there's a lot, a lot of Python going on there.

43:51 And it's not just huge.

43:53 We have, we also have many of the key members of the Python community are also part of the

43:57 OpenStack community, which means we are, we are, we are interconnected with the Python community and everything we do,

44:05 we do it in a way that we can give back to the community.

44:08 We, like in the OpenStack community, we are very against of, reinventing the wheel and,

44:16 and redoing things that exist already in the Python community.

44:19 Whenever we can just use a Python library that exists already and make it better,

44:24 which has happened a lot, we, we just do it.

44:28 And if we end up writing our own library, we make it in a way that is not OpenStack dependent,

44:34 so that we can just give it back to the Python community.

44:37 When it is OpenStack dependent, we would just mark it in a way that you would know,

44:42 it's like all the dope libraries that you know, those are part of dope.

44:45 Well, we do the same with OpenStack.

44:48 There are some libraries that we have built that are meant to be used by OpenStack.

44:53 And it's not, it doesn't necessarily mean that, you cannot use them, outside of OpenStack,

44:59 but it definitely means the API is, the API has been taught for OpenStack in a way that will make OpenStack better or easier to consume the library across OpenStack.

45:09 so I believe one of the, the best thing that OpenStack is giving back to Python is actually Python.

45:15 There's a lot of contributions back to the language itself, to the testing libraries.

45:20 like I said before, like I said before, like our CI system is huge and it runs a lot of patches and tests per day.

45:27 And all the things that have been written and found out in our CI system that are not necessarily a problem in OpenStack, but probably a problem outside of OpenStack.

45:36 All those things have been contributed back.

45:38 many, many new workflows from, from a test perspective, from a requirements and dependencies management perspective have been contributed back to the community somehow.

45:48 even in way, even in a way of documentation, I believe that's a huge, benefit the Python community is getting from OpenStack.

45:57 Many things like, it recently happened like two weeks ago, there was a new release of Request.

46:05 And, you know, Request has a, it vendors your, your lead three.

46:10 And it just like the latest release just brought some of the OpenStack client libraries.

46:15 And we just found it and it was a lot of like table listed.

46:18 And one hour later, we just found the issue and we just went back to Request and said like,

46:23 Hey, you know what?

46:24 I got, you just broke OpenStack and some of the, yeah.

46:27 Call up Kenneth writes and say, Hey Kenneth, we have a problem.

46:31 Exactly.

46:32 We've got a problem.

46:33 but it turns out like some of the Request maintainers are also part of OpenStack.

46:38 So it was even easier to just say like, Hey man, do your mind?

46:42 And like the issue was resolved in no time.

46:45 Like the patch was written and landed.

46:48 In no time.

46:49 The release came a couple of days later.

46:51 in the meantime, we, we kind of tried to apply the workaround for it, but like we resolved the whole issue within a week,

46:59 which we were talking about Request, which is a like widely used library everywhere.

47:06 and OpenStack, which has a huge ecosystem, which is hard to maintain consistent and sane.

47:12 Making all that happen in a single week means that we've managed to create a workflow or to contribute back to the Python community in a way that is effective as well.

47:21 Yeah.

47:22 That's, that's a really great story.

47:23 And one of the points that I heard someone make was you guys are really betting on Python.

47:29 And if for some reason, say like a section, some operation or something in Python is too slow,

47:34 instead of saying, Oh, forget this.

47:35 We're going to switch over to go or something like you guys actually across,

47:40 you know, Red Hat and Rackspace and so on, actually employ some of the core contributors and actually just make Python better to fix those problems.

47:50 And that, that benefits everyone.

47:51 Right.

47:51 Absolutely.

47:53 Like we, like we, I can talk about Red Hat because I'm part of it and I know,

47:58 and I know how it works there.

47:59 It's not just about just talking about the company that pays my salary.

48:03 it's yeah.

48:05 But like we've, we've hired people dedicated to open source library and like they work on those open source libraries that OpenStack consumes.

48:16 They don't even work on OpenStack.

48:18 And, and we do that because we believe in OpenStack and that library is a huge part of OpenStack.

48:23 And if that library breaks or that person just decides to leave the library and drop it and never maintain it,

48:28 I'm not going to say the community won't pick it up, but why wouldn't you like,

48:34 why wouldn't you give this guy that has dedicated a lot or GERD that has dedicated a lot of time on that library an opportunity to just keep doing it and,

48:42 and have OpenStack benefit from that.

48:44 Right.

48:44 So it's not a matter of hiring people or having people working on OpenStack.

48:48 full time, but also having people working on libraries that OpenStack uses to make sure that OpenStack stays sane and,

48:55 and those libraries won't break it in the future.

48:57 Yeah.

48:57 That's a great stabilizing force in the whole open source industry, right?

49:02 Yeah, exactly.

49:02 And like I said, like OpenStack is a huge ecosystem and, and keep it sane and consistent and stable.

49:09 Like it takes a lot of minds and resources to do that.

49:12 And I'm not going to say like it's rocket science, but it definitely, there are many separate independent pieces that need to talk to each other.

49:21 And if one of those pieces don't do that, it'll just all fall down right away.

49:26 Yeah.

49:27 Thinking of all the interdependencies between 375 different repositories.

49:32 That's right.

49:33 That's, that's complicated, but you guys are doing it.

49:35 That's awesome.

49:36 So one thing I did want to come back to is Docker.

49:39 What's the story with Docker and OpenStack?

49:42 We were just embracing it.

49:45 It is not a matter of whether you have to pick Docker or you have to pick OpenStack.

49:51 Even, even if you have Docker, you still need to maintain all your containers,

49:56 right?

49:57 There are other tools to do that out there, but OpenStack is also one of them.

50:01 You can have services, there's Magnum, and it'll, it'll just allow you to manage all your Docker containers like you would do with Nova and virtual machines,

50:12 basically.

50:12 So you don't really need to pick one or the other.

50:15 We believe in Docker.

50:17 We believe Docker is an amazing tool and it gives you a lot of power and,

50:22 and resources.

50:22 It does that in a different way.

50:24 It has, it has its own issues as virtual machines have their own, but we,

50:30 we believe that the containers and Docker itself is also part of, of what a good cloud,

50:36 is and, and which is why we have also services that, that would allow you to just use Docker.

50:41 there.

50:41 So much like I can go up to OpenStack and say, I would like three virtual machines with this image and then put them into a private network.

50:50 I can say, I would like these three containers based on these images and I want them in a private network.

50:56 Is that possible?

50:57 Yes, absolutely.

50:59 And you can also say, I want two virtual machines and just one container and make them work to do it.

51:03 That's awesome.

51:04 Yeah.

51:06 You just like, you pick your, you pick your flavor and like, is it really like,

51:11 it like everything in our industry depends on the context and your needs.

51:15 Right.

51:15 And that's probably one of the best excuse, we have in our industry.

51:19 Whenever you don't want to answer something, you just say that, like, well,

51:23 yeah, but I digress.

51:24 That's, that was a joke.

51:25 but even for open stack, it really depends on, on your needs actually.

51:29 Like if you don't want to, if you don't need all the security layers and features that a virtual machine,

51:35 provides and give you, you can also use Docker.

51:38 It's not just a matter of resources.

51:39 It's not like a virtual machine will use more resources than a Docker container.

51:43 to some extent that is true, but the footprint of virtual machine has right now,

51:48 nowadays, has been improved a lot.

51:50 And, and I'm not going to say it's as, it is as cheap as running a Docker container,

51:55 but, it is not as expensive as it used to be.

51:57 Yeah.

51:58 But Docker enables different kinds of workflows and exactly, you know, super responsive scale,

52:05 right?

52:05 You know, a hundred milliseconds.

52:07 You've got a container up and running.

52:08 Like there's just different things you can do and trade offs you can make.

52:11 So it's really cool.

52:12 You guys support it.

52:12 Yeah, absolutely.

52:14 Awesome.

52:15 So Flavio, we're coming up kind of near the end of the show.

52:19 Do you have any like final call to actions or things you want to let people know about that?

52:24 we haven't spoken about yet?

52:25 What I would like to say again is that you don't need to have a huge public cloud for OpenStack to be worth it.

52:32 Like just install it and improve your development and testing workflow using OpenStack.

52:37 you don't need to deploy it on 800 virtual machines.

52:39 You have a starter kit and you can just start small, give it a try.

52:43 and if you like it, you can just grow from there.

52:46 All right.

52:47 That's awesome.

52:47 And they can go out and check out the starter kit to get started maybe, right?

52:50 Right.

52:50 And if it, if it doesn't work, you know where to find us.

52:53 That's right.

52:55 All right.

52:56 Two final questions before you go.

52:57 If you're going to write some Python code, what editor do you open?

53:00 right now, Emacs.

53:02 I, I love both Veeam and Emacs.

53:05 I used to be a, just only Veeam developer.

53:07 Then I just gave Emacs a try.

53:09 and there's a Trump mode that I love.

53:11 especially when traveling.

53:14 So, right now is Emacs.

53:16 That's, that's what I often do.

53:18 Oh, excellent.

53:18 They've, they've converted you, huh?

53:20 Yeah, man, but I can go back.

53:22 Like I use both.

53:23 Honestly, it's, it's, it's very weird.

53:25 Like sometimes I just run bin and start doing it.

53:28 And, but right now, most of the time it's just Emacs.

53:31 Cool.

53:32 And of all the thousands of PyPI packages out there, what are ones you think people should know about that?

53:38 Maybe they don't.

53:40 Whoa.

53:40 Probably one of the, there's, there's this package that I was actually creating as part of OpenStack.

53:46 And I like a lot.

53:47 And, and it's called also messaging and it's an RPC library.

53:52 so, and it's important to understand it's an RPC library.

53:56 It does not provide just pure messaging across brokers.

53:59 It is an opinionated RPC library that will allow you to either use RabbitNQ,

54:03 QP Proton, or some other broker that is supported.

54:09 to create your, distributed system and make different parts talk through RPC,

54:17 calls.

54:18 So that's widely used in OpenStack.

54:21 And it's probably one of the, one of those sticks that if you remove it,

54:26 openstack will just fall down.

54:28 And, and most of the services that have a distributed architecture in OpenStack are using those messaging right now to make sure that all the pieces in the service can talk to each other.

54:36 so if you, if you are in the need of, of writing, of having different notes talking to each other and,

54:43 and RPC is one of the things you might want to give a try.

54:46 Well, Oslo messaging is an amazing library for that.

54:49 perfect.

54:50 So very good recommendation.

54:52 So if you're out there listening, go check out OpenStack and check out their starter kit,

54:58 which you can find on the homepage.

54:59 Definitely a cool project.

55:01 And I love the whole Python component to it, Flavio.

55:04 Thanks.

55:04 Awesome.

55:05 Thank you for having me here.

55:06 Yeah.

55:07 Thanks for being on the show.

55:08 See you later.

55:08 This has been another episode of Talk Python to Me.

55:12 Today's guest was Flavio Prococo.

55:14 And this episode has been sponsored by Hired and Cochip.

55:17 Thank you guys for supporting the show.

55:18 Hired wants to help you find your next big thing.

55:21 Visit Hired.com slash Talk Python to Me to get five or more offers with salary and equity presented right up front and a special listener signing bonus of $4,000.

55:30 Cochip wants you to always keep shipping.

55:34 Check them out at Cochip.com and thank them on Twitter via at Cochip.

55:38 Don't forget the discount code for listeners.

55:40 It's easy.

55:41 Talk Python.

55:41 All caps.

55:42 No spaces.

55:43 You can find the links from today's show at talkpython.fm/episodes slash show slash 33.

55:50 And be sure to subscribe to the show.

55:52 Open your favorite podcatcher and search for Python.

55:55 We should be right at the top.

55:56 You could also find the iTunes and direct RSS feeds in the footer of the website.

56:00 Our music is Developers, Developers, Developers by Corey Smith who goes by Smix.

56:05 You can hear the whole song on talkpython.fm.

56:09 This is your host, Michael Kennedy.

56:10 Thank you very much for listening.

56:12 Smix, take us out of here.

56:22 The mic back to who rocked his best.

56:24 The mic back to who rocked his best.

56:24 The mic back to who rocked his best.

56:24 The mic back to who rocked his best.

56:24 The mic back to who rocked his best.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon