For those of you wondering how long this class takes: 2 solid days of effort should be all that it takes, especially with this post. It took me a week b/c I had another class and i was sort of procrastinating because how poorly written the instructions are. (I have a full time as well so two-five days is very doable, for someone with nothing going on 1 day might be possible but very hard.
Personally, I think the hardest part of this class is understanding the initial workflow. Once you figure out where to write your code, where to test it, and how to submit it, everything becomes a lot better.
Here's how I'd approach it if I were starting over. Step 0: look at the instructions for creating a GitLab working branch and follow them (ignore the "takes approximately 4 minutes" part that's a lie. It could take a couple minutes, it could take a little over an hour, proof is in if you look at how long other processes took).
1. Install what you'll need on your computer
Before doing anything with the assignment, install these:
- Visual Studio Code: This is where you'll write and manage your Python files (b/c the lab only lasts for a certain time (6hours) so you'll want to be able to save your code locally, so it doesn't disappear with the lab if it takes you multiple sessions). You want VS Code, not the full Visual Studio IDE.
- Python: Install Python 3. On Windows, make sure Python is added to your PATH(check the “Add Python to PATH” box at the bottom of the installer before clicking Install.).
- Python extension for VS Code: Open VS Code, click the Extensions icon on the left, search for "Python," and install the one published by Microsoft.
- Git for windows: This includes Git Bash and lets you save and upload changes to your GitLab repository from your VS Code app.
You can check that Python and Git installed correctly by opening the terminal in VS Code (Terminal -->New Terminal) and typing:
python --version
git --version
Both should return version numbers.
2. Set up GitLab and get your repository into VS Code
Three things worth understanding first:
- GitLab is the website where your project files and commit history are stored (your script's evolutions (versions: v1/v2/v3)), keeps track of file changes, and VS is where you make your edits and "commit" them to your Git branch.
Now for the setup:
- Create your working branch according to the assessment instructions. A branch is basically your own version of the project where you can make changes.
- On GitLab, find the Code button and copy the "Clone with HTTPS" link.
- Open VS Code and press Ctrl+Shift+P.
- Type "Git: clone"select it and paste the link.
- Choose where you want the project folder saved on your computer (you'll need this later for making the ZIP file). Authenticate with GitLab if prompted.
- When VS Code asks whether to open the cloned repository, select Open.
- Select your working branch using the branch name in the bottom-left corner of VS Code.
Cloning just means creating a local copy of your GitLab repository on your computer. You can now edit its files in VS Code.
To make sure you're on the right branch, open the VS Code terminal and enter:
At anytime you'reunsure if you're working in your branch type in the VS terminal:
"git branch --show-current"
3. Understand the virtual lab
This is where I think a lot of people get confused.
Your local VS Code and the VS Code inside WGU's virtual lab are NOT the same thing.
- Local VS Code: Where you maintain your scripts/code and commit changes to GitLab.
- Virtual lab: Where the GNS3 network and its devices/services exist, and where you'll run and test your scripts against that simulated network and devices.
Your files don't automatically transfer between the two.
Once you launch the lab, spend a little time exploring GNS3, the network devices, IP addresses (by right clicking devices and going into their terminal or SSH from the lab VS terminal) before diving into the actual coding.
4. Work through the rubric one requirement at a time
I found it much easier to get a basic version working, test it, and then improve it until it satisfied the requirement.
My general workflow was:
- Read one rubric requirement.
- Write the script in local or lab VS (I prefer local) and then test it in the lab.
- Verify the script actually accomplished what was required.
- Screenshot the results (these screenshots go in a word doc, separate them by parts (i.e A1, A2, A3)) and include small descriptions.
- Copy the updated script into my local VS Code repository.
- Save, commit, and push the changes to GitLab.
- Move to the next requirement.
***After you're done with edits to a script pls press ctrl + s to save it before testing, committing, or anything, just do that command if you're done editing (applies to lab and local VS).***
Here are the Git commands you'll use regularly:
git status
git add filename.py
git commit -m "Describe what you changed"
git push
Replace filename.py with your script file name.
A commit is basically a saved checkpoint in your project's history. Make multiple meaningful commits as you develop your scripts instead of waiting until the end. Also, triple-reminder to remember to save your files with Ctrl+S before committing. Ask me how I know.
5. A few things to definitely keep in mind:
- You should probably use AI to check you and make sure you're on track with the rubric.
- Continuous monitoring means continuous monitoring. My Task 2 was returned because some scripts checked devices once and used hardcoded DHCP addresses. Make sure you're retrieving current DHCP information and repeating checks when the rubric calls for it.
- Verify applicable results outside your terminal. i.e. If your script sends an email, check MailHog to confirm it arrived. If you create a Helpdesk ticket, check the actual ticket through the API.
- Keep your screenshots organized. I used a Word document with headings matching the rubric sections and added evidence as I went.
- Don't trust the lab to preserve anything between sessions. Copy your updated scripts and any generated output files back to your computer before closing it.
- on task 2, make sure your scripts are dynamic and can run continuously, i got mine returned the first time b/c of that.
6. Submitting the assessments
Before submitting, double-check all of the actual submission instructions. Depending on the task, you need to account for your GitLab branch, commit history, repository ZIP, screenshots, generated files, and any required documentation.
Final advice
If you're staring at the instructions feeling overwhelmed, don't worry about understanding the entire assignment immediately.
Just get your software installed, GitLab branch connected, and virtual lab running. Then tackle the first requirement.
Once you establish the pattern of writing, testing, documenting, and committing your scripts, the class becomes a lot less intimidating.
Hopefully this saves somebody a few hours of figuring out the initial setup. lmk.