Overview

About this video

What You'll Learn

  1. Initialize DevSpace from a containerized app with Dockerfile, Helm, or Kubernetes manifests.
  2. Use dev mode to sync source changes into a running container and hot reload.
  3. Organize deployments, pipelines, dependencies, and remote SSH access from VS Code.

Leon from Loft joins David for a hands-on tour of DevSpace. They initialise a Node.js project, deploy it to Kubernetes with a Helm chart, swap into dev mode, watch file sync and hot reloading via nodemon, and explore pipelines, dependencies, and the VS Code remote SSH integration.

Chapters

Jump to a chapter

  1. 0:00 <Untitled Chapter 1>
  2. 2:42 Introduction to Rawkode Live and DevSpace
  3. 5:05 What is DevSpace? (TLDR)
  4. 10:02 How DevSpace Works (Workflow Overview)
  5. 10:41 Create a Dev Space Yamo
  6. 11:46 Key Dev Mode Features Explained
  7. 13:18 Dev Mode
  8. 14:24 Hands-on: Initializing a Project
  9. 15:06 Example Application
  10. 16:06 DevSpace Init CLI Walkthrough
  11. 17:27 Namespace
  12. 17:34 Running DevSpace Dev (Entering the Container)
  13. 18:57 Inside the Dev Container Environment
  14. 20:08 Exploring the DevSpace.YAML Configuration
  15. 21:39 DevSpace YAML: Images Configuration
  16. 23:09 DevSpace YAML: Deployments Configuration
  17. 23:10 Deployments
  18. 24:16 DevSpace YAML: Dev Mode Configuration
  19. 25:03 Dev Image
  20. 28:38 Demonstrating Hot Reloading
  21. 31:19 Troubleshooting Dev Mode & Config Changes
  22. 38:48 Dev Space Purge
  23. 42:13 DevSpace YAML: Commands & Pipelines (DevSpace v6)
  24. 43:15 Pipelines
  25. 46:57 Importing DevSpace Configurations
  26. 50:46 Exploring DevSpace UI
  27. 51:40 Define Dependencies
  28. 52:29 VS Code Integration (Remote SSH)
  29. 53:05 Demonstrating VS Code Integration (Attempt & Troubleshooting)
  30. 58:39 Dev Pipeline
  31. 1:01:15 Shared Dev Clusters & Dependencies (Q&A)
  32. 1:04:04 DevSpace Community & Roadmap
  33. 1:04:29 Public Slack
  34. 1:05:50 Conclusion
Transcript

Full transcript

Generated from the English captions. Timestamps jump the player to that moment.

Read the full transcript

2:42 Introduction to Rawkode Live and DevSpace

2:42 Hello, and welcome back to Rawkode Academy. I'm your host, David Flanagan. And today, we have a another great episode coming of Rawkode Live. Rawkode Live is the show where we take a look at open source software within the cloud native and Kubernetes space, And hopefully show you enough cool stuff to help simplify your Kubernetes journey. Because let's face it, this stuff is mighty hard. Alright. Remember, we love comments. So if you're watching this now, feel free to say hello in the comments section. As we move through today's episode and we're playing with the technology, take a moment to ask your questions. Don't

3:16 leave them lingering in your mind because you'll forget. We recommend you take them in as soon as possible. Today, we are taking a look at DevSpace from Loft. It is a tool to help you ship, build, develop Kubernetes applications faster and easier. And today's guest today is Leon from the Loft team. Hey there. How's it going? Pretty good. Thanks. It's a beautiful day, surprisingly so. Yeah. I'm looking forward to the session. Well, yeah. I mean, you're in Amsterdam. Right? And I'm in Glasgow. I think we have quite similar weather patterns, which is usually Probably. Yeah. Cloudy and rainy and windy. I

3:53 don't know. But today's today has been quite nice here too, actually. That's good. Okay. So for anyone that doesn't know you, hasn't spoken to you before, can you please say hello and give us a little brief introduction, please? I would love to. So my name is Leon. I'm based in Amsterdam, and I'm a DevRel for Loft. And if you know me from any kind of, like, social events or something, you probably best know me as the chief karaoke officer. So if we ever are at the same conference, I promise we we will go to karaoke.

4:29 Well, we are going to be at the same conference. Right? We are. I booked at the Cube Cuddle already. I'm really looking forward to it. Yeah. Yeah. We are just, what, two and a little bit weeks away, two weeks in a few days. Yeah. It's stressful. But, yeah, I can't wait. So karaoke is gonna be awesome. Okay. Today, we're taking a look at DevSpace. This is a relatively new project to me. I wasn't that familiar about it or I hadn't been aware of it until a couple of weeks ago. I think you you tweeted something and you share

4:59 something, and I thought, hey. Is this this looks cool. Like, we need to do something on this. So can you just tell us, like, what what what's the TLDR for DevSpace? Yeah. Sure. So to me, it's easier to say what it does rather than what it is. So, basically, what we're trying to do with DevSpace is make the development cycles faster. So if you're developing for Kubernetes, then, you know, there's all kinds of stuff that you need to be aware of, putting stuff in a container and everything. And most developers, they just wanna focus on

5:05 What is DevSpace? (TLDR)

5:32 developing. So we're trying to just abstract everything away from you, make it easy and fast. And I don't wanna go too deep into details because I hope we can, you know, like, learn by doing. Yeah. I always find this this is one of these really common questions that I get all the time, you know, when you go to conferences and people are doing you know, we're all in the same journey, but all at different stages of that journey. And it's like, yeah, I'm used to developing locally and I just installed all the tools and it's fine. And then people move towards containers.

6:03 And it's like, okay. Well, I spent up some Docker containers and I work against it. But we're now at this stage, I feel where it's not just I've adopted Kubernetes. It's I've refactored my monolithic application to half a dozen or two dozen or 20 services. I have a Kubernetes cluster. I have service meshes. I have all these things. How do I develop locally? And you're like, good question. You don't. This is this not a solved thing yet, but there are tools to make it a little bit easier. And I this is where DevSpace comes in. Right?

