Welcome to the project.
This project is cloud automation with Ansible.
Yes, you're going to automate cloud tasks by using Ansible.
Let's see the scenario and understand when this would be required.
OK, so let's say you have an enormous cloud management team and their job is to deploy set up infrastructure
on the cloud.
So any new project comes in, this team is going to be in charge of setting up the infrastructure,
deploying the stack on the cloud and making all the regular changes as and when required before we implement
any project on Eatables Cloud, viz., VPC.
Right, so this team will be in charge of setting up a VPC on Eatables Cloud to provide the security
and high availability to the project, and also this team is getting a regular request for deployment.
So let's say your project is where you need to set up some VBC than your project.
Be there.
Also, you need to set up some VPC, your project C.
So like that, many such requests, regular requests they get.
Now, as you know, VPC consist of many moving parts, there are so many things when we are setting
up a VPC, you have a subnets, Najid, with Internet Gateways Roundtable, NCCL rules, security group
instances in that last week, IP and so many more things.
And not to mention the Bastiaan host.
It's also called a jump server, mostly this Gemzar or Bastiaan horse I provided.
Or used to have an established connection.
We are instances in private VPC or even our connections, so against is a single point of entry from
a public network into your private network.
Now, if you're doing such a thing, there's always a chance of making a human error, a typographical
error or some configuration misfire.
Because of this or these human errors, you may have a nonfunctional or an exposed VBC which is exposed
publicly on the Internet.
Also, not to mention managing all these things is a time consuming task force.
Is the setup then regular changes?
Part of everything is happening through console or even Seelie.
It's really difficult to track all the changes.
So in order to save our time and track all the changes you need to have configuration management of
VPC, we need to have a completely automated setup so we can avoid human errors.
And any changes we going to do in the VPC will be managed centrally.
So there should be a centralized change management system and we're automating all this will be doing
it through probably some code in Ansible.
We have Playbook's or in YAML format and it's text and we can version controller so we can track who
made the change when the change was made, so we can use Gaiden version control of our code.
So we have infrastructure as a code.
Now these are some quick benefits that I'm talking about, but this really gives many more benefits.
We know for sure adds business value.
But also anything that you automate, especially in cloud, also adds a lot of business value.
So let's see some statistics now.
Now, as per statistics, 70 percent, 71 percent of the organizations who are doing cloud automation
have found they have 10 percent more revenue growth, 84 percent of the companies have said yes, they
have seen increased revenue and also they have lowered their operations cost 81 percent have become
more innovative.
So when you have things automated, you don't need to be doing tasks manually.
You get more time to find more innovative solutions.
And 84 percent said they have become more agile.
And that's what we are looking into.
What really we need processes to be more agile, more quick.
So cloud automation sounds cool, but also it adds a lot of business value.
And that is as for the statistics and numbers don't lie.
OK, let's see what we're going to do, what tools we are going to use in this project.
So we're going to do we're going to use Ansible to automate eatables, VPC set up and also Bastiaan
Horst.
So you have a bunch of Ansible Playbook's that will set up VPC Honorables Cloud and also will have a
Bastion host, which would be used to login.
After that, there will be another ansible project where you will use this VBC set up and deploy an
entire Web application, stack the profile web application stack that you've been setting up manually
so far now will automatically automatically set up that entire stack by using Ansible.
That's in the next project in this project will lay out the infrastructure for it automatically.
So let's make it happen.
So before I show you all the code that we are going to use and we're going to have really a lot of code
in that before I show you that, before we get into that, let's see the architectural design of what
exactly we're going to do.
So join me in the architectural design.
So starting in the architecture, we have, the Playbook's will have some bunch of Playbook's and just
playbooks will be using some variables which are going to define and verify and some uncivil configuration
display, but will be powered with a lot of modules that we are going to use to set up the VBC.
These modules are going to use the World-Famous Python Boto, which will make an API call to our Eatables
Cloud account.
First thing it will do is it is going to set up a VPC, a VPC that will have subnets in two zones.
Will you will be using two zones.
So Zone one will have some subnet zone.
We will have some other subnets.
First to start within the zone, we will have a public subnet enforced zone, second zone will have
one more public subnet.
This public subnet will round the request to Internet gateway by using the round table so they'll have
a round table every subnet and this round table is going to allow the request to Internet gateway and
then the traffic can go on the Internet or can be coming from the Internet.
We'll also have private subunit in both the Zorn's.
One zone will have one private subnet, another zone will have another private subnet, and again,
there will be a round table which is going to route all the request, outgoing request to not get the.
Let's see again, in the full view, so of ABC distributed in two zones, Zone one and zone to one,
public subnet in Zone one, one public subnet in another zone.
Private subnet also will be distributed like that among two zones.
Every subnet will have a routine public subnet without the recourse to Internet gateway and private
subnet without the recourse to not gateway and the not good.
We control the traffic to Internet gateway through the round table of public subnet.
Also, not to mention we'll have a bastion host a jump server, which will be a public subnet so we
can access it from the Internet.
And in that bastion, Horst can have connection to private, easy to instances, instances which are
in private subnet and will be, of course, a security group on the Bastiaan host.
So this entire set up, we're going to do through our playbook's.
So we ran the Playbook Playbook is going to use some modules, some variables, use Python Boto Connect
to establish Clower set up the VPC with four subnets each having round table.
Internet gateway and gateway for public subnet and traffic subnet, respectively, and also finally
a Bastion host, which will be a single point of entry into our VPC from the Internet.
So this is what we are going to do, the log into redevelops account will create an issue to instance
to run our ansible playbook.
And we we're going to select a region which has three zones that's not mandatory.
You can do whatever we're doing in any region we can set up in any region.
But just to follow along the project, you're going to select a region that has three zones.
They're going to install Ansible in that you two instances where we set up, we're going to install
Boto, that is a dependency to do the cloud automation.
We're going to set up an easy to rule for Ansible, so ansible, easy to instanced can connect to all
the eatables services like VPC and all.
Authentication, so we're not going to use access and security, we're going to use rules, which is
much more C4 option, you if you're already on a tablas.
Then we'll create a project director in our instance, you see the instance and we're going to execute
a sample task to create a keeper.
Now, if you have never done cloud automation with Ansible, you're using Ansible to do system automation,
there is a little difference in doing cloud automation.
So while we're doing this task, a simple task or a simple task to create a keypad, you will see the
differences.
Once you get that, then you can follow along or did all the tasks.
We get two variables fine, one will have information, information, one will have Bastiaan host information.
So we're not really going to do static entries in our playbook will fetch that from variable, FYI.
Then we'll write our main playbook, which is to set up the VBC stack, this playbook will set up WBCSD
subnets, Internet Gateway, Roundtable, everything.
And then we are going to write another book, which is going to set up a Bastion host in the public
Sabaneta for BBC with right rules.
We're going to use a site that we will file then and we'll put entries of both the playbooks or we will
finally execute site Wireman, which will in turn execute VPC, set up playbook and Bastian's that a
playbook.
Once we are done setting up our entire stack, we should have this entire week with four subnets round
table, not go to an Internet gateway.
And also the Bastiaan host.
So what are you waiting for?
Let's dive in.