Day-4 | AWS & Azure - How to Create Virtual Machines | Free DevOps Course | 45 days |#devops #aws

00:29:37
https://www.youtube.com/watch?v=NJkMe9cdYEQ

摘要

TLDRIn this video, Abhishek continues the DevOps Zero to Hero course, focusing on advanced virtual machines. He explains how to create virtual machines on AWS and Azure, emphasizing the importance of automation in DevOps. The video covers the process of making requests to cloud providers, using AWS EC2 and Azure virtual machines, and introduces various automation tools like AWS CLI, API, CloudFormation, and Terraform. Abhishek also highlights the differences between AWS and Azure, including their free tier offerings and user interfaces. The session concludes with a practical demonstration of creating virtual machines on both platforms.

心得

  • 👨‍💻 Introduction to Day 4 of DevOps course
  • ☁️ Focus on advanced virtual machines
  • 🛠️ Importance of automation in DevOps
  • 🌐 Overview of AWS and Azure
  • 📜 How to create virtual machines on AWS
  • 📜 How to create virtual machines on Azure
  • 🔑 Significance of key-value pairs in AWS
  • 📈 Tools for automation: AWS CLI, API, CloudFormation, Terraform
  • 🔄 Understanding hybrid cloud model
  • 💡 Differences between AWS and Azure free tiers

时间轴

  • 00:00:00 - 00:05:00

    In this video, Abhishek introduces Day 4 of the DevOps Zero to Hero course, focusing on advanced virtual machines. He encourages viewers to watch previous days' videos for context and outlines the topics to be covered, including creating virtual machines on AWS, Azure, and on-premise scenarios.

  • 00:05:00 - 00:10:00

    The session begins with a recap of the previous day's lesson on virtual machines, emphasizing the process of making requests to cloud providers like AWS and Azure to create virtual machines. Abhishek explains the terminology used in AWS, specifically the EC2 instance, and reassures viewers that he will guide them through the practical steps of creating a virtual machine.

  • 00:10:00 - 00:15:00

    Abhishek highlights the importance of efficiency in DevOps, explaining that instead of manually creating multiple virtual machines, automation should be utilized. He introduces the concept of AWS APIs, specifically the EC2 API, which allows users to automate the creation of virtual machines through scripting, thus saving time and reducing errors.

  • 00:15:00 - 00:20:00

    The video discusses various methods for automating the creation of virtual machines, including AWS CLI, AWS API, CloudFormation Templates (CFT), and Terraform. Abhishek emphasizes that while Terraform is popular for multi-cloud environments, AWS-specific tools like AWS CDK may offer better integration and support for AWS services.

  • 00:20:00 - 00:29:37

    Finally, Abhishek demonstrates how to create an AWS account and launch an EC2 instance through the AWS console. He also briefly compares the process with Microsoft Azure, noting differences in free account offerings and user experience. He concludes by inviting viewers to return for the next class, which will cover automation processes.

显示更多

思维导图

视频问答

  • What is the focus of Day 4 in the DevOps course?

    Day 4 focuses on advanced virtual machines, specifically how to create them on AWS and Azure.

  • What are the main cloud providers discussed?

    The main cloud providers discussed are AWS and Azure.

  • What is the importance of automation in DevOps?

    Automation improves efficiency and reduces errors in routine tasks.

  • What tools are mentioned for automating virtual machine creation?

    Tools mentioned include AWS CLI, AWS API, CloudFormation, and Terraform.

  • How does AWS EC2 differ from Azure virtual machines?

    AWS EC2 instances are created through the AWS console, while Azure virtual machines are created through the Azure portal.

  • What is the free tier offering for AWS and Azure?

    AWS offers a free tier for one year, while Azure provides a shorter free trial.

  • What is the significance of the key-value pair in AWS?

    The key-value pair is used to log into the EC2 instance securely.

  • What is Terraform?

    Terraform is an open-source tool for automating infrastructure across multiple cloud providers.

  • What is the AWS Cloud Development Kit (CDK)?

    CDK is a proprietary tool for AWS that allows for advanced automation and resource management.

  • What is the hybrid cloud model?

    The hybrid cloud model involves using multiple cloud platforms for different resources.

查看更多视频摘要