6:32 This is the the market. This is the problem that it really wants to help us with. So Yeah. Exactly. Alright. We have And, again, I just have to say it's not gonna solve, like, every problem that you have. Like, I I don't even know, like, service meshes. And if you have, like, something that's super distributed, you might get it to work. I probably could point you to the people who can help you with that. But, yeah, there's, like for now, this is, like, tackling the most common issues that people have, not every single one. Awesome. Oh, hey, Marino. Yeah. There there's quite

7:05 a lot of comments going on in the chat. People are are very excited, so awesome. Okay. Well, we're gonna take a look at DevSpace. So let's make sure that screen share is all up in business. I guess we could share everybody and see we were having some I was having some Kubernetes trouble prior to this going live, and I couldn't get a cluster to work. Go figure. Pretty standard. Well, gonna say right now that it's it's you can use DevSpace locally or on a remote cluster. It works the same way. So luckily that we had some backups.

7:40 Yeah. Well, we can definitely try both. Right? I I've got a mini cube cluster, which is the one I'm currently looking at right now. But I do have a SQL cloud or a SQL cluster that we can switch to it and maybe try and see what that remote experience looks like. We also have the DevSpace website here. So it's got some nice little kind of walk throughs here on the homepage, and we're just gonna kinda get started on this. I think we'll just send a learn this by doing, which is my favorite way. I hope that's okay for you. Yeah. Same.

8:10 Of course. Yeah. Right. That's the first thing you need is the CLI that will make things easier. Well, well, actually, you needed to run it. Yeah. We've got a nice graphic. This is a go over this in a moment. But let's see if we can get the CLI first. Yeah. Yeah. Then Would you should you do you want me to tell you where to find things, or do you wanna, like, explore for yourself a little bit? I kinda prefer exploring, and I I know you're gonna be sitting there cringing as I'm like, oh, I don't know

8:42 what I'm saying. But yeah. No. Consider This is excellent because it this is how we, like, improve our docs, I think. Exactly. It's a litmus test for documentation. It's like, you know, how long is it gonna take me to find the thing that I need? But at least I think I just bridged all these things. I'm not feeling Yeah. Too worried about that. Should be fine. It's not that huge. But I did see what happened when you tried to start that mini cube. It had me a bit worried. Well, you know, I've I've been at this office space for

9:15 a little under a year now. And the people that provide Internet to the office space, they they charge extortionate amounts. Like like it was the nineties and Internet with those new things. So I told them to go away and I run off of a five g router and I have done all year and it's just been perfect. But I know at some point, I'm gonna I'm gonna feel the pain of using a five g viewer. Okay. We have DevSpace. So let's maybe go back to that image and kinda try and understand what it's doing. So this is the Yeah. How does it

9:47 work? And I see things like Docker, Canico. I see Registry. I see YAML. So what what is the the starting point for, know, taking a project and using DevSpace against it? Yeah. So luckily, those are numbers, so that helps a little bit for figuring out what happens first. You usually, you start with a project that is already containerized. So you have a Docker file, and you probably also already need, like, at least a Kubernetes manifest, or you can use customize or helm charts. So that's kind of the prerequisites to really get starting with DevSpace. Okay. And then

10:02 How DevSpace Works (Workflow Overview)

10:31 yeah. So I'm just gonna kind of rephrase this this image. So when you initialize a project to use with DevSpace, it will create a DevSpace YAML for you. So, I mean, like, YAML. Right? We're doing Kubernetes. So, obviously, we're gonna have a YAML. DevSpace, so the CLI when I say DevSpace, I'm probably gonna refer to the the tool, the CLI now from now on. So DevSpace will look for the DevSpace YAML, read the config, and then build a image using whatever build tool you say it should. It will then push the image to the registry. Maybe you

10:41 Create a Dev Space Yamo

11:11 can also say that you wanna skip pushing to registries, and it will just build that in memory, I believe. Then it will check your kube conf KubeConfig, KubeContext to understand, like, which Kubernetes cluster should use. This is where you can, like, use a local one or a remote one. And then it will deploy your project to that cluster with Helm charts or, as I said, customize or Kubernetes manifest. And this is kind of the the, like, the the basic workflow, but then DevSpace also has this has this dev mode that does a bunch of cool

11:46 Key Dev Mode Features Explained

11:48 stuff. That is where we try to improve kind of, like, the the development cycle. So there's stuff like hot reloading where if you make changes in your source code, we're not gonna rebuild the image, and we're not gonna redeploy the container. Instead, what we're we're gonna do is we're gonna mount the changes directly into the running container so you will instantly see the changes. It can start a SSH server in your pod, so in your application that you can, like, SSH into the container and do whatever stuff you need to do. It can start a terminal for you automatically

12:26 through, like, a configuration DevSpace. And yeah. So this is all, like, stuff that we could, hopefully, we'll be able to explore. Awesome. I mean, the only challenge there is is me. So, hopefully, I don't break things too much. Alright. So I'm gonna try and summarize that just to make sure that I have a a really good mental model and understanding Yeah. Of what DevSpace is doing. But it sounds like I just take my existing project that I'm working on, whether that be a monolith or a microservice, like, whatever. I added DevSpace.YAML. We don't know what that looks like yet,

12:59 but I'm sure we'll be right in one of them in just a moment. From that configuration, the DevSpace CLI is capable of building the image using whatever tools I already use, optionally pushing it to a registry, and then using my current cube context to deploy that to a Kubernetes cluster. And you mentioned that it has a dev mode. We see that on the right hand side here. And this has given us that convenience features that we're starting to see more and more of, which really helps us get that sharp feedback loop for developing our applications.

13:18 Dev Mode

13:29 Hot reloading, so important. Like, who really wants to sit and wait for Docker image build to work every single time they change a bit of their code? Yeah. Exactly. Yeah. And the local Well, guess people who are people who are bored in an office love when there's docker build, and you can, like, go and have a coffee and chat with someone for half an hour and then come back. Or jump on a wheelchair and have a sword fight. I don't know. Whatever whatever your preference. Exactly. Okay. Okay. So hot reloading, local host access put forward, and all the

13:59 logging that I need. And then I haven't seen this last feature working well on any other tool yet, so I'm very excited. No. I don't even know if we have a right application to try and debug something. But debugging, I've always I wanna I have not even tried that debugging feature, but I guess we'll find out. Oh, yeah. Awesome. Okay. I'm gonna click on initialize the project because I'm assuming this is gonna guide us through getting set up. Yeah. It's a good way to get started. I like that I can just use one of these quick starts.

