  varios.        ,   ,  ,   ,       ,  ,   , , , , , , , , And improvisation, as we understand it, is a way to react effectively in an unexpected situation. And the way to react effectively in an unexpected situation is to remain calm and stay present in the situation, not get carried out or not get nervous and things like that. Or angry. And the way to learn that is to train. So as the same goes, practice makes perfect. So we are going to train a little bit here. We have only like half an hour, so it won't be very big course, but maybe we'll get some rest from the other presentations and we'll move a little and we'll see what we will do. So we will try several improvisation exercises here to, in those exercises you will be in situations that are unexpected, or maybe a bit unpleasant, but only a little bit, but also we'll play some games to train our preparation for the unexpected situation in the world. Before we get started, we'd like you to meet you not only officially or physically, but also to get to know your names and things like that. So if you could each of you and us to just say your name and then add one interesting thing that happened to you on this conference so far. So my name is Petr, and interesting thing. Yeah, when I was yesterday, when I came here, first I discovered that there is a T over there, then I discovered that there are some little pieces of bread, and in the end I discovered there is also a Sue, so it was like gradually better for me the conference because there are lots of food. So I'm Hanka, and today when I was looking for Petr, I kind of received a message saying you know where to find me, so I went to the food point and there he was. So your name and something that happened to you. My name is Cheta, I'm living here in Brno for about a year now. I attended this conference last year and met my friend Mike who we had seen in Finland two years ago, and just having a short chat with him, my wife finds a job in Red Hat, so it was a very nice thing to see him again today, and it's with him. Yeah, I'm Mike, I'm from Germany, I work for Red Hat, and this is my fourth time to attend a conference in Brno, and when I went to the city the first day this time, I saw this new post which was signaled 30 years after, and I liked it a lot because I had heard the tourist guide last year talking about plans to react this, and I was very surprised that it's actually there, and I think it's so nice. Hey, so my name is Liid, and the best thing at this conference for me was that I gave a talk yesterday, and in the middle of the talk I started to talk about some topic, and died from the outbreak, and I was like, hey, there was exactly my question, and it was a very good question, I was like, yeah! You definitely nailed it! And maybe the most interesting part for me was yesterday's question of finding my goal, because it was like, oh, this is number five, oh, we have just started like this, and it was completely in a different place, and it took 15 minutes to find, and it was like this. So, hi, I'm Mayaku. Yesterday I also had a meeting with a friend, I met a friend that I didn't expect him to be here, that he worked in the same company, and it's a good thing, the good thing is that yesterday Vaikai was working just fine for me, and today it just sucks. All right, thanks. Now I'd like to get our brains working and get to know the names a little better, so if you could please all stand up, and we will be in the room, please introduce to each other, and in a specific way we will be exchanging our names. So, in the beginning I have my own name, I'm better, this is Hanka, and I'm going to introduce myself. Hi, I'm better. Thank you. Now I'm Hanka, and she is better. Okay? Let me come to you as I'm alive, and I say, hi, I'm Hanka, and I get another name, and we will be exchanging names like that, and when you meet the two names that are the same, it means we made a mistake, so you just say, oh, we screwed up, and we'll start over, okay? So now everyone starts with their own name. I'm better. Okay. Are you sorry? Hi, I'm better. Hi, I'm better. Oh, he too, I've been... Oh, I haven't said anything about who I am. I'm bigger. Okay, so I'm Hanka. Hi, I'm better. I'm majoring in 2019. Are you so much better? Who is who now? Let's try to do the check. I think I need V. No, no. I think I need V too. One more time just to get a break for a little more. So I'm better again and let's go back one more round. I need V. Nice to meet you. I'm Meku. Nice to meet you too. I've never met you before. I'm Chita. Hi, I'm Meku. Hi, Mike. Hi, I'm Mike. Hi, I'm Chita. Hi, I'm Chita. Hi, I'm Meku. Hi, I'm Chita. Hi, I'm Meku. I remember it. Hi, I'm Chita. Hi, I'm Meku. Oh, you just split new couples. So Meku will join you and my main couple, please. Don't be scared. So now, in the couples, we'll practice associations, which will be the same words that just come to our mind, just to get our walls down a little bit, just be spontaneous and say what comes to your mind. And in the couple, imagine we go back a long time into the old ages when people were still killing each other with just pieces of wood. And imagine you are such a person and you have a big piece of wood in your hands and you are beating the other person. Just enjoy it, okay? Now, I'm beating Hanka and with every strike, I am saying one word. Just what comes to my mind, just I don't know, car, wheel, driver, bus driver and anything. I just go. And when I stop, when I can't say anything more, that's Hanka's time to take revenge. And she started for me. Get animal dog. I don't know, sir. Yes, a computer. And we go like this, okay? So when you are beating, you just wait for the opportunity and then go for the other one, okay? So let's try new couples. Just the same starts and then go for it. Door likes four. Door likes four. Okay, I'll smile. And don't let your share be eaten, just run. Run from the bus and then we'll be beating you. Like the lunch. The food. And you're very funny. With a smile. A sun. A hamburger. A bee. A dog. A tree. A slaker. A cow. A cow. A dog. A garbage bin. Sarge. Seasons. Those who are taking pain protection, you know, just run. I certainly am. My name is C. My child is not orange. Where am I? He was born in the 18th century. So, hotel room, bed, shower, bathroom, bed. I wanna see. It's such a peaceful way of communication, right? Everything else? Somebody's hesitating whether he should come inside, so he's trying to frighten him in. Would you like to join us for an improvisation workshop? We're just starting, we're doing some improvisation games to get in the mood and be prepared in unprepared situations, nice but in situations. So you can just tell us your name, so we know. Yeah, I'm Tim. Tim, great. Tim Maokhan! So this next game is is called Speaking caves. Speaking caves please make different pairs. Okay, cool. So the thing is, when we did this association game, we will do something similar in the whole sentences. We agree with you, right? Speaking of agreeing, you know? I think you got the idea. So the task is to interupt each other as many times as possible. Okay? So... We start for... Just speak, talk. Thank you, friends. Talking about this, that isn't very nice either. And it's true that we are all friends. We're always nice, we're friends. But you can go... You can go... Yeah, well, I hope that it was... My friend... Speaking about friends... Yeah, I met my little friends here. And she's the other friend of mine. And I met her the rest of the room. So we're all friends. Speaking of company... Yeah, well... Any... Yeah, I think you got the idea. Yeah, I think you got the idea. Don't worry, we'll interupt you whenever you feel better. So the company will work with three companies. We'll see if they do us. We'll see if they do us. Speaking about new projects... It's the potential of big data. And big data as well. We are making so far so... Speaking of big data... So... Here you always started... I didn't get to talk about other new things. Yeah, a lot of new things. And the thing... You have to always learn new things to improve your skills and to... Actually, all things... I saw that, you know, you know, you put friends things... You must be in a good party this... And... We will interupt things. Yeah, it's new wonderful things. Everybody is like... New girls are everybody. Everybody is like... Everybody is like... Everybody is like... Everybody is like... Everybody is like... Everybody is great. Everybody is wonderful. We will interupt things. Actually, it's one of the most... Of the presentations from... Speaking of Microsoft... We had the opportunity to organize in that sense. The last time we had a Microsoft guy from a teacher... Speaking of the... Clouds... And new... Overload movement... And new things to be... There are no outside... Outside any wonderful letter... Yes, we came over there. We are back to it. Speaking of stopping... Well... Well, it's... I don't call it... Okay, sir... It's easier for you... How do you call it? So not to listen to somebody. It's interesting so you don't want to interupt. Just there was no point in this discussion. Because we never finish living. Every time... Surrounded only from... Yeah, from... Like... Maybe there are clouds, do better clouds. And then from... Then to weather, I kind of... We started with weather and... In the middle of our... Association together. So... Why don't we change course one more time and try it once again? Just see how it is with this... It's on person. Try different combination if possible. Same... Okay... You know, just enjoy it because this is a type of conversation. It's very rude to help me. So this is the one time you can do it. My father always asked me this. Father, don't speak about me. It's not real. And it's such a... If you can say about it then... You should prove that I mean.... It's a... I know... I know so many things, you can't imagine what I am... I know... I know... I speak about technology for you. And you can use what I'm saying. Yes, your father may be... Your father may be... Yeah, I know what you're saying... I know what you're saying, We will move on to another activity. We really don't have a name for it. But it is a form of public speaking. But there are various types of public speakers. For example, I will give each of you two a piece of paper. And there will be different roles. And you will be speaking in that role. You will start and finish it whenever you want. But you won't tell us what your role is. For example, there is a CEO of a big company giving a resignation speech to his or her employees. But before you do that, you will try to order us in the right position. It's really hard to sit here. Maybe you can use it also in all these chairs, but they are not movable. It's not really possible to do everything. But at least try to arrange others in that arrangement you need for this role. And when you do, start your role and then end it whenever you think it's possible. And just whatever happens. So for example, if I'm going to be a CEO, I will say, okay, so maybe can you use it? And you will sit. And I will start something. Okay? Well, you know, I think I did a great thing for this company. And I feel that my wife will be great CEO as well. It's a dead giveaway. Right? It's a dead giveaway when you say that your wife is a CEO. People know for sure you are a CEO. Yeah, you can choose whether you are going to say it or not. It's up to you. But it's usually obvious. I understand. Try to guess what is your role coming to what you do. So please, choose two. Two? Sir, you can take turns. Is there any problem to you? Yeah. Okay. Who knows it? So please, arrange us. Please, go into the audience and stand in ovation. Okay? If that's what you want. Yeah, like, you don't have to go somewhere too far. And the ovation is a surprise that I was aware of. But fortunately, I've prepared my small speech. So I want to thank my parents. I want to thank my wife. I want to thank my children's. I want to thank my teachers in the grammar school, my school, university. And I want to thank my fans. And so it's really great pleasure to be here. And I'm really delighted to receive this award. So thank you, thank you. So what was it? Try to guess. We must have got an award for writing or acting. A noble prize. Yeah, for acting. It's thanking after winning piano score. Who wants to go next? Okay. So you can make a seat. Yeah, so please sit. So, today is Saturday. Okay, imagine it's Sunday. And we shoot in the wrong way, but okay. Our God is the best thing in the world who gives us life, who gives us feelings, love, everything we have. So I ask you today, this Sunday morning, to be grateful for what you have. If I can secure chair to give out. For the life we have, to be grateful for that and think again about human being. It's supposed to be longer, but I think it's quite enough to give out. So any guesses? Amen. Just choose of the two which one you like more. You will perform more. Well, we will get to both. So, what shall we do? We should be arranged. Yeah, you can stay like that. So I can tell you, we spent some time together. And now I know that if I would have to go against you, I would be fucking terrified, because you are the fucking best and toughest group of guys that I've ever encountered. And I'm telling you, if we go out there today, we will kick their asses, and they will go back home where they belong to. And we will let them take our freedom or our land. It's supposed to be general before that. Now. Arrange us. I think that you can stay soon. We are here to discuss the big proposal which can have a very big impact on our country and how society will evolve. And you know, to reduce some crime, get a better education for people and to really make lives in this country better. I know that we will need still some comments and amendments, but I think that we are on a good way to be really, really the greatest country in the world. We'll just put it on, talking about the long build. Nice. Why don't you wear on the... ʕʕʕʕʕʕʕ ʕʕʕʕʕʕʕ ʕʕʕʕʕʕʕ ʕʕʕʕʕʕʕ You can come all around. What you see here is a dead body. Please give him immense respect, because if he was from a wealthy family, he would be dropping in a coffin somewhere, but he has donated his body for medical research, and all of you are able to see his body and see his innards and discover more about what the human body looks like. So this dead body... We are standing on this model of the city, and we can see that this model is supposed to be a symbol of foresight, because this part of here is a church, and you can see that the roof of the church is taken off because the roof is there, and it might burn. You can see to the bone, and so the general opinion of the city was very careful in doing the best work to do the end of the switch, and the medical was successful. We have about 5 minutes, I think, before the start of the lecture. So please make a couple of months more for the last time. Just try to go with someone you haven't been if it's possible still. We'll do exercises, I warned you, and before it's a little mind-fuck, so be prepared. And it goes like this, it's called Have You Heard Off? And one of you is in the role of the person who wants to tell the other person about something that happened, and I start like this, and Hanka will again interact with me and say something. Hanka, Have You Heard Off? Yeah, about the time we had terrible hangover. No, no, no, that's not what I mean. I reject it and start over. I mean the other thing, I mean... Yeah, the time we went to the zoo and saw the big monkey. No, that's not what I mean. I mean the last thing, I mean the... Yeah, I know, when we went for the ice cream and then we met the big monkey who just escaped the zoo, and then we had a really terrible hangover Yeah. And the way we are going to do it, one person is saying like, Have You Heard Off? and three times, the other person gives him something else, and the first person then has to connect all the three different things to a story. So in this example, I will be the one to connect in the stories. Hanka would tell me one more and I will then say all the three. You'll just change your roles after you try it. Yeah, so one more to connect all the stories. We'll show it once more, okay? I'm saying have you heard that I'm connecting with stories, right? Yeah, I am connecting with stories. I messed it up. Yes, you did. So, first time. Hey, Hanka, have you heard of... Yeah, the time we went to the zoo and saw the monkey. No, no, no, that's not what I mean. I mean the other thing. Yeah, when we went to see your mom and just... No, no, no, I mean... I mean, you know what I mean. Yeah, I know what you mean. The time we asked... Yes, yes, yes, the time we saw my best friend, my mother on the way to the zoo. Yeah. I'm writing that. Sorry. All three together. Yeah, all three together and make the one story. So... If we do the unraised things and make the one story. Okay. Let's go. One person can connect and then switch the... Yeah, very well. Okay. How can we... Okay. ...do the unraised things and then make the one story. Yeah, it was like... I still didn't want to be and it was very... I don't know... I hope that... Yeah, it was about... about... Who missed this presentation? No, no, no. It was exactly that. It was on the other person. The one story. I don't know the time. I don't know the time.                                                                                                       . , the shlaring very good me It was more difficult to think about three different things or connect them together. I think think of three different things. I was just thinking that the way that you can connect them out of it in the end. Maybe it wasn't the wrong way. It was more difficult to think about unrelated things completely. And you already took the crazy monkey in the zoo with your mother. I don't want to talk about it. Well, we'll have to end in a few minutes. Thank you that you came. Usually when we do such workshops, it's for several hours. University is a course for the half years. It was just a little bit just to show you as free. It was also just students improvisation workshop. So, thanks for coming. And we have this. We can be here also when we end and talk about it more. But there is a next session starting soon, so we probably have to move. And we had such a little ritual when we ending our workshops. Just imagine you have like between your hands, you have like a giant rubber band, you know. And all of us, we will push it together up. And our goal is to clap all at the same time. And no one is the leader, so don't forget me. Just to watch each other very carefully and clap at the same time. Thank you guys. I hope we at least woke you up after so many lectures. And since then, it's been a bit of a bit of a week in general. I don't think it's going to be. The improvisation techniques are in improvisation theater. And this is more of a way to be relaxed. And when we are about this speaker, to be relaxed and giving a presentation. And to be more assured of yourself. Twenty different reactions. Not everyone in the conversation begins to get many reactions. So we should be doing it right. Like in front of each other. Just to let you know. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. It's very difficult right. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. So, in a large group, 14 people, 15 people didn't react when they heard it. When you showed us my direction, according to my teammates, ḣᵇᵍᶀ ḣᵃ ᶴᵎ ᵇᵃ ᶜᵍᵃ ᶔᵍᵃ ᶜᵄᶦᵗ ᶤᵃᵉm ᶠᵍ ᶠᶦᵃ ᶮᶦᵃ ᶜᵇ ᶠᶦᶦ ᶜᵃ ᶗᵃ ᶠᵃ ᶜᵃ ᵘᶦᵃ ᶜᶦᵃ ᶜᶦᵃ ᶜᶦᵃ ᵘᶦᵃ ᶜᶦᵃ ᶜᵃᵃ ᶜᶦᵃ ᶠᶦᶦ ᶜᶦ ᶜ ὒ ὁ ὂ ὃ ὦᾆ ᴟ lengthy por tu. Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣe Ṣ  deity hook Steeve said it's the unit talks though, oh my gosh, I was bloody probably going to tell me that I have to reduce my speed by about four times. I think it was a really long technical presentation for 40 minutes. I think that you wanted to cover so many topics. I knew I wasn't going to finish it, so that's why I had all the notes. But I talked too quickly, I know that I get too enthusiastic. That's why I reduced my talk for the other or less. But I'm trying to, I've been playing around with how much I talked the last few times to try and adjust myself to what works for me and trying to not work so much. So nice. Good morning afternoon. It's about time, probably people will start coming in. Doesn't matter. Today we are going to, I'm going to show you how some of the deployment patterns that you can use in a container application platform. That means OpenShift. This is the OpenShift track. We are talking the whole day in this room about OpenShift. And the first thing, I'm Jorge Morales from Spain. I work as a developer advocate in the OpenShift team. I usually, I do some other things in the team. And now my team is coming in. They asked to watch me because they think this is going to be interesting for them, which is not. First thing, because this is an OpenShift talk. Most important thing is to set the expectations for the talk. That means that if you know about OpenShift already, then it's fine. If you don't know anything about OpenShift, probably I will be talking about concepts. OpenShift concepts that will be boring to you because I'm not going to do an introduction into OpenShift. So this is the time for you, if you want to live, if you stay, just stick to the end. Okay. Some of the concepts. In OpenShift, what we do is deploy applications. Usually they are deployed in something called pods, which creates a unit of your application and provides with IP and resources and storage. And everything that containers provide. That means that a pod is one container or a set of containers shipped as a single unit. And that's a Kubernetes concept. Everything that's in blue in this slide is what Kubernetes provides to OpenShift product. And everything else is what we build on top of Kubernetes. When you deploy your pods, you need to access those pods. Why? Because at the end you want to deploy one or multiple instances of your application to be able to access all those instances of your application. There is one thing called a service that is a single point of access to your application and will abstract you from where the application is running. When you want to access those applications from the external, you will use a route. That means that you provide with a DNS name for accessing your application and through the services it will get into the pod every request as a client. We're using an internal SDM for extracting the networking for the pods so that pods can come and go in different hosts and it will be transparent for you. And then there is the replication controllers. There is a different set of controllers, but I'm going to talk about replication controllers. That provides you with a definition of what will be your application, what will be running inside your container. This is the container or set of containers that will be running or that will be part of your application. On top of that, OpenShift provides the concept of a deployment configuration that wraps a replication controller providing you with the number of instances of your application that you want to run. Probably you want to make it reliable or scale it. And also provides with additional information like triggers, what will make your application change from one version to another. So if something is triggered to that deployment configuration, a new version of your application will get deployed. This is really important because we are going to be talking about the deployment pattern. So the most important thing that we are going to talk about is things that can be done with deployment configurations. There is also bound to the deployment configuration, one concept that is the strategy that will use for moving your application from one version to the next one. And then the rest you can just skip it. The deployment patterns. The first thing you probably need to know is how do I deploy my state-led application? What is a state-led application? A state-led application is something that doesn't need to have some state. That means that I don't require to persist anything to this because if it fails, I can just spin up a new instance of my application and it will run the same way as it had before. So a good example is a web application. I have my web application that I can just deploy into OpenShift. So for that, this is a diagram that I would use for the whole talk which tries to model an environment, an OpenShift environment, a hosting environment where you have multiple nodes where your application will be running and I will be showing how it will behave when a node fails, what will happen with your application, how would you move from one version to the application to the next one and what things you have to do or you have to change in order for that to happen. Then we have different parts in this diagram that are in green. I'm sorry because there is a lot of light and probably you cannot see the diagram very well. But you'll see that these green parts they will have some meaning but it's mostly related to what I just explained. The service layer. That means how we access my applications if I need to create a service for my application then the routing layer if I want to provide or expose my application to external consumption and then there is the persistence layer. So if I need to have a persistence service or a stateful service which we'll be looking at in a moment I think you have to press for one. If the persistence layer where we will be storing our data in case we have the stateful services and also registry because our containers will be doctor containers every time we create an application it will be storing the registry and hopefully it will get that image from the registry and deploy it into your environment. So the first thing you need to do for a stateful application is create a new deployment configuration same amount of replicas or instances of your application that you want to have in this example I'm using three and I'm deploying just a web application. So it will deploy three instances my replication controller this is a controller that lives in the master server it will just make sure that you have three instances of your application up and running. Then we create the service to abstract where those instances are located why because these nodes for you are unknown where they are living they can move from one node to another in case of failure. So we create an abstraction layer so in case we want to access our application you don't do it directly to the instance to a concrete instance but you go to an abstraction layer and then you have also a routing layer so in case you create a web application you want consumers to go to your web application so you provide with a DNS name like web.example.com through the normal web client to consume your application. What happens? That's a status application we'll see if it over after once. Stateful applications is an application that requires persistence somewhere why because if my application goes down and then I start a new instance of my application I need the data that was in there to still be there accessible to my application. How do we model this in OpenShift? I am using an example where we have a web application but this application is using a database for storing this data. So at the end what I will have is two different types of set of applications I will have my web application and I will have my database the first thing to do is if I need to persist my data in an external persistence storage I need to create a persistence volume to provide with the configuration for the amount of data where it will be lived where it is external an NFS server Cinder, Glaster, whatever type of storage you have available in your installation Once you have your persistence volume you create your database you create a deployment configuration the amount of instances that you want you want a highly available database so you have now two instances of a highly available MySQL up and running and using a shared storage that means that you can fail over from one instance to the other seamlessly so if one node goes down you will still have your database up and running to access that database you will always require a service how do I access my database why? because as I said database or pods can come and go if something fails it will just spin up a new pod somewhere and then because I am going to access my database not from a client but from a web application what I do is create my web application and link it to the service so I will link my web application to my database this is done through environment variables so my web application will have some configuration username, password, whatever configuration I mean my web application in my toncat I will set some configuration to access that database so I will set these credentials and I will point it to the service so my web applications will go to the service through this service abstraction layer that means that my web application will be able to connect as long as I have one of the instances of my application up and running to expose this again for external consumption because we are talking about applications that we want to make accessible you need that service and you need that route when we are talking about stateful applications and we are talking about an immutable infrastructure one of the biggest problems that we face is how do I create my database how do I load the initial set of data that I want in my database we want to have a set of reusable images my SQL, whatever that will be the same at the end is the runtime but it will be different for each and every user that uses that runtime every application will require their own schema so one thing that you need to do is to once you have your application create that schema on top of the application how can we do it if I can create an image that it will be only suitable for my application if I have a different type of application because that database has a certain schema I will have to create a different database with a different schema when I am talking about a different database I am talking about a different Docker image or you can have that schema creation offloaded into an external persistence volume that means that I have to guarantee that some way I will create the schema the data files in the persistence volume and the database just will connect to that data files in that volume you can also use something that is called post deployment hook that means that every time you have to ship with your database container one script once the database image which is generic it is deployed it will run a script that will do something in this case create the schema at the end it has one drawback which is that this image this database image will have to have the script also in the image itself so at the end even if the image is very useful or you can have multiple scripts the script has to be embedded into the image there is a different pattern there is a different controller that we are shipping right now in open ship that is called a job a job it's something that you can run once to the end one instance up to the end so I can just create one job that it will have the responsibility of creating or creating that schema for you so I have my deployment running without a schema I can run a separate process of the job that it will run create the schema and die the good thing is that you are not binding in any way the schema to the database so that this makes a more reusable process of configuring your databases or loading your databases or you can have it of course application loaded that means that there is different types of application frameworks like hibernate or different type of languages like pearl that when you start your application because the schema is in some way related to the application it will just create the schema for you in the database now that we know what different types of applications we can ship so there is a stateful application or a stateless application of course with these patterns we can go the full microservices type of application the stateful both of them suit very well for microservices they also fit very well for legacy type of applications the only constraint with legacy type of applications right now with OpenShift is that you will have to stick these applications to certain nodes that means that we currently don't have the ability to stateful or legacy applications to orchestrate them so they can move the applications legacy applications even if they are not cloud ready they can write in OpenShift what we are working is into making also your applications which are legacy and which are not cloud ready to be able to move and be cloud ready by the platform this is something that will come during the year through something one of the talks that was mentioned it's called Petsets deployment strategies how do I deploy or update one application from one version to a different version once I have my application usually this is there is different types or ways of updating your application whether you are working in development or you are working in production usually you will not update the same way in different environments because you want to keep in production or in testing you want to preserve database data in development maybe you don't want to preserve the database data because you are developing you can just wipe out the database and create a new database from scratch so with deployment strategies with the deployment configuration there is you instruct whenever you deploy something into OpenShift you instruct how it will move transition from one version to the next deployment configuration about your applications is because your application will be running in a container which is immutable once you have created a container it will be like that and it's the one that you will be moving from environment to environment the only thing that requires for you to go from one version to the next one or rollback is just spin up the oldest version of your container you already have it in your registry so it's just a matter of moving back and forth so deployment configuration at the end it's the different versions it will cycle your application if I do a deployment and something happens I can rollback to the previous deployment and in fact the platform will rollback for you if something fails so we have different types of strategy out of the box we have the Recreator strategy which is really easy I just throw out whatever I have and deploy it again that's as easy as wiping out the previous version and then wiping in, sorry by the colors because there is not much time I have three new instances of the new version of the application this is Recreat, this is usually used more in development why because, yeah so the containers will be stopped deleted and then new containers will be created so because when you create a new version of your application you'll have a new version of an image so let's say you create an image version 1 and an image version 2 moving from one version to the next one is just kill the old containers and spin up a new version of the containers going back it's as easy as killing those containers the version 2 and bringing up version 1 containers why because you still have them there you have all the configuration that was required and of course in this type of pattern you are not carrying about database you have to, the only thing that you need to take care in OpenShift is when you are moving applications with the data for the application itself it's really easy, when you are moving database from version to the next version then it's more complex because you have to think that if I go forth then if I roll over how will I roll over that database, once I have that database so you have to take care a lot when you are following these patterns for databases, stateful services or this type of deployments we are working a lot into providing capabilities for allowing database to be also easily transition from one version to another and they will eventually come with the platform but of course that's something that it takes a lot of time, you have to look at all the different patterns rolling deployment canary releases, we do deployment, we move from one application 1 to application 2 in a rolling fashion, that means that set amount we put a new amount of the new version 2 we take out a certain amount of version 1 that means that we will not lose our service at any point our application will be up and running and it will be accessible at all the time of course your application needs to be compatible that means that during the time that your application moves from transitions from one version to the other if the application if the database schema is different you will have to look into that how to move that, so this is the example is really used or I'm showing it's for a stateless type of application transitioning good thing is that we are doing canaries what is a canary release a canary release is when you want to move one application to a new version of the application but doing gradually and in that time that you do the rollover of the new version you want to look at what's happening so if something doesn't go well roll back but not the whole application maybe you want to do one by one check that everything works fine you can do something and it takes time so that's why rolling strategy has more configuration than the previous one redeployment redeployment just drop the old really rolling over how will I do the rolling so I can structure what will be the update period of my application to move so in this example I'm moving choose one to the next one any traditions in the slots and it's happening every day that means that the new version or a new containers of the new version will come I will have one day to check if everything goes fine and if everything goes fine and I don't stop or cancel the deployment it will continue to move and then of course if it fails on the redeployment it will roll back automatically but this is when you are doing canary if you put a long update period of seconds what you want to do is have your ops looking into the behavior of the application and then there is the max search and max unavailability that instructs which will be the chance of application that I can exceed of the new version and that I can live without the old version that means that the amount of ports that it will bring over before carrying down the old version you can specify in percentage or you can specify in amount so that means that you can say okay do it one by one do it if I have hundred of applications just move 25% of the applications create a new version it's really it's better to see with an example this is one by one so what I do is create a new instance of my new version and then once I check it will delete the old one new one delete the old one a new one and delete the old one I'm moving in this example I'm only transitioning the stateless part of my application I'm assuming that the web application it will work the same with the database when if you want to talk about I'm not showing in this talk because it's a very short talk or probably and I'm not showing about transitioning databases but if you want to talk about in that pattern or if you have want to know how we can propose it just come on ask me after the talk blue green deployment does anybody know what is a blue green deployment what is for I have swag what it's you have two instances of your application one is live and the other one is testing environment and we go to switch that blue because the blue is running or the green is running and then when you switch to the other one you switch it goes live and then you have the other one testing it's not only meant for testing of course it can be used for testing and there is one pattern that is not used usually for testing which we will see later it's also to be able to provide some guarantees or some predictability that the new version of the software it's good that means that I will have at a certain point both of the applications the blue and the green that means version one and version two of the applications live and I will be able to switch really fast between both applications so I will deploy the new application once the application is deployed switch to the new version of the application if something goes wrong it's just a matter of changing the routing or how I will access my application and it will be a matter of seconds going back to the previous version while if you do if you have to do deployments it will take the time to deploy your application your new version of the application to transition from one to the other of course it doesn't work in certain scenarios for every scenario so if you want to access the same database it has to be compatible you need to know that both of the applications will be accessing the database so there is certain considerations that you need to look at when you are doing AD how do we implement AD? we have a deployment configuration of three instances of my application which is version one, it is the blue and I have a service I have the access to this blue application and a route because I have consumers of my application accessing the clients of my application accessing them what I do is just create a new instance version two which will consist again of deployment configuration and a service and once I have both instances of my application with the service abstraction layer being able to access my application what I do is just change my routing so my routing before was pointing to the service my application blue and now it is pointing to my application green that's a matter of one single command that it will change your routing and it will be instantly if whenever you do blue grade deployment if something goes fine you will maintain the green but if something goes wrong you will maintain the blue and you will be able just to remove the green deployment and just create a new version and she will be whenever you are ready for it next pattern A.V. testing so during the routing it is still on the all kind of switch during the roll over okay since it is rolling it takes time right yes so you have a one application you have a just going to be in another so on the usable level if you do it by default with one service what it will happen is that your application will be accessing your new version no sorry your old version usually and when you want to do long rolling deployment of your application you mix this pattern with A.V. or with A.V. testing that I was going to show so you create a new service to access your new version of the application so you can test it if it is a long roll over if it is a short roll over what it will happen is that it will create a new instance it will just move the deployment of your instance and the service it will be accessing both of them at the same time so that depending on the time and on the differences on the application you will have to follow different pattern usually A.V. testing and blue-green needs to be mixed with the configuration for the rolling deployment A.V. testing who knows who is A.V. testing by the way you ask a question feel free to ask questions somebody ask a question before you otherwise I will have to take them home okay who knows what is A.V. testing what is the purpose of A.V. testing go ahead so we have two versions of applications of an application and we serve one version to one sub to the users and we think about the second sub to the users and we test which one is better for users but really the main purpose is not to test which one is better for users but what you usually do is the V version what you want to do is to get some information about a new version that you are developing so you will get some sample data about the behavior and usually A.V. testing follows back going back to A once you are finished so you get to be or you deploy a new version in your application you direct a certain amount of users to the V version they start using the new version of the application and you check what is the behavior or you ask them because you know who will be using the new version of the application once you know and you get all the information that you want you can go back and if that or if the application goes fine then do a rolling deployment deployment to the V version and just deploy it for everybody so A.V. testing is a way of testing features in a control way so you usually want to you want to direct this testing of the features to a certain amount of users so we have right now we have the ability of doing A.V. testing out of the box in OpenShift but we are working on providing with more advanced use cases for A.V. testing so we start with application A three instances service A A.V. and the route so the main difference with this is that I have my application I have a level that is called A.V. member you can call it whatever but I have a level for this type of services and my service will route to all the pods that are using that level the services related to pods through a level selector that means that it will go to all the pods that has that level what do I do is I deploy a new version of my application one instance that means that right now I will have three pods of the old version one pods of the new version if I do the normal testing on the routing layer I will get 25% of sampling data out of this then you can scale of course depending on the amount of sampling data that you want if you want 50% you just scale up the new version of the application to provide you with the percentage of the sampling data that you want you do all the testing all the testing that you require once you've done all the testing you go back to the previous release and you decide whether you want to go live with the new version or not so things that we are working right now because the AV testing that we provide is somehow based on the amount of pods that you can spin out we are working on trying to provide more advanced use cases whether it's in the platform or through patterns that can be created on the application like being able to provide weight being able to do the routing to this new version based on headers or cookies or whatever so the routing layer will direct to the new version only the amount of users that have to go so you can have just one instance of the new version and whatever amount of instances of the old version and based on the criteria just directly in the users up to that version all the users so it will be unpredictable in some way of course if you want to make it predictable what you usually do is create a new version of your application expose it into a different route and just have the new set of users going into your application through a different route but that's more or less like having two versions of the app two complete sets of the applications from top to bottom or don't feel shy otherwise we are going to finish in five minutes yes, please but you have a wife let's say you have a new version of the JavaScript and the new API that user who gets that version of JavaScript all those APIs so right now that's one of the that's one of the things that when you roll new deployment if your browser is caching things and you probably you get requests to different versions you will probably have unpredictable behavior on the client the routing layer usually do sticky sessions on the source IP that means that once you start a session on the routing layer you will always go to that application so that means that if it could happen or one session that's already been going on, it will always go to version A if there is a new user it will go to session B or to the version B once you finish with the AV testing you will spin down or scale down that container there will be no longer version B the routing layer will direct you to the version A and that's the time where it could fail when you as an admin scale down version B to the A otherwise the routing layer usually is doing the sticky session so it's guaranteed that once you start a session it will go to the same to the same backend the only thing the only consideration is that if there is a firewall that abstracts the real source IP you will have unpredictable behavior but you need to know your network topology in order to apply this pattern so if you don't know how you're going to do it probably the best way is just to create a new version of your application give a new client or give a new URL a new route to the user if you want to test B once that's done they will start using again the version B through the routing to the version A to the routing to the version A Ryan obviously it's not a question it's a question it's okay you should know everything this is a lot of stuff that I haven't seen yet and in the old version of OpenShift there was something where we would auto scale the application and if there were persistent connections or open sockets we would not put it to sleep or not scale it all the way down do you know if there's anything in the roadmap to count the number of connections and maybe say hold off on removing an old deployment until the connections are closed that's what is called graceful shutdown so that's usually when you want to move you can do it you can do a graceful shutdown but the graceful shutdown has to have a period that means that you provide with a certain amount of time for the users to move away then after that you cannot wait if the user is holding you from transition from one version to another you cannot hold so at the end for those ever that has a transition in that graceful shutdown period they will fail yes sorry sorry so that's the thing at the end what you want to do is to provide the users a certain amount so the routing layer in the routing layer you will not get new request to the old version but you want to transition you want to be able to remove the old version from the deployment because at the end it's consuming computing resources the pods are there and you want to eventually be able to remove them so what you want to do is to provide them with a period of time that they will be able to move otherwise you just kill them the question is can you do it in the current part or some way how to move the sessions from one instance to another or it's something like you want to implement in the application that if you have something like card like you buy something that's application specifically because at the end a card how do you do a card depends on the language depends on the word but which sessions application sessions so if you are using AP you are using probably the application session storage that uses EAP if you are using not whatever so there is no way to provide this out of the box so you have to provide it in your application so you use a container like yeah but that's application specific how do you model that how do you model that it's application specific but it's not going to come from the cloud no no never signal to the application I think there is a way to build applications on the REST API so you can interchange this this intermediate layer without that issue you just need not to break the REST call in progress and you usually need just few seconds so what you do when you do the redeployment there is two phases one phase is bring up the new instance that's not what we are discussing and the other is tear down the old instance when you tear down the old instance what you do is send the signal to the container and there is a period of time that you give that container to go down the thing is that that period of time that you give the container depends on the container the runtime that you are using let's say EAP EAP doesn't provide with grateful shutdown in certain scenarios so you'll get the signal and depends on the runtime that you are using to shut down properly but at the end you have to provide timeouts for this to happen otherwise you'll always stick to waiting and waiting and waiting forever if something doesn't transition ok, the last pattern we are running out of time I think but I see you are really interested so I will continue until you leave next last thing is how would you promote application from one environment to a different environment OpenShift provides you with different ways of modeling your environment that means that usually if you have one single OpenShift cluster what you will do is level your environment with different tags with different levels saying this certain nodes will be target for development this amount of nodes will be target for test this amount of nodes will be target for production so whenever you deploy an application to the nodes for application if it's a production application it will go to the production type of service maybe because the quality of service that you provide in those servers are better maybe because there is more computing resources whatever reason you have that's up to you so how do you move one application using one single OpenShift install cluster this is one single cluster the first thing is when you build your application it will be storing the registry under one tag that's the image string tag or that's the name of the docker image that you provide in the docker registry in this example I'm using my application there and I have different types of deployment configuration related to different tags so I have for my production environment I'm watching an image that is called my application production in my prep production I'm watching for a tag that is called my application prep production and in depth the same so the first time that I build I will just create the image in the registry with that so automatically it will get deployed into the development environment with one instance because my deployment configuration has one instance how do I promote now because my developers are fine they want the testers to test it how do I do it I tag my image in the registry with the new tag that is being used with the new and with the new deployment with the new deployment configuration so that means that once I tag my application with prep production the deployment configuration that was set for prep production it will deploy it and that's the same pattern again and again for production environments when you move tagging into the same registry different tags will be the source for different deployments what about different application different cluster so I have two different installations usually production is different installations what I don't have access so I can follow probably in prep pro it's the same environment I can follow that pattern but maybe when I want to move into production I need to move an image from one registry to a different registry how do I do that it's the same you have one installation one image in the registry but this time it's not tagged especially you don't have to tag it especially why because what you need to do you have two deployment configuration for each and every environment what you need to do is just move your image from one registry to the other registry how you pull the image you copy probably in a pen drive you go to the production environment once it's in the registry it will get deployed we are working in making that easier with some commands like oc import image export image that will provide with other capabilities other than the Docker basic it will create all the opens it requires that I think that was it if you have questions ask me after quick finish because there is more sessions coming in thank you this hard part of having stateful application and data available it's already it's feasible so do people do this yes but you don't probably have to know no application comes without it's really stateful when you move applications it is the same it's not amazing