In the local folder use Git bash and initialize the folder.
git init -b main
Now go ahead and create a README.md file, add and stage the files and commit the changes to prepare to push to the remote repository.
echo "# itseasyasonetwothree" >> README.md
git add README.md
git commit -m "First commit"
Now next time we’ll add our remote repository and push the changes.
Now head over to github.com/new here.
To avoid errors don’t add any files to the project. This can be done later.
Next click create and in the next post we’ll initialize the local directory.
Let’s add source control to a local directory with Github like here.
First download Git from here.
Next launch Git Bash.
Now create a new folder for your project and move into the folder.
Great! Now in the next post we’ll create our Github repository.
First update the container registry for admin enabled.
Now deploy your container. You will find username and password for the registry in the access keys settings.
az container create -g 05lab-rg --name ipcheckcontainer --image xyz.azurecr.io/ipcheck:latest --cpu 1 --memory 1 -l westeurope
Now since it’s automatically started all you need to do is check the logs and you will see the container has collected the ip adress of the container.
az container logs -g 05lab-rg -n automaticrunipcheckcontainer
Wow! Awesome work!
In this part we will create an Azure Container Registry.
az acr create --name acraz204lab05 --resource-group 05lab-rg --sku Basic -l westeurope
az acr build --registry acraz204lab05 --image ipcheck:latest
You can now check the respository of the container registry and verify that your docker image is available.
az acr repository show --name acraz204lab05 --image ipcheck
Now in the final post we will deploy a container from our image.
Launch the cloudshell from the Azure Portal and create a folder and a dotnet console application.
Create a new console project
dotnet new console
Create a new file called Dockerfile and launch code inside the cloudshell.
Copy the sourcecode from the learn excercise and run the application to verify that the ipaddress is found.
And finally copy the sourcecode to the Dockerfile, save and close.
Now in the next part we will create an Azure container registry and publish our ipcheck console application!
In Lab 05 here we will deploy Docker containers into Azure Container Registry.
Connect to Azure and create a resource group and the VM.
az group create --location westeurope -n 05lab-rg
az vm create --name quickvm -g 05lab-rg --image Debian --admin-username xyz --admin-password xyz
Now check the ipadress and note it.
az vm list-ip-addresses
Now let’s connect using SSH.
There you go! You just connected to your very own debian vm in Azure!
In the next post we’ll create a docker container.
Head over to Azure Storage Explorer here and download and install.
Open and connect to your storage account and queue and add a message. Make sure you don’t encode in base64.
Run your dotnet application and watch it collect your message in your very own Azure Storage Queue!
You’ve just created a storage account, message queue and written a C# program that uses the resources. Great work!
Now go ahead and delete the storage account and the resource group if you don’t want them anymore.
az storage account delete -n lab11stgacc -g lab11-rg
az group delete -g lab11-rg