QwikLabs Archives - ISbyR https://isbyr.com/tag/qwiklabs/ Infrequent Smarts by Reshetnikov Wed, 23 Feb 2022 01:06:09 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 Completing the GCP Essentials quest on my daily commute https://isbyr.com/completing-gcp-essentials-quest-daily-commute/ https://isbyr.com/completing-gcp-essentials-quest-daily-commute/#respond Fri, 09 Mar 2018 05:02:05 +0000 http://isbyr.com/?p=263 Everyone attending the Google Cloud OnBoard in Sydney.had got an opportunity to get the GCP Essentials badge by completing a QwikLabs quest for free.  I don’t have much time during the day or evening when at home, so I’ve decided I’ll complete the GCP Essentials quest on my daily commute to work. The Challenge The part … Continue reading Completing the GCP Essentials quest on my daily commute

The post Completing the GCP Essentials quest on my daily commute appeared first on ISbyR.

]]>
Everyone attending the Google Cloud OnBoard in Sydney.had got an opportunity to get the GCP Essentials badge by completing a QwikLabs quest for free.  I don’t have much time during the day or evening when at home, so I’ve decided I’ll complete the GCP Essentials quest on my daily commute to work.

The Challenge

The part of daily commute when I can actually sit and work is about  30 minutes each way and goes through areas with quite a patchy network, so I had a ping -t 8.8.8.8  constantly running to understand whether the  delay that I am getting is from Cloud Shell or Console doing any actual work or from my connectivity to the network.

Patchy Network While doing the GCP Essentials labs

I kind of lied – I did not complete all of the labs on the bus/train.

I did the first lab “Creating a Virtual Machine” at home as I didn’t know the format of the labs and whether the QwikLabs estimated duration is precise.  I also did the “Hello Node Kubernetes” at home as the estimated time was 60 minutes and I am totally new to Kubernetes. The rest of them as well as the associated posts were actually done on the daily commute.

The Journey

The quest consist of 7 or 8 (if you want to do the first lab on once for Linux and once for Windows) labs

Each lab you start will create you a temporary GCP account that you can login with to the Cloud Console and Shell, where you will spend most of the time creating and using different GCP resources. It suggested by QwikLabs to run the labs in Incognito mode, and after a few that’s how my login screen looked like 🙂

The labs are very detailed and are easy to follow. I did have a few things I got stuck with. I am not sure whether I missed something in the instructions or the labs are not up-to-date.

I’ve decided to put my “workarounds” as a separate posts for my own sake as well as for the sake of others who might have similar experience

Also wanted to mention the guys at QwikLabs support. They are very responsive and nice. For some reason when I tried to start the last lab (Set Up Network and HTTP Load Balancers) it became non free and requested me for 7 credits. I’ve emailed them and teh support team sorted everything out pretty quickly.

The Bumps Along The Way

Creating a Virtual Machine – I got stuck on 10/15 points

Compute Engine: Qwik Start – Windows – just a few tips about choosing the right image for the VM as well as what to look for in the logs while you are waiting to be able to RDP to the machine

Creating a Persistent Disk – I decided to “extend” the lab a little bit by adding a file into the persistent disk, blowing away the machine, reattaching the disk to a new machine  and verifying the file is still there

Hello Node Kubernetes – explains how to get the token required  to access the Kubernetes Dashboard

The Finish Line

All the labs are complete and I can wear my “GCP Essentials” badge with honor!

All GCP Essentials labs complete

The post Completing the GCP Essentials quest on my daily commute appeared first on ISbyR.

]]>
https://isbyr.com/completing-gcp-essentials-quest-daily-commute/feed/ 0
Qwiklabs – GCP Essentials – Creating a Persistent Disk – Extending the lab https://isbyr.com/qwiklabs-gcp-essentials-creating-a-persistent-disk-extending-the-lab/ https://isbyr.com/qwiklabs-gcp-essentials-creating-a-persistent-disk-extending-the-lab/#respond Sun, 04 Mar 2018 19:24:19 +0000 http://isbyr.com/?p=253 I really enjoyed the Qwiklabs – GCP Essentials – Creating a Persistent Disk lab, but I think Qwiklabs could extend the lab a bit further by showing how the disk is persistent by blowing  away a VM, starting a new one and reattaching the disk. So I decided to try it. You can follow the steps … Continue reading Qwiklabs – GCP Essentials – Creating a Persistent Disk – Extending the lab

The post Qwiklabs – GCP Essentials – Creating a Persistent Disk – Extending the lab appeared first on ISbyR.

]]>
I really enjoyed the Qwiklabs – GCP Essentials – Creating a Persistent Disk lab, but I think Qwiklabs could extend the lab a bit further by showing how the disk is persistent by blowing  away a VM, starting a new one and reattaching the disk. So I decided to try it. You can follow the steps below  to do just that.

