- [Instructor] Continuous integration is, at its core,
connecting things together.
Tying the pieces of your environment so that
business processes just flow from all the way
from code commit to running on your customers computers
or providing some useful service.
And it generally begins with checking in some source code.
Of course, you have a place to check in the source code.
And that's really the start of your
continuous integration path.
It contains the code and preferably, also the Dockerfiles
that are used to define the environment for that code.
This helps you keep track of which piece of code
needs which dependencies and ties them together.
I'm a big fan of just taking the Dockerfiles
and putting them in the group of the repository
that they build for.
Also, as I mentioned earlier, it's really helpful
if you use the Git hash as the tag on an image
so you could always tell which code was used
to build that image.
And of course, GitHub provides a highly popular
place to store your Git repos.
And it also, most importantly, provides web hooks
that you can use to tie your Git changes
into the rest of your system and trigger the pipe
when code changes.
It also provides API's that you can use to monitor
the status of your build and keep track of whether a build
has started, finished, been aborted, which can be
extremely useful building your pipelines down the line.
GitHub also provides options to store and manage
the security tokens, such as SSH keys
used in the deployment process.
And Jenkins is an excellent and extremely solid option
for managing your deployment process.
It's been around a long time, lots of people use it.
There are prettier, newer options, but there's a good chance
that many of you already have Jenkins running in
your environment and it's already part of your daily lives.
Jenkins coordinates your build process.
It responds to new code, builds the images for it,
and then starts the rest of the process.
It runs the tests, triggers the deployers,
and eventually pushes it to production.
And on top of all that, it gives us a decent user interface
to make sense of it all.
There are a lot of other options besides Jenkins.
Travis and Circle CI both provide extremely popular
build services, and Amazon Web Services offers the
whole spectrum from do it yourself to fully canned.
They'll host registries of you, run containers
on instances you rent, they also offer some pre-canned
continuous integration pipelines all set up
and ready to go as long as your project fits
some predefined criteria.
Some of these include CodeCommit, which stores Git repos,
CodeBuild that will coordinate the deployment process,
CodeDeploy which configures instances and helps build
your infrastructure, CloudFormation which is
super important, helps tie all of your AWS resources
together into manageable chunks that can be deployed,
and most importantly, cleaned up together.
And then CodePipeline present a pretty user interface
on top of all of this.
And of course, let's not forget,
running our Docker containers.
As we mentioned, Amazon offers hosting for both
Docker images and containers, as well as Google
provides Kubernetes Engine and Compute Engine
for running your images on machines that you rent.
And of course, there are many, many others.
I'm sorry if I forgot your favorite moniker.
As far as hosting your Docker registry,
the same options generally apply.
There's Amazon with ECR, which is a solid choice
if your within the Amazon ecosystem.
Google hosting is a solid choice
if your within the Google ecosystem.
And let's not forget the people who
brought us Docker to begin with.
A large portion of their business is hosting registries
for people, and they offer some solid on-premise solutions
for places where cloud-based environments are not suitable.
And of course, there are ancillary enterprise build tools.
An important one is Nexus, which is often available
within an enterprise for storing build artifacts,
and it includes a built in Docker registry
that many people already have running.
So if you're within a large enterprise,
you might want to look into that and see if you
already have a great option available to you.
And of course, there are many other databases
and data set and data storage engines
and a whole plethora of monitoring tools,
such as AWS CloudTrail that can be used to help
keep track of your Docker environments,
what's running where and help you keep an eye on things.