Getting Started With DevOps, Part 2
Tags: documentation, devops, continuousdelivery, deployment
Published: 2018-08-01 12:46:16

---
title: Getting Started With DevOps, Part 2
published: true
tags: documentation,devops,continuous-delivery,deployment
canonical_url: 
---

This is a continuation of [Getting Started With DevOps, Part 1](https://medium.com/@sublimegeek/getting-started-with-devops-f10a71e26620).

![](https://cdn-images-1.medium.com/max/1024/1*f71hX15gxi3I1oiFZjMDBg.jpeg)<figcaption>Sometimes, it’s a simple as that. Photo by <a href="https://unsplash.com/photos/cdwpR1AUn8o?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jessica Lewis</a> on <a href="https://unsplash.com/search/photos/motivational?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>.</figcaption>

### Documentation

Let’s air out all of our dirty laundry. I know, just _reading_ the word makes some people cringe. Documentation is not for the doers.

> Why should I document how to do something if I already know how to do it?

Documentation is the fingerprints of those that came before you. Sure, _one_ type of documentation is bootstrapping a development environment, but truthfully, documentation happens in many forms.

If you remember in my [first part](https://medium.com/@sublimegeek/getting-started-with-devops-f10a71e26620), I point out that the more thought you take out of development, the more your brain can focus on other, more important, stuff.

Here are some example forms of documentation:

- How to setup development environment
- Error logs and anything else that makes the application sing
- Restful API endpoint structure, parameters, and response objects
- Generally anything anyone would benefit from knowing

If you look at it this way, you (and your team) only know what you document.

Have a new guy/girl? Have them test your documentation. If they find any workarounds or little nuances that go along with developer setup, it’s their job to update the documentation.

### Single Source of Truth, Decentralized

I love the [MarkDown](https://guides.github.com/features/mastering-markdown/) language. It’s easy to use. I don’t have to take my hands off of the keyboard, and it’s human-readable even in raw form.

Best of all, because it’s plaintext…guess what manages plain text _magically?_ You guessed it, Git does!

That’s right, [gumshoes](https://en.wikipedia.org/wiki/Gumshoe)! Sure, you can store your documentation in a Wiki, but where is a place that _all_ devs **should** have access to? The source code!

What I like about this method is that your documentation is maintained _with_ the source code. For a private team, this is very useful and very easy to maintain. It will always live with the source code no matter what tool you use to host your code (Github, Bitbucket, etc).

For public projects, it still makes sense to have a Wiki or some form of other hosted documentation; however, make sure other aspects of the project are also documented.

### When You Build It

It’s one thing to build it on your machine, _and you should,_ but you should also use a build tool like Jenkins, Travis CI, or Circle CI.

The main reason? It’s clean. It doesn’t have all of the older versions of 80 NPM packages you downloaded to try.

In case you’re wondering, CI stands for Continuous Integration. It’s the first half of CI/CD. The second have is Continuous Delivery.

CI, to me, is where it all comes together. Your CI tool should be a well-tuned machine. It should stand up your development environment in minutes, run your tests, build your application, tag the version, and deploy the artifact to a repository.

Setting up your CI tool should mimic the documentation you wrote to get your development environment going. What tools did you have to install on the command line? What permissions did you need to set and forget on files and folders?

All of those one-off things you did months ago and forgot about after you’re environment has been setup? You need those.

Your CI tool, if done right, should literally enable you to pull down your repository without setting up your environment. Yes, you should be able to clone your repo, write code in a basic editor like Notepad, and push your code. Your CI should handle the rest.

Realistically, that implies a lot of risk writing code in the aforementioned manner, but if you have the proper checks and balances in play and build is successful, ship that code!

<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F143vPc6b08locw%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Ffail-code-boat-143vPc6b08locw&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F143vPc6b08locw%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="329" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ce89463e75d7ea78029937e2b6f94f5/href">https://medium.com/media/9ce89463e75d7ea78029937e2b6f94f5/href</a></iframe>

Let’s recap.

Your CI tool should

- stand up your development environment
- lint your code
- run your unit tests, save your integration tests for later
- output a code coverage report
- tag a release
- deploy the release artifact to a repository

Once you have your release artifact in your repository, let’s deploy it to a test environment and…test it some more! It’s at this point we could run our integration tests since we’re in a live environment. You could also do some manual testing and basic smoke tests.

### Polish It Pretty

It’s high-time for your build to graduate! If you have a testing environment, you should also have an environment for QA. Builds here should be polished and pretty so QA can do their thing. This is where automation can happen for end-2-end testing and exploratory testing can happen with humans.

Once you have your pretty polished package and all of your committed features match the accepted criteria, it’s time to send your build off to Production.

### Thank You

By now, you should have an idea about getting your application into the hands of another human (or machine) who didn’t compose it to use it.

Beyond this, you get into the realm of application lifecycle and how to manage your baby in the real world with real loads and network shenanigans.

I hope you’ve enjoyed this short series.

* * *