Hello and welcome to the next project in our Dwarf's project, CCDs, the name of this project is Continuous
Delivery with Jenkins' and Ansible.
So in this project, we are going to combine the power of Jenkins continuous integration server with
Ansible, which is a configuration management tool or in general and automation tool.
OK, so this is the scenario, let's say there is agile software development team and they're doing
a continuous development of the product, so they're going to make continuous code changes.
This code, this code needs to be packaged and needs to be deployed to servers for testing.
If the process is continuous, if the candidates could commit to continuously deploy artifact to servers
for testing, if all the test checks out, fine, then we can finally deploy to production.
So after the deployment, the software testing and other kinds of testing will be conducted.
And the test reports will be evaluated and the approval will be given to promote it to production or
not.
And this is going to be a process of deployment test, deploy test because you'll be having different
environments.
Dev Kuai, unity, production, staging.
So if you have like these multiple environments before even you deploy to production, then you will
understand there is continuous deployment.
There is continuous called comet.
When there is continuous deployment, there's also continuous dependency on the operations team, so
different, different teams will be there or different different product owners from different projects
will be dependent on off steam for the regular deployments.
And every project will have Dev Kuai staging production multiple environments.
So it'll be continuous deployment requests that will be sent to the operations team.
So this is the scenario.
Let's see the problem.
If the code deployment process is manual, it's going to take a lot of time to promote your changes
to production because there are multiple environments where the deployment needs to be done.
If it's manual, then it's going to take a lot of time.
Doesn't matter how fast you make the code change, still, the deployment will be slow.
And in this process of deployment, there will be ticketing systems, there'll be approvals, assignments,
there'll be different owners for different environments.
Developer owns the environment.
Kuwait wants to keep the environments and the software testers and productions are owned by different
team monitoring team site reliability engineers.
So there'll be too many, you know, ticketing assignment and approvals going here and there, which
actually is problematic in an agile process, the too much dependencies on operations and building the
least team for the deployment.
The solution will be to force that continuous integration process and continuous delivery process so
for every code, commit, build, test, deploy, then test and this happens for every comit and the
deployment process should be automated.
So deployment on different different environments and different environments have different owners.
So you can also notify them if something fails or process successfully, like a developer gets notifications
off protesters gets notification.
So there'll be multiple teams.
And also.
There'll be multiple tools, you need to integrate all the tools, all the automation tools together.
So could this integration tool integrated with repositories, integrated with automation tools, with
configuration management tools, so when you do these integrations, it will remove human intervention.
Because just writing a script to automate a task is just not enough.
So let's say you're done, are you deployed the artifact with the server, then you need to communicate
this to software testing team.
They'll conduct their software test execution and they'll be again in this process also to get assignments
and feedback and approvals.
So in order to get over from this problem, you need to integrate tools together.
And whenever there is a problem bug in the code or in the deployment process, you start the process
automatically stops and you fix the problem and then the process repeats again.
And this indeed automated process is called US continuous delivery process and in continuous delivery,
try to integrate all the tools that that are used in the release management process.
So in this project, we are going to see a variety of tools integrated together.
So let's see the list of the tools now.
So we're going to use Jenkins' for continuous integration, and Jenkins will be integrated with all
the tools that will be integrated with GIT.
Where our source code is kept and also will be MAVEN, which will be are built to check style, which
will be doing a code analysis.
For notification will be using Slack to store our software artifact, we'll be using Nexxus on our software
repository and we use it for two purposes.
When the MAVEN needs dependency, the dependency will be downloaded from Nexus type repository.
Also, when we generate the artifacts going to storage back to Nexus or type repository.
For good analysis, we're going to use a Sunako observer, so in CubeSat, that will provide us a good
dashboard and also quality gates and also different kinds of rules that we can set on them.
And also, we are going to integrate it with Ansible, so Jenkins will have integration also with the
Ansible deployment.
We're going to do in this project with Ansible.
Selenium, we're going to use for a software testing which will be running on Windows Server.
And Selenium Cassard will get executed or will test really Apache Tomcats over an Apache Dom Cazador
application will be Holstege will be also connected to a database server and all the setup we're going
to do it do on EWR.
So we're going to use eatables to instances as a virtual machines.
OK, so these are all the tools and technologies that we're going to integrate together.
While doing this project, keep our objective on our mind, we have to do deployment automation, it's
a complete end to end automation of delivery.
So if anything happens, we can even repair things very quickly.
If something breaks, we can isolate, we can find the problem.
Writing gets the notification in the meantime, to repair is really, really becomes short here.
When you have a complete automated release cycle.
Then any request that comes from the user, any go change, any bug fix, anything can be done very
quickly.
So it makes a code change automatically, the entire pipeline triggers and do the complete delivery
and testing it and no human intervention.
So nobody gets in or not.
Many people get involved while the process is happening.
So it's going to be less disruptive.
All right, let's achieve this goal, but before we do that, we are going to see architecture of continuous
delivery pipeline.
OK, so developers are going to make regular code changes as we are talking in an agile development
process and they make the code change the commit to the local git repository, and then that will be
synched with the remote repository.
So we are going to use GitHub.
Our source code is in GitHub so they know the new code is changed.
Whenever there's a comment on GitHub, Jenkins will detect that automatically and fetch all the changes.
And then it's going to do a test, it's going to do unit test, and whether it's based on whether it's
passed or fail, the notification will be sent.
If it passes, it goes to the next level.
The next level will have good analysis.
So we are going to use a style and sonar cube scanner.
These tools are going to scan the code and a report will be generated and will be uploaded to Soknacki
Observer Sunit CubeSat or will compare it with its quality gates.
If you pass the call to get.
The job continues, the next job gets triggered if it's failed and a. feel notification will be sent
and the pipeline stops.
But if it's a success, it goes to the next level where maybe, again, we going to build the software
this time is going to build the software in code.
Testing maven is going to do unit test here and he's going to build the artifact.
And when it builds the artifact, it needs some dependancy.
Those dependancy will be downloaded from Nexxus Repository.
So on Nexxus, we're going to create MAVEN Repository One central repository so all the dependancy will
be downloaded.
When the build process is happening.
If this fails, failure notification is sent by Polestar, but if this passes, the packaging of the
artifact will be done and the artifact will be uploaded to Nexxus Repository.
So now you'll have a versioned artifact gone through unit test and code analysis.
If this is all good.
Then our ansible will get kicked in, the job of Ansible will be to deploy the artifact, download the
artifact from Nexus and deploy to staging server.
And while Ansible is doing that, it will also make sure the right packages are installed, the right
services are running.
The configurations are correct.
So we can also make sure this all this happens along with the deployment process.
Also, one more thing.
While the deployment is happening and something feels Ansible will be put, an intel will put the kind
of intelligence that in or it can roll back to the previous state.
So it's all we can do to roll back.
And yes, so all the things we can do with Ansible, that's why doing deployment with Ansible will be
much more convenient.
So once Ansible is done by checking everything and deploying to the staging server, then our software
test can get executed and do the software testing on the staging environment.
They're staging you all the environments.
And then if we get the approval, then we can use Ansible to deploy the artifact to production server
as well.
And this can be automatic without approval.
It's pre-approved or it can be with approval also.
In any case, you have a complete automated pipeline.
So this is the entire floor.
Now let's see the Flarf execution, how are we going to execute this entire project, interlocutory
account account we create a login keeper, will create a security group for Jenkins Nexxus and so on.
The server then will launch these three pseudosciences with user data.
Jenkinson Tacuba Nexus Server then will conduct Jenkins post installation steps Nexxus Repository.
We are going to set up three Nexxus repositories for MAVEN.
Next, we're going to cube a post installation steps.
Then we'll set up jobs in Jenkins', forced a job, then we're going to set up a notification reintegrates
integrate slack with Jenkins'.
Will get a job to execute textile core analysis, then will integrate Jenkins with Sunako server.
Will create a job that will a sonar scanning and upload the result to Sonic Observer.
Then the next job, which is going to upload the artifact to Nexis repository.
And then we can connect all these jobs together, and that will give us a continuous integration pipeline.
And we'll set up an automatic trigger, so any changes pipeline will get triggered automatically, will
tested by making a code change from get.
Next, we are going to continue with the continuous delivery pipeline.
Now will give security group four of Windows Server from where we're going to run our selenium to suit.
Security group for Tomcat and Conservers will create tomcatting back in server on Easy two for staging
post back in Seattle will set up, but Tom Carceral will get provisioned automatically through Ansible
Playbook's.
So we're going to next create a job which is going to run our ansible playbook and these playbooks will
force to validate if you have Tomcat, JDK, all the dependency on configuration.
Right.
And then it will deploy artifact to staging environment by using ansible playbooks.
So there'll be two playbooks in the play over here.
First will validate whether downcourt setup is up and write.
The next playbook will fetch the artifact from Nexus and deploy to Tomcat server while it's doing that
display, which will also make sure if there is any failure, it will roll back to the previous version
of the artifact.
Then we'll add Windows not as a slave to Jenkins from where we're going to run our selenium to suit.
And we create a job which will run selenium scripts from Windows Server.
So after the deployment on staging environment, we would like to execute our scripts.
Once the script checks out fine, everything is good, then Wildeblood artifact the production server
again by using Ansible from Jenkins'.
So by now, we already had a continuous integration partner and we had no new jobs, we're going to
integrate all these new jobs to our pipeline.
And then again, we tested by committing a code to GitHub.
And then finally, we'll clean up everything.
So what are we waiting for?
Let's get started.
If you've already done this integration project and you have everything ready, you can do is integration
pipeline.
Then you can jump to the second half of this project in full stop, we will be setting up conduce integration
pipeline.
If you already have gone through the project and if you already have the setup, you can directly jump
to the second half and extend the pipeline and make it continuous delivery.
By integrating Ansible and software suit together.