TTT - Interns DevOpsin'
Director's cut of talk - REQUIRED VIEWING
Your computer (windows/mac/linux) requires the following:
- Visual Studio Code (with terminal)
- Web Browser
- GitHub repo forked (you need to run actions, your fork required)
- Azure Account (to create resources for deployment)
- Hugo
Prep for session:
-
ensure any existing old versions linked to your fork are deleted.
- ensure your fork does not have
.github\workflows
files (this will cause a conflict)
- ensure your fork does not have
-
Desktop setup should be similar to the following:
- LEFT on monitor - browser
- Open fork of repo in tab
- Open Azure portal in tab
- RIGHT on monitor - VSCODE
- Have fork cloned locally and opened in this
- have terminal open and in the hugo directory
- LEFT on monitor - browser
-
DEMO 1 -
- You're just showing the code and the minimal of how hugo works
- OPEN GITHUB REPO: https://github.com/jaydestro/twtintern
- Show them them config.yaml – explain that this is how the site is built using hugo and a theme
- Open VSCODE – show directory structure
- explain Hugo is a cli tool, open source, go, can be installed anywhere
- Show in terminal – hugo binary – show a quick build (run
hugo
in terminal in root directory of repo fork) - – explain it renders the markdown into html/css/javascript – go back to deck - continue presentation.
-
DEMO 2 -
- Open Browser – Open Portal – Search for Static Web Applications in search at top
- Click "+" and create new SWA
- create new resource group, just explain minimal what it is
- create site name, example twtinterns2020 - explain it's not hostname - just logical name
- Select region, EAST US 2
- explain free due to preview
- click sign in with github (Make sure you auth your session for GitHub's integration at least once before to save time.)
- select org, select repo select branch, click build/next
- enter
/
for app location - REMOVE details from API location
- enter
public
in artifact location - click review and create – explain ARM will validate our request for this infrastructure (make sure everything we selected is valid) click create
- Go to newly created SWA Show URL SHOW WORKFLOW - - DESCRIBE WHAT’S IN YAML
- CLICK GITHUB ACTION RUNS, CLICK BUILD SHOW BUILD AND DEPLOY – EXPLAIN GITHUB ACTIONS STEPS – GO BACK TO PORTAL – SHOW OTHER CUSTOMIZING OPTIONS – OPEN WEBSITE FROM URL – SHOW WEBSITE.
-
DEMO THREE
- open vscode
git pull
in terminal to update the repo with the new github workflow file.- go to
content/news.md
- Copy and paste a new "Loren Ipsum" block
- Save file and then run
hugo
in root of repo - Just commit change to master - explain typical workflow includes branch/PR
- go to actions, show triggered build
- return to deck, finish session.