Start here after you’ve finished the “Creating a Persistent Disk” lab.

Let’s create a new folder on our  persistent disk. Run mkdir /mnt/mydisk   (while still SSH-ing to the VM)

Now add a file there with some text vi /mnt/mydisk/tmp/hello.txt

Press i  to switch to edit mode and type in some text (It was “Hi There!” in my case) then follow this sequence to save Esc : wq

It’s time to say goodbye to your VM and delete it.

In the Cloud Shell execute gcloud compute instances delete gcelab –zone=us-central1-c   and you will see something similar to the below

The following instances will be deleted. Any attached disks configured
 to be auto-deleted will be deleted unless they are attached to any
other instances or the `--keep-disks` flag is given and specifies them
 for keeping. Deleting a disk is irreversible and any data on the disk
 will be lost.
 - [gcelab] in [us-central1-c]

Do you want to continue (Y/n)?  y


Deleted [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-678cde46183b8e95/zones/us-central1-c/instances/gcelab].

You can also go to the Cloud Console and verify that your “old” VM is gone.

Create a new VM (using Cloud Console or Shell) with the  name of gcelab2

When it is ready use the following command (in the Cloud Shell) to attach the disk:

gcloud compute instances attach-disk gcelab2 –disk mydisk –zone us-central1-c

SSH to the VM

Execute the below commands (similar to the ones you did as part of attaching the persistent disk to gcelab VM) necessary to create  a new mount point and mount the disk. DON’T run the  format (mkfs) command

sudo mkdir /mnt/mydisk
sudo mount -o discard,defaults /dev/disk/by-id/scsi-0Google_PersistentDisk_persisten
t-disk-1 /mnt/mydisk

You can run df -kh  to see the disk mounted and available

google245648_student@gcelab2:~$ df -kh
Filesystem      Size  Used Avail Use% Mounted on
udev            1.8G     0  1.8G   0% /dev
tmpfs           371M  7.5M  364M   2% /run
/dev/sda1       9.8G  983M  8.4G  11% /
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdb        196G   61M  186G   1% /mnt/mydisk

Don’t forget to check your message from the old VM

google245648_student@gcelab2:~$ cat /mnt/mydisk/tmp/hello.txt 
Hi There!

 

The post Qwiklabs – GCP Essentials – Creating a Persistent Disk – Extending the lab appeared first on ISbyR.

]]>
https://isbyr.com/qwiklabs-gcp-essentials-creating-a-persistent-disk-extending-the-lab/feed/ 0
Qwiklabs – GCP Essentials – Hello Node Kubernetes – Getting the Kubernetes Dashboard Token https://isbyr.com/qwiklabs-gcp-essentials-hello-node-kubernetes-accessing-the-ui/ https://isbyr.com/qwiklabs-gcp-essentials-hello-node-kubernetes-accessing-the-ui/#respond Tue, 27 Feb 2018 11:49:34 +0000 http://isbyr.com/?p=248 The “Hello Node Kubernetes” lab went up until the point where I was supposed to browse to UI. I was required to provide the Kubernetes Dashboard Token The lab says to run the gcloud container clusters get-credentials command and then to start the proxy kubectl proxy –port 8081  after which you should be able to access … Continue reading Qwiklabs – GCP Essentials – Hello Node Kubernetes – Getting the Kubernetes Dashboard Token

The post Qwiklabs – GCP Essentials – Hello Node Kubernetes – Getting the Kubernetes Dashboard Token appeared first on ISbyR.

]]>
The “Hello Node Kubernetes” lab went up until the point where I was supposed to browse to UI. I was required to provide the Kubernetes Dashboard Token

The lab says to run the gcloud container clusters get-credentials command and then to start the proxy kubectl proxy –port 8081  after which you should be able to access the Kubernetes Dashboard UI at https://<YOUR_SPECIFIC_URL>.appspot.com/ui,

However, instead of getting the actual UI I was presented with a “Login” screen.

Kubernetes Dashboard Login screen

I am not sure whether I did something wrong or not, but you can overcome this by providing the Token.

In order to get the token open a new Cloud Shell tab and run the following command cat /home/google244648_student/.kube/config | grep access-token  (of course replace with your user’s home directory)

You will see an output similar to the below

access-token: ya29.GqMBbwUy_ilk0VFXi4pK4-MAC5q-psLmOlt31lhmjc5MkBC4PocfZW7x_-yQVuUcxezLTVwomuLPfxcI-7OVXhyf2hbxLS4IXjHxxsTV_kToVrTpSQpytM6ipPzfwtI4mU0L9G266oBnRLL5FPwb81YiU5P3gq98ViK4HIf-IVbD68WyRvUtBJrUPHTPqyddh7AG5ZUBi7pfRqKdr8PTiGgzfXIJNg