14:24 Hands-on: Initializing a Project

14:30 I'm gonna try and make my life a little bit easier. Just do Node. Js, and then maybe we'll do we'll see how things are going, and we we can always try Go. But I think maybe Node. Js is a good Sure. Point. When you think about I was gonna dis I was gonna discourage you from using Ruby and ASP dot NET. That was the only thing that I was like, maybe don't do that because I I think there's some like, I couldn't get them to run on my machine probably because I have an m one.

14:55 So I think we haven't updated those yet. Cool. Yeah. I'm not very comfortable with those languages, so I'm quite happy to avoid them. Alright. Let's see what we have here in this example application. Do I trust? Sure. Go for it. So this alright. So this is just an express application that's gonna throw some HTML right down to the browser. Yep. That's fine. Exactly. We have a docker upload in my font. Tiny because I was doing some other stuff today. Yeah. Okay. That's good. Now we have a docker file just using node Alpine, doing a quick copy,

15:06 Example Application

15:35 NPM install. It's pretty much what we'd expect. That's pretty fair. Yeah. Yep. I don't see a DevSpace surprises there. So I must remember we're gonna is that a command for that? Yes. Yeah. So the the quick start is, like, just the project. So we're gonna walk you through, like, the that that is, like, probably what you already have, and then the rest of it is, like, okay. Now you're introducing DevSpace. Yeah. That's good. Like, don't make any assumptions, which I like. So Exactly. It's detected JavaScript. Oh, how do I want to deploy? Yeah. So the for the for the for

16:06 DevSpace Init CLI Walkthrough

16:15 the quick start products, we do have Helm charts that we have in a remote repository. If you feel super adventurous, we could try one of the others, but then you would have to, like, actually write them yourself, I believe. So the easiest is to use the Helm chart. I think it's also in the docs. I'm not quite sure, but I think I recently changed them to just, like, walk you through the actual like, what you what should you choose at every step of the way. Yeah. Yeah. You have. Okay. Well, let's start with helm. Because I If

16:47 we do the goal one, we will we feel adventurous. Yeah. Let's let's let's see what the hell yeah. What this does for us with the easy the easy start. Yeah. So we also detect that it's a quick start project, which makes the setup a bit more streamlined. And then, yeah, we want to develop because we wanna see all the cool dev mode stuff. Yeah. We have a Dockerfile there already. And since you're local, I would probably suggest skipping. Yeah. I don't have to want to deal with credentials that are remote. Yeah. Okay. So we'll just avoid that for

17:21 now. Mhmm. Alright. So this is telling us So We can use the namespace if we want to I'm just gonna use default, which is my context. I I don't think we need to worry about that. But I believe now we can do DevSpace dev and oh, yeah. Yeah. I'm okay with that. Yeah. So there's a warning that it's like, are you sure? Because you might be on a shared cluster. You might, like, be on the kind of dev cluster when you're sharing that with other people. So just just wanna make sure you're not breaking anything. Is DevSpace specifically targeted at

17:34 Running DevSpace Dev (Entering the Container)

17:58 dev clusters and not production clusters? Or is that something that you think it's gonna open up to maybe production clusters? Or You can use it for production clusters as well as well. There's there's another command that's DevSpace deploy, which would then not start the dev mode, but just deploy your application, like, kind of like you would in on prod. We can check that out. And you can use it in prod. You can use DevSpace to do some CICD stuff for you. Ideally, you would use DevSpace for everything, so it really behaves the same way everywhere, and

18:31 it actually manages your environment no matter where whether it's, like, dev or staging or prod. But yeah. I mean, like, most of our users use it for development because the dev mode is really the thing that stands out, I guess. I see that Oleg said hi, which is great because Oleg is one of the engineers at Loft. So if we have a question, maybe he can help us out. Awesome. Always good to have support in the chat. Yeah. So I suspected I was in a container here because my prompt changed. I typed who am I? It says root. So, yeah,

18:57 Inside the Dev Container Environment

19:03 DevSpace dev has Yeah. Spun up a container and then put me in an interactive shell. Uh-huh. Exactly. You are in the container right now. I opened the terminal for you. You can see probably yeah. So there's a couple of things that that DevSpace does in the background, which we can look at later in the YAML. But for now, all you need to know is that we are in the container now. We have not started the web server yet. That's why it says, like, this is how you can work with it if you're yeah. If you want, you can, yeah,

19:42 check out the container some more, or you can run NPM star to see the application. Yeah. I just I just wanted to poke around. I'm loving No. The sleep command. Fair enough. Of course. This this pipeline. Like, why not? Just Yeah. I could see the sync thing. I assume this is some sort of fail system. We have an SSH server and a tunnel and then screen. So yeah. Okay. Cool. But Everything you need to pry open the container. So, yeah, it also automatically opens this, like, beautiful web page and then tells you what you could do now to try out the

20:08 Exploring the DevSpace.YAML Configuration

20:19 functionalities of DevSpace. Hold on a minute. How does it open a web page? We can look inside the DevSpace YAML to do it. If you're asking me how does it happen inside Yeah. Like, under the hood, I don't know that. But if you open the DevSpace YAML, there's a there's a command for that. But, yeah, you would have to probably leave the container to check it out. But Yeah. It does it only does it once. Just don't know how did that I mean, DevSpace must have detected that a new port was opened or something. I'm not sure.

20:58 Actually, it pulls I'm not a hundred a % sure, but it does, like, a regular check on you you provide a URL, and it just does a regular pull on it. And as soon as it gets like a non 500, I wanna say, response, it will then open a browser and display that page. There you go. Okay. Okay. So we now have a DevSpace.YAML. We can see we've got a version and a name. We got something called a pipeline. We got something called an image Yeah. Something called a deployment. Yeah. There's a lot of stuff happening in

21:39 DevSpace YAML: Images Configuration

21:40 there. Let's look let's look at the images first maybe because this is kind of the order of things. Yeah. So we basically say we have a bunch of images, and this image is named app. And then we tell it, like, okay. This is how you have to name the image. It can I mean, if you wanna push it to a registry, then this is where you would put the the full URL with the username and the name of the image, and then where to find the Docker file? And I think if you want to use a different