即时访问由人工智能支持的免费 YouTube 视频摘要!
字幕
en
自动滚动:
  • 00:00:01
    hello everyone my name is Abhishek and
  • 00:00:03
    welcome back to my channel so today we
  • 00:00:05
    are talking about day four of our devops
  • 00:00:08
    Zero to Hero course
  • 00:00:09
    for people who are just watching our
  • 00:00:11
    videos for the first time we are doing a
  • 00:00:13
    45 days of complete devops course that
  • 00:00:15
    is devops Zero to Hero and today we are
  • 00:00:17
    at day four if you haven't watched our
  • 00:00:19
    previous videos Day Zero day one day two
  • 00:00:21
    and day three I would highly recommend
  • 00:00:23
    you to go and watch those videos first
  • 00:00:25
    so there is a demo of Zero to Hero
  • 00:00:27
    playlist on my channel and those videos
  • 00:00:29
    covers the previous topics and this is
  • 00:00:33
    typically virtual machines part two so
  • 00:00:35
    in the previous video we talked about
  • 00:00:37
    virtual machines and uh you know where
  • 00:00:40
    we talked about the evolution of virtual
  • 00:00:42
    machines what is the server what is
  • 00:00:44
    physical server how a physical server is
  • 00:00:46
    different from a virtual machine what is
  • 00:00:48
    the concept that allows you to create
  • 00:00:50
    virtual machines and we also looked at
  • 00:00:52
    how data centers are you know getting
  • 00:00:56
    extinct you know previously even a
  • 00:00:59
    startup used to have their own data
  • 00:01:00
    center but now people are relying on
  • 00:01:02
    platforms like openstack or AWS or Azure
  • 00:01:05
    so we also talked about those things so
  • 00:01:07
    it would be a really interesting one to
  • 00:01:10
    watch part one before part two
  • 00:01:13
    now today what we'll learn is we will
  • 00:01:16
    learn about virtual machines in a
  • 00:01:18
    advanced way we will talk about how to
  • 00:01:20
    create virtual machines we will look at
  • 00:01:22
    the top platforms or the top Cloud
  • 00:01:24
    providers today you have AWS you have
  • 00:01:26
    Azure and I'll also take a on-premise
  • 00:01:28
    scenario so that if you're working in
  • 00:01:31
    people might be working in different
  • 00:01:33
    organizations so that everybody gets a
  • 00:01:34
    feel of it like there is also Google
  • 00:01:36
    Cloud platform but we cannot cover all
  • 00:01:38
    of the topics so what I'll try to tell
  • 00:01:40
    you is
  • 00:01:42
    how to create a virtual machine on these
  • 00:01:43
    platforms I'll talk about AWS I'll talk
  • 00:01:46
    about Azure and then also say I'll also
  • 00:01:48
    talk about how to create a virtual
  • 00:01:49
    machine on on-premise let's say your
  • 00:01:51
    organization has not shifted to cloud
  • 00:01:53
    and they're still using their own data
  • 00:01:55
    center they have their own servers so
  • 00:01:56
    how to create a virtual machine on those
  • 00:01:58
    so these are the different things that
  • 00:02:00
    we would cover today
  • 00:02:02
    okay so before we start the video I
  • 00:02:04
    would like to just make a simple request
  • 00:02:06
    that you know I'm making these videos
  • 00:02:08
    with at most honesty and you people know
  • 00:02:11
    that it's a free devops course so the
  • 00:02:13
    only thing that I would expect from
  • 00:02:14
    everyone is to promote these videos
  • 00:02:17
    within your uh Circle and if anybody who
  • 00:02:20
    is looking for these videos like
  • 00:02:21
    somebody is passionate about learning
  • 00:02:23
    devops then please do share these videos
  • 00:02:25
    with them so that everybody is benefited
  • 00:02:27
    out of these videos
  • 00:02:29
    perfect so going ahead firstly just a
  • 00:02:33
    precap of uh sorry recap of what we have
  • 00:02:35
    learned yesterday so yesterday we
  • 00:02:37
    learned that in devops to create a
  • 00:02:39
    virtual machine you basically make a
  • 00:02:42
    request to one of your Cloud providers
  • 00:02:43
    I'll talk about on-premise later so for
  • 00:02:45
    now just understand that we are dealing
  • 00:02:47
    with Cloud providers okay
  • 00:02:50
    so what we would do is we'll make a
  • 00:02:52
    request with one of these Cloud
  • 00:02:53
    providers let's say we have we are only
  • 00:02:55
    talking about AWS and Azure so as an end
  • 00:02:57
    user what you do is from your personal
  • 00:02:59
    laptop let's say this is your personal
  • 00:03:01
    laptop and you are a guy who is sitting
  • 00:03:03
    in front of this laptop and you are in
  • 00:03:07
    search of a virtual machine so what you
  • 00:03:09
    do you would log into something called
  • 00:03:11
    as
  • 00:03:13
    AWS console
  • 00:03:15
    okay by logging into AWS console what
  • 00:03:19
    you do is you make a request to AWS
  • 00:03:21
    asking for a virtual machine in AWS
  • 00:03:24
    terminology it is called ec2 instance
  • 00:03:26
    don't worry if you are not aware of AWS
  • 00:03:28
    in this video we will directly look at
  • 00:03:30
    the AWS console I'll show you how to
  • 00:03:32
    create a virtual machine and today we
  • 00:03:34
    are not even deep diving into AWS so
  • 00:03:36
    don't worry even if you have zero
  • 00:03:38
    knowledge on AWS I'll show you
  • 00:03:39
    theoretically as well as practically how
  • 00:03:42
    to create a virtual machine on AWS and
  • 00:03:44
    also we'll take a look at Microsoft
  • 00:03:46
    azure
  • 00:03:47
    so for theoretical understanding what
  • 00:03:50
    happens is there is a developer or there
  • 00:03:52
    is a person called X Mr X and what Mr X
  • 00:03:55
    would do is sitting in front of his
  • 00:03:57
    laptop he'd open his favorite browser
  • 00:03:59
    and in his favorite browser he would
  • 00:04:01
    search for AWS console once he go to the
  • 00:04:04
    AWS console he can make a request with
  • 00:04:07
    the AWS through the UI to
  • 00:04:10
    create a virtual machine or ec2 instance
  • 00:04:13
    and what AWS would do is AWS in response
  • 00:04:16
    would send you back
  • 00:04:17
    something like an IP address
  • 00:04:21
    and all the specification related to
  • 00:04:23
    this virtual machine that you have
  • 00:04:24
    requested
  • 00:04:25
    This is the End thing that happens or
  • 00:04:28
    this is the overall thing that happens
  • 00:04:30
    if you are trying to create a virtual
  • 00:04:31
    machine from the UI and the same thing
  • 00:04:33
    happens with Microsoft Azure as well
  • 00:04:35
    right so whether it is Microsoft Azure
  • 00:04:36
    or whether it is AWS the process is the
  • 00:04:39
    same again there is a person who is
  • 00:04:41
    sitting in front of his laptop let's
  • 00:04:42
    call him Mr X and what Mr X would do is
  • 00:04:45
    instead of
  • 00:04:47
    AWS on his favorite browser he will try
  • 00:04:49
    to open Microsoft Azure portal which is
  • 00:04:53
    Azure portal right once he opens the
  • 00:04:56
    Azure portal don't worry we'll also take
  • 00:04:58
    a look at this uh practically on the
  • 00:05:00
    Azure portal he will do the same thing
  • 00:05:01
    he would ask the Azure to create a
  • 00:05:04
    virtual machine in Azure terminology we
  • 00:05:06
    call it virtual machine only and Azure
  • 00:05:09
    would send back him the same response
  • 00:05:11
    right the IP address plus all the
  • 00:05:13
    specifications that are required to
  • 00:05:14
    login
  • 00:05:15
    so this is the process but
  • 00:05:18
    the important thing that we would
  • 00:05:19
    understand is okay for creating one
  • 00:05:21
    virtual machine everything is fine like
  • 00:05:23
    you know you can log in you can go
  • 00:05:26
    through the UI and you can create a
  • 00:05:27
    virtual machine but as a devops engineer
  • 00:05:29
    always from class 1 I teach you the same
  • 00:05:32
    thing that we have to focus on
  • 00:05:34
    efficiency let's say you get hundred
  • 00:05:37
    such requests okay because in your
  • 00:05:39
    organization you might have thousands of
  • 00:05:40
    people and if you get hundreds of the
  • 00:05:43
    same requests right every day you
  • 00:05:44
    receive the same request people ask you
  • 00:05:46
    to create a virtual machine so would you
  • 00:05:49
    go to your AWS portal 100 times and
  • 00:05:51
    create a virtual machine you can do that
  • 00:05:53
    but that does not add efficiency so in
  • 00:05:57
    devops every day what we are talking is
  • 00:06:01
    the same thing that is efficiency so as
  • 00:06:04
    a devops engineer you should always
  • 00:06:06
    Target in improving the efficiency of
  • 00:06:08
    your routine task so what you do is you
  • 00:06:12
    would look for automation
  • 00:06:15
    so AWS people also provides you the
  • 00:06:19
    support for this automation right
  • 00:06:21
    because you are talking to AWS AWS has
  • 00:06:23
    to develop a feature that allows you to
  • 00:06:26
    automate the stuff on AWS right so what
  • 00:06:28
    happens is in general this is called a
  • 00:06:31
    AWS API
  • 00:06:33
    okay so AWS provides you API so in this
  • 00:06:36
    case we are talking about ec2 so it is
  • 00:06:38
    called as AWS ec2 API right what is it
  • 00:06:42
    called AWS ec2 API because we are
  • 00:06:45
    talking about ec2 for now we are only uh
  • 00:06:48
    talking about the AWS ec25 similarly if
  • 00:06:50
    you want to create storage AWS supports
  • 00:06:52
    AWS S3 API if you want to talk about
  • 00:06:54
    volumes AWS support AWS EBS API or the
  • 00:06:58
    something else so for now understand
  • 00:07:00
    that AWS people have developed something
  • 00:07:01
    called as AWS ec2 API and using this AWS
  • 00:07:05
    ec2 API the end user or the devops
  • 00:07:08
    engineer who is using his laptop what he
  • 00:07:11
    can do is instead of directly accessing
  • 00:07:13
    the Amazon.com or sorry Amazon console
  • 00:07:16
    from his favorite browser what he can do
  • 00:07:19
    is
  • 00:07:20
    he can write a script okay what this
  • 00:07:23
    user would do he would write a script
  • 00:07:25
    and using this script what he would do
  • 00:07:27
    he would make a call to the AWS
  • 00:07:32
    ec2
  • 00:07:34
    API right so he makes a call to AWS API
  • 00:07:38
    and in this script what he'll say is I
  • 00:07:40
    want to create 10 easy to instances okay
  • 00:07:44
    or he'll just write a script and every
  • 00:07:46
    time a user comes to him and asks for
  • 00:07:47
    ec2 instance he would run the script and
  • 00:07:49
    it would return one ec2 instance okay
  • 00:07:51
    even if you are writing a script to
  • 00:07:53
    automate the process for creating one
  • 00:07:54
    ec2 instance and even if it is same in
  • 00:07:57
    one minute of your regular time okay
  • 00:07:59
    that is also called as a automation
  • 00:08:01
    right because
  • 00:08:03
    there is no manual intervention so when
  • 00:08:05
    there is no manual intervention that
  • 00:08:07
    means there are no errors right because
  • 00:08:10
    manually you might commit some errors
  • 00:08:12
    but if you are automating the process
  • 00:08:14
    and automation is doing things for you
  • 00:08:16
    so you are also avoiding errors and you
  • 00:08:19
    are also saving your time so this is the
  • 00:08:21
    process now
  • 00:08:23
    coming to the script it can be done in
  • 00:08:25
    multiple ways okay so I'll talk about
  • 00:08:28
    the different ways that AWS will allow
  • 00:08:30
    you to create or automate the stuff on
  • 00:08:32
    AWS now the process would be same for
  • 00:08:35
    Microsoft Azure as well so that is the
  • 00:08:37
    reason why I'm not repeating AWS and
  • 00:08:39
    Azure so for now understand that the
  • 00:08:41
    process is same for any cloud provider
  • 00:08:43
    today I am talking about AWS it can be
  • 00:08:45
    Microsoft Azure it can be Google Cloud
  • 00:08:46
    platform digitalocean or any cloud
  • 00:08:48
    provider okay the process is the same
  • 00:08:50
    what they would do is for the service
  • 00:08:53
    that they are providing so it can be
  • 00:08:54
    easy to service it can be storage
  • 00:08:56
    service or any service what the cloud
  • 00:08:58
    provider would do is they would write a
  • 00:09:00
    API so the developers at Amazon what
  • 00:09:03
    they would do is they have hundreds of
  • 00:09:05
    services right Amazon provide you
  • 00:09:07
    hundreds of services today
  • 00:09:10
    and today we are dealing with ec2
  • 00:09:12
    service
  • 00:09:13
    in future we'll talk about the other
  • 00:09:14
    services but for the easy to service
  • 00:09:16
    there is a developer right or there are
  • 00:09:18
    a bunch of developers what these
  • 00:09:20
    developers would do is they would expose
  • 00:09:22
    the API of This ec2 Server okay
  • 00:09:26
    so this is the API
  • 00:09:29
    now
  • 00:09:31
    what happens is this API would receive a
  • 00:09:33
    request
  • 00:09:37
    and if it receives the request in the
  • 00:09:39
    expected format as a response what we
  • 00:09:41
    will do it would send you a
  • 00:09:47
    easy to instance right so the AWS ec2 is
  • 00:09:51
    AWS ec2 API is responsible for receiving
  • 00:09:54
    the request and once it receives the
  • 00:09:57
    request and the resource request is
  • 00:09:59
    valid authenticated and authorized okay
  • 00:10:01
    what I am talking about the three things
  • 00:10:03
    one is the request that you are doing
  • 00:10:05
    should be valid valid is following all
  • 00:10:08
    the standards this ec2 API is expecting
  • 00:10:10
    and then it should be
  • 00:10:13
    authenticated what is authenticated the
  • 00:10:16
    user who is making the request should
  • 00:10:18
    have access to the AWS and then
  • 00:10:20
    authorized okay sometimes as a user you
  • 00:10:23
    might have access to AWS but you don't
  • 00:10:26
    have access to or you are not authorized
  • 00:10:28
    to create ec2 instance so all these
  • 00:10:31
    three criterias have to be matched one
  • 00:10:32
    is the request that the user is sending
  • 00:10:34
    has to be valid then he has to be
  • 00:10:36
    authenticated he has to be authorized
  • 00:10:38
    once these three things are done what
  • 00:10:40
    happens is as a devops engineer now you
  • 00:10:43
    can write a script
  • 00:10:47
    what your script has to do your script
  • 00:10:49
    has to make an API call with AWS with a
  • 00:10:53
    request that is matching all this
  • 00:10:54
    criteria that is valid authenticated and
  • 00:10:56
    authorized and as a output for the
  • 00:11:00
    script you will get a ec2 instance now
  • 00:11:02
    what is this script I have been talking
  • 00:11:03
    about script script script all this
  • 00:11:05
    while so now let's Deep dive and
  • 00:11:07
    understand what is the script actually
  • 00:11:08
    so the script can be multiple types one
  • 00:11:11
    is through CLI
  • 00:11:14
    okay so because we are talking about AWS
  • 00:11:16
    let me call this as AWS CLI so as a
  • 00:11:20
    devops engineer you can automate the
  • 00:11:22
    creation of your virtual machines or ec2
  • 00:11:24
    instance through AWS CLI 1 2 you can use
  • 00:11:28
    AWS
  • 00:11:32
    API itself directly right if you are
  • 00:11:34
    familiar with the concept of uh let's
  • 00:11:37
    say the rest API how to write a rest API
  • 00:11:39
    and if you have exposure towards any
  • 00:11:41
    programming language you can directly
  • 00:11:43
    deal with AWS API and there are some
  • 00:11:45
    modules like if you're talking about
  • 00:11:46
    python python supports boto3 okay using
  • 00:11:49
    boto3 module in Python you can directly
  • 00:11:51
    make a request to the AWS API now this
  • 00:11:54
    does not have to be uh I mean you don't
  • 00:11:56
    have to be familiar at this point of
  • 00:11:58
    time like even if you don't know uh
  • 00:12:00
    python or Java or any programming
  • 00:12:02
    languages you can still use AWS CLI to
  • 00:12:04
    automate the process but for now you
  • 00:12:06
    should understand that AWS also allows
  • 00:12:09
    you to write your custom scripts or your
  • 00:12:11
    own scripts and you know there are open
  • 00:12:14
    source libraries or the models that are
  • 00:12:16
    available and If For example I'm a
  • 00:12:19
    familiar with python so in Python there
  • 00:12:21
    is a model called boto3 and boto3 allows
  • 00:12:23
    you to directly make a API call with AWS
  • 00:12:26
    any service ec2 service or S3 service or
  • 00:12:29
    any service now the next approach is AWS
  • 00:12:31
    support something called as AWS CFT that
  • 00:12:35
    is called as cloud formation templates
  • 00:12:36
    so the cloud formation templates are
  • 00:12:38
    templating language it's a classic
  • 00:12:41
    template uh you AWS provides a
  • 00:12:44
    definition or a proper structure if you
  • 00:12:47
    provide this template to the AWS AWS
  • 00:12:48
    will return you with 1 to n number of
  • 00:12:51
    virtual missions that you have requested
  • 00:12:52
    so these are the different approaches
  • 00:12:55
    and finally there is also a great
  • 00:12:57
    competitor that is available in the
  • 00:12:58
    market that is terraform
  • 00:13:03
    now if you put terraform aside for now
  • 00:13:06
    because we have a separate class where
  • 00:13:09
    we will talk about terraform and
  • 00:13:10
    terraform is a uh you know is something
  • 00:13:13
    that we cannot uh discuss for now
  • 00:13:15
    because people have to have certain
  • 00:13:16
    level of expertise to Deep dive into
  • 00:13:18
    terraform and during the terraform class
  • 00:13:21
    we will Master this uh we will learn
  • 00:13:23
    Zero to Hero of terraform so far now
  • 00:13:25
    just understand that terraform is one of
  • 00:13:27
    the Alternatives that is available to
  • 00:13:29
    automate your
  • 00:13:30
    resource creation and the advantage with
  • 00:13:32
    terraform is that if you look at these
  • 00:13:34
    three things they are very specific to
  • 00:13:36
    AWS right this is AWS CLI this is AWS
  • 00:13:38
    API boto3 and this is AWS CFT but
  • 00:13:42
    terraform I did not mention as AWS
  • 00:13:44
    because one terraform multiple Cloud
  • 00:13:46
    providers so terraform can automate your
  • 00:13:48
    process in AWS it can automate your
  • 00:13:50
    process in Azure it can automate your
  • 00:13:52
    process in Google Cloud platform
  • 00:13:53
    everywhere
  • 00:13:54
    okay now what is happening here is using
  • 00:13:58
    all of these things or any of these
  • 00:14:00
    things what you can do is you can
  • 00:14:02
    directly talk to the AWS API right so
  • 00:14:05
    what are these things doing end of the
  • 00:14:07
    day they are directly talking to the AWS
  • 00:14:09
    API so who is writing the AWS API the
  • 00:14:13
    devops engineer or the developer at
  • 00:14:14
    Amazon what they are doing is they are
  • 00:14:17
    exposing their ec2 instance
  • 00:14:19
    using the API and as a devops engineer
  • 00:14:22
    you can automate the process in your
  • 00:14:24
    organization by using one of these
  • 00:14:27
    things that is AWS CLI AWS API CFT or
  • 00:14:31
    terraform or if you are not aware of all
  • 00:14:33
    of these things what you can also do is
  • 00:14:35
    you can also use the manual approach
  • 00:14:37
    right as I explained even using the
  • 00:14:39
    manual approach you can create but the
  • 00:14:42
    problem with manual approach is that you
  • 00:14:44
    have to let's say you receive 100
  • 00:14:46
    requests so 100 times you have to log
  • 00:14:48
    into the AWS console and you have to
  • 00:14:50
    create virtual machines one by one that
  • 00:14:52
    is against the pattern of devops because
  • 00:14:55
    you are doing it in a inefficient way in
  • 00:14:58
    devops we always talk and if in devops
  • 00:15:01
    we always learn the efficient ways so
  • 00:15:03
    these are the different processes that
  • 00:15:05
    are available
  • 00:15:06
    so in an interview you can say any of
  • 00:15:09
    these things like let's say somebody
  • 00:15:11
    asks you in an interview how do you uh
  • 00:15:13
    create 10 virtual machines at once or
  • 00:15:15
    what is the automation that you are
  • 00:15:17
    using in your organization for
  • 00:15:18
    infrastructure creation what is a
  • 00:15:20
    virtual machine virtual machine is an
  • 00:15:21
    infrastructure right or ec2 instance is
  • 00:15:23
    an infrastructure so people will ask you
  • 00:15:26
    what is the tool that you are using for
  • 00:15:28
    infrastructure automation now the very
  • 00:15:31
    popular tool that is available in the
  • 00:15:32
    market is terraform but remember as I
  • 00:15:35
    mentioned in our previous classes don't
  • 00:15:37
    do something because that is popular or
  • 00:15:40
    don't do something because it has to be
  • 00:15:43
    done
  • 00:15:43
    always look at your organization what is
  • 00:15:47
    your organization doing let's say your
  • 00:15:48
    organization is completely focused with
  • 00:15:50
    AWS and in future also they only want to
  • 00:15:53
    deal with AWS okay you can use any of
  • 00:15:55
    these things you don't have to
  • 00:15:57
    definitely move to terraform right you
  • 00:15:58
    can either use AWS CLI API or CFT and
  • 00:16:02
    AWS also supports additional things
  • 00:16:04
    sorry I forgot to mention that is AWS
  • 00:16:05
    cdk
  • 00:16:07
    okay that is AWS Cloud development kit
  • 00:16:09
    which is recently introduced so you have
  • 00:16:12
    four different options right either you
  • 00:16:14
    can use CLI API CFT or cdk so personally
  • 00:16:18
    if you ask me if your organization is
  • 00:16:20
    very focused on AWS and you know that
  • 00:16:23
    your vision is AWS like you know next 10
  • 00:16:25
    years or 15 years your organization is
  • 00:16:26
    going to stick with AWS you can use cdk
  • 00:16:29
    over terraform because cdk provides
  • 00:16:31
    Advanced or more uh benefits over
  • 00:16:34
    terraform okay so in an interview you do
  • 00:16:36
    you don't have to always mention that I
  • 00:16:38
    am using terraform in the organization
  • 00:16:40
    no you can say our organization using
  • 00:16:43
    AWS cdk because cdk is very specific to
  • 00:16:47
    AWS and AWS has decided that they have
  • 00:16:51
    their initial support let's say AWS is
  • 00:16:53
    launching a new service
  • 00:16:54
    okay this service is called AWS XYZ so
  • 00:16:58
    the developers at AWS they have to write
  • 00:17:01
    an API for it right similar to ec2 they
  • 00:17:03
    have to write an API for XYZ now once
  • 00:17:06
    they write this API who is going to get
  • 00:17:08
    the first support terraform or cdk
  • 00:17:10
    obviously cdk because cdk is a
  • 00:17:13
    proprietary tool of AWS whereas
  • 00:17:15
    terraform is a
  • 00:17:16
    open source tool which is developed and
  • 00:17:19
    maintained by hashicorp or the other
  • 00:17:21
    community members so to have initial
  • 00:17:23
    support or to have initial access for
  • 00:17:25
    any automations or database cdk is far
  • 00:17:28
    better than terraform
  • 00:17:29
    similarly CLI API or CFT as well so
  • 00:17:33
    always choose your answers wisely and
  • 00:17:36
    whenever you are projecting yourself for
  • 00:17:37
    a devops interview make sure that your
  • 00:17:39
    Basics are and your foundation is clear
  • 00:17:42
    now you might ask me then when is
  • 00:17:44
    terraform used so you know there are
  • 00:17:46
    some organizations or most of the
  • 00:17:48
    organizations these day or these days
  • 00:17:51
    are choosing the hybrid Cloud pattern
  • 00:17:53
    okay what is this pattern called it's
  • 00:17:55
    called hybrid Cloud pattern so what we
  • 00:17:58
    are doing in the hybrid cloud model is
  • 00:18:00
    that they have their virtual machines in
  • 00:18:03
    one Cloud platform they have their other
  • 00:18:05
    resource infrastructure in a different
  • 00:18:07
    Cloud platform either it can be because
  • 00:18:09
    of the efficiency let's say Google Cloud
  • 00:18:11
    platform Google Cloud platform is very
  • 00:18:13
    popular for its Ai and ml stuff okay if
  • 00:18:16
    you are talking about machine learning
  • 00:18:17
    or artificial intelligence Google Cloud
  • 00:18:19
    platform leads or it's a compared to be
  • 00:18:23
    better than these things or you know
  • 00:18:25
    some people prefer kubernetes on Google
  • 00:18:28
    so that's why these days organizations
  • 00:18:30
    are choosing hybrid Cloud Model they
  • 00:18:32
    have their Ai and ml stuff on Google
  • 00:18:34
    they have their other stuff like RDS or
  • 00:18:37
    something on AWS it's a individual
  • 00:18:39
    Choice uh depending upon the
  • 00:18:40
    organization requirements to
  • 00:18:41
    requirements so that's why if you are
  • 00:18:43
    using a hybrid Cloud Model terraform is
  • 00:18:45
    definitely a best fit for you because
  • 00:18:47
    you have to automate infrastructure
  • 00:18:49
    across the different Cloud platforms
  • 00:18:51
    whereas if you are in a single Cloud
  • 00:18:53
    platform and your organization will
  • 00:18:54
    stick to be in a single Cloud platform
  • 00:18:56
    then choose your answer wisely and go
  • 00:18:58
    with either cdk CLI API or if you're on
  • 00:19:01
    Azure you can talk about Azure resource
  • 00:19:03
    manager because those things are pnas or
  • 00:19:05
    they have early access to any resources
  • 00:19:08
    on that cloud platform
  • 00:19:10
    perfect I think now we have talked a lot
  • 00:19:12
    about these things now let's get
  • 00:19:14
    practical right so you need to
  • 00:19:16
    understand how to manage or how to deal
  • 00:19:18
    with these things so before that firstly
  • 00:19:21
    I'll show you how to deal with AWS
  • 00:19:23
    through the UI and once we understand
  • 00:19:25
    that probably we can talk about the
  • 00:19:28
    automation that is using CLI or CFT or
  • 00:19:30
    something and parallel here also show
  • 00:19:32
    you with Microsoft azure
  • 00:19:35
    let me just stop sharing the screen and
  • 00:19:38
    go with a new one
  • 00:19:40
    uh okay
  • 00:19:42
    so how do I do that here if I click on
  • 00:19:45
    share
  • 00:19:48
    document
  • 00:20:07
    perfect
  • 00:20:14
    okay sorry I am still finding my screen
  • 00:20:17
    just keep my moment
  • 00:20:19
    okay perfect so now I'm sharing my
  • 00:20:24
    AWS console screen right let's say you
  • 00:20:26
    don't have access or you are very new to
  • 00:20:28
    cloud and you want to create an account
  • 00:20:30
    with AWS it's a very simple uh practice
  • 00:20:32
    what you have to do is you have to come
  • 00:20:34
    here okay go for sign in dot aws.com
  • 00:20:37
    okay or you can simply click on uh AWS
  • 00:20:41
    console uh just go to your browser and
  • 00:20:43
    say AWS console it will redirect you to
  • 00:20:45
    this page if you have already have an
  • 00:20:47
    account with AWS you can proceed with
  • 00:20:50
    your sign in provide your user mail ID
  • 00:20:52
    or if you don't have what you can do is
  • 00:20:54
    you can come down and you can click on
  • 00:20:56
    create a new AWS account once you click
  • 00:20:58
    on create a new AWS account it would
  • 00:21:00
    just ask you for some questions okay and
  • 00:21:03
    you will be proceeded with creating an
  • 00:21:05
    AWS account so there are no uh ifs and
  • 00:21:08
    buts there like you know you can
  • 00:21:09
    directly follow the step-by-step
  • 00:21:11
    approach and finally you will be asked
  • 00:21:13
    with the card details and once you
  • 00:21:14
    provide the card details it will deduct
  • 00:21:16
    uh if you are in India it will direct
  • 00:21:19
    two rupees INR from your account just to
  • 00:21:21
    validate that you are a authentic user
  • 00:21:24
    and providing a valid card details and
  • 00:21:27
    once you are done with that your AWS
  • 00:21:28
    account will be created now don't worry
  • 00:21:30
    that AWS will not charge you for any
  • 00:21:33
    virtual machines that you are created if
  • 00:21:34
    you are using a free instance I'll also
  • 00:21:37
    show you how to use a free instance
  • 00:21:39
    don't worry about it now let me just
  • 00:21:41
    stop sharing for a moment so that I can
  • 00:21:43
    hide my user details
  • 00:21:46
    stop share
  • 00:21:48
    and let me log in
  • 00:21:55
    okay coming here
  • 00:21:59
    so I have provided my user id uh sorry
  • 00:22:03
    for not sharing the screen but I have to
  • 00:22:04
    enter my password and uh my password
  • 00:22:07
    details are entered now let me see
  • 00:22:12
    let me go back and share my screen
  • 00:22:21
    perfect
  • 00:22:23
    so I hope you are looking at the right
  • 00:22:25
    screen again perfect so now what you do
  • 00:22:28
    is once you are done with it come here
  • 00:22:30
    and search for the services so AWS
  • 00:22:32
    provides you a bunch of services okay
  • 00:22:34
    and you have to Choose Wisely what the
  • 00:22:36
    service that you want to use so in my
  • 00:22:38
    case I am sure that I want to use a AWS
  • 00:22:41
    ec2 service so you can click on the ec2
  • 00:22:43
    service
  • 00:22:45
    and what you will do is you look at the
  • 00:22:49
    instances or the services that are
  • 00:22:51
    available here what you do is you would
  • 00:22:53
    come to the AWS ec2 global view and
  • 00:23:00
    uh perfect let me just go back here and
  • 00:23:03
    what I'll do is I would go to the
  • 00:23:06
    instances and what I'll do is I'll click
  • 00:23:08
    on the launch instance okay so click on
  • 00:23:11
    the launch instance and provide these
  • 00:23:13
    details okay now what you are doing you
  • 00:23:15
    are talking to the AWS uh CL sorry UI
  • 00:23:18
    directly you are not doing any API calls
  • 00:23:22
    or this is not a process of automation
  • 00:23:23
    what you are doing everything is a
  • 00:23:25
    manual process okay so what do you do
  • 00:23:28
    here you would provide the details here
  • 00:23:29
    let's say test okay let me call my AWS
  • 00:23:32
    instance name as test and then you have
  • 00:23:34
    to choose over the wide range of
  • 00:23:37
    operating systems that AWS provides you
  • 00:23:39
    you can use Amazon Linux you can choose
  • 00:23:41
    Ubuntu Windows red hat for a first comer
  • 00:23:44
    or if you are just learning about uh
  • 00:23:46
    devops and everything I would prefer
  • 00:23:48
    Ubuntu and I would recommend you to use
  • 00:23:51
    Ubuntu because Ubuntu is widely used in
  • 00:23:54
    the devops community but you can go with
  • 00:23:56
    any other options as well and after that
  • 00:23:59
    see this is very important choose free
  • 00:24:02
    tire eligible okay because we want to
  • 00:24:04
    try out things and we are not going to
  • 00:24:08
    pay any amount uh to the AWS for the
  • 00:24:10
    instances that we're using so always
  • 00:24:11
    choose the free tire available what is
  • 00:24:13
    the difference between free tire and the
  • 00:24:15
    paid ones so in free tire you get very
  • 00:24:18
    uh restricted amount of resources so
  • 00:24:20
    here if you see I'm only dealing with
  • 00:24:22
    one CPU and 1GB memory but if I am going
  • 00:24:26
    to go to the subscription model or if
  • 00:24:28
    I'm going to pay AWS then I can choose
  • 00:24:31
    larger virtual machines here if you see
  • 00:24:33
    T2 large I'm going I'm getting two CPUs
  • 00:24:35
    and 8GB memory but I am going to be
  • 00:24:37
    charged well if you are using the free
  • 00:24:39
    tire available or free time eligible
  • 00:24:41
    options you'll not be charged by AWS
  • 00:24:43
    then
  • 00:24:45
    after that for the very first time you
  • 00:24:47
    have to create your key value pair with
  • 00:24:49
    AWS what is key value pair so key value
  • 00:24:52
    pair is something that would allow you
  • 00:24:54
    to login to your ec2 instance okay once
  • 00:24:57
    you create your AWS ec2 instance you
  • 00:24:59
    would get the IP address but there has
  • 00:25:01
    to be a password kind of thing to log
  • 00:25:03
    into your virtual machine right so
  • 00:25:04
    that's why click on create new key value
  • 00:25:07
    pair okay let me call it as test key
  • 00:25:09
    value pair or let me say test one one
  • 00:25:12
    one and now
  • 00:25:14
    go with the defaults choose RSA you
  • 00:25:16
    don't have to know about uh you know Ed
  • 00:25:19
    for now this is a different uh you know
  • 00:25:22
    RSA is a kind of thing and Erie is a
  • 00:25:24
    different uh encrypted public and
  • 00:25:26
    private key methodology but for now just
  • 00:25:28
    go with RSA that is default and pem pem
  • 00:25:32
    should be fine for the private key file
  • 00:25:34
    format
  • 00:25:36
    now click on create key value pair that
  • 00:25:39
    would be saved it would be downloaded
  • 00:25:40
    and saved in your local this would be
  • 00:25:42
    very useful to login once your key value
  • 00:25:46
    pair is gone then it is almost
  • 00:25:48
    impossible to log into your ec2 instance
  • 00:25:50
    so make sure you save your key value
  • 00:25:51
    pair
  • 00:25:53
    then you know we are not going to talk
  • 00:25:55
    about any of these things at this point
  • 00:25:57
    of time I am not going to explain you
  • 00:25:59
    what is a security group what are the
  • 00:26:00
    vpcs and all at this point of time
  • 00:26:02
    because today we are just learning about
  • 00:26:04
    installing a virtual machine and uh for
  • 00:26:07
    the beginners who are watching our
  • 00:26:09
    videos I don't want to confuse them by
  • 00:26:12
    explaining about the advanced concepts
  • 00:26:14
    of a virtual machine or compute
  • 00:26:15
    instances and then click on launch
  • 00:26:18
    instance that's it now once you click on
  • 00:26:20
    the launch instance your virtual machine
  • 00:26:22
    is created
  • 00:26:23
    you don't have to do anything else just
  • 00:26:25
    wait for a couple of minutes go back to
  • 00:26:27
    the instant screen your ec2 instance is
  • 00:26:29
    available here okay it would take a
  • 00:26:31
    couple of minutes now while we wait for
  • 00:26:34
    this I would also parallely show you how
  • 00:26:35
    to create instances on Microsoft azure
  • 00:26:38
    you don't have to do anything new or
  • 00:26:40
    anything fancy apart from uh the things
  • 00:26:43
    that we are doing on AWS what you do is
  • 00:26:45
    click on portal.azure.com okay on your
  • 00:26:48
    browser go for portal.azure.com it would
  • 00:26:51
    ask you for sign up and one good thing
  • 00:26:53
    about Microsoft Azure is they have
  • 00:26:55
    inbuilt integration with GitHub okay so
  • 00:26:58
    if you are a user for GitHub user on
  • 00:27:00
    GitHub you already have a GitHub account
  • 00:27:02
    like like I do what I've done is I have
  • 00:27:05
    signed up with GitHub if you see here
  • 00:27:06
    this is a GitHub icon that I'm showing
  • 00:27:08
    here so using GitHub I have logged in it
  • 00:27:10
    would take less than couple of minutes
  • 00:27:12
    for you to log in once you are done with
  • 00:27:15
    it see here I don't I'm not holding any
  • 00:27:17
    uh paid account with Microsoft Azure one
  • 00:27:20
    difference between Azure and AWS here is
  • 00:27:23
    if you're a new player or if you are
  • 00:27:25
    just learning devops you know AWS
  • 00:27:27
    provides you close to one year uh free
  • 00:27:30
    membership on AWS whereas Azure only
  • 00:27:33
    provides you some 30 to 45 days I'm not
  • 00:27:35
    exactly I don't remember exactly but AWS
  • 00:27:38
    provides you longevity so that you can
  • 00:27:40
    play around and try AWS for more time
  • 00:27:43
    Azure you have to buy uh after this one
  • 00:27:46
    month or let's say no I want to create a
  • 00:27:48
    virtual machine with Azure which I'm
  • 00:27:50
    sure you I have to pay money so click on
  • 00:27:53
    create resource okay or there is an
  • 00:27:56
    option directly for virtual machines so
  • 00:27:58
    I personally feel that the Azure user
  • 00:28:00
    interface or user experience is slightly
  • 00:28:03
    better than AWS like click on create
  • 00:28:05
    virtual machine and provide the same
  • 00:28:07
    details that you're going to provide for
  • 00:28:09
    nav I don't hold a free account so if
  • 00:28:12
    you are starting with a free Azure
  • 00:28:13
    account then you just follow the same
  • 00:28:15
    steps click on start I mean I'm not
  • 00:28:18
    going to go with the pay and use I would
  • 00:28:21
    go for start free but I'm already done
  • 00:28:22
    with my free membership so if you if you
  • 00:28:25
    have a free membership then you provide
  • 00:28:27
    the same details that you have done with
  • 00:28:29
    AWS and your virtual machine would be
  • 00:28:31
    created on Azure as well so whether it's
  • 00:28:34
    AWS or Azure the process is the same now
  • 00:28:36
    if you see here our AWS ec2 instance is
  • 00:28:39
    up and running okay once this AWS ec2
  • 00:28:42
    instance is up and running you can
  • 00:28:44
    either log in from the UI or using the
  • 00:28:48
    key value pair you can also log in using
  • 00:28:49
    the
  • 00:28:50
    terminal
  • 00:28:52
    so those things I'll show in the next
  • 00:28:54
    class and I will also show you how to
  • 00:28:56
    automate these things right because we
  • 00:28:57
    should also look at the automation for
  • 00:28:59
    now I just showed you how to create an
  • 00:29:02
    account with AWS and Microsoft Azure how
  • 00:29:04
    to create these resources through the UI
  • 00:29:06
    but if you want to learn how to create
  • 00:29:08
    them how to login into them using the
  • 00:29:11
    automation process wait for my next
  • 00:29:13
    class which would be tomorrow and in
  • 00:29:15
    that video I'll show you how to automate
  • 00:29:18
    the process I hope you watch I mean I
  • 00:29:21
    hope you'll like this video if you like
  • 00:29:23
    the video click on the like button if
  • 00:29:25
    you have any feedback for me good or bad
  • 00:29:27
    please do post that in the comment
  • 00:29:29
    section I would happy to reply to each
  • 00:29:31
    and every comment and finally
  • 00:29:33
    don't forget to subscribe my channel if
  • 00:29:35
    you haven't Abhishek virmala thank you
标签
  • DevOps
  • Virtual Machines
  • AWS
  • Azure
  • Automation
  • EC2
  • CloudFormation
  • Terraform
  • Cloud Providers
  • Hybrid Cloud