Copy the everything after “access-token: ” and paste it into the Kubernetes UI “Login” screen (don’t forget to select “Token” as the login method)

The post Qwiklabs – GCP Essentials – Hello Node Kubernetes – Getting the Kubernetes Dashboard Token appeared first on ISbyR.

]]>
https://isbyr.com/qwiklabs-gcp-essentials-hello-node-kubernetes-accessing-the-ui/feed/ 0
Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips https://isbyr.com/qwiklabs-gcp-essentials-compute-engine-qwik-start-windows-tips/ https://isbyr.com/qwiklabs-gcp-essentials-compute-engine-qwik-start-windows-tips/#comments Tue, 27 Feb 2018 10:25:45 +0000 http://isbyr.com/?p=240 After finishing the Qwiklabs – GCP Essentials – Creating a Virtual Machine lab I was going over the  “Compute Engine Qwik Start – Windows” one and stumbled open a few misalignment between the lab and the actual environment. When you need to choose the OS the lab says: “Choose Windows Server 2012 R2,..”, however you will … Continue reading Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips

The post Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips appeared first on ISbyR.

]]>
After finishing the Qwiklabs – GCP Essentials – Creating a Virtual Machine lab I was going over the  “Compute Engine Qwik Start – Windows” one and stumbled open a few misalignment between the lab and the actual environment.

When you need to choose the OS the lab says: “Choose Windows Server 2012 R2,..”, however you will not find such to be available.

old boot disk config

What I had were:

actual boot disk config

So I’ve chosen the former.

 

When you start the VM you are advised  that it might take some time before the machine will be RDP-able and you need to run  gcloud compute instances get-serial-port-output instance-1  using Cloud Console and wait for the below output (which will indicate that now you can RDP to it)

2018/02/27 05:27:05 GCEInstanceSetup: ------------------------------------------------------------
2018/02/27 05:27:05 GCEInstanceSetup: Instance setup finished. instance-1 is ready to use. Activation will continue in the backgr
ound.
2018/02/27 05:27:05 GCEInstanceSetup: ------------------------------------------------------------

I’ve scanned the few last lines and couldn’t see it, I run the above command again a few more times (with additional parameter, that specifies to show only the delta from the previous output). but nothing changed. Then I decided to scroll all the way up and this message actually appeared almost in the few first lines of the output

The post Qwiklabs – GCP Essentials – Compute Engine Qwik Start – Windows Tips appeared first on ISbyR.

]]>
https://isbyr.com/qwiklabs-gcp-essentials-compute-engine-qwik-start-windows-tips/feed/ 1
Qwiklabs – GCP Essentials – Creating a Virtual Machine stuck on 10/15 points https://isbyr.com/qwiklabs-gcp-essentials-creating-virtual-machine/ https://isbyr.com/qwiklabs-gcp-essentials-creating-virtual-machine/#comments Mon, 26 Feb 2018 11:16:39 +0000 http://isbyr.com/?p=230 I was using Qwiklabs to learn a bit about Google Cloud Platform (GCP) and started the GCP Essential quest. During the 1st lab (Creating a Virtual Machine) I got stuck on 10/15 points, despite the fact that I thought I’ve completed all the steps as required. What I think went wrong is the step where … Continue reading Qwiklabs – GCP Essentials – Creating a Virtual Machine stuck on 10/15 points

The post Qwiklabs – GCP Essentials – Creating a Virtual Machine stuck on 10/15 points appeared first on ISbyR.

]]>
I was using Qwiklabs to learn a bit about Google Cloud Platform (GCP) and started the GCP Essential quest.
During the 1st lab (Creating a Virtual Machine) I got stuck on 10/15 points, despite the fact that I thought I’ve completed all the steps as required.

What I think went wrong is the step where you need to create the 2nd VM.  The lab says that you can choose any zone for the VM

Being in Sydney, I naturally created it in australia-southeast1-c using the following command from Google Cloud Shell gcloud compute instances create gcelab2 –zone australia-southeast1-c , but when followed all the steps till the end of the lab I noticed that my lab score was still only 10 out of 15.

I quickly deleted the improperly placed VM by running gcloud compute instances delete gcelab2  and re-created it in the suggested zone by running gcloud compute instances create gcelab2 –zone us-central1-c.

Great Success – 15 out of 15 points achieved!!!

The post Qwiklabs – GCP Essentials – Creating a Virtual Machine stuck on 10/15 points appeared first on ISbyR.

]]>
https://isbyr.com/qwiklabs-gcp-essentials-creating-virtual-machine/feed/ 3