Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Implementation Guide 1 Upgrade Local Arsenal 📘 Instruction Summary Refreshes your computer's package list and upgrades installed software to their latest, shiniest versions. 🎯 Why It's Needed A fully patched system keeps the gremlins away and prevents annoying errors when installing new tools. 🏗️ Pillar Connection Operational Excellence — Keeping your digital house clean and ready for action. terminal Copy All Test Commands sudo apt update && sudo apt upgrade -y

💡 Refreshes the package list so you get the latest versions when installing.

2 Install Git, Curl, and Docker 📘 Instruction Summary Installs Git (your code time-machine), Curl (for downloading stuff), and Docker (for running apps in isolated boxes). 🎯 Why It's Needed These three tools are the absolute foundation of modern tech. You'll use them every single day! 🏗️ Pillar Connection Operational Excellence — Equipping yourself with industry-standard tools. terminal Copy All Test Commands sudo apt-get update

sudo apt-get install -y git ca-certificates curl

💡 Installs the "-y" package from the system package manager.

sudo install -m 0755 -d /etc/apt/keyrings

sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc

sudo chmod a+r /etc/apt/keyrings/docker.asc

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo ${UBUNTU_CODENAME:-$VERSION_CODENAME}) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

💡 Prints text to the terminal — also used to write to files with > or >>.

sudo apt-get update

sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

💡 Installs the "-y" package from the system package manager.

docker --version

💡 Prints the installed Docker version to verify it's set up.

3 Introduce Yourself to Git 📘 Instruction Summary Tells Git who you are so it can slap your name on every awesome piece of code you write. 🎯 Why It's Needed Since we just installed Git, it needs to know who's driving! Without this, you can't save (commit) your work. 🏗️ Pillar Connection Security & Auditing — Knowing exactly who made what change. terminal Copy All Test Commands git config --global user.name "Your Name"

💡 Sets Git configuration (user name, email, aliases, etc.).

git config --global user.email "you@example.com"

💡 Sets Git configuration (user name, email, aliases, etc.).

git config --list

💡 Sets Git configuration (user name, email, aliases, etc.).

4 Create a GitHub Repository 📘 Instruction Summary Creates a remote home for your code on GitHub — think of it as your project's cloud backup and portfolio piece. 🎯 Why It's Needed In real DevOps, code lives in a remote repository so the whole team can collaborate, CI/CD pipelines can trigger, and nothing is lost if your laptop catches fire! 🏗️ Pillar Connection Collaboration & Sharing — Every professional project needs a central remote repository. terminal Copy All Test Commands

1. Go to https://github.com and sign in (or create an account if you don't have one)

2. Click the '+' icon in the top-right corner → 'New repository'

3. Name it: devops-lab

