title
GitLab CI CD Tutorial for Beginners [Crash Course]

description
Learn GitLab CI/CD by building a complete CICD pipeline for a python demo project | with Docker 🧡 GitLab Course with Kubernetes, Microservices, Multi-Stage: https://bit.ly/3MqmVlr 💚 Become a DevOps Engineer - 6-month program: https://bit.ly/3BQ6j1v #gitlab #gitlabcicd #techworldwithnana ► This course is sponsored by Twingate 🙌🏼, a modern alternative to VPN ► If you want to try it, check out their special offer for my viewers by using the code "NANA": https://lp.twingate.com/NANA ▬▬▬▬▬▬ What you’ll learn in 1 Hour ✅ ▬▬▬▬▬▬ ► What GitLab CI/CD is ► GitLab compared to other CI/CD platforms ► Overview of GitLab Architecture ► Build a full GitLab CI/CD pipeline for a python app that - executes tests, - builds a Docker image, - pushes to a private Docker repository and - deploys the app to a remote server on DigitalOcean ► Learn GitLab Basic Concepts on the way: - Pipeline, Jobs, - Stages - GitLab Runners and Executors - Variables (Variable and File Type) - Docker in Docker ▬▬▬▬▬▬ R E F E R E N C E S 🔗▬▬▬▬▬▬ ► Git repo we build the CI/CD pipeline for: https://gitlab.com/nanuchi/gitlab-cicd-crash-course ► Original forked python demo app: https://github.com/benc-uk/python-demoapp ► Docker in Docker Image: https://hub.docker.com/_/docker ► Docker in Docker Gitlab Docs: https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker ► Install Python and Pip: https://www.python.org/downloads/ ▬▬▬▬▬▬ Course Pre-Requisites ▬▬▬▬▬▬ 💡 Docker - learn here: ► https://youtu.be/3c-iBn73dDE 💡 YAML - learn here: ► https://youtu.be/1uFVr15xDGg 💡 Basics of Git ▬▬▬▬▬▬ Pre-Requisites if you want to follow the demo ▬▬▬▬▬▬ ⌨️ GitLab Account ⌨️ DockerHub Account - we push and pull docker image from Docker Hub (https://hub.docker.com/) ⌨️ If you want to start the app locally: Install Python3, Pip and make ▬▬▬▬▬▬ T I M E S T A M P S ⏰ ▬▬▬▬▬▬ 00:00 - Intro and Course Overview 01:25 - What is GitLab CI/CD? 01:59 - What is CI/CD in simple words 03:11 - GitLab in comparison to other CI/CD platforms 04:28 - GitLab Architecture - How GitLab works 06:16 - Overview of the demo app (run locally) 12:47 - Pipeline Configuration File (.gitlab-ci.yml) 14:09 - Run Tests 26:27 - Build and Push Docker Image 27:43 - Variables for Login Credentials 32:33 - Write Pipeline Configuration 38:56 - Docker in Docker 43:23 - Execute Pipeline 44:20 - Define Stages 47:19 - Prepare Deployment Server 47:44 - Create Ubuntu server on DigitalOcean 54:44 - Deploy Application 1:06:22 - Validate Application Runs Successfully 1:07:30 - Delete server on DO 1:07:49 - Dive Deeper into GitLab CI/CD ▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬ INSTAGRAM ► https://bit.ly/2F3LXYJ TWITTER ► https://bit.ly/3i54PUB LINKEDIN ► https://bit.ly/3hWOLVT Facebook group ► https://bit.ly/32UVSZP

