GitOps 2.0 hands-on workshop: Setting up your repositories with ArgoCD and Codefresh

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right it is two minutes after the hour so let's go ahead and get started so welcome to our get ups 2.0 hands-on workshop um this is setting up your repositories with argo cd and code fresh um in this webinar anais is going to um you're going to follow along with on is rather as she takes you from setting up an active argo cd installation in your cluster to connecting it with the get ops dashboard in code fresh if you have not done so already please take just a moment to open up your code fresh account or start a code fresh account which just takes a second so that you can follow along step by step with on ice i also have a poll question to help on ais learn everyone's expertise level and so how she can kind of craft this webinar so let me go ahead and launch that poll now we just want to know what tools and processes you're currently using so if any of these are new to you and also if you are currently using code fresh so please answer that poll that will really help us tailor this presentation a little bit and we'll go over those in just a minute yeah so while you're answering that i'm going to go over some housekeeping items we encourage your questions throughout the session but please remember to submit them using the q a button on our zoom toolbar rather than in the chat then we can keep better track of them we don't want to lose track of your question in the chat this session is being recorded and a copy of the recording will be sent to you by tomorrow from me so look out for an email from taran at codefresh lastly please remember to reference codefresh.ios events for upcoming webinars as we have fresh and informative webinars for you several times a month and with that i'm going to go ahead and welcome anais hi anis how are you doing hello good thank you so let's take a look at our poll responses and if you haven't responded to the poll please do so this really helps us out it looks like nobody is using git ops or argo cd yet that's probably why they're here but most people are using docker and kubernetes um nobody is quite an expert with code fresh but they've used it before and then we have three people who have an account but haven't used it very much and three people who just opened an account for the purpose for people who just opened an account for the purpose of this workshop so awesome looks like this this is exactly the audience we wanted right people who want to learn more about code fresh specifically get ops in argo cd so let me go ahead and close that poll thank you everyone for your answers and there we go i can share the results you can see them there and on ace you can go ahead and take it away for this uh on this workshop and i will join you again at the end thank you awesome thank you taryn um welcome again everybody for joining me this evening afternoon morning wherever you are for this webinar um just a bit about myself maybe to say hi my name is anees i'm a developer evangelist at code fresh i just joined code fresh and actually the devops space two months ago so this is all really exciting and you can connect with me here on twitter or lisa nice um so let's before we dive into get ups and what git ups actually is and how we're gonna set up argo cd and code fresh um why do we want git ups what is it used for so um dan and victor and others are code fresh and other other folks in the industry have talked about it quite a lot already um overall uh there's this presentation from casey hightower that he just gave a a few days ago actually where he reminds us um that everything that we do all the processes all the tools that we use they're ultimately there to enhance um our human-to-machine interaction to enhance our existing processes and operations and make them more efficient so githubs in itself you probably if you're a developer if you're working in the space you already use git so it means that everything that we do we define and get and that allows us to automate our resources and and processes and make them more effective so why do we want it why do we want to have um ups and um and integration with something like aggro cd so before we kind of yeah so overall i found this i found this treat that i think illustrates the point quite nicely um this might be how it feels like for some people at some companies to deploy um especially on a friday it's just this roller coaster of what's actually going on um and that's what we don't want to have so what we do want to have is uh to have high observability um insights into what is deployed where uh what resources are we using uh how are they deployed who deployed them and um just easy way to figure out if something is going wrong uh so let's dive into the demon um we are gonna set up first argo cd uh on our local machine and then we're gonna set up the integration with code fresh and deploy also an application in argo cd and then see how that connects with code fresh so here i have a repository that i'm going to be using it's a basic react application that has a hum chart that defines my kubernetes resources and then i have here in code fresh right now i don't have my github dashboard set up that's something we're going to do and then i have here my cluster connected to code fresh right now um there is no there's no aggro cd deployed so that's what we're going to do first so also locally i have my uh cloud cluster connected um so i'm going to be using that all of the commands and everything that i'm doing here i will share at the end and uh github just so you can use that to follow along so don't worry about uh following along right now and like in the hurry that's something i'm going to provide you at the end of the of the webinar so first of all setting up agua city we want to have a kind of a home for argo on our cluster and for that we're going to set up a namespace for argo and our cluster so we're just going to create that um it might take a few seconds it's created and now on that um cluster we want to and then the namespace we want to add our argo cd um resources and what agricity ultimately does it deploys a cubanita's controller that then um basically what the controller like high level does is um it gets information from us of what we want happening on our cluster and then consistently um compares the information that we gave it to what's actually happening on the cluster so it's basically consistently checking is everything okay is everything okay is everything okay and if there's a no then uh it will inform us um so that's agucd if you haven't if you don't have um the client installed yet you can do that with this command um i'm not going to do that since i already have it installed and it might take some time to do that again i will provide all the resources later on the first part of this demo might be a bit let's say a bit hectic of like in terms of one command of the other so next we want to access our argo cd api server and for that we're going to change it into a load balancer so we can access it and basically forward it with this cute cuddle command so we can access it um so then let's just close this and open it up so it will tell us basically in this uplink in this deployment that others use of argus data that's not um it doesn't have to proper certificate we're gonna open it up anyways and here is the login screen of argo um now i need an a password to log in and the password is also provided um through a command with argo cd this is all based on um the argo documentation as well as the code first documentation so i will share those at the end as well so you can follow along with those so this will give us our initial password we can take that and um the username is going to be admin by default and then we can log into um the application and right now we are logged in um you probably would like to change the password um which yeah i'm not going to do right now but you will you will want to change your password once you log into something that either you can easily store remember or something um yeah so right now there's no application deployed here um so we're gonna add a new application now um and this is this application as already mentioned at the beginning so we're gonna you can do all of that also through the command line i'm just gonna do it for just demonstration purposes i'm gonna do it here um in the ui but you can also do it with their client so i'm gonna name this react articles um let me show you the application in a second so you know what's actually being like deployed here and provide some more information so this is my repository um then i'm providing here basically the path to the helm charts that i'm going to be using you can also use any other kubernetes manifests as long as argo basically aga wants to know what is your vector do you want to jump in no okay uh i just saw victor joining maybe he wanted to add something um awesome so uh yeah i'm basically gonna tell i'll go hey this is what i want to deploy this is what uh the deployment is ultimately gonna look like here i'm going to provide the cluster or like yeah that i want to use to deploy my application at um if you're using a different cluster to the cluster where auger cd is running then you have to do some additional configurations um the namespace i'm gonna just put into the demo namespace and then i can go ahead and create it here on argo and right now as you can see it's out of sync so i can um just ah something else i set it to manually synchronize so i have to in this case i have to invoke the synchronization um which is which i do because i want to um basically invoke so whenever i make a change to the repository i want my code first pipeline to run and then trigger the synchronization with aggro so now my application is synchronized here now we want to go ahead and connect it to our code fresh account so this is my code first account like already shown at the beginning right now i don't have any um getups application connected so we can either do it through here or we can go to our account settings and if you're already familiar with coders you might be already familiar with this site here um that basically allows you to um connect various integrations with with code first so we're going to go to the githubs integration and once we say we want to connect to argo it's going to provide us the commands that we need to connect to argo so in this case um i already have my code first client uh installed so i'm gonna just gonna go ahead and install the argo cd agent so i'm gonna open it up here let's use a new terminal and then once we connect it here it's gonna might take a few seconds um it's gonna ask us several questions um that we basically have to kind of fill out so it knows what it's supposed to do supposed to connect let's wait adam maybe any questions right now taran no questions yet if you all have a question go ahead and pop it into the q a i did just share the um the doc that shows this kind of integration that you can follow along with as well and i use if you have your github repository that we can go ahead and share now um that would be wonderful in case people are super speedy and want to follow along where's the chat it's on your toolbar which sometimes gets hidden when you're a presenter q a more chat you can send it to me okay i got it so you can go ahead and clone this repository it's basically well here it's running on my um localhost so it's basically just a simple react application that displays different articles but i can check okay yeah so this connects basically to um it's just an api that displays different articles from hacker news and i can just delete them or i can do different surges for example get ups and then it will display the articles um so let's check if it's ah now it's connected um so here it's connected to my google cloud cluster and then i'm going to use argo cd as the integration name in this case i want to provide my username and password the password on the username is admin and the password i can take from here and just plug it in there and now it's testing a connection it's asking me if i want to import all existing applications that have an argo running to code first which i do want to do and also to yes and now it's basically setting up the connection to uh code fresh and i will be able to uh once it's synchronized it should show that it's healthy um so we will see once this is does it stand here um yeah that usually takes also a few seconds since you have just a minute on east i do have a couple questions um the first one is from simeon can you integrate with jenkins to multi-cloud interface if if configured you mean i'm not sure in so maybe if you like if you could elaborate whether you mean like integrating argo with jenkins i'm not sure in what use case you would want to connect codefish with with jenkins and argon um but maybe if you like if you specify the use case we could provide further information on that yeah go ahead and type that in the chat or in the q and a's man and we will clarify and then we have another question from chandu as well um could you explain then this is kind of just a general question the major difference between regular devops flow and deployments and githubs so um so i can i can provide him my perspective since i mentioned i'm just new to the devops space since like two months so i'm not 100 i'm i'm basically that newbie who just got introduced to cicd tools right from the beginning so i'm really used to using code fresh um as like my yeah um testing integration god knows what flow so um what you basically do with argo is you want to make sure that um your application is always in in the right state let's say like you tell it i want it to be in the state i want it to look like such and um aggro cd i will dive into that a bit later in the demo is basically going to make sure that that's the case and if it's not the case it tells you why it's not the case and um then you have options for code first as well to to make sure that your application is deployed as the way you want it to be deployed um so it's basically an extra like mechanism of like making sure that what's happening is what you want to happen and that everything that you have deployed is visible in such a way that you can um yeah that you know what's going on and he did elaborate a little bit sorry i didn't read the entire thing it is in the chat um but he said what i meant devops process of uh deployments is whenever i push my my code to a git platform and whenever the cd tool i configure to my repo it deploys my app to the target if there is any hpa or vpa configured in my kubernetes environment for auto scaling that happens um how does gita the get ops engine react to the auto scaling when the auto scaling actually happens either hpa or vpa that's a really good question um maybe viktor has has further thoughts on that if he's here if he's in the state where he can answer otherwise i'm happy to get back to the question later on or reply with more detail but yeah and then sorry we had um simon uh responded as well to his original question about jenkins he says let's uh let's say can it run argo argo cd on aws and azure with the application so um so indicate well in in this case i we are highlighting specifically the integration of argo in in uh code fresh which i'm gonna dive into in this part of the repo so it's a different use case let's let's approach it that way it's a different use case and i believe a different discussion um you can integrate any cloud provider into um code for itself so that that would be possible directly on code fresh um [Music] okay yeah okay yeah let's go ahead and continue sorry to interrupt with all the questions there and i see a couple more questions but we'll hold those until just a little bit later i think sounds good okay so as you might have seen already um it and it's indicated here that we are basically connected to argo and that the agent is healthy and we can go ahead and check out our githubs dashboard as you can see here similar to an in the argo cd interface it basically says our like what's what's deployed on our cloud cluster um is the same as what's defined in argo and it's gonna here basically indicate the same state as what we can see on argo so we can go ahead and open this up um you will have if you have multiple applications in hour itself you would see multiple um applications in your githubs dashboard so this would be just one of them um and this is basically the information that's then provided to you that you want to have when you're using get ops to reach that high observability and reassurance of of your deployments um so in this case we can for example if you would have an long-lived application let's say where you make multiple deployments to um not in this case an application that you just deployed that's quite that's fairly simple um but for example if you have multiple microservices running et cetera and you would have uh you would be able here to track the state of your application over time so you would be able to see for example when what got deployed and then you can see who deployed it and you can also connect additional information such as the pull request that is related to that deployment and um the yeah the issue in your in your jira account so you can access all of that here as well um so what else um just to demonstrate maybe quickly how um how agucd basically detects that um the state of the application is different let's go ahead and jump to the kubernetes insights um so in this case as mentioned i'm connected to my qnds cluster i have here all of my other resources i can also access the application right here and then here's the application that i just deployed um as you can see here's my uh docker image and basically any information that i have here related to it so i could go ahead and modify obviously you wouldn't want to do that right i can modify the application right here through the ui and then make changes so like mentioned before right now the application is in a healthy state um and if i make changes here through the ui it will automatically make changes here in argo so it's like basically it's it realized that i made changes to the to the application being deployed on my cluster and it's saying hey wait a minute there's something going on here let's try to sync um and in this case it's out of sync the application so if i try to sync again as mentioned i have set it to manually sync so it won't automatically sync with my application so if i try to sync again um the synchronization will fail so it won't like it basically tells me hey there's something there's something different in the in your deployment versus what you said you want to have so in this case i can see also here it provides some additional insight on the difference of what i have done here so i made those changes from basically this is what is supposed to happen what's supposed to look like my deployment and this is what i just did the changes so it tells me it can't sync i can either force sync here or i can just um revert the changes either through the ui itself or i could also make robots backs through the githubs dashboard so i can just make the changes and once i make the changes um it will basically okay right now it doesn't want to connect um let's see let's maybe to it again anyway so if i if i make changes again um it will then be in the in the let's say i'll go define state again on my cluster um and be able to sync so here we go um so now i could sync again the application i can also do the same thing through my through my code first pipeline i'm going to tell you in a second um how that how that would look like um but as you can see my application is again in a healthy state um i can check the application also in githubs and i can see that the changes have been made um here so ultimately you wouldn't want to make changes through something like the ui you would if you're using githubs you want to make changes to your yeah cloud cluster through git so everything that you any change that you're making everything that you do should be defined in git itself um so we can also use our um code first pipeline i'm gonna check that out here i already prepared it before the webinar that's also something you can find in the docs so the pipeline um is basically the one that you would be able to find in the in the docs as well it's based on uh on that so check out the the code first documentation for further information so i basically have here a basic code first pipeline that uh basically clones my my resources my repository then it builds and pushes the docker image to my container registry in this case i'm connected to the docker hub and then it adds me like additional information to that image such as the like what pr is it connected to uh what jira issue etc and then i can have additional steps here such as what i want to happen before the application is synced with argo and what i want to happen after so for example i could run specific tests before and after depending on what i want to do um so you can define all of that here in in your code for gmo file um if you're new to code fresh um yeah that's basically the code fridge uh that's how you define your code first pipeline um so this is these are the steps this is this is the clown stop then we have here the build step um then we enrich the image information and here the auger specific steps in this case those are just dummy uh commands that you could replace with of actual commands to do something on your on your repository on your docker image yeah so this is the the demo that i wanted to show let's move maybe on to two more q a and i could dive into further further aspects uh depending on the questions sure all right so i actually um did ask one of our team members coasters capilotus about chandu's question and uh chando if you haven't seen that yet i did add a link that you can ignore auto scaling and any other parameter um and it's a link to just the argo project so if you want to take a look at that and let us know if that helps you we also have another question on is about if this can integrate with spinnaker and kubernetes can you explain that a little bit so so i actually haven't used spinnaker before so i can't answer that part um so excuse my my newbie ignorance let's say but basically um codfish is directly integrated with kubernetes and i can basically all the images that well um every step here is defined by container images so it's basically as extensible as you want it to be in terms of what what the code first pipeline itself can do and then um our group cd is directly connected to my kubernetes cluster so it runs in my kubernetes cluster in this case i could also have it running in another cluster um and it basically uh basically when i tell it to that the deployment here um like that's the deployment when i tell it that that's the that's the helm chart that i want to deploy like that's what i want to have running in my cluster um then it basically takes those kubernetes manifests and it deploys it on my cluster automatically does that answer the question yeah let us know if that answered your question regarding kubernetes uh and victor added in the chat that regarding spinnaker there's no need for spinnaker when using argo cd um for deployments because i believe argo cd is doing the deployment side that i believe that spinnaker would normally do so if you all have any more questions or anything else that you would like to see from anais please let us know you can add those in the chat or in the q a remember we will send you a copy of this as well as all of the links to her github repository and the docs so you can follow along along with the recording of this video um and sounds like that was um the right answer for uh for diraj there regarding um spinnaker and kubernetes so thanks for that um so yeah we'll we'll stay open for a couple more minutes if you all have any questions and like i said reminder we're going to send you all of these materials so that you can follow along yourself and actually let's see i think i have another question coming in um yeah why do i need code fresh if argo is doing cd so well that's a good question so argo cd is just um maybe i have an export argus ideas like to its fullest but basically argued cd is handling the deployment part of it so it's basically saying that this this is what the deployment side so should look like but uh code first does like everything before before that in terms of what what tests do you want to run what um additional steps that you want to have before you do the deployment itself um before you then deploy to your given environment it also so the main point after deployment and after deployment yeah so good point victor thank you so it's also like after so obviously it's focused on the deployment specifically so you have like things that happen before and things that happen after and so the goal of code fresh and integrating aggregate with code fresh is basically to have it as like a rubber around like around it off like the deployment itself so you have i mean i showed you for instance here that i have my kubernetes cluster i have my in this case make it ups i also have my um well my health charts and anything in my docker images um for my docker hub all accessible through code fresh and that allows me to have like anything that i'm doing i can just basically go to code fresh instead of having to open and make the manual connection let's say between uh five different applications and environments um so that's basically where where code first comes in i i know that the steamer was quite heavy on like the agua cd part um so the main point was basically to demonstrate like this is what happens when you when you do a deployment and that's how your application or like how rcd checks that your application is in the um in the right state and if it's out of state then it will inform you and you can have those additional insights through the githubs dashboard all right thanks monies and i have one more question so far feel free to enter your questions now um if you have any more um how easy would it be to extend one of the steps to meet our needs it depends i guess what's this you i guess you're referring to the um pipeline itself um um yeah so i guess so perhaps just one of adding a new step yeah a customized step to the pipeline so you can so well let me show you we have the step marketplace with like a vast amount of different steps that are that you can integrate into your code fresh pipeline so any of these you can you can add you can also write your own um own stops it's basically a yml file you can find the how to write own steps in um in the docs but also you can run any of the github actions directly in code first so you can also reuse those um but yeah we have like this really huge step marketplace um where you can see like a few here um so you can basically extend it how like depending on your needs how far you need it every step is based on container images yeah and i think victor is saying as well you know you can create a container image with just a few lines of yaml and that's it as long as it fits into a container then you can create your own custom step um so hopefully that's that answered that question and let me see i might have one more question um yes is it only in yaml or can i take python or other languages as well i haven't tried that i'm not sure so yeah everything in code fresh will be in yaml if you're using code fresh um however i'm not sure i'm sure that you can use argo cd perhaps with um with different languages and victor said yeah anything that runs in a container can be used all right looks like we have some chat still going on um in the chat here uh let's see i just want to make sure that chandu is seeing all your responses victor because if you'll change that maybe from all panelists to all panelists and attendees he should be able to see your responses because i've lost track there's quite a bit of chatter going on here in the chat also if you want to continue the conversation please join us in our community forum and we would be happy to to keep the chat going there as well maybe taryn you can drop a link to the forum it's what should i yeah let me add that real quick just a second [Music] here's our code fresh yeah community forum so feel free and ask any questions there and let's see chandu asked do um do i have to do anything in github's engine side to make it ignore my hpa or vpa or optimizer etc so i think um yeah victor is is chatting a little bit with chandu about this as well this was um his original question um so i think we can we'll take that that question offline chandu and maybe we can have kind of a conversation and after we've looked at those stocks a little bit further um about that that hpa bpa optimizer victor said um you need just a few additional lines in argo cd definition perfect you said thank you wonderful well thank you um anais for running through that and answering all of your all of the questions thank you to the audience for all of your great questions um and just the final reminder i'll send you this the the recording um as well as all of the links uh to the documentation and github repository to you by tomorrow at the latest um so that you can walk through this yourself and please feel free and yeah ask questions on the code fresh community forum or on our website using using our chat bot those are real people not just spots so you can definitely ask questions there as well so thank you everyone for attending code fresh live today i hope you have very happy holidays and a merry christmas and we will see you in the new year thank you
Info
Channel: Codefresh
Views: 634
Rating: 5 out of 5
Keywords:
Id: gYq8HaSLlBg
Channel Id: undefined
Length: 36min 41sec (2201 seconds)
Published: Thu Dec 17 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.