4. Leave it PUBLIC, do NOT add a README (we'll push our own code)

5. Click 'Create repository'

6. Copy the HTTPS URL — it will look like: https://github.com/YOUR-USERNAME/devops-lab.git

Create Your First App 📘 Instruction Summary Creates a folder, makes a tiny Node.js app, saves it into Git history, and links it to your GitHub repository. 🎯 Why It's Needed Every epic journey starts with a single line of code. We connect to GitHub early so your work is always backed up and ready for CI/CD! 🏗️ Pillar Connection Operational Excellence — Version controlling everything from minute one. terminal Copy All Test Commands mkdir devops-lab && cd devops-lab

💡 Creates a new directory (folder).

echo 'console.log("Hello, DevOps!");' > app.js

💡 Prints text to the terminal — also used to write to files with > or >>.

git init

💡 Initializes a new Git repository in the current directory.

git branch -M main

💡 Lists, creates, or manages branches.

git add . && git commit -m 'Initial commit'

💡 Stages all changed files for the next commit.

Now connect your local repo to the GitHub repo you created in Mission 1

Replace YOUR-USERNAME with your actual GitHub username

git remote add origin https://github.com/YOUR-USERNAME/devops-lab.git

💡 Stages the specified file(s) for the next commit.

git remote -v

💡 Manages remote repository connections (origin, upstream, etc.).

2 Build the Docker Container 📘 Instruction Summary Writes a recipe (Dockerfile) to package your app, builds it into an image, and runs it! The Dockerfile tells Docker which base image to use, which files to copy in, and which command to run. 🎯 Why It's Needed Containers ensure that if it works on your laptop, it'll work on the production servers without those pesky 'it works on my machine' excuses. 🏗️ Pillar Connection Reliability — Eliminating environment drift with magical immutable boxes. terminal Copy All Test Commands printf 'FROM node:18-alpine\nCOPY app.js .\nCMD ["node","app.js"]\n' > Dockerfile

💡 Prints formatted text — more control than echo (like C's printf).

docker build -t devops-hello .

💡 Builds a Docker image from the Dockerfile in the current directory. The -t flag tags it with a name.

docker run --rm devops-hello

💡 Creates and starts a new container from the specified image. Simulate a Super-Fast Deployment 📘 Instruction Summary Adds a second save point (commit) to simulate shipping a new feature quickly. 🎯 Why It's Needed Deployment Frequency is a key metric. Elite teams deploy multiple times a day instead of once a month! 🏗️ Pillar Connection Speed & Agility — Measuring and supercharging your delivery speed. terminal Copy All Test Commands

Make a quick change and add it to app.js

echo 'v2' >> app.js

💡 Prints text to the terminal — also used to write to files with > or >>.

git add .

💡 Stages all changed files for the next commit.

git commit -m 'feat: bump to v2'

💡 Creates a new commit with all staged changes and the message after -m.

git log --oneline

💡 Shows the commit history. --oneline condenses each commit to one line, --graph shows branches visually. Install Make (if you don't have it) 📘 Instruction Summary Installs the 'make' command-line tool so your system can read and run Makefile instructions. 🎯 Why It's Needed Make is not installed by default on Windows. Without it, the 'make build' shortcut won't work. 🏗️ Pillar Connection Operational Excellence — Setting up the right tools before you start. terminal Copy All Test Commands

Linux users — likely already installed. Verify:

make --version

If missing, install with:

sudo apt-get install -y make

💡 Installs the "-y" package from the system package manager.

2 Write the Automation Script (Makefile) 📘 Instruction Summary Creates a 'Makefile' that defines simple shortcuts (build, run, clean) for our long Docker commands. The tab character before each docker command is critical — Make requires TABS, not spaces. 🎯 Why It's Needed DevOps engineers hate doing the same thing twice. Automation saves time and prevents typos! 🏗️ Pillar Connection Operational Excellence — Automating the boring stuff so you can focus on fun stuff. terminal Copy All Test Commands printf 'build:\n\tdocker build -t devops-hello .\nrun:\n\tdocker run --rm devops-hello\nclean:\n\tdocker rmi devops-hello\n' > Makefile

💡 Prints formatted text — more control than echo (like C's printf).

3 Test Your New Butler 📘 Instruction Summary Executes your newly created shortcuts to build the image, run it, and clean up the mess. 🎯 Why It's Needed Always test your automation locally before letting it loose on real servers. 🏗️ Pillar Connection Reliability — Verifying automation works perfectly. terminal Copy All Test Commands make build

make run

make clean Create a Release Tag 📘 Instruction Summary Commits any remaining work and creates a shiny 'v1.0.0' sticker on your latest commit. 🎯 Why It's Needed Tags mark stable points in time. When a CI/CD pipeline sees a new tag, it knows it's time to automatically deploy to production! 🏗️ Pillar Connection Reliability — Rock-solid, easy-to-find rollback points. terminal Copy All Test Commands git add .

💡 Stages all changed files for the next commit.

git commit -m 'feat: add Makefile automation'

💡 Stages the specified file(s) for the next commit.

git tag -a v1.0.0 -m 'First epic DevOps lab release!'

💡 Creates a tag (label) on a commit — typically used for release versions (v1.0, v2.0).

git log --oneline --decorate

💡 Shows the commit history. --oneline condenses each commit to one line, --graph shows branches visually.

2 Push Everything to GitHub 📘 Instruction Summary Uploads all your local commits and the v1.0.0 tag to your GitHub repository so the world can see your work. 🎯 Why It's Needed Code that only lives on your laptop isn't real DevOps! Pushing to GitHub backs up your work, enables team collaboration, and is the trigger point for CI/CD pipelines in the real world. 🏗️ Pillar Connection Collaboration & Delivery — Shipping code to the remote so pipelines can pick it up. terminal Copy All Test Commands

Push all your commits to GitHub

git push -u origin main

💡 Uploads your local commits to the remote repository.

If you get an error about 'main', your default branch might be called 'master'

git push -u origin master

Push your release tag too

git push origin v1.0.0

💡 Uploads your local commits to the remote repository.

echo ' 🎉 CONGRATULATIONS! v1.0.0 is tagged and pushed to GitHub!'

💡 Prints text to the terminal — also used to write to files with > or >>.

echo ' 🌐 https://github.com/YOUR-USERNAME/devops-lab'

💡 Prints text to the terminal — also used to write to files with > or >>.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages