Get Started with a GitHub Repo & Deploy Some Test Azure Resources
The end goal for this blog series, is to test out Azure Lighthouse and Arc. For Lighthouse, we need two environments; one to manage and one to be managed. If you need help creating a testing subscription, check out the earlier posts in this series:
Part 1 — Azure Subscription Signup
Part 2 — Switch from PowerShell ISE to Visual Studio Code
Part 3 — Get Started with a GitHub Repo (fork, clone, edit & push the repo)
Part 4 — Deploy Some Test Azure Resources & Azure AD Users
Part 5 — Use PowerShell to configure Lighthouse and Manage Resources in Another Subscription
Once you have two environments available, you need some users and infrastructure to manage using Azure Lighthouse. This post will step you through deploying some basic infrastructure using the rudimentary PowerShell scripts I use to populate my test subscriptions. If you have better scripts or want to build on mine please feel free to get in touch!
I repeat, the PowerShell are scripts hacked together to get the job done in the shortest amount of time are are not beautiful at all please do not @ me unless you want to share something better :).
Alternatively, if you’d like a really well developed demo environment take a look at:
- Joshua Waddell’s Azure-demo-environment on GitHub.
or - The Cloud Adoption Framework repo which considers best practice, security, governance and is a fully fleshed out deployment.
It doesn't really matter how you populate the environments, so long as there’s something to manage.
First up, lets fork a test repo
When you want to contribute to or use someone else’s repository, you make a copy of it. This copy is called a fork and is created in your own github namespace.
To fork my basic scripts repo:
- Log into GitHub with your account
- Go to my Basic Azure repo
- Click the “Fork” button in the top right hand corner
- Once that’s done, you’ll have your own copy of the repo that you can do whatever you like with. You should be able to see it at
https://github.com/your-namespace/basic_azure/
. - Now you can clone the repository to your local machine, work on the files, and submit changes back to your original repository.
NB:
To create a copy of a remote repository’s files on your computer, you can either download or clone the repository. If you download it, you cannot sync your copy with the original repository later.To download, browse to the the repo and download manually using the GUI.
Cloning a repository is the same as downloading, except it preserves the Git connection with the remote repository. You can modify the files locally and upload the changes to the remote repository on GitHub.
We want to be able to make changes and and push them to our GitHub repo so we want to clone the repo.
Clone a test repo
- In the git bash shell, CD to wherever you want the code to be downloaded, for eg:
cd c:/your/file/path
- You can make new folders using the
mkdir yourfoldername
command
- Great, lets copy this demo repo down to your machine using the
git clone https://github.com/simone-bennett/DemoAzureLandingZone.git
command
- And just like that, the entire repo (which contains not much atm) is copied to your machine :)