22:19 building engine, then you can provide that as a property. I would have to check the docs myself, which I am doing right now. Well, we have Yeah. Can look at the or something else. Uh-huh. Good. Even better. Yeah. I did not even know that. Yeah. Well, down here, I don't know. I know it's really difficult to do that. But it actually detects the Yeah. No. I see. As a DevSpace YAML, which was my first indication that I could probably all complete this. And, yeah, looks like we we can. Nice. I like it when projects publish the

23:00 JSON schema, and it just works with Versus Code because I spend most of my day in Versus Code. So I want I want that to be a good experience. Makes sense. So, yeah, we can check deployments next. I'm gonna explain pipelines later, but that's it's not super important right now. So here, we have the list of deployments that we can use. And, again, we have, like, a thing named app, and we we're just saying right now that we're using a Helm chart. And here, we were loading this from our from our own repo, the Charts DevSpace SH

23:10 Deployments

23:34 repo, and it's called component chart. And, like, all the other quick starts use the same chart. I can probably look into it to see what exactly gets deployed. And then we put in some values, namely what the name of the image is and which port we need to open to access the website. And you can use DevSpace deploy, So the DevSpace deploy command if you only want to deploy this without without opening the dev mode. So you could conceivably just run DevSpace deploy on a prod environment and then just deploy it like it is. Okay.

24:14 And then I must have been this dev key is how we hook up the the reloading and Dev mode. Yeah. This is the the interesting part. So we can, like yeah. Let's run from it from the top, I guess. So the basically, in dev mode, we're doing a bunch of stuff to the container. We're modifying it in a lot of ways. So the first thing we need to do is we have to, like, select the right container or the right pod, let's say, right container. There's a couple of ways you can do that. You can use an image selector.

24:16 DevSpace YAML: Dev Mode Configuration

24:43 So, basically, you would select all the or the first image or the first container that has this that's using this image. I think you can also use a label selector and probably some other ways to do that as well. Again, we can refer to docs later if wanna get excited. This dev image in line 50, that's a pretty cool feature. So I said that you could deploy your container to production. But then if you're developing, you might wanna have a slightly different container, maybe one that has, like, some kind of DevTools installed that you wouldn't want to have

25:03 Dev Image

25:22 on prod. So here, we will we would be replacing the container image with this image that we provide a dev image, and that's just optimized for development purposes. So then we are not using the original image anymore. We're using this one. And this image also doesn't have the source code. We have to, like, sync it to this dev container, which we're doing in the next couple lines. This is where the hot reloading happens as well. We're basically saying, like, okay. I copy everything from this path, put it into the container. You can also exclude things, like, for example.

26:00 This if you're using Dev Image, this is super important. Otherwise, you just end up with a container with nothing in it. Okay. Yeah. Here, we are opening a terminal, and there's a bunch of magic happening in DevSpace start. We can take a look at that. I have not yet, so I would probably be learning something if we take a look at that. But I actually opened it Yeah. The all complete here because I was really hoping to see sort of make target option where I could just maybe because I don't know. I don't I'm not a big fan

26:31 of arbitrary scripts lying around and maybe supporting some links. Yeah. I don't yeah. Meet target would be cool there. Okay. Oleg, I hope you're listening. Right? This is the feature request now. Yeah. And then we can inject the SSH server into the container so you can either with your IDE or just with your shell Right. Connect to the container. We also for the quick start, we are creating some proxy commands. So, basically, if you run DevSpace or kubectl inside the container, it will then be proxied to your host machine. Gotta be super careful with that because everyone

27:10 who has access to the dev container could then execute these commands on your host machine on your local laptop or something. Yeah. And then we can also do some port forwarding there. Not quite sure what the nine two two nine port is for. The 3,000 is obviously for the web app. Maybe the Node. Js will find. That could be. I'm not sure. I I guess Guess we could experiment with yeah. Yeah. And, yeah, finally, that line 72, that's that's the thing that opens the browser. And as I said, so it, yeah, it checks the status,

27:51 and then other than five zero two or five zero three. Okay. So as soon as usually, it's, like, as soon as the application starts, it will then open the browser as you've seen. So when we started the when we run run DevSpace start, nothing happened. But as soon as you then ran NPM start, that's when the web server actually got started, and that's when the the browser opened. So this is the this is the cool magic part, and the stuff that you see here is pretty much like the most used features in DevSpace, which is why they're all here.

28:28 And we can talk about the others too if you want, or we can what we haven't tried yet is to actually change some source code and see it just, like, change in the browser without having to re rebuild in everything. Yeah. That's a good idea. I mean, we should try and see what this kind of feedback look is like for developers. I'll just add that. I mean, I think I was overcomplicating this. We could just do command make thing. Right? Like, I don't we don't need a special pragma for a big target. So I'll take back my feature request.

28:38 Demonstrating Hot Reloading

28:55 You're okay. I like We do have a start script. Yeah. I think that's just for for sure to print DevSpace, I guess you could run migration scripts and other things there. And I'm gonna pull up the browser with that local host on it. Mhmm. Let's change let's change some text or something. So index dot g s. Oh, it tells you to edit the text. Yeah. Yeah. It tells you exactly what to do. But you don't have to follow it. Like, you can change other stuff if you want to. I mean, I am a terrible HTML and

29:36 CSS person. But, I mean, I could probably manage to do, like, style. Oh. I would have just removed the line, but okay. Well, we could try and make a red background. Right? Because this I think we're gonna find out. I don't even know how to do background colors. But Okay. You just need to save the file. You you can now check the logs if you would like. In any case, you have to reload the browser to see the changes. Oh, you have to reload. Ah. Yeah. Well done. Yep. That was a nightmare in the past

30:15 life, as you could tell. I know. Yes. I was gonna say this is not very eye friendly, but Yeah. Okay. Well done. We'll just go with the all black approach. Ta da. Uh-huh. And you see this is pretty fast, so this this is excellent. Yeah. K. Cool. So I I can see how that works. Russell's Yeah. Has that the or Uman Russell. The red one's not bad. Yeah. So one of the things also is that we need to use NodeMon instead of running Node because, otherwise, we would have to restart the Node process all the time if we make a change.

