Everything As Code
Spring 2025
1
Outline
2
Outline
3
Version Control Review
Questions like these will definitely�be on the midterm exam
Syncing Across Different Repos
Branches
Suppose you have a branch off of main called Feature-Branch, and suppose one commit has been made to main since you branched.
Redraw the history after a merge commit is used to reconcile the history. What branch should you be on to merge into main? What command would you use?
Suppose you have a branch off of main called Feature-Branch, and suppose one commit has been made to main since you branched.
Redraw the history after a rebase is used to reconcile the history. What branch should you be on to merge into main? What command would you use?
What is the difference between a fast forward merge and a regular merge?
Your answer here…
What are the steps to resolve a merge conflict during a rebase?
<<<<<<< HEAD
[Feature A Code]
=======
[Feature B Code]
>>>>>>> 1a0ffaa (Add feature b)
main.py
Outline
11
Everything As Code
History of Server Management
Virtualization and Containerization
Both are ways of isolating computational environments to run applications, but they work differently “under the hood”:
So much complexity – many services are virtualized all over the place. How do we manage it? Even if you’re not actually maintaining the hardware, you’re still on the hook for the software configuration / maintenance.
Codification of Management Rules
Allows you to version control all the things!
Allows you to formally inspect how things have evolved / changed; Allows you to consistently replicate / rebuild / maintain your infrastructure.
In the next few weeks…
Outline
19
Introduction to Containerization with Docker
Enabled by Linux Kernel technologies:
Both are fundamental technology used in modern container runtimes like Docker and Kubernetes to manage resources for containers.
Why is Docker a Big Deal?
Docker Definitions
Image – a read-only template used to build containers.
Container – A runtime instance of a docker image.
Docker Cheat Sheet: https://docs.docker.com/get-started/docker_cheatsheet.pdf
Docker Definitions (Cont’d)
Volume – provides the ability to connect specific filesystem paths of the container back to the host machine.
Docker Definitions (Cont’d)
Bind Mounts – allow you to mount your source code into the container so that your container can “see” the changes right away.
A few other rules of thumb…
Today’s Activity
Today’s Activity
Open the command prompt and run the following command: �docker run -dp 80:80 docker/getting-started. Then you can open http://localhost in your browser to complete the tutorial.