detail
{'title': 'GitLab CI CD Tutorial for Beginners [Crash Course]', 'heatmap': [{'end': 332.216, 'start': 240.79, 'weight': 0.878}, {'end': 579.96, 'start': 538.177, 'weight': 0.81}, {'end': 870.6, 'start': 827.228, 'weight': 0.806}, {'end': 1086.181, 'start': 988.057, 'weight': 0.907}, {'end': 1414.258, 'start': 1323.91, 'weight': 0.702}, {'end': 1912.487, 'start': 1861.177, 'weight': 0.722}, {'end': 2361.097, 'start': 2315.46, 'weight': 0.994}, {'end': 2534.442, 'start': 2400.973, 'weight': 1}, {'end': 2613.265, 'start': 2566.283, 'weight': 0.774}], 'summary': 'This tutorial provides a crash course on gitlab ci/cd, covering core concepts and building a basic pipeline in one hour. it includes setting up ci/cd pipeline, configuring docker images, and deploying to a server, offering practical guidance and demonstrations for beginners.', 'chapters': [{'end': 677.447, 'segs': [{'end': 29.418, 'src': 'embed', 'start': 0.169, 'weight': 1, 'content': [{'end': 8.151, 'text': 'Hello and welcome to the GitLab crash course, where I will teach you everything you need to know to get started with GitLab CICD in one hour.', 'start': 0.169, 'duration': 7.982}, {'end': 17.314, 'text': 'I am Nana, and I have taught hundreds of thousands of people how to advance their DevOps skills through my YouTube channel and online courses,', 'start': 8.911, 'duration': 8.403}, {'end': 20.735, 'text': 'as well as the complete DevOps educational program.', 'start': 17.314, 'duration': 3.421}, {'end': 29.418, 'text': "If you're new to my channel, be sure to subscribe because I upload new videos about different DevOps technologies and DevOps concepts all the time.", 'start': 21.135, 'duration': 8.283}], 'summary': 'Nana offers a gitlab crash course, covering cicd in one hour, with extensive experience in teaching devops skills.', 'duration': 29.249, 'max_score': 0.169, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo169.jpg'}, {'end': 68.044, 'src': 'embed', 'start': 46.512, 'weight': 0, 'content': [{'end': 56.361, 'text': 'And while building the pipeline, you will learn the core concepts of how GitLab, CI CD works and the main building blocks, such as jobs stages,', 'start': 46.512, 'duration': 9.849}, {'end': 58.781, 'text': 'runners, variables, etc.', 'start': 56.881, 'duration': 1.9}, {'end': 62.742, 'text': 'Now. of course, you can learn only so much in one hour, right?', 'start': 59.182, 'duration': 3.56}, {'end': 68.044, 'text': 'And this will help you build foundational knowledge and get started with the GitLab CI City platform.', 'start': 63.123, 'duration': 4.921}], 'summary': 'Learn gitlab ci cd core concepts in one hour', 'duration': 21.532, 'max_score': 46.512, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo46512.jpg'}, {'end': 142.089, 'src': 'embed', 'start': 90.892, 'weight': 2, 'content': [{'end': 101.063, 'text': 'Now, GitLab platform generally is striving to become the DevOps platform or a one-stop shop for building DevOps processes for your applications.', 'start': 90.892, 'duration': 10.171}, {'end': 104.927, 'text': "So they have exactly this roadmap and they're working towards that,", 'start': 101.764, 'duration': 3.163}, {'end': 114.875, 'text': "which means they're actually integrating and creating new features to basically give you everything in one platform to build complete DevOps processes.", 'start': 104.927, 'duration': 9.948}, {'end': 119.018, 'text': 'And big part of those processes is a CI CD pipeline.', 'start': 115.235, 'duration': 3.783}, {'end': 130.113, 'text': 'So first of all, what is CI CD in simple words? CICD stands for continuous integration and continuous deployment or continuous delivery.', 'start': 119.759, 'duration': 10.354}, {'end': 142.089, 'text': 'And what it basically means is automatically and continuously testing, building and releasing code changes to the deployment environment.', 'start': 130.514, 'duration': 11.575}], 'summary': 'Gitlab aims to be a one-stop devops platform, including ci cd pipeline for automated code testing, building, and deployment.', 'duration': 51.197, 'max_score': 90.892, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo90892.jpg'}, {'end': 240.79, 'src': 'embed', 'start': 218.495, 'weight': 4, 'content': [{'end': 228.042, 'text': 'So this is an extension of your software development processes in your team where you can also build CI-CD pipelines on the same platform.', 'start': 218.495, 'duration': 9.547}, {'end': 230.323, 'text': 'So your team already works with GitLab.', 'start': 228.542, 'duration': 1.781}, {'end': 231.444, 'text': 'You have your code there.', 'start': 230.543, 'duration': 0.901}, {'end': 239.349, 'text': "So this is basically additional feature that you can extend your workflows on GitLab with and you don't need a separate tool for that.", 'start': 231.784, 'duration': 7.565}, {'end': 240.79, 'text': 'Apart from that,', 'start': 239.93, 'duration': 0.86}], 'summary': 'Extend software development processes with ci-cd pipelines on gitlab platform.', 'duration': 22.295, 'max_score': 218.495, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo218495.jpg'}, {'end': 332.216, 'src': 'heatmap', 'start': 240.79, 'weight': 0.878, 'content': [{'end': 252.938, 'text': 'GitLab makes that extension very seamless by allowing you to get started without any setup effort and also having your pipeline as part of your application code,', 'start': 240.79, 'duration': 12.148}, {'end': 261.885, 'text': 'compared to Jenkins, for example, where you have to set up and configure the Jenkins server, create a pipeline and then connect it to the Git project.', 'start': 252.938, 'duration': 8.947}, {'end': 265.946, 'text': 'With GitLab, you can start without any of this configuration effort.', 'start': 262.545, 'duration': 3.401}, {'end': 267.947, 'text': 'And we will see that in the demo part.', 'start': 266.366, 'duration': 1.581}, {'end': 275.569, 'text': "Now, if you don't have to set up anything and configure any servers to run the pipelines, how does it actually work?", 'start': 268.727, 'duration': 6.842}, {'end': 280.211, 'text': 'And this leads us to the topic of GitLab architecture and how it works.', 'start': 275.989, 'duration': 4.222}, {'end': 288.233, 'text': 'You have a GitLab instance or GitLab server that hosts your application code and your pipelines.', 'start': 280.691, 'duration': 7.542}, {'end': 290.526, 'text': 'and basically the whole configuration.', 'start': 288.905, 'duration': 1.621}, {'end': 292.848, 'text': 'So it knows what needs to be done.', 'start': 291.046, 'duration': 1.802}, {'end': 302.674, 'text': 'And connected to that GitLab instance, you have multiple GitLab runners, which are separate machines connected to the GitLab server machine,', 'start': 293.408, 'duration': 9.266}, {'end': 305.736, 'text': 'which are actually the ones executing the pipelines.', 'start': 302.674, 'duration': 3.062}, {'end': 310.64, 'text': 'So GitLab server knows what needs to be done, and GitLab runner actually does that.', 'start': 306.057, 'duration': 4.583}, {'end': 319.386, 'text': 'And GitLab.com is actually a managed, GitLab instance that offers multiple managed runners already out of the box.', 'start': 311.34, 'duration': 8.046}, {'end': 321.828, 'text': 'So these are all maintained by GitLab.', 'start': 319.887, 'duration': 1.941}, {'end': 329.754, 'text': "And that's why you can start running your pipelines without any setup and configuration effort using this managed setup.", 'start': 322.228, 'duration': 7.526}, {'end': 332.216, 'text': 'And this is already enough for starting out.', 'start': 330.094, 'duration': 2.122}], 'summary': 'Gitlab offers seamless setup, with managed runners, and no configuration effort.', 'duration': 91.426, 'max_score': 240.79, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo240790.jpg'}, {'end': 319.386, 'src': 'embed', 'start': 291.046, 'weight': 5, 'content': [{'end': 292.848, 'text': 'So it knows what needs to be done.', 'start': 291.046, 'duration': 1.802}, {'end': 302.674, 'text': 'And connected to that GitLab instance, you have multiple GitLab runners, which are separate machines connected to the GitLab server machine,', 'start': 293.408, 'duration': 9.266}, {'end': 305.736, 'text': 'which are actually the ones executing the pipelines.', 'start': 302.674, 'duration': 3.062}, {'end': 310.64, 'text': 'So GitLab server knows what needs to be done, and GitLab runner actually does that.', 'start': 306.057, 'duration': 4.583}, {'end': 319.386, 'text': 'And GitLab.com is actually a managed, GitLab instance that offers multiple managed runners already out of the box.', 'start': 311.34, 'duration': 8.046}], 'summary': 'Gitlab server coordinates tasks, while gitlab runners execute pipelines. gitlab.com provides managed runners.', 'duration': 28.34, 'max_score': 291.046, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo291046.jpg'}, {'end': 407.18, 'src': 'embed', 'start': 384.424, 'weight': 6, 'content': [{'end': 391.749, 'text': "So we're gonna be building a simple CI CD pipeline for a Python app where we execute the tests,", 'start': 384.424, 'duration': 7.325}, {'end': 396.532, 'text': 'we build a Docker image from the Python application and then we deploy it and run it.', 'start': 391.749, 'duration': 4.783}, {'end': 402.076, 'text': "So it's a web application and the code is from this repository on GitHub.", 'start': 397.112, 'duration': 4.964}, {'end': 404.698, 'text': 'I will link this as well in the video description.', 'start': 402.616, 'duration': 2.082}, {'end': 407.18, 'text': "So that's basically the original application.", 'start': 405.038, 'duration': 2.142}], 'summary': 'Building ci/cd pipeline for a python app, testing, building docker image, and deploying web application from github repository.', 'duration': 22.756, 'max_score': 384.424, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo384424.jpg'}, {'end': 579.96, 'src': 'heatmap', 'start': 538.177, 'weight': 0.81, 'content': [{'end': 543.018, 'text': 'So you can apply this knowledge for any other application written in any other language.', 'start': 538.177, 'duration': 4.841}, {'end': 544.819, 'text': 'So we have these tests.', 'start': 543.399, 'duration': 1.42}, {'end': 552.123, 'text': "I think there are four of them and they're using this configuration file in the test folder to execute those tests.", 'start': 544.919, 'duration': 7.204}, {'end': 558.786, 'text': "So as a first step, let's actually see how the tests of this specific project can be executed.", 'start': 552.643, 'duration': 6.143}, {'end': 560.807, 'text': "And I'm going to open a terminal for that.", 'start': 559.127, 'duration': 1.68}, {'end': 569.372, 'text': 'And again, in this specific project to execute the tests, we have this make file that includes a couple of commands and one of them is test.', 'start': 561.408, 'duration': 7.964}, {'end': 575.33, 'text': 'So using make test, we can execute the tests basically.', 'start': 569.872, 'duration': 5.458}, {'end': 577.217, 'text': "So let's run it.", 'start': 576.555, 'duration': 0.662}, {'end': 579.96, 'text': 'And there you go.', 'start': 579.5, 'duration': 0.46}], 'summary': "Tests for a specific project can be executed using a make file with a 'test' command.", 'duration': 41.783, 'max_score': 538.177, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo538177.jpg'}, {'end': 637.64, 'src': 'embed', 'start': 612.182, 'weight': 7, 'content': [{'end': 619.187, 'text': 'So in Python specifically, those dependencies are defined in a file called requirements.txt.', 'start': 612.182, 'duration': 7.005}, {'end': 622.53, 'text': 'Again, different languages have different files for that.', 'start': 619.688, 'duration': 2.842}, {'end': 630.256, 'text': 'And at the beginning, all the dependencies are downloaded that are needed for the test and then tests are executed.', 'start': 623.15, 'duration': 7.106}, {'end': 637.64, 'text': 'You see here internally apply test command gets executed and then we have result of text execution.', 'start': 630.976, 'duration': 6.664}], 'summary': 'Dependencies defined in requirements.txt; tests executed after downloading all needed dependencies.', 'duration': 25.458, 'max_score': 612.182, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo612182.jpg'}], 'start': 0.169, 'title': 'Gitlab ci/cd fundamentals', 'summary': 'Provides a crash course on gitlab ci/cd, covering core concepts and building a basic pipeline in one hour. it also explains ci/cd pipeline using gitlab, detailing its architecture and advantages, and demonstrates building a simplified pipeline for a python application.', 'chapters': [{'end': 114.875, 'start': 0.169, 'title': 'Gitlab cicd crash course', 'summary': "Introduces a crash course on gitlab cicd, aiming to teach the core concepts and build a basic ci cd pipeline in one hour, with the instructor's extensive experience and a complete course available for further learning.", 'duration': 114.706, 'highlights': ['Comprehensive GitLab CICD Crash Course The crash course aims to teach everything needed to get started with GitLab CICD in one hour, covering building a basic CI CD pipeline, core concepts of GitLab CI CD, and deploying a newly built image to a remote Ubuntu server.', "Instructor's Extensive Experience The instructor, Nana, has taught hundreds of thousands of people through YouTube and online courses and offers a complete GitLab CI CD course for those interested in diving deeper into building real-life DevOps pipelines.", "GitLab's Role as a DevOps Platform GitLab is striving to become the DevOps platform, integrating and creating new features to provide everything in one platform for building complete DevOps processes."]}, {'end': 677.447, 'start': 115.235, 'title': 'Understanding gitlab ci/cd pipeline', 'summary': 'Explains the concept of continuous integration and continuous deployment (ci/cd) pipeline using gitlab, detailing its architecture and advantages, and demonstrates building a simplified ci/cd pipeline for a python application, including running tests and handling dependencies.', 'duration': 562.212, 'highlights': ['CI/CD stands for continuous integration and continuous deployment or continuous delivery, which entails automatically and continuously testing, building, and releasing code changes. The concept of CI/CD involves continuous testing, building, and releasing of code changes, providing an automated and continuous deployment process.', "GitLab's advantage in building CI/CD pipelines is its seamless integration with the existing code repository, eliminating the need for a separate tool and minimizing setup efforts. GitLab's advantage in CI/CD pipeline development lies in its seamless integration with the existing code repository, eliminating the need for a separate tool and minimizing setup efforts.", 'The GitLab architecture involves a GitLab server hosting application code and pipelines, connected to multiple GitLab runners responsible for executing the pipelines, with GitLab.com offering managed runners. The GitLab architecture comprises a GitLab server hosting application code and pipelines, connected to multiple GitLab runners executing the pipelines, with GitLab.com providing managed runners.', 'The demonstration project involves building a CI/CD pipeline for a Python application, including running tests, building a Docker image, and deploying it, illustrating the process for any technology and application. The demonstration project focuses on creating a CI/CD pipeline for a Python application, involving running tests, building a Docker image, and deploying it, demonstrating the process for any technology and application.', 'Dependencies for tests in Python applications are defined in a file called requirements.txt, and the process involves downloading and making the dependencies available locally before executing the tests. Python applications define dependencies for tests in a file called requirements.txt, requiring the download and local availability of dependencies before executing the tests.']}], 'duration': 677.278, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo169.jpg', 'highlights': ['Comprehensive GitLab CICD Crash Course covering building a basic CI CD pipeline and core concepts of GitLab CI CD.', 'Instructor, Nana, offers a complete GitLab CI CD course for building real-life DevOps pipelines.', 'GitLab is striving to become the DevOps platform, integrating and creating new features for complete DevOps processes.', 'CI/CD involves continuous testing, building, and releasing of code changes, providing an automated and continuous deployment process.', "GitLab's advantage in CI/CD pipeline development lies in its seamless integration with the existing code repository.", 'GitLab architecture involves a GitLab server hosting application code and pipelines, connected to multiple GitLab runners executing the pipelines.', 'Demonstration project focuses on creating a CI/CD pipeline for a Python application, illustrating the process for any technology and application.', 'Python applications define dependencies for tests in a file called requirements.txt, requiring the download and local availability of dependencies.']}, {'end': 1497.199, 'segs': [{'end': 704.692, 'src': 'embed', 'start': 678.227, 'weight': 4, 'content': [{'end': 686.096, 'text': 'And finally, because we have the make file here to execute those commands, we need make command as well to be available on the machine.', 'start': 678.227, 'duration': 7.869}, {'end': 695.565, 'text': 'And this means that we need these three tools to also be available inside our pipeline when the tests are executed.', 'start': 686.496, 'duration': 9.069}, {'end': 697.887, 'text': "And we're gonna see that a bit later.", 'start': 696.306, 'duration': 1.581}, {'end': 704.692, 'text': "Now I'm gonna do one more thing, which is actually start the application locally and see how it looks in the browser.", 'start': 698.247, 'duration': 6.445}], 'summary': 'Make command needed for executing commands; application to be started locally.', 'duration': 26.465, 'max_score': 678.227, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo678227.jpg'}, {'end': 792.057, 'src': 'embed', 'start': 757.095, 'weight': 0, 'content': [{'end': 760.858, 'text': 'So now we know how the application looks like, how to run the tests.', 'start': 757.095, 'duration': 3.763}, {'end': 766.404, 'text': "So let's actually go ahead and build a simple CI city pipeline for this demo application.", 'start': 760.878, 'duration': 5.526}, {'end': 771.413, 'text': "So I'm gonna stop this.", 'start': 770.393, 'duration': 1.02}, {'end': 773.634, 'text': "Let's actually remove the terminal.", 'start': 771.433, 'duration': 2.201}, {'end': 778.154, 'text': 'And now the question is how do we create a GitLab CI CD pipeline??', 'start': 774.334, 'duration': 3.82}, {'end': 782.855, 'text': 'Well, following the concept of configuration as code,', 'start': 779.015, 'duration': 3.84}, {'end': 792.057, 'text': 'the whole pipeline will be written in code and hosted in the applications Git repository itself in a simple YAML file.', 'start': 782.855, 'duration': 9.202}], 'summary': 'Creating a gitlab ci/cd pipeline using yaml for the demo application.', 'duration': 34.962, 'max_score': 757.095, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo757095.jpg'}, {'end': 870.6, 'src': 'heatmap', 'start': 827.228, 'weight': 0.806, 'content': [{'end': 835.231, 'text': 'And as I said, it has to be called .gitlab-ci.yml.', 'start': 827.228, 'duration': 8.003}, {'end': 843.894, 'text': "And as soon as I type that in, you see that it automatically fills out the rest because it detected that we're creating the pipeline code.", 'start': 835.711, 'duration': 8.183}, {'end': 848.596, 'text': "And now let's write our pipeline in a simple YAML format.", 'start': 844.834, 'duration': 3.762}, {'end': 863.154, 'text': "So the tasks in the CI CD pipeline, such as running tests, building an image, deploying to a server, et cetera, are configured as what's called jobs.", 'start': 852.486, 'duration': 10.668}, {'end': 866.797, 'text': "So let's create jobs for all those tasks.", 'start': 863.975, 'duration': 2.822}, {'end': 870.6, 'text': "So first let's create a job that will run the tests.", 'start': 867.157, 'duration': 3.443}], 'summary': 'Creating a .gitlab-ci.yml file automatically fills out pipeline code and involves writing tasks in a simple yaml format.', 'duration': 43.372, 'max_score': 827.228, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo827228.jpg'}, {'end': 945.477, 'src': 'embed', 'start': 916.805, 'weight': 2, 'content': [{'end': 923.408, 'text': 'so, for example, run tests right, make test is a command that needs to be executed in order to run the test.', 'start': 916.805, 'duration': 6.603}, {'end': 925.429, 'text': "so we're going to write that command right here.", 'start': 923.408, 'duration': 2.021}, {'end': 930.36, 'text': "So that's actually a job configuration to run the tests.", 'start': 926.496, 'duration': 3.864}, {'end': 931.562, 'text': 'Simple as that.', 'start': 930.941, 'duration': 0.621}, {'end': 937.088, 'text': 'We have the name of the job and inside that we have a script that tells what should this job actually do.', 'start': 931.942, 'duration': 5.146}, {'end': 945.477, 'text': "And we're saying that it should run command called make test, which will execute the tests just like we did locally.", 'start': 937.568, 'duration': 7.909}], 'summary': "Job configuration to run tests using 'make test' command.", 'duration': 28.672, 'max_score': 916.805, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo916805.jpg'}, {'end': 1086.181, 'src': 'heatmap', 'start': 988.057, 'weight': 0.907, 'content': [{'end': 997.547, 'text': 'as i mentioned in the beginning, pipeline jobs are executed on gitlab runners, and gitlab runners can be installed on different environments.', 'start': 988.057, 'duration': 9.49}, {'end': 1004.194, 'text': 'it could be different operating system, like windows, linux, different distribution of linux, etc.', 'start': 997.547, 'duration': 6.647}, {'end': 1006.276, 'text': "and that's what's called a shell executor.", 'start': 1004.194, 'duration': 2.082}, {'end': 1012.019, 'text': "It's a simplest type of executor, simplest environment, what we know from Jenkins, for example,", 'start': 1006.937, 'duration': 5.082}, {'end': 1020.462, 'text': 'where you have a simple server on Linux machine and you execute shell commands on them as part of your job, directly on the operating system.', 'start': 1012.019, 'duration': 8.443}, {'end': 1026.124, 'text': 'But another common execution environment on GitLab is Docker container.', 'start': 1021.242, 'duration': 4.882}, {'end': 1036.048, 'text': 'So instead of executing the jobs directly on the operating system, like on a Linux machine, for example, We execute the jobs inside containers.', 'start': 1026.564, 'duration': 9.484}, {'end': 1045.492, 'text': 'So the GitLab runner is installed on some Linux machine and on that machine GitLab runner creates Docker containers to run the jobs,', 'start': 1036.509, 'duration': 8.983}, {'end': 1054.617, 'text': 'and the managed runners from GitLab that we get available out of the box actually use Docker container as the execution environment.', 'start': 1045.492, 'duration': 9.125}, {'end': 1059.48, 'text': 'So all our jobs that we write here will be executed inside Docker containers.', 'start': 1055.038, 'duration': 4.442}, {'end': 1066.603, 'text': "But as you know, containers run based on a certain image, right? You can't run a container without an image.", 'start': 1060.16, 'duration': 6.443}, {'end': 1072.566, 'text': "And depending on which image you use, you're going to have different tools available inside that container.", 'start': 1066.983, 'duration': 5.583}, {'end': 1080.357, 'text': "So if I use a MySQL image to start a container, I'm going to have MySQL inside, plus some other tools that the image has.", 'start': 1072.986, 'duration': 7.371}, {'end': 1086.181, 'text': "If I have no JS image, then I'm going to have no JS and NPM available inside the container.", 'start': 1080.778, 'duration': 5.403}], 'summary': 'Gitlab runners can be installed on different os, like windows, linux, or docker containers, with various available tools.', 'duration': 98.124, 'max_score': 988.057, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo988057.jpg'}, {'end': 1066.603, 'src': 'embed', 'start': 1045.492, 'weight': 1, 'content': [{'end': 1054.617, 'text': 'and the managed runners from GitLab that we get available out of the box actually use Docker container as the execution environment.', 'start': 1045.492, 'duration': 9.125}, {'end': 1059.48, 'text': 'So all our jobs that we write here will be executed inside Docker containers.', 'start': 1055.038, 'duration': 4.442}, {'end': 1066.603, 'text': "But as you know, containers run based on a certain image, right? You can't run a container without an image.", 'start': 1060.16, 'duration': 6.443}], 'summary': 'Managed gitlab runners use docker containers for job execution.', 'duration': 21.111, 'max_score': 1045.492, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1045492.jpg'}, {'end': 1424.161, 'src': 'heatmap', 'start': 1323.91, 'weight': 3, 'content': [{'end': 1329.313, 'text': 'So we will have all three tools that we need available in order to execute this command.', 'start': 1323.91, 'duration': 5.403}, {'end': 1337.518, 'text': 'So now, with this configuration, we already have a working pipeline with just one job which runs tests,', 'start': 1330.014, 'duration': 7.504}, {'end': 1343.142, 'text': 'but still we have a valid working pipeline that we can execute for our application.', 'start': 1337.518, 'duration': 5.624}, {'end': 1350.243, 'text': 'So how do we actually execute the application? The only thing we need to do is simply commit this file.', 'start': 1343.979, 'duration': 6.264}, {'end': 1354.026, 'text': 'And as soon as we commit the changes,', 'start': 1350.924, 'duration': 3.102}, {'end': 1363.472, 'text': 'GitLab will actually detect that we have added a pipeline configuration and it will automatically execute the pipeline in the background.', 'start': 1354.026, 'duration': 9.446}, {'end': 1366.054, 'text': 'So the pipeline is actually already running.', 'start': 1363.732, 'duration': 2.322}, {'end': 1369.28, 'text': 'Now, where do we see the pipeline execution?', 'start': 1366.917, 'duration': 2.363}, {'end': 1377.331, 'text': 'Well, right here we are in the repository section which lets you manage the files, commits, branches and so on.', 'start': 1369.801, 'duration': 7.53}, {'end': 1385.041, 'text': 'For the CI CD, there is a separate section that lets you manage the CI CD part of the project.', 'start': 1377.831, 'duration': 7.21}, {'end': 1388.782, 'text': "and the good thing is you don't have to switch to some other view.", 'start': 1385.701, 'duration': 3.081}, {'end': 1398.806, 'text': 'you stay inside the project, you have all the configuration in one place and the first tab here is pipelines and this is a list view.', 'start': 1388.782, 'duration': 10.024}, {'end': 1406.369, 'text': 'so this is going to be a list of all the pipeline executions for your project and we see that our first pipeline was successful.', 'start': 1398.806, 'duration': 7.563}, {'end': 1414.258, 'text': "it has passed state and if i click inside, That's the detailed view of the pipeline.", 'start': 1406.369, 'duration': 7.889}, {'end': 1418.259, 'text': 'We actually see all the jobs that ran for the pipeline.', 'start': 1414.538, 'duration': 3.721}, {'end': 1420.02, 'text': 'In our case, we just have one job.', 'start': 1418.619, 'duration': 1.401}, {'end': 1424.161, 'text': 'We also have a separate job section where you can see the list of the jobs.', 'start': 1420.5, 'duration': 3.661}], 'summary': 'Configured pipeline successfully runs tests and executes application on gitlab, with detailed view of pipeline and jobs available.', 'duration': 25.355, 'max_score': 1323.91, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1323910.jpg'}], 'start': 678.227, 'title': 'Setting up ci/cd pipeline and gitlab runner with docker', 'summary': 'Outlines the process of setting up a ci/cd pipeline for a demo application, including running tests and creating job configurations. it also explains how to configure gitlab runner to run tests using docker containers, including setting up the environment, specifying the execution environment, and viewing pipeline execution details.', 'chapters': [{'end': 959.212, 'start': 678.227, 'title': 'Ci/cd pipeline configuration', 'summary': 'Outlines the process of setting up a ci/cd pipeline for a demo application, including running tests and creating job configurations in a .gitlab-ci.yaml file.', 'duration': 280.985, 'highlights': ['The chapter outlines the process of setting up a CI/CD pipeline for a demo application. Setting up a CI/CD pipeline, running tests, creating job configurations', "The job 'run.test' is created to run the tests with the command 'make test' specified in the script attribute. Creation of job 'run.test', specifying 'make test' command in script attribute", "The need for 'make' command to be available wherever the job runs is emphasized for successful execution of the 'make test' command. Emphasis on availability of 'make' command for successful execution of 'make test' command"]}, {'end': 1497.199, 'start': 959.212, 'title': 'Gitlab runner and docker setup', 'summary': 'Explains how to configure gitlab runner to run tests using docker containers, including setting up the environment, specifying the execution environment, and viewing pipeline execution details.', 'duration': 537.987, 'highlights': ['The chapter explains how to configure GitLab Runner to run tests using Docker containers It details the process of setting up the environment, specifying the execution environment, and overwriting the default image used by the runner.', "The pipeline execution details are conveniently accessible within the project's CI/CD section It provides a comprehensive overview of the pipeline executions, job details, and logs within the project's CI/CD section, allowing for easy management and troubleshooting.", 'The detailed view of the pipeline includes information about the specific image being used by the Docker executor It showcases the usage of a specific image defined for the Docker executor, emphasizing the ability to override the default image and use a custom image for each job.']}], 'duration': 818.972, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo678227.jpg', 'highlights': ['The chapter outlines the process of setting up a CI/CD pipeline for a demo application. Setting up a CI/CD pipeline, running tests, creating job configurations', 'The chapter explains how to configure GitLab Runner to run tests using Docker containers. Setting up the environment, specifying the execution environment, and overwriting the default image used by the runner', "The job 'run.test' is created to run the tests with the command 'make test' specified in the script attribute. Creation of job 'run.test', specifying 'make test' command in script attribute", "The pipeline execution details are conveniently accessible within the project's CI/CD section. It provides a comprehensive overview of the pipeline executions, job details, and logs within the project's CI/CD section, allowing for easy management and troubleshooting", "The need for 'make' command to be available wherever the job runs is emphasized for successful execution of the 'make test' command. Emphasis on availability of 'make' command for successful execution of 'make test' command", 'The detailed view of the pipeline includes information about the specific image being used by the Docker executor. It showcases the usage of a specific image defined for the Docker executor, emphasizing the ability to override the default image and use a custom image for each job']}, {'end': 1953.413, 'segs': [{'end': 1600.686, 'src': 'embed', 'start': 1497.941, 'weight': 0, 'content': [{'end': 1505.014, 'text': 'And at the end we have our four tests that all ran and they are in the past state.', 'start': 1497.941, 'duration': 7.073}, {'end': 1511.146, 'text': 'So the first step or first job of our pipeline is configured and working.', 'start': 1505.362, 'duration': 5.784}, {'end': 1515.909, 'text': 'Before moving on, I want to give a shout out to TwinGate who made this video possible.', 'start': 1511.686, 'duration': 4.223}, {'end': 1524.714, 'text': 'TwinGate is a remote access service that allows you to easily access private services within any cloud or in your home lab.', 'start': 1516.269, 'duration': 8.445}, {'end': 1530.218, 'text': 'For CI city workflows that execute outside of your environment.', 'start': 1525.175, 'duration': 5.043}, {'end': 1537.262, 'text': 'TwinGate includes a service account feature that allows secure and automated access to your private resources.', 'start': 1530.218, 'duration': 7.044}, {'end': 1546.328, 'text': 'TwinGate is actually a modern alternative to a VPN that is easier to set up, offers better performance, and is more secure.', 'start': 1537.943, 'duration': 8.385}, {'end': 1555.174, 'text': 'If you need to create a CICD workflow to deploy into your private Kubernetes clusters, or if you have internal databases you need to access,', 'start': 1546.769, 'duration': 8.405}, {'end': 1557.296, 'text': 'then it is an excellent choice.', 'start': 1555.174, 'duration': 2.122}, {'end': 1563.5, 'text': "With TwinGate, you don't need to open any ports on your firewall or manage any IP whitelists.", 'start': 1557.856, 'duration': 5.644}, {'end': 1570.582, 'text': 'You will also find providers for Terraform and Pulumi, so you can fully automate it into your existing stack.', 'start': 1564.2, 'duration': 6.382}, {'end': 1578.985, 'text': 'If you want to try it, you can use their free tier and get started for free, or TwinGate has actually provided a special offer for my viewers.', 'start': 1571.363, 'duration': 7.622}, {'end': 1586.668, 'text': 'You can use the code NANA to get three months free of the business tier in addition to their 14-day free trial.', 'start': 1579.645, 'duration': 7.023}, {'end': 1600.686, 'text': "So now let's go back to the pipeline and add the next job that will build and push a Docker image of our Python application.", 'start': 1590.222, 'duration': 10.464}], 'summary': 'Twingate offers secure remote access service for cicd workflows, providing a modern alternative to vpn with service account feature, no need for firewall port openings, and special offer for viewers using code nana for three months free on business tier.', 'duration': 102.745, 'max_score': 1497.941, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1497941.jpg'}, {'end': 1705.556, 'src': 'embed', 'start': 1679.28, 'weight': 5, 'content': [{'end': 1687.085, 'text': 'it has its credentials and you have to log in before you actually push an image or pull an image from it.', 'start': 1679.28, 'duration': 7.805}, {'end': 1694.33, 'text': 'So we would need repository credentials for this repository to be available on GitLab,', 'start': 1687.646, 'duration': 6.684}, {'end': 1699.474, 'text': 'so that GitLab runner can actually log into the registry before it pushes the image.', 'start': 1694.33, 'duration': 5.144}, {'end': 1705.556, 'text': 'And the credentials are actually username and password of your Docker Hub account.', 'start': 1700.194, 'duration': 5.362}], 'summary': 'Gitlab runner needs docker hub credentials to push/pull images from the repository.', 'duration': 26.276, 'max_score': 1679.28, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1679280.jpg'}, {'end': 1752.687, 'src': 'embed', 'start': 1728.996, 'weight': 4, 'content': [{'end': 1736.099, 'text': "So we want to create what's called secret type of variables that will be available in our pipeline.", 'start': 1728.996, 'duration': 7.103}, {'end': 1740.361, 'text': "And the way it works on GitLab is in the project's settings.", 'start': 1736.439, 'duration': 3.922}, {'end': 1745.964, 'text': 'So, if you scroll all the way down, you have this settings tab here,', 'start': 1740.621, 'duration': 5.343}, {'end': 1752.687, 'text': 'where you can actually configure some of the administration settings for different parts of your project.', 'start': 1745.964, 'duration': 6.723}], 'summary': "Creating secret variables in gitlab for pipeline, found in project's settings", 'duration': 23.691, 'max_score': 1728.996, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1728996.jpg'}, {'end': 1912.487, 'src': 'heatmap', 'start': 1861.177, 'weight': 0.722, 'content': [{'end': 1871.359, 'text': 'Right And this will be then available inside the pipeline code so we can actually reference those variables in our pipeline configuration.', 'start': 1861.177, 'duration': 10.182}, {'end': 1875.102, 'text': 'So if I expand this, we can create variables here.', 'start': 1871.519, 'duration': 3.583}, {'end': 1886.549, 'text': "Click on add variable, and we're gonna define docker user, or this could also be registry user.", 'start': 1876.182, 'duration': 10.367}, {'end': 1889.571, 'text': "And here we're gonna have the value.", 'start': 1887.31, 'duration': 2.261}, {'end': 1891.713, 'text': "So I'm actually gonna copy that.", 'start': 1889.852, 'duration': 1.861}, {'end': 1904.385, 'text': "this is the docker id, so your username on docker hub and the type variable, and we're gonna click on mask variable.", 'start': 1893.402, 'duration': 10.983}, {'end': 1912.487, 'text': 'so what this will do is whenever the variable is referenced and used inside a job, for example job execution of the pipeline,', 'start': 1904.385, 'duration': 8.102}], 'summary': 'Variables can be defined and referenced in the pipeline code, such as docker user and registry user.', 'duration': 51.31, 'max_score': 1861.177, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1861177.jpg'}], 'start': 1497.941, 'title': 'Configuring cicd pipeline and docker image push', 'summary': 'Covers configuring the first step of a cicd pipeline with twingate, and setting up a private docker hub repository with details on creating credentials and security configurations within gitlab cicd settings.', 'chapters': [{'end': 1626.897, 'start': 1497.941, 'title': 'Configuring cicd pipeline with twingate', 'summary': 'Covers the successful configuration of the first step of a cicd pipeline, along with a special offer from twingate for viewers, highlighting its features and benefits.', 'duration': 128.956, 'highlights': ['TwinGate offers a special offer for viewers, providing three months free of the business tier in addition to their 14-day free trial, using the code NANA.', 'TwinGate is a remote access service that allows easy access to private services within any cloud or in a home lab, including a service account feature for secure and automated access to private resources.', 'TwinGate is a modern alternative to a VPN, easier to set up, offers better performance, and is more secure, making it an excellent choice for creating CICD workflows to deploy into private Kubernetes clusters or accessing internal databases.', 'TwinGate provides providers for Terraform and Pulumi, enabling full automation into existing stacks, without the need to open any ports on the firewall or manage IP whitelists.', 'The chapter demonstrates the successful configuration and functioning of the first step or job of the pipeline, with four tests running and in the past state.']}, {'end': 1953.413, 'start': 1627.437, 'title': 'Setting up docker image push to private repository', 'summary': 'Covers setting up a private docker hub repository, creating repository credentials for pushing images, and configuring secret variables for pipeline security within gitlab cicd settings.', 'duration': 325.976, 'highlights': ['Creating a private repository on Docker Hub provides one private repository by default in the free version, and the user needs to sign up to get it. Having a private repository on Docker Hub requires signing up, with one private repository provided in the free version.', 'To push an image to a private repository, logging in with repository credentials, such as username and password, is necessary for security reasons. Logging in with repository credentials is required to push images to a private repository for security purposes.', 'Using secret variables in GitLab CICD settings allows for secure storage and reference of sensitive information within the pipeline configuration. GitLab CICD settings enable the creation of secret variables, such as username and password, to be securely referenced in the pipeline configuration.']}], 'duration': 455.472, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1497941.jpg', 'highlights': ['TwinGate offers a special offer for viewers, providing three months free of the business tier in addition to their 14-day free trial, using the code NANA.', 'TwinGate is a modern alternative to a VPN, easier to set up, offers better performance, and is more secure, making it an excellent choice for creating CICD workflows to deploy into private Kubernetes clusters or accessing internal databases.', 'TwinGate provides providers for Terraform and Pulumi, enabling full automation into existing stacks, without the need to open any ports on the firewall or manage IP whitelists.', 'The chapter demonstrates the successful configuration and functioning of the first step or job of the pipeline, with four tests running and in the past state.', 'Using secret variables in GitLab CICD settings allows for secure storage and reference of sensitive information within the pipeline configuration.', 'To push an image to a private repository, logging in with repository credentials, such as username and password, is necessary for security reasons.']}, {'end': 2274.145, 'segs': [{'end': 2023.331, 'src': 'embed', 'start': 1956.435, 'weight': 0, 'content': [{'end': 1964.239, 'text': "So I'm going to go back to the editor and right here, we're going to create a job called build image.", 'start': 1956.435, 'duration': 7.804}, {'end': 1970.643, 'text': "Obviously you can call it whatever, but I'm going to call it build image and let's define the main script.", 'start': 1964.66, 'duration': 5.983}, {'end': 1981.791, 'text': 'So what is the main logic that we want to do in this job? Well, first we want to build a Docker image of our Python application from Docker file.', 'start': 1970.884, 'duration': 10.907}, {'end': 1985.354, 'text': 'And we actually have a Docker file as well in the project.', 'start': 1982.112, 'duration': 3.242}, {'end': 1995.343, 'text': 'So right here in the roots of the project, we have this Docker file that defines the Python base image, which is, by the way, the same as we used.', 'start': 1985.895, 'duration': 9.448}, {'end': 2005.559, 'text': 'right here to run tests, and the rest of the configuration is simply copying the relevant files inside the image,', 'start': 1996.033, 'duration': 9.526}, {'end': 2012.083, 'text': 'installing all the dependencies from the requirements file and then finally starting the application on port 5000.', 'start': 2005.559, 'duration': 6.524}, {'end': 2013.824, 'text': "so that's what's happening.", 'start': 2012.083, 'duration': 1.741}, {'end': 2021.069, 'text': "we already have the docker file, so we're going to use that to build the image And, as I said, it is in the root of the project.", 'start': 2013.824, 'duration': 7.245}, {'end': 2023.331, 'text': "So we're going to do Docker build.", 'start': 2021.61, 'duration': 1.721}], 'summary': 'Create a job to build docker image for python application with docker file, installing dependencies, and starting the application on port 5000.', 'duration': 66.896, 'max_score': 1956.435, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1956435.jpg'}, {'end': 2122.524, 'src': 'embed', 'start': 2099.344, 'weight': 3, 'content': [{'end': 2107.275, 'text': 'So it knows on this Docker registry you have repository called this and you want to tag the image using this specific tag.', 'start': 2099.344, 'duration': 7.931}, {'end': 2114.76, 'text': "But before we can do docker push, obviously we need to authenticate with the repository, otherwise it's not going to work.", 'start': 2107.836, 'duration': 6.924}, {'end': 2122.524, 'text': 'So right here before push, we need to execute docker login command, which takes username and password as parameters.', 'start': 2114.84, 'duration': 7.684}], 'summary': 'Authenticate with docker registry using docker login before pushing image.', 'duration': 23.18, 'max_score': 2099.344, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2099344.jpg'}, {'end': 2200.298, 'src': 'embed', 'start': 2174.562, 'weight': 5, 'content': [{'end': 2182.024, 'text': 'And since the Docker build and push are main commands and Docker login needs to be executed before we can push to the repository,', 'start': 2174.562, 'duration': 7.462}, {'end': 2186.105, 'text': 'we can actually set it in before script section.', 'start': 2182.024, 'duration': 4.081}, {'end': 2190.946, 'text': 'Like this.', 'start': 2190.626, 'duration': 0.32}, {'end': 2197.816, 'text': 'So we have our main commands and supporting commands, so to say, separated like this.', 'start': 2192.932, 'duration': 4.884}, {'end': 2200.298, 'text': "So that's our job configuration.", 'start': 2198.577, 'duration': 1.721}], 'summary': 'Setting docker login in before script allows main and supporting commands separation for job configuration.', 'duration': 25.736, 'max_score': 2174.562, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2174562.jpg'}], 'start': 1956.435, 'title': 'Docker image build process', 'summary': 'Covers building a docker image for a python application, including creating a job to build the image, copying files, installing dependencies, and starting the application on port 5000. it also explains the process of tagging, pushing, authenticating, and setting commands in the pipeline configuration for the docker image build and push.', 'chapters': [{'end': 2023.331, 'start': 1956.435, 'title': 'Building docker image for python application', 'summary': "Covers the process of creating a job named 'build image' to build a docker image of a python application using a docker file, including copying relevant files, installing dependencies, and starting the application on port 5000.", 'duration': 66.896, 'highlights': ["A job named 'build image' is created to build a Docker image of a Python application.", 'The Docker file defines the Python base image, copies relevant files, installs dependencies, and starts the application on port 5000.', 'The process includes using the existing Docker file located in the root of the project.']}, {'end': 2274.145, 'start': 2023.771, 'title': 'Docker image build and push', 'summary': 'Explains the process of building and pushing a docker image to a repository, including tagging the image, pushing the image, authenticating with the repository, and setting commands in the pipeline configuration.', 'duration': 250.374, 'highlights': ['The process of tagging the Docker image with the repository name is crucial for Docker to know where to push the image. Tagging the Docker image with the repository name is essential for defining the destination of the image push command.', 'Authentication with the repository using username and password is necessary before executing the Docker push command. Executing the docker login command with username and password parameters is necessary for authenticating with the repository before pushing the Docker image.', 'Setting commands in the before_script section allows for organizing main and supporting commands, such as Docker build and push, in the job configuration. Organizing main and supporting commands, like Docker build and push, in the job configuration can be achieved by setting commands in the before_script section.']}], 'duration': 317.71, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo1956435.jpg', 'highlights': ["A job named 'build image' is created to build a Docker image of a Python application.", 'The Docker file defines the Python base image, copies relevant files, installs dependencies, and starts the application on port 5000.', 'The process includes using the existing Docker file located in the root of the project.', 'The process of tagging the Docker image with the repository name is crucial for Docker to know where to push the image.', 'Authentication with the repository using username and password is necessary before executing the Docker push command.', 'Setting commands in the before_script section allows for organizing main and supporting commands, such as Docker build and push, in the job configuration.']}, {'end': 2843.657, 'segs': [{'end': 2361.097, 'src': 'heatmap', 'start': 2315.46, 'weight': 0.994, 'content': [{'end': 2322.123, 'text': "And in that Docker container, we need to have the commands, whatever we're executing inside the job, available.", 'start': 2315.46, 'duration': 6.663}, {'end': 2325.544, 'text': "Otherwise it's going to say it cannot find the command right?", 'start': 2322.223, 'duration': 3.321}, {'end': 2335.448, 'text': 'So in this case we have a little bit of specific situation where we need Docker to be available inside a Docker container.', 'start': 2326.305, 'duration': 9.143}, {'end': 2338.73, 'text': "And that is what's called Docker in Docker concept.", 'start': 2335.789, 'duration': 2.941}, {'end': 2346.772, 'text': 'So within a Docker container, you have Docker daemon and Docker client both available in order to execute the command.', 'start': 2339.25, 'duration': 7.522}, {'end': 2354.035, 'text': 'And again, the default is a Ruby image, but we need an image that will have Docker available inside the Docker container.', 'start': 2346.912, 'duration': 7.123}, {'end': 2361.097, 'text': 'And there is actually an official image of Docker right here.', 'start': 2354.495, 'duration': 6.602}], 'summary': 'Docker in docker concept: need docker available in a docker container for executing commands.', 'duration': 45.637, 'max_score': 2315.46, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2315460.jpg'}, {'end': 2565.563, 'src': 'heatmap', 'start': 2400.973, 'weight': 0, 'content': [{'end': 2404.675, 'text': "So right here, we're gonna do Docker and the image tag.", 'start': 2400.973, 'duration': 3.702}, {'end': 2409.596, 'text': 'So this will take care of starting a Docker container from Docker image.', 'start': 2405.155, 'duration': 4.441}, {'end': 2412.798, 'text': 'So we have the Docker client available inside.', 'start': 2409.997, 'duration': 2.801}, {'end': 2416.979, 'text': 'However, we also need Docker daemon available inside right?', 'start': 2413.138, 'duration': 3.841}, {'end': 2425.483, 'text': 'So Docker daemon is the process that lets the client actually execute those commands, connect to the Docker registry, pull the image, push the image,', 'start': 2417.22, 'duration': 8.263}, {'end': 2425.943, 'text': 'et cetera.', 'start': 2425.483, 'duration': 0.46}, {'end': 2433.316, 'text': 'So in order to make that available, we actually need to configure another attribute which is called services on GitLab.', 'start': 2426.363, 'duration': 6.953}, {'end': 2436.057, 'text': "So let's actually define that and I'm going to explain what that means.", 'start': 2433.716, 'duration': 2.341}, {'end': 2444.641, 'text': 'So service is basically an additional container that will start at the same time as the job container,', 'start': 2436.517, 'duration': 8.124}, {'end': 2448.823, 'text': 'and the job container can use that service during the build time.', 'start': 2444.641, 'duration': 4.182}, {'end': 2456.568, 'text': 'So, for example, if your test execution needs some kind of service, like a database service, for example MySQL,', 'start': 2449.203, 'duration': 7.365}, {'end': 2463.313, 'text': 'then you can actually start a MySQL service or MySQL container during your job execution.', 'start': 2456.568, 'duration': 6.745}, {'end': 2472.319, 'text': 'In addition to this Python container and the service attribute will make sure that these containers are linked together so they run in the same network.', 'start': 2463.973, 'duration': 8.346}, {'end': 2474.499, 'text': 'and they can talk to each other directly.', 'start': 2472.699, 'duration': 1.8}, {'end': 2483.241, 'text': 'So this way, Python container will actually have access and can use the MySQL service from the other container.', 'start': 2475.059, 'duration': 8.182}, {'end': 2488.122, 'text': "So that's basically what the concept of services means in GitLab CICD.", 'start': 2483.541, 'duration': 4.581}, {'end': 2498.263, 'text': "So, right here what we're doing is we have this Docker container with Docker client inside and we want to start another Docker container with Docker daemon inside.", 'start': 2488.462, 'duration': 9.801}, {'end': 2505.497, 'text': 'So the client can actually connect to that daemon the Docker server and then execute these commands.', 'start': 2498.664, 'duration': 6.833}, {'end': 2510.983, 'text': 'And then image for the Docker daemon is actually this tag right here.', 'start': 2506.098, 'duration': 4.885}, {'end': 2525.056, 'text': "So that's gonna be Docker and the same version, so that's the client, that's the daemon with D-I-N-D, which is Docker in Docker.", 'start': 2513.405, 'duration': 11.651}, {'end': 2534.442, 'text': 'So these two will basically give us the complete set of Docker client and server in the same job execution environment.', 'start': 2526.095, 'duration': 8.347}, {'end': 2540.778, 'text': 'So these two containers will be linked to each other and they will be able to communicate with each other.', 'start': 2535.236, 'duration': 5.542}, {'end': 2549.301, 'text': 'There is one final thing we need to do here, which is to make sure these two can communicate with each other using Docker certificates.', 'start': 2541.178, 'duration': 8.123}, {'end': 2555.543, 'text': 'So these two need to have the same certificate so that can authenticate with each other and talk to each other.', 'start': 2549.661, 'duration': 5.882}, {'end': 2565.563, 'text': 'And for that, we want those two containers that will start to share that certificates directory so they can read from the same certificates folder.', 'start': 2556.083, 'duration': 9.48}], 'summary': 'Using docker in gitlab cicd, linking client and daemon containers for communication and execution during job, ensuring certificate sharing for authentication.', 'duration': 77.101, 'max_score': 2400.973, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2400973.jpg'}, {'end': 2613.265, 'src': 'heatmap', 'start': 2566.283, 'weight': 0.774, 'content': [{'end': 2577.229, 'text': 'And we can do that by defining a variable or environment variable called Docker TLS certdir and setting that to slash certs.', 'start': 2566.283, 'duration': 10.946}, {'end': 2582.892, 'text': 'So what this will do again is this will tell Docker to create the certificates in this location.', 'start': 2577.589, 'duration': 5.303}, {'end': 2588.815, 'text': 'And then this certificate will be shared between the service container and the job container.', 'start': 2583.392, 'duration': 5.423}, {'end': 2597.018, 'text': 'So in this configuration we have a full Docker set up of client and a server or Docker demon, and they can talk to each other,', 'start': 2589.315, 'duration': 7.703}, {'end': 2598.959, 'text': 'authenticate with each other, and so on.', 'start': 2597.018, 'duration': 1.941}, {'end': 2603.081, 'text': "And this way we're going to have Docker commands available inside our job.", 'start': 2599.659, 'duration': 3.422}, {'end': 2613.265, 'text': "Great, so now let's actually commit our changes and GitLab will automatically trigger a pipeline for us.", 'start': 2606.902, 'duration': 6.363}], 'summary': 'Defining docker tls certdir to slash certs allows sharing certificates between service and job containers, enabling docker commands inside the job.', 'duration': 46.982, 'max_score': 2566.283, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2566283.jpg'}, {'end': 2731.62, 'src': 'embed', 'start': 2650.166, 'weight': 3, 'content': [{'end': 2659.357, 'text': 'So we have successfully built and pushed a Docker image to Docker registry using GitLab CI city pipeline.', 'start': 2650.166, 'duration': 9.191}, {'end': 2668.923, 'text': 'However, there is one issue here, which is that both jobs get executed at the same time.', 'start': 2663.237, 'duration': 5.686}, {'end': 2675.65, 'text': 'And if we add deploy job, it will also run in parallel to these two jobs.', 'start': 2669.423, 'duration': 6.227}, {'end': 2680.175, 'text': 'And this makes no sense for us because we want to run these jobs in order.', 'start': 2676.311, 'duration': 3.864}, {'end': 2687.641, 'text': 'Right So we want to run the tests and only if the tests are successful, we want to build and push the image.', 'start': 2680.615, 'duration': 7.026}, {'end': 2697.95, 'text': 'And only if build and push job was successful, then we want to deploy that image, because if build fails, we have nothing to deploy.', 'start': 2688.181, 'duration': 9.769}, {'end': 2707.357, 'text': "Right So how can we force this order in which the jobs will execute in the pipeline? Well, we can do that using what's called stages.", 'start': 2698.01, 'duration': 9.347}, {'end': 2717.166, 'text': 'So the stages can be used to organize the pipeline by grouping related jobs that can run in parallel together.', 'start': 2708.218, 'duration': 8.948}, {'end': 2724.273, 'text': 'So, for example, if you have different tasks that you run for your applications, like unit tasks, linked tasks, whatever,', 'start': 2717.727, 'duration': 6.546}, {'end': 2727.636, 'text': 'they can all run in parallel by being in the same stage.', 'start': 2724.273, 'duration': 3.363}, {'end': 2729.638, 'text': "So let's see how that works.", 'start': 2728.277, 'duration': 1.361}, {'end': 2731.62, 'text': 'Going back to the editor.', 'start': 2730.319, 'duration': 1.301}], 'summary': 'Used stages to enforce job execution order in gitlab ci pipeline for docker image deployment.', 'duration': 81.454, 'max_score': 2650.166, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2650166.jpg'}], 'start': 2274.986, 'title': 'Docker configuration for gitlab ci-cd', 'summary': 'Discusses configuring docker in docker for gitlab ci-cd, ensuring availability of docker client and daemon in a docker container by setting the appropriate image, services, and certificate sharing. it also covers setting up a docker image pipeline using gitlab ci, including configuring stages to enforce the order of job execution, resulting in successful docker image building and pushing to the registry.', 'chapters': [{'end': 2588.815, 'start': 2274.986, 'title': 'Configuring docker in docker for gitlab ci-cd', 'summary': 'Explains how to configure docker in docker for gitlab ci-cd, ensuring the availability of docker client and daemon in a docker container, through setting the appropriate image, services, and certificate sharing.', 'duration': 313.829, 'highlights': ['Configuring Docker in Docker involves setting the appropriate Docker image with Docker client, and starting another container with Docker daemon, ensuring both client and server are available in the same job execution environment. Docker client and server in the same job execution environment.', 'The service attribute in GitLab CICD allows starting an additional container that runs at the same time as the job container, enabling them to run in the same network and communicate directly, ensuring access and usage of services like the MySQL service from the Python container. Enabling containers to run in the same network and communicate directly.', 'Sharing the Docker TLS certificates directory ensures that the Docker client and daemon containers can communicate with each other by authenticating and reading from the same certificates folder through defining the Docker TLS certdir environment variable. Enabling communication and authentication between Docker client and daemon containers.']}, {'end': 2843.657, 'start': 2589.315, 'title': 'Docker image pipeline staging', 'summary': 'Explains setting up a docker image pipeline using gitlab ci, including the configuration of stages to enforce the order of job execution, resulting in successful docker image building and pushing to the registry.', 'duration': 254.342, 'highlights': ['Successfully built and pushed a Docker image to Docker registry using GitLab CI city pipeline Successfully built and pushed a Docker image to Docker registry using GitLab CI city pipeline, with both jobs running simultaneously and resulting in a successful deployment of the Python app 1.0 image.', 'Configuring stages to enforce the order of job execution Explains the use of stages to enforce the order of job execution in the pipeline, organizing related jobs to run in parallel and ensuring that the build image job waits for the run tests to execute and only proceeds if the run test was successful.', 'Organizing pipeline by grouping related jobs using stages Describes the use of stages to organize the pipeline by grouping related jobs that run in parallel together, allowing for the creation of multiple stages and referencing them within jobs to enforce the desired execution order.']}], 'duration': 568.671, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2274986.jpg', 'highlights': ['Configuring Docker in Docker involves setting the appropriate Docker image with Docker client and starting another container with Docker daemon.', 'Enabling containers to run in the same network and communicate directly.', 'Sharing the Docker TLS certificates directory ensures that the Docker client and daemon containers can communicate with each other by authenticating and reading from the same certificates folder.', 'Successfully built and pushed a Docker image to Docker registry using GitLab CI city pipeline, with both jobs running simultaneously.', 'Configuring stages to enforce the order of job execution in the pipeline, organizing related jobs to run in parallel and ensuring that the build image job waits for the run tests to execute.', 'Describes the use of stages to organize the pipeline by grouping related jobs that run in parallel together.']}, {'end': 3273.008, 'segs': [{'end': 2916.111, 'src': 'embed', 'start': 2844.217, 'weight': 0, 'content': [{'end': 2856.325, 'text': "Now let's add the final job to our pipeline to deploy that newly built Docker image to an Ubuntu server and run that Docker application there.", 'start': 2844.217, 'duration': 12.108}, {'end': 2863.569, 'text': "For that, we first need a deployment server, right? We need a server that we're going to deploy to and run our application.", 'start': 2856.845, 'duration': 6.724}, {'end': 2872.475, 'text': 'To make this easy, we will create a simple Ubuntu server on a DigitalOcean platform.', 'start': 2866.806, 'duration': 5.669}, {'end': 2878.545, 'text': "It's way easier to set up and configure than AWS if you don't have an AWS account.", 'start': 2873.276, 'duration': 5.269}, {'end': 2880.568, 'text': "So that's the platform we're gonna use.", 'start': 2879.046, 'duration': 1.522}, {'end': 2886.331, 'text': "Now, if you have an Ubuntu server or other server, you're welcome to use that as well.", 'start': 2881.488, 'duration': 4.843}, {'end': 2889.994, 'text': 'So this is not specific to any cloud platform.', 'start': 2886.671, 'duration': 3.323}, {'end': 2894.897, 'text': 'We just need an Ubuntu server that is connected to internet that we can deploy to.', 'start': 2890.234, 'duration': 4.663}, {'end': 2900.821, 'text': 'And on DigitalOcean, actually, you can sign up a new account with $100 credit.', 'start': 2895.417, 'duration': 5.404}, {'end': 2905.884, 'text': 'So make sure to take advantage of that if you register here so that you can work through the demo for free.', 'start': 2901.121, 'duration': 4.763}, {'end': 2908.586, 'text': "I already have an account, so I'm gonna log in.", 'start': 2906.544, 'duration': 2.042}, {'end': 2911.948, 'text': "And I'm starting with a completely clear state.", 'start': 2909.446, 'duration': 2.502}, {'end': 2913.809, 'text': "I don't have anything configured yet.", 'start': 2911.968, 'duration': 1.841}, {'end': 2916.111, 'text': "So we're going to do all this together.", 'start': 2914.53, 'duration': 1.581}], 'summary': 'Deploy the docker image to an ubuntu server on digitalocean, which offers $100 credit for new accounts.', 'duration': 71.894, 'max_score': 2844.217, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2844217.jpg'}, {'end': 2973.2, 'src': 'embed', 'start': 2947.559, 'weight': 2, 'content': [{'end': 2960.387, 'text': 'You can upload the public key of that key pair to DigitalOcean and then all the servers that you create on DigitalOcean will be accessible using the public key that you uploaded here.', 'start': 2947.559, 'duration': 12.828}, {'end': 2962.168, 'text': "So that's how it's going to work.", 'start': 2960.867, 'duration': 1.301}, {'end': 2967.532, 'text': "So what we're going to do is actually create a new SSH key locally.", 'start': 2962.628, 'duration': 4.904}, {'end': 2969.517, 'text': 'which is very simple.', 'start': 2968.476, 'duration': 1.041}, {'end': 2973.2, 'text': "I'm going to leave the project.", 'start': 2969.537, 'duration': 3.663}], 'summary': 'Uploading the public key to digitalocean enables access to servers; creating a new ssh key locally is simple.', 'duration': 25.641, 'max_score': 2947.559, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2947559.jpg'}, {'end': 3101.735, 'src': 'embed', 'start': 3071.422, 'weight': 3, 'content': [{'end': 3072.302, 'text': "And that's it.", 'start': 3071.422, 'duration': 0.88}, {'end': 3079.907, 'text': "So now I'm going to go back to the droplets and create a deployment server.", 'start': 3073.004, 'duration': 6.903}, {'end': 3082.087, 'text': 'So click on create droplet.', 'start': 3080.447, 'duration': 1.64}, {'end': 3089.43, 'text': "I'm going to choose Ubuntu with the latest version basic plan, regular with SSD,", 'start': 3083.748, 'duration': 5.682}, {'end': 3096.973, 'text': "and I'm going to select the smallest server with the smallest resources, because we're just going to be deploying one application container,", 'start': 3089.43, 'duration': 7.543}, {'end': 3098.473, 'text': 'which is our Python app.', 'start': 3096.973, 'duration': 1.5}, {'end': 3101.735, 'text': "So we don't need much resources.", 'start': 3098.914, 'duration': 2.821}], 'summary': 'Creating a deployment server for a python app using the smallest resources and ubuntu with ssd.', 'duration': 30.313, 'max_score': 3071.422, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo3071422.jpg'}, {'end': 3185.823, 'src': 'embed', 'start': 3159.109, 'weight': 4, 'content': [{'end': 3163.433, 'text': "And for that, we're going to grab the public IP address of our droplet.", 'start': 3159.109, 'duration': 4.324}, {'end': 3166.478, 'text': 'of our server, which is this one right here.', 'start': 3164.153, 'duration': 2.325}, {'end': 3174.394, 'text': "Let's copy and we're going to connect to that machine locally and we're going to SSH into the server using an SSH command.", 'start': 3166.779, 'duration': 7.615}, {'end': 3180.782, 'text': 'and the ip address of the server, which is a public ip address.', 'start': 3176.121, 'duration': 4.661}, {'end': 3185.823, 'text': 'but, of course, when we ssh into a remote server, we need to authenticate ourselves right.', 'start': 3180.782, 'duration': 5.041}], 'summary': 'Copying and connecting to server using ssh with public ip address.', 'duration': 26.714, 'max_score': 3159.109, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo3159109.jpg'}], 'start': 2844.217, 'title': 'Deploying docker image and setting up ssh key', 'summary': 'Covers deploying a docker image to an ubuntu server on digitalocean, emphasizing ease of setup and $100 credit for new accounts, along with setting up ssh key, creating a deployment server, and installing docker with minimal resource requirements.', 'chapters': [{'end': 2916.111, 'start': 2844.217, 'title': 'Deploying docker image to ubuntu server', 'summary': 'Covers deploying a newly built docker image to an ubuntu server on digitalocean, highlighting the ease of setup and $100 credit for new accounts, allowing for a cost-free demo experience.', 'duration': 71.894, 'highlights': ['DigitalOcean provides $100 credit for new accounts, offering a cost-free demo experience.', 'The process involves deploying a newly built Docker image to an Ubuntu server, emphasizing the ease of setup and configuration compared to AWS.', 'The chapter emphasizes the flexibility of using any Ubuntu server, not specific to any cloud platform.']}, {'end': 3273.008, 'start': 2916.411, 'title': 'Setting up ssh key for digitalocean server', 'summary': 'Covers the process of creating and uploading an ssh key to digitalocean, creating a deployment server on the platform and installing docker on the server, emphasizing the use of ssh for server access and the minimal resource requirements for the deployment.', 'duration': 356.597, 'highlights': ['Creating and uploading an SSH key to DigitalOcean The process involves generating an SSH key pair locally, uploading the public key to DigitalOcean, and using it to access all servers created on the platform.', 'Creating a deployment server on DigitalOcean The deployment server is created with minimal resources for deploying a Python app, and the closest region is selected for better performance.', 'Installing Docker on the server The process involves obtaining the public IP address of the droplet, connecting to the server using SSH command with the private key, and installing Docker to make it available for running Docker containers.']}], 'duration': 428.791, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo2844217.jpg', 'highlights': ['DigitalOcean provides $100 credit for new accounts, offering a cost-free demo experience.', 'The process involves deploying a newly built Docker image to an Ubuntu server, emphasizing the ease of setup and configuration compared to AWS.', 'Creating and uploading an SSH key to DigitalOcean The process involves generating an SSH key pair locally, uploading the public key to DigitalOcean, and using it to access all servers created on the platform.', 'Creating a deployment server on DigitalOcean The deployment server is created with minimal resources for deploying a Python app, and the closest region is selected for better performance.', 'Installing Docker on the server The process involves obtaining the public IP address of the droplet, connecting to the server using SSH command with the private key, and installing Docker to make it available for running Docker containers.', 'The chapter emphasizes the flexibility of using any Ubuntu server, not specific to any cloud platform.']}, {'end': 4138.755, 'segs': [{'end': 3326.738, 'src': 'embed', 'start': 3300.299, 'weight': 0, 'content': [{'end': 3304.923, 'text': 'Or how is it gonna connect to the server in order to deploy the Docker image?', 'start': 3300.299, 'duration': 4.624}, {'end': 3309.887, 'text': 'Well, actually the same way as we did locally using SSH command.', 'start': 3305.343, 'duration': 4.544}, {'end': 3310.967, 'text': 'So again,', 'start': 3310.287, 'duration': 0.68}, {'end': 3320.875, 'text': "GitLab runner will start a container for the deploy job and inside the container we're gonna execute SSH command to connect to the remote server.", 'start': 3310.967, 'duration': 9.908}, {'end': 3326.738, 'text': "And for that SSH command we're going to need exactly the same information, right?", 'start': 3321.756, 'duration': 4.982}], 'summary': 'Gitlab runner deploys docker image using ssh command to connect to remote server.', 'duration': 26.439, 'max_score': 3300.299, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo3300299.jpg'}, {'end': 3640.169, 'src': 'embed', 'start': 3616.636, 'weight': 2, 'content': [{'end': 3626.802, 'text': 'First of all, this command will be executed on a droplet server and it will actually pull the image that we specify here from the private registry.', 'start': 3616.636, 'duration': 10.166}, {'end': 3632.245, 'text': 'And that means we need to authenticate with that registry to be able to pull the image.', 'start': 3627.542, 'duration': 4.703}, {'end': 3640.169, 'text': 'So just like we had to do Docker login here in order to push an image, we need to do Docker login here in order to pull the image.', 'start': 3632.965, 'duration': 7.204}], 'summary': 'Executing command on droplet server to pull specified image from private registry, requiring authentication.', 'duration': 23.533, 'max_score': 3616.636, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo3616636.jpg'}, {'end': 3713.447, 'src': 'embed', 'start': 3687.058, 'weight': 1, 'content': [{'end': 3691.064, 'text': "And obviously this is going to fail because you can't run multiple processes on the same port.", 'start': 3687.058, 'duration': 4.006}, {'end': 3699.397, 'text': 'Right. So before each Docker run command, we also need to make sure to stop and remove any existing containers,', 'start': 3691.124, 'duration': 8.273}, {'end': 3706.342, 'text': 'or at least stop any currently running containers on port 5000, so that a new one can be created.', 'start': 3699.397, 'duration': 6.945}, {'end': 3708.403, 'text': "So that's the second thing we need to do.", 'start': 3706.842, 'duration': 1.561}, {'end': 3713.447, 'text': 'And because we know that this server will only host and run our application.', 'start': 3708.964, 'duration': 4.483}], 'summary': 'Multiple processes on the same port need to be managed to run new containers.', 'duration': 26.389, 'max_score': 3687.058, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo3687058.jpg'}, {'end': 4099.39, 'src': 'embed', 'start': 4075.672, 'weight': 3, 'content': [{'end': 4082.678, 'text': 'And you can already work with this knowledge because you basically learn the core concepts of GitLab CICD and you can extend on it.', 'start': 4075.672, 'duration': 7.006}, {'end': 4092.766, 'text': 'However, there is much more to GitLab CICD platform, much more features with more advanced use, cases of using artifacts caching,', 'start': 4083.018, 'duration': 9.748}, {'end': 4099.39, 'text': 'deploying with Docker Compose, deploying to Kubernetes cluster, creating pipelines for microservices applications,', 'start': 4092.766, 'duration': 6.624}], 'summary': 'Learn core gitlab cicd concepts, extend knowledge with advanced features like artifacts caching and deploying to kubernetes.', 'duration': 23.718, 'max_score': 4075.672, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo4075672.jpg'}], 'start': 3273.248, 'title': 'Deploying docker image to server and gitlab ci/cd basics', 'summary': 'Discusses deploying a docker image to a server via ssh, addressing port conflicts, and authentication. it also covers setting up a gitlab ci/cd pipeline, emphasizing generic applicability and potential for customization.', 'chapters': [{'end': 3761.203, 'start': 3273.248, 'title': 'Deploying docker image to server', 'summary': 'Discusses deploying a docker image to a server, utilizing ssh commands, creating secret variables for the private key, and executing docker commands within the ssh environment, ensuring successful deployment by addressing port conflicts and authentication for pulling the image.', 'duration': 487.955, 'highlights': ['Creating a secret variable for the private key in the cicd settings by adding a third variable called ssh key with the value of the private key file contents, to be referenced as an SSH key file. The process involves creating a secret variable for the private key in the cicd settings by adding a third variable called ssh key with the value of the private key file contents, to be referenced as an SSH key file.', 'Utilizing SSH command inside the GitLab runner to connect to the remote server, enabling deployment of the Docker image through the execution of Docker run command within the SSH environment. Utilizing SSH command inside the GitLab runner to connect to the remote server, enabling deployment of the Docker image through the execution of Docker run command within the SSH environment.', 'Addressing port conflicts by ensuring the stopping and removal of any existing containers on the server running on the same host port before executing the Docker run command to deploy the image. Addressing port conflicts by ensuring the stopping and removal of any existing containers on the server running on the same host port before executing the Docker run command to deploy the image.', 'Authenticating with the private registry to pull the Docker image by executing the Docker login command inside the SSH environment before running the Docker run command. Authenticating with the private registry to pull the Docker image by executing the Docker login command inside the SSH environment before running the Docker run command.']}, {'end': 4138.755, 'start': 3761.703, 'title': 'Gitlab ci/cd basics', 'summary': 'Discusses setting up a gitlab ci/cd pipeline, including stopping and creating containers, updating ssh key file permissions, running docker commands in detached mode, and validating the deployment. it also emphasizes the generic applicability of the pipeline to any programming language and the potential for further customization and advanced features in gitlab ci/cd.', 'duration': 377.052, 'highlights': ['The chapter discusses setting up a GitLab CI/CD pipeline, including stopping and creating containers, updating SSH key file permissions, running docker commands in detached mode, and validating the deployment. The chapter covers the essential steps of setting up a GitLab CI/CD pipeline, such as stopping and creating containers, updating SSH key file permissions, running docker commands in detached mode, and validating the deployment.', 'It also emphasizes the generic applicability of the pipeline to any programming language and the potential for further customization and advanced features in GitLab CI/CD. The chapter highlights the generic applicability of the pipeline to any programming language and the potential for further customization and advanced features in GitLab CI/CD, offering flexibility and scalability for diverse projects.']}], 'duration': 865.507, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/qP8kir2GUgo/pics/qP8kir2GUgo3273248.jpg', 'highlights': ['Utilizing SSH command inside the GitLab runner to connect to the remote server, enabling deployment of the Docker image through the execution of Docker run command within the SSH environment.', 'Addressing port conflicts by ensuring the stopping and removal of any existing containers on the server running on the same host port before executing the Docker run command to deploy the image.', 'Authenticating with the private registry to pull the Docker image by executing the Docker login command inside the SSH environment before running the Docker run command.', 'The chapter discusses setting up a GitLab CI/CD pipeline, including stopping and creating containers, updating SSH key file permissions, running docker commands in detached mode, and validating the deployment.', 'It also emphasizes the generic applicability of the pipeline to any programming language and the potential for further customization and advanced features in GitLab CI/CD.']}], 'highlights': ['GitLab is striving to become the DevOps platform, integrating and creating new features for complete DevOps processes.', 'CI/CD involves continuous testing, building, and releasing of code changes, providing an automated and continuous deployment process.', 'The chapter outlines the process of setting up a CI/CD pipeline for a demo application. Setting up a CI/CD pipeline, running tests, creating job configurations', 'The chapter explains how to configure GitLab Runner to run tests using Docker containers. Setting up the environment, specifying the execution environment, and overwriting the default image used by the runner', 'TwinGate offers a special offer for viewers, providing three months free of the business tier in addition to their 14-day free trial, using the code NANA.', "A job named 'build image' is created to build a Docker image of a Python application.", 'Configuring Docker in Docker involves setting the appropriate Docker image with Docker client and starting another container with Docker daemon.', 'DigitalOcean provides $100 credit for new accounts, offering a cost-free demo experience.', 'Utilizing SSH command inside the GitLab runner to connect to the remote server, enabling deployment of the Docker image through the execution of Docker run command within the SSH environment.']}