30:56 So NodeMen will detect that there was a change, and it will kind of, like, inside its own process, restart the node process. Alright. Well, that was pretty easy. Right? Right? Okay. I think we're done now. It's pretty good. Alright. Bye. See you soon. Like, I can we can talk a bit more about the other things in the DevSpace YAML that we haven't looked at yet? Or if you have any specific questions, we can cover them as well. Okay. Okay. There's a few assumptions that wanna get out of my head. So firstly, this terminal we're in we're in a

31:19 Troubleshooting Dev Mode & Config Changes

31:37 thing. We saw this is running screen. I'm assuming I could just drop this, and I actually expect this web application still. Oh, no. It doesn't. Okay. That that ended. I thought that was gonna run-in the background. You stopped the process, though. Like, you stopped the web server, so that's why it's not here anymore. Oh, but I thought because I was on a screen session. I think the screen is for the I I actually don't know. You know what? I don't know. Yeah. Okay. Alright. We'll just we'll just not do that anymore. Alright. So when I leave the when I

32:13 leave the container, it shuts all down. I can go have my coffee, come back after lunch, and start again. That's fine. And then we need to run the NPM star. Yeah. We should be back in business. Okay. Cool. Yeah. And we could, for example, if you if you didn't ex replace the dev image well, if you didn't replace the image and just use the the image that we have, then you wouldn't need to start to run NPM start even because then we would use the actual production image that we built, and that automatically starts NPM start.

32:49 But you can still, like, do the hot reloading. That would still work. It's just that because we're using a dev image, it doesn't, yeah, it doesn't use the Docker image that we looked at. But you said if I run DevSpace deploy then, that just deploy with Not quite. Not not quite because we still need to go to dev mode. So okay. If you open the DevSpace YAML Yep. Yeah. And then we could remove the line 50 where we just commented out. So now we're not replacing the dev image anymore. We're just using the production image. You

33:25 can run DevSpace dev, and then it would just open the browser. And we do we wouldn't have to run NPM start because the entry point okay. Interesting. The entry point would be NPM start. That's interesting. What happened? Well, I may have broken it by running a deploy and killing it, and it made no oh, no. It's trying to reach speed to red. Oh. Oh, okay. That interesting. I did not have that issue when I tried it, but, yeah, if you just use the I guess you have to if you're doing that, you have to probably change the image

34:15 name everywhere because I think it's it's trying to build the image in the images part. So if you scroll up, there was this property called image and or images. Yeah. And that that's where we built the image. So I guess we could just, yeah, remove the host name and just call it DevSpace. Yeah. And then then change our dev image It's or image selector. Yeah. I don't know if we have to change it in the deployments part as well, but I guess we'll find out. Oh, no. And that's trying to interesting. Well, it's try it's still authenticating you with

34:57 Docker Hub. Got okay. Oh, no. It's trying to it's trying to pull that. Don't quite understand why it's trying to push your image, though, because we did say that we wanna skip. What we can do is we can add a property called skip push to the app, and that should definitely push skip the push. Like, when we when we say that in the initialization period you know what? I actually, I don't I'm not quite sure about that. I thought it would be saved somewhere. It probably is saved somewhere because we did skip the push initially.

35:45 We did skip that way when we ran the init. Yeah. And then it'll complete here, and there is a skip push flag that wasn't set. So I've kinda maybe that will help. I don't know. I'm I'm Let's try. Let's try. No. Same. Uh-huh. Okay. Well alright. Yeah. It seems happier now. Okay. Yeah. Let's see if that works because we didn't change the image name in deployment. So we will see. I'm learning as well. Yeah. Probably need to change that in deployment as well because that's it's still trying to deploy. So there's in line 48. Yeah. Exactly.

36:26 Makes sense because we're telling the helm chart that we are like, it should use this image. We're putting the values in there. So, yeah, deployment should show. I mean, this is just Kubernetes. I could actually run yeah. We can see that. Yeah. Oh, no error. Pulled image. Which image is it trying to load? I don't know. Maybe we should figure that out. It's because I'm using many cube. I will need to source. I don't ever had to do this. It's been so long. The docker end because I'm actually built we'll be building this into computers are hard. Yeah. This this is very

37:19 interesting because I I don't understand why we're running into this now when it worked before. I guess the the fact that we are because I would have expected that we deploy the regular like, the image that we built, and then we exchange the image with the dev image. So we should have run into this problem before, but I might be wrong. I'm obviously wrong because it didn't happen as I would have thought it would. Well, like, if you're still listening, you can explain it. Right? Yeah. It's it's not working. What have I done wrong? Control,

38:04 describe. Oh, yes. So I was trying to pull this image. Which it should. Can you check your images? Yeah. I think this is the right one. It should be I mean, we're building it correctly, apparently. Empty. Yeah. Yeah. I'm not sure. Alright. Is there a DevSpace delete everything? Can I will we Yes? There's a DevSpace purge, and that will I don't I probably won't delete images from your Docker registry, though, but we can Well, it's just because we set the Docker the Minikube Docker environment halfway through. So now that we have that Yeah. Although, it depends with DevSpace.

38:48 Dev Space Purge

39:08 Let's try. Okay. But we do build. It's all cached, which means I think this image is in the right place. It should be. Let's try DevSpace. Dev Let's try DevSpace. Yeah. Okay. I mean, as we could try DevSpace deploy because the way that I understand it oh, okay. So you broke it. It wasn't me. Good. I think it was just because, yeah, the Minikube environment wasn't my local Docker environment, and I think DevSpace was working against my Docker desktop and not my Medikube. And yeah. It was a weird Ah, okay. No. Yeah. That makes sense.

39:53 But that's what's saying we have something running. So We have, but it doesn't do what I was hoping it would do, which is just start your browser immediately. Oh, DevSpace start not found. What did you do? Is is it because we're not using the dev image anymore? So, like, this stuff isn't No. No. I well, because we're syncing it, so we should be, like, syncing everything over. Like, literally, I tested this yesterday. Wait a sec. Oh, yeah. Look. Waiting for initial sync to complete, sync work, and then Yeah. So that includes the DevSpace start. Did

40:37 you rename it or something? I don't think so. No. It's there. Okay. Okay. Bunch of stuff in this file. We did, but not yeah. Because okay. So we're we're saying open a terminal and use the following command to start it. I don't think our I'm not quite sure whether our DevSpace containers have the DevSpace start as agent. Shouldn't in theory. Well, I'll take it. That's probably something I've done. Thank you. It's not it's clearly not that our quick start don't work properly. Alright. Let's okay. Just to make sure that we we're back, can you reintroduce the dev image languages? I just wanna

