Monday, January 14, 2019

Building a flexible server configuration for experimentation and other workloads

Some years ago now I revived an old PC and set it up as a headless server to run various projects. Basically it was something that you could use to spin up VMs, play with new OSes, test new configurations or install and run apps like Jenkins, Kubernetes or databases. I've created and torn down many configurations since then but found during the most recent hardware rebuild that it's good to put a bit of extra effort into the set-up to reduce the overhead of maintaining the platform.

You may argue that this is all a bit anachronistic in the era of cloud computing but IMHO there's no substitute for getting your hands dirty with the basic building blocks that the big cloud providers use so you can see the nuts and bolts of the architecture.

So the basic config is:

  • An old PC - mine was an old AMD hex-core with 32GB of cheap memory sticks installed, and modest hard drive for the hypervisor.
  • Ubuntu Server 18 with the Xen hypervisor.
  • A NAS for various services (you could host these somewhere else that's always on (like a router), or use a substitute in some cases)
    • iSCSI (or local LVM2, if you have the disk for it)
    • DNS
    • DHCP
    • LDAP
    • NFS
  • Networking infrastructure like routers and switches, and an internet gateway

Wednesday, January 02, 2019

Getting AWS Certified – Sol Arch and SysOps Associate

Back in late 2017 I obtained all three AWS associate level certifications in the space of around 2 months and thought I’d write a note to share my experiences on study techniques, resources and the exam itself in the hope that it may help others contemplating or undertaking certification themselves.

TL;DR (Too Long; Didn’t Read)
  • get a free tier AWS account
  • start with the Solution Architect – Associate certification
  • take the acloudguru course(s) and practice exam questions
  • read the AWS official study guides and take their practice questions (very close to actual exam)
  • take the other certifications if you can at around the same time (60% content overlap)

Links to the materials identified above follow.

The official exam format is covered off here for the Solution Architect – Associate exam and here for the SysOps Administrator – Associate exam.

There is a lot of overlap (around 60%) between the exams so consider taking all three around the same time. I found SysOps Administrator the most difficult, followed by SA - Associate and finally the Developer Associate.

Start with the Solution Architect – Associate exam as it covers off the core services such as S3, EC2, VPCs and so on. These come up in the other exams but you may find that some courses for the Developer and SysOps exams treat this as assumed knowledge or skim this content as they assume you have already taken the Sol Arch exam. Sol Arch - Associate is also the key certification if you want to take the Professional or Specialty certifications.

My first course on AWS was a virtual classroom session. I personally didn’t find this particularly useful. The presenter was quite knowledgable however the virtual format was a bit limiting and as with any classroom type experience the group tends to be brought down to the lowest common denominator so some people may find the pace frustrating if they come with some prior experience.

Get an AWS account. You can get a ‘free-tier’ account which will let you play around with the management console for free, provided your resource usage stays below AWS’s stated thresholds. For learning purposes like running labs and so on the free-tier is perfect and you shouldn’t need to incur any costs. Tear down your resources when done to help manage your costs – this is pretty easy to do but note there are some resource types that have charges associated with them that may be less obvious – ELBs, EIPs so keep an eye on your billing page and set up CloudWatch notifications. If you’re using multiple regions you need to keep an eye on the resources you’ve created in each one.

I let too much time pass between my first AWS course and when I started studying in earnest, meaning I basically had to go back and learn the content from scratch.

I started with online training from cloudacademy.com. I felt it was lacking so eventually headed over to udemy.com and found the acloud.guru courses. I bought all of these and the question banks.
udemy.com acloudguru SA – Associate
udemy.com acloudguru SysOps Administrator – Associate
udemy.com acloudguru Developer – Associate
udemy.com acloudguru SA – Associate Practice Tests
udemy.com acloudguru SA – Developer Practice Tests
No test bank appears to be available at this time from acloudguru for the sysops exam.

OK – so the acloudguru courses were at the time of writing $15AUD, which is a steal. There are videos for all major areas of the exam and the focus is on passing the exam so you spend time on the questions that are likely to come up rather than reading about the sprawling set of services available on AWS. The courses also have video labs and some source code supplied. I used Microsoft OneNote to take key screen grabs and take notes as I watched the course which I revised prior to the exam. You can set the video to play at higher speed (up to x2) to get through the content more quickly. The Udemy mobile app is great as you can download the course materials and play them offline, say on the train. You can also take the practice tests on the go.

I also used the following two guides:
AWS Solution Architect – Associate Official Study Guide (Amazon.com)
AWS SysOps Administrator – Associate Official Study Guide (Amazon.com)

These are fairly hefty tomes at 500+ pages each however I strongly recommend reading them for two reasons. Firstly, they are more comprehensive and professionally written than acloudguru. Secondly, and more critically, they come with a large number of practice questions. I can’t underscore this part enough – these books’ practice questions are much closer to the AWS exam questions than acloudguru’s. To put this in context, I would score around 10% higher on the acloudguru question sets than the official study guides. The marks I achieved on the exam where almost the same as my scores on the official study guide question sets. Even if you aren’t going to take the official study guide’s test questions, just be aware that you need to be scoring in the 90’s on the acloudguru tests to pass comfortably.

Finally, at the time of sistting the exams I didn’t have a lot of hands-on AWS experience but still passed. I’d say this is largely due to my background in Technology Architecture. If you don’t have some kind of technical background involving infrastructure, networking, storage systems, virtualisation or being a sysadmin I’d recommend you get very hands-on to reinforce how the services work and some of their quirks.

As for the exams themselves there is some pressure to keep answering questions due to time constraints. I found with a relatively considered pace I still had 20mins to go back and double-check any flagged questions. The usual techniques for multiple-choice exams apply here – there are usually two options that can be eliminated immediately and you can take a guess (if necessary!) to choose between the remaining two options. Be careful with the 2nd type of multiple-choice question where you are required to pick 2 or more options from a list. Note that you need to get the selections exactly right or you will receive no points. I found the SysOps exam had many more of these types of questions than the Sol Arch exam, and several required you to pick up to 4 correct responses.

I hope this helps some of you out there and all the best on your path to certification! As always, feel free to reach out if you have any questions.

Google Cloud Certified - Professional Architect

Back in June 2018 I got my Google Cloud Certified - Professional Architect certification. I was told at the time I was the 2nd in Australia/NZ to get it but no idea if this was actually true. I wanted to share my experience with the training and the prep as I had done previously with the AWS associate level certs with the aim of helping those heading down the same path.

The TL;DR (Too long; didn’t read) summary is:
  • this is a pro-level cert, with a challenging format
  • it is based on your knowledge of GCP, but a major factor is also your experience as an architect
  • it will test you from the highly abstract with ambiguous scenario-based questions down into the weeds with unix command lines that may differ by a single flag
  • there is (at the time of writing) very little material available to prepare (unlike, say AWS with various official study guides, acloud.guru and many other quality training vendors and practice test banks)
  • Familiarity with other public cloud services will help as there are similarities and overlaps between each providers’ offerings – but also many nuances
  • Mark is pass/fail. You will not get a score, or a breakdown of how you went.
The first thing to note is that Google initially only had the Google Cloud Certified – Professional Cloud Architect certification (there are others for Data Engineer and GSuite but I’ll treat these as ‘specialties’ for the purposes of this blog – the full list is here). In recent weeks, it has also introduced a beta Cloud Engineer cert which appears to be more at the associate level.

Cloud Architect – the official Google recommendation:

Self-Assess Review the exam guide

Some thoughts on the above:

  • The Coursera training is not bad, it takes you through the main services and key concepts so you get oriented. If you’ve done the AWS acloud.guru training, it will NOT focus on how to pass the exam – it does not try to tell you what questions come up on the exam and how to answer them.
  • The Coursera training is pretty dry – set it to 1.5x normal speed (or more) to just get through it. It may feel too hard to keep up initially, but you won’t notice a few hours into it…
  • The labs are also good for the purposes of orientation – you will walk away understanding the purpose of the service in the lab and the basic use cases, but that’s about it.
  • Some of the literature will say doing the labs is essential to passing the course. I did several of them, but nowhere near all – it was just too tedious. The ones you need to do are the ones you probably haven’t used on another public cloud platform, or are different enough from say AWS that you should review them. The ones that stood out for me (coming from an AWS background):
    • networking
    • Orgs, projects and IAM
    • All of the data services are sufficiently different/unique that they deserve their own review
  • The practice exam is not particularly close to the real exam. You should probably shoot for around 70% on the online exam as a minimum before taking the actual exam, but you will need to calculate your score yourself. NB: one or two questions from the practice exam came up on my exam (not verbatim, but similar) so learn the answers to all questions for some easy marks.
  • The case studies are really important. Read them, read them again, then read them one more time. Around 50-60% of the questions are on the case studies so know them backwards before you go in so you don’t have to waste time reviewing them in the exam. Focus on the business and technical requirements. In some cases, the current situation will be relevant and inform the best way forward.
  • Some of the Google services aren’t widely used on other public cloud platforms, or in industry, or may not be familiar to those working with more legacy technologies. If you haven’t worked with Kubernetes or Docker, NoSQL and why/when to use them, you will need to get familiar with these and how they overcome traditional IT problems. I won’t go into this further, but do go and read up on microservices and 12-factor apps for some of the drivers behind contemporary platform tech and architectures.

The exam format:

  • 50 questions, 2hrs
  • For what it’s worth, I completed it in about 1:30, with 30mins of review time
  • All questions are multiple choice, most with single answer, many with 2 or possibly 3 answers required
  • Several questions will be diagramatic – you will be shown several architectures and you need to pick the right one. These are similar to the examples in the practice exam, but a variation.
  • The cases studies feature prominently, around 50-60% of the questions will be on one of the 4 case studies. The questions for each case study are contiguous, so you won’t be asked a question about a case study again after the questions for the next case start.
  • You won’t be asked about all case studies (this is stated in the exam preamble) but (again, for what it’s worth) I had to answer questions on 3 of them.
  • The computer based exam divides the screen into two halves – the left has the questions and possible answers and controls, the right pane allows you to select from a drop-down list the details of one of the 4 case studies.

Types of questions – this is based on my general recollection:

  • technical questions: eg here’s a dockerfile, and the devs are complaining that it takes too long for the service to come up, what should you do to optimise it? Specific commands and meta-data fields involved in GCE pre-emption. GCS lifecycle policies vs linux commands to identify and delete files of a certain age.
  • case study questions: usually a set of often generally correct/potentially viable options are presented to solve a problem. Look very, very closely at what the question asks – it usually refers to how can the business ‘best meet’ its Business and/or Technical requirements – this means the bullet lists provided under these headings in the case studies. You can’t avoid applying your general knowledge of architecture here to hone in on the ‘best’ answer – use your understanding of things like the latency of packets traversing the internet over a VPN vs what you would expect over a dedicated link to address database replication lag and packet loss. Some of this you won’t be able to directly study for, just be prepared to use your prior knowledge and experience.
  • There are some special features of Google’s cloud services that are worth remembering as they may come up:
    • compute instances can be tagged (not labelled) to ease management of firewall rules across subnets
    • many of Google’s services (at this time) force you to consume them over public IPs, so understand what this may mean for a solution (you are routing over the internet, not internally within Google’s network so security and network ingress/egress charges may be incurred)
    • not all services work like AWS – whilst they may appear equivalent at a high level, operation is quite different under the covers. GCE lets you customise the CPU and memory quantities, rather than use predefined configurations like AWS. GCE supports live migration where AWS does not, and you need to understand what this means for your applications and maintenance activities. Google’s subnets straddle zones where AWS’ are zonal only. GCS has coldline storage, but it doesn’t require you to wait 5hrs to get your data back. There are so many others…
    • Service questions: You will need to know all the key services and how they can be integrated at a high level. This includes knowing the main architectures to get data from on-prem, remote sites and into GCP. Think about the main architectures – starting with GCS as an ingestion point, and how data might be propagated into the other services – eg files on GCS triggering Cloud Functions or Dataflow or Dataproc. Know when to use each service – CloudSQL for smaller relational database needs, up to Spanner for large/global datasets and ACID transaction support. Know the NoSQL options and the decision trees for selecting them. Nothing comes for free, so understand the trade-offs. A lot of this is covered off in the Coursera training.

Resources

I did go onto Udemy and purchase a practice test bank. In short, there aren’t many around and the ones that are available suffer from various problems – not close enough to the real thing, terrible/ambiguous English, demonstrably incorrect answers, absence of explanations and more. Despite all this, I still recommend paying a few dollars for one, if only to explore what you do and don’t know so you can go back and review the docs to fill in the gaps. For what it’s worth, here’s the one I used.

Finally, you really should read the Google Cloud documentation. It’s really well written and comprehensive, and will fill in the gaps you will be left with from Coursera.

Well, I hope this has been helpful. As always, I welcome feedback and would love to hear about your experiences. I am also happy to receive and respond to your questions so fire away!

All the best and good luck on your certification journey.