41:30 make sure that we didn't change it to the degree that nothing works anymore. Otherwise, we have to reset everything, I think. Yeah. It seems okay. But Okay. That that looks like yeah. Okay. So if you run-in I'm wondering if maybe you we what we should what we would need to do is really not open the terminal. It's like the, yeah, the terminal is kind of tied to the dev image, but then we could take a look at the documentation. Okay. Well, I think we can go back to the docs and and work through that. But I just while we're here,

42:13 DevSpace YAML: Commands & Pipelines (DevSpace v6)

42:21 right, and then DevSpace thing, something caught my eye, which was these commands here. Like, I mentioned migration to earlier, not knowing. This was set set in the DevSpace.YAML. So it looks like there's already the ability to run arbitrary command. So Yes. Is that just DevSpace run? Yeah. Run. Yeah. Exactly. So you could run any kinds of commands, anything that you need to do to, you know, set up your development environment in the way that you need it and then do a DevSpace run. Exactly. And, yeah, it could be anything that you would so this is why we

43:00 kind of replace Makefiles or, you know, like, sup supply Makefiles if you want to. If you love your Makefiles, like, you can still, like, do both. If you go to back to the DevSpace YAML, I think this is not a a good place to talk about the pipelines. So we scroll all the way up. So we have these pipelines, and this is, like, something that we changed in in the latest release. So we released DevSpace six, like, a couple of weeks ago. So we now have these pipelines that you can completely modify the way that you want to. There

43:15 Pipelines

43:35 is a default behavior for the pipelines. I think it's it's it's in-depth explained in the docs, but then you can, like, run the default behavior by just, like, run default pipeline or something. But, basically, here, when you run DevSpace dev, which is a short form for DevSpace run pipeline dev, this is what will happen. So you will run all the dependencies of which we have none currently. You will create the deployments. So then that would be the the deployments part that starts in '9 '20 '8, and then you start the dev mode for one or more

44:15 units. So we we named everything app here. You could give them different names. You could, like, say, like, all of them, or you could just, like, have a couple. So we could, like, have start dev app DB or whatever you want. And, yeah, so similarly, in deployments, we run all the dependencies. We build other images, and we create the deployments. Oh, see. So in DevSpace dev, we don't build the images. So if I had read this earlier. This is why we didn't run into this issue earlier because we don't build the images because we're just, like, using the dev image. Got

44:50 it. Okay. And, yeah, you could change whatever you need here. You could add add commands. Right? Like, here, we could you could, like, add the migrate DB command into the dev pipeline or the pipeline. And then this way, if you are someone who's, like, completely new, just being onboarded to the team, all you need to know know is that you have to run DevSpace dev, and you don't need to know, like, oh, you have to run this script and then that, but only in these circumstances and all of that. That's kind of the thing that we're trying to do

45:20 here to just give you, like, one command, and then your development environment is just all shiny and perfect, which we've seen that that works perfectly. Awesome. Alright. No. I understand pipelines. I hadn't really worked that out from the start when we're looking at this. The dev and deploy were just pipelines. I mean, I'm assuming and I, you know, I like to make assumptions. But if I copied Yeah. Let's say performance test or some or performance. Mhmm. I could just run that, like, with DevSpace. What was it? Pipeline run performance. And this is actually Run dash pipeline.

46:04 It's DevSpace. Run dash. That's one one command one dash pipeline. Yep. Oh, nice. Okay. Cool. I like that. So I can start to build off and build off all the pipelines from my application. Because it might be that, you know, developers just want a short feedback loop when they're making changes to HTML, CSS, maybe some code. But, you know, QA engineers may want to actually run automated browser test against the and, like, you know, maybe there's other people, machine learning people that wanna start important data. I don't know. Like, the I'm sure there's lots of pipelines in a modern application these days.

46:46 Yeah. Exactly. And as it gives you the freedom to just, like, use the bits that you want to use, and there's also the cool feature, which is you can import other DevSpace YAMLs into your DevSpace YAML. It's not showcased in this one, but, conceivably, you could have, like, a shared DevSpace library with these custom commands and pipelines. And then, you know, I wanna import that so I can just, like, use it without having to necessarily know exactly. So I could, like, define these custom functions, custom pipelines, custom commands, and you can import them and use them,

46:57 Importing DevSpace Configurations

47:30 but you can also override them. So if you have, like, some kind of testing setup and there's some functions I wanna use, but others I wanna just, like, do differently on my machine or in my project, then I can just override individual functions or pipelines or commands. That's super cool because you can, like, build this library of, like, shared stuff. Yeah. It makes a lot of sense. Like, you know, most dev shops that I speak to, you know, we we think we're in this world of polyglotism where we are writing a Rust and Go and Pony and C and all our app.

48:03 Like, we've got 50 different languages and 50 different services. But, really, most shops Yeah. Have one or two languages that they really invest in and builds up the knowledge within their organization and within their team. And I can see where you would want to have a consolidation of all your DevSpace pipelines and configuration and a central location so that when you update that once, every team can take advantage of that right away with the import statement. I think that's a really clever move. Like, that's that's a nice feature. Yeah. It's also new in DevSpace six. And,

48:32 really, the the goal is really that you just you can just focus on your development. Like, you should not be bogged down in, oh. Like, all this knowledge that you have to have, especially when you start in a new place or you switch teams or whatever, you have to know all these, like, secret knowledge things about, like, this this is here, but you have to, like, press this button first, and then you can, like, do that. So, yep, all this is trying to kinda cut down on that. Do you see a future where, you know, there's a DevSpace hub and

49:01 you have these preconfigured DevSpaces for Go? Because I'm assuming they don't differ lightly. And for Rust and for PHP and for JavaScript and Java, or do you think this is very much Yeah. Mean organizations to I would like to see that. I mean, DevSpace is an open source project, so any way that the community can contribute and help each other out and make things better, share their best practices. I think that's a good thing. I know there was once an attempt to do, like, something like DevSpace Cloud. I think that was a that was the

49:33 attempt to do a share like, a service offering, though. Right now, most of our customers, as I understand it, for them, it's more like building up the internal platform, if you will. So their focus is not necessarily on, like, open sourcing, whatever stuff they got going. And I guess, like, in probably the overwhelming amount of cases, it really is, like, very organizational specific stuff that that you're, like, to put in there. I could see it. I don't think that's where our current focus is right now, but it would be cool. Okay. I mean, nothing's stopping you from just creating a a

50:13 repository and making it public because as you can see, you can import a public Git, like, any repository, really. So you could just do it, put it, you know, on GitHub, and then everyone could pull it from from there. Yeah. That makes sense. Alright. There's two things on my head that I've been kinda holding on to while we kind of explore a little bit. So I I wonder if you could touch on both of those. One of them was well, one of them is right in front of me. Like, so I see some sort of IDE

50:40 integration. So I'll come back to that in a second. Yes. The other thing I saw was when we ran DevSpace, there was a UI command. Is this gonna give me a Yeah. Like, a shiny interface? Or It's an interface. I'm not sure how shiny it is. I mean, that that's, like, subjective, I would say. It oh, it's there. Yeah. I could change my Again, is the idea that maybe people just don't feel super comfortable working on the CLI, so you could, like so this is for, like, checking the logs of your containers and, like, not managing your

50:46 Exploring DevSpace UI

51:13 containers, but being able to debug them and, like, try things out in them. Like, my honest personal opinion is that it could do more. Right now, it's just kind of like yeah. Just like a yeah. A little bit shinier version of what you could also get from the CLI. I think it could it could be much better. Right? I think there's, like like as I mentioned before, and I would like to look at that maybe at some point later as well as, like, you can have the you can define dependencies. So if you have a

51:40 Define Dependencies

51:45 an application that depends on, like, a microservice that depends on other microservices, you can define that. And I would really like to see, like, a dependency tree, a visual one. Right? I think that would be a super cool feature. Again, Oleg, if you're listening, please put that in the feature backlog. Because I think that is something that I've heard from a lot of people while when I was, like, you know, I was a consultant for a long time where people were just like, I don't I just wanna know what my applications depend on and which,

52:13 like, what what the actual, like, tree is. Yeah. I think that would be cool. But right now, it's just, like, looking at logs, looking at stacks. K. Cool. Yeah. I guess you can run commands from there as well. Alright. Well And the other thing I've seen then was the Versus Code integration. I'm curious what what this adds. You this is super cool. So I highly recommend to check out the example project. And what it will do is it will open that SSH server, and then it will open your Versus Code if you have remote like,

52:29 VS Code Integration (Remote SSH)

52:52 this this remote SSH extension. If you have that installed, it will then open Versus Code, which is directly connected to the container, and that is really awesome. Okay. I mean, I'm just gonna go with default namespace. Yeah. Yes. I'm sure. Oh, let's see. Yeah. That's just a bit of a walk through for you to see what's happening. Ah, okay. So we're just waiting for the containers to come up right now. We're just just waiting for the yeah. So that's just gonna spin up a Versus code for me. Or just a Versus code with remote. Alright. Okay. Yeah. As long as you oh,

53:05 Demonstrating VS Code Integration (Attempt & Troubleshooting)

53:45 as long as you have the Versus code CLI because it's starting it from the shell. So I'm not sure if you have that, though. Yeah. But it's it's failing. It says I can't drag it on. Okay. Now yeah. Can't read it. What does it say? Oh, no. It's not over here. I I couldn't read the error message. What did it say? It said it couldn't connect to the remote, but I don't know why. Alright. Are you willing to share what's in your EDC host? Because I think I had a problem earlier. And, like, an older version of DevSpace,

54:36 the we did some stuff there, and then you had to remove that so it works now. I'm just looking for the for the Slack exchange where I got had that explained to me. Okay. So because in your e oh, no. In the SSH config, it wasn't in the e t c host. Sorry. There should be, like, an entry for this quick start stuff. Ah. Yeah. Okay. So there's my app DevSpace. And, actually, that looks right because what we should want to see is So the quick start, that's right. I don't know if, like, my app

55:39 is that the okay. Do you still get that error, by the way? I'm I'm assuming you have that on another. I I removed the old one. Let's try again. Yeah. And this is some great user research right now. Could not establish connection to my app dot DevSpace. Can you try to just SSH to my app dot DevSpace without the, you know, Versus code? Yeah. That doesn't work either. Oh. Bad configuration option DevSpace. Interesting. I guess, like, comment. Oh, no. It's not running. Wait. But this is not even the right port. Oh, we have ten six three seven.

56:41 I think the other one is probably oh, can we just remove the other one here, the the one above? The one above. Yes. I think that's like a magic comment, isn't it? I'm gonna leave that. I think it's being used to parse and add stuff to that fail. So I've probably been breaking this demo because of that. Yeah. Let let's just again say that this is something you broke and clearly not some weird behavior that we haven't anticipated. No. It failed. No matching keys. I'm just going to okay. Then instead, let's look at the DevSpace

57:26 YAML to see what it should do. I know why that's not working. Oh, you know? My SSH sock is hooked up to one password, and you're probably adding them to a different agent. DevSpace will be adding it to the default SSH agent, so I don't think it's gonna work. Yeah. Probably. Okay. Well, then let's still look at the DevSpace YAML. And if you at home try it out yourself, and you don't have this weird setup with the SSH cable work. Because, again, I tried it out yesterday, so it should still be working. Oh, this is the wrong DevSpace. We need

58:00 to go to the v Versus Code example DevSpace exactly. Yeah. Right. So, yeah, if you scroll down a little bit this is very similar to what we just saw. So in the sync part Yep. Yeah. We're just, like, doing some Git magic stuff there. I think it's in the pipeline in the dev pipeline, probably, what's happening, the the interesting part, I'm guessing. So scroll down a little bit. Oh, yeah. There it is. So we run the default pipeline of dev, which is pretty much what we saw, so deploying stuff. And then we this is just one command.

58:39 Dev Pipeline

58:57 Right? We because the SSH server has been created in the SSH part, what we can do here is we just start Versus Code with the code code command and then basically say, like, the the folder that you should open is this, like, remote container that you can connect to through SSH remote. Not quite sure how the Versus Code remote thing works, but it seems like this is just a a URL that you can just feed into the code Nice. Command. So this would be super cool if it were. Yeah. That's my fault, I think, just because

59:40 of my weird setup. Yeah. But, like, this again, if you if you just wanna try it out at home, I'm sure if there is a CLI for, like, intelligent or something that would allow you to similarly just, like, open a remote folder, you could probably do that as well here. And, yes, really convenient. I'm I'm guessing there's probably other stuff that we can also do with Versus Code, but I haven't checked that yet. Alright. Well, we have a few comments. So, apparently, I'm the ultimate product tester because on every hands on session, I managed to

1:00:16 break something. Yeah. Thank you. Well, you're not breaking something. That's the thing. You just have a very particular setup, which is good to know. I mean, we're probably not gonna fix it because it doesn't work for you because you're, like, one of the 00.1% of people who do it the way that you do, possibly. Yeah. Yeah. I spent too much time playing with myself. But if I just left it alone, maybe more stuff would work. I think I definitely am the the lowest common denominator here. But You you pretty much know what you're doing, which is, like, not necessarily I mean,

1:00:48 I'm not gonna say that our users don't know what they're doing, but that's obviously, we're targeting people who might not know exactly all the ins and outs about, like, you know, SSH connections or networking or, like, how to set up stuff in Kubernetes. So, yeah, we're focusing on on the group of people who just, like, do the standard stuff more than, like, very specific edge cases, which is, like, probably what most companies are doing. Okay. We also have a question from Russell who is saying it's went off the screen, but I'll read this one out. Is there any support for

1:01:15 Shared Dev Clusters & Dependencies (Q&A)

1:01:23 multiple copies? So this is where Russell is assuming there's a shared development cluster that is being used by multiple people, and they may want to work on the same service at the same time. So I guess the DevSpace.YAML would be the same. How would that work? Yeah. So this is where you could use dependencies, for example. So let's say we're we're the two of us are working on different services that depend on each other. We can I can define your service as a dependency, and you can define my service as a dependency? And then on the cluster,

1:01:55 there is it's either a config map or a secret. I'm not quite sure about that, but it's saved on the cluster. And DevSpace will see, oh, there is a instance of this dependency running, so I don't need to deploy it. I'm just gonna use this instance here as a dependency for my microservice. And if you change something, it will be reflected in my microservice because I'm using your dependency. So as long as we're on the same cluster, this will work out of the box, which is pretty awesome. But I guess if someone if two people

1:02:23 wanted to work on the same service, they would have to use different namespaces to make sure that would work and doesn't Yeah. But that is not and I don't think it should work, honestly. I I think if two people work on the same class and the same product at the same time, it's it's just generally not a good idea. Yeah. Use namespaces. Keep them separate, I guess. Yeah. Yeah. Or vClusters, which is another product that we develop. Yeah. Yeah. We've done a session on vCluster, but it has been a long time. So I'll need to reach out to you to

1:02:51 you and Yeah. And Retch and get something else on the couch for that because it'd be good to see what's going on vCluster. But that that's not what we're doing today. Alright. So I really like this. You know, DevSpace gives me something I could put into GET, which is, the step one for all tools. If if I'm gonna use it, I have to be able to store the config in GET. We have a YAML definition for describing how to build and ship our application, and it sets up all of that plumbing that just gives us this interactive environment report

1:03:20 forward and and potential debugger, which I'm not fancying my chances of my my machine getting to work. So As I said, I also haven't used the debugger feature, so I couldn't even help you troubleshoot it probably. Well, no. But, you know, we're I think what we've done is we're able to show people that this tool is best, how to get started, and, you know, how it could be adapted to different languages and such. Now I I like that the documentation kind of has I mean, these are all pretty popular languages, Node, Python, Java, Ruby, Go language, PNSB. So, you

1:03:53 know, people should go check it out and let us know how you get on. Feel free to leave comments or reach out to either of us directly on Twitter. And it's always fun to share. Yeah. Is there anything else that we could do with comfort? I think the I mean, there's, like, this function sections, which is, like, a way that you can define, like, your own custom functions, but I think this is like, I don't know how interesting this is. This is just another thing that you can define. I do wanna just give people the chance. If you if

1:04:04 DevSpace Community & Roadmap

1:04:26 you have more in-depth questions, especially, like, more technical questions, we have a public Slack, which is you can see that on the top right, and you can join that Slack and ask you questions. And, you know, like, if you have any feature requests, maybe just drop them in there. We have some lovely engineers there who will help you out. Yeah. Apart from that, I think we covered most of it. Most of the, like, standard stuff. If you wanna do something more specific, the docs will hopefully help you. If you want to contribute, as I said, it's open source, so feel

1:04:29 Public Slack

1:04:57 free to check out the GitHub repository. And, you know, even if you're just changing a typo in the docs, that's also helpful. So feel free to just, like, you know, send in some pull requests or something. Thanks, Russ. Have a great weekend too. Well, I mean, we've taken a good look at what DevSpace offers. I hope that people's interest has peaked and they go kick the tires on it. But maybe you could share you know, I I didn't realize it was on DevSpace six, but I'm assuming the market is ongoing and continue to improve. Like, what's

1:05:27 on the road map for DevSpace? What are you working on next? Then you're literally asking the wrong person for that. I do not do not know. Stuff and things. That's all I have to say. Yeah. Lots of cool stuff. Lots of good things. Just Oh, yeah. We're we're gonna make it even better. We're gonna make it work on Rawkode's computer. Alright. Awesome. Well, I think that's us then. I'm looking forward to catching up with you in Edinburgh, a cute puddle. And so I will see you then. Super excited. Lots of karaoke. I hope everyone has a great weekend. I

1:05:50 Conclusion

1:06:01 hope you have a great weekend. Any last words before I say goodbye? Just, you know, be kind to each other, and thanks for having me. Awesome. Thank you. Alright. Have a wonderful weekend. We'll see you all soon, and bye bye.

Technologies featured

Meet the Cast

Weekly Cloud Native insights

Stay ahead in cloud native

Tutorials, deep dives, and curated events. No fluff.

Comments, transcript, and resources

More from Rawkode Live

View all 173 episodes
DevSpace

More about DevSpace

View technology
Kubernetes

More about Kubernetes

View all 172 videos
Helm

More about Helm

View all 49 videos

More about Docker

View all 36 videos