Gotta GSD, Don’t Wanna Buy Windows, Here’s Some Options!

Ok, again, I’ve sat down to get some shit done and I immediately stumble into this one strange scenario where I need a Windows machine. I don’t want to buy Windows. I rarely use it. I just need to do this one thing. I don’t want to use Windows on a regular basis. I’m happy with Linux, and a little MacOS usage here and there. But here is this brick wall roadblock for this one task I need to do on Windows.

What a bummer! But there’s an easy way Microsoft has setup to help us out with these scenarios!

Thank goodness.

If you want to test out a development environment, there’s a location here where you can go download a time limited VM of your choice. This machine image is great because they’ve already got things setup with;

  • Visual Studio 2019
  • Visual Studio Code
  • Windows 10 SDK
  • UWP
  • .NET Desktop
  • Azure workflows enabled
  • Windows Subsystem for Linux w/ Ubuntu. Not that I’d need this, but ya know, it’s hugely useful on Windows.
  • Dev mode & bash enabled.

That image is all groovy. No Java pun intended. But if you want a slightly slimmer image for just testing out Microsoft browser stuff, like MS Edge or older Internet Explorer versions, check out these images.

With both of these options the versions are time limited, to something like 90 days. The cool thing is though, that’ll give you enough time to test out most things or troubleshoot any .NET Windows proprietary code bits!

The other great thing is they offer the images in multiple different formats too; Virtual Box, VMware, and others.

Hope these are helpful to ya, enjoy!  👍

A Really Quick Introduction to Minikube

There’s likely a million introductions to Minikube, but I wanted one of my own. Thus, here you go!  Minikube is basically Kubernetes light that runs on your own machine. Albeit, it does this similarly to how Docker used to do it, via a virtual machine. Thus, you can do some things with it but if you want to get serious you’ll still need to spool up a proper cluster somewhere as it will start to bog down your machine with any heavy workloads.

1: Minikube – Installing

Linux Direct:

 curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
   && sudo install minikube-linux-amd64 /usr/local/bin/minikube

Linux Debian:

 curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
   && sudo install minikube-linux-amd64 /usr/local/bin/minikube

Linux Red Hat:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-1.4.0.rpm \
 && sudo rpm -ivh minikube-1.4.0.rpm

2: Starting Minikube

minikube start will start a minikube instance, pulling images, resources, kubelets, kubeadm, dashboard, and all those resources.

00-starting

3: Stopping Minikube

minikube stop brings the minikube service to a stop, allowing for restart later.

09-stopping-minikube

4. Deleting Minikube

minikube delete will delete the minikube. This will delete any of the content or related collateral that was running in the minikube.

01-delete

5. Restarting after Delete

minikube start this is the way to restart a minikube instance after you’ve stopped the instance. It’s also the way start a minikube, as shown above.

03-restarting-after-delete

6. Starting a Named Minikube

If you want a named minikube instance, use the -p switch, with a command like minikube start -p adrons-minikube.

04-minikube-with-name

7. Starting & Using the Dashboard

To check out the dashboard, that pretty Google dashboard for Kubernetes, run minikube dashboard to bring that up.

05-starting-dashboard

06-minikube-dashboard.png

8. Status!

To get a quick update on the current state of the minikube instance just run minikube status.

07-other-minikube-commands

9. Starting Minikube sans a Virtual Machine

This is, albeit I may be mistaken, this is a Linux only feature. Run minikube start --vm-driver=none and it’ll kick off a minikube right there on your local machine.

09-minikube-no-vm-started.png

References:

Join the Apollo Beta for FREE! Help the Databass!

Hello to all the data curious, database lovers, and sciency datamungers! I have a small favor to ask of you all. At DataStax we just opened up our Apollo service i.e. “Apache Cassandra as a Service” i.e. DBaaS offering and I’m looking for people that want to test drive the database! Now, you don’t have to actually tell me you’re using it or anything, but I’d love to know if you are. Maybe we could even chat about your experience using it.

To get started:

  1. Sign up here.
  2. Create a database here.
  3. Pick a driver here.  [C#/F#, Node.js/JavaScript, Java, C++, and Python] – I added F# cuz ya know, that’s how F# works and all, you just use the C# driver and BOOM, you’ve got F# access!!
  4. Write CQL and execute the database!
  5. Profit!

Alright, where profit is that’s when you let me know what works for you and what doesn’t. Feel free to comment here, ping me via Twitter @adron, or via the response form here, or however you’ve got to message me. I’d be super stoked to chat!

Getting Started Specifics

To create a database, once you’ve got an account, just navigate to https://apollo.datastax.com/createDatabase and you’ll get prompted with the following screen.

apollo-create-database

Currently during beta we have AWS as the provider option, and you can choose between Developer, Startup, Standard, and Enterprise. Each offering various configurations and future prospective SLA’s and such.

asdf

Once you have the database name, keyspace, user name, and you password set, click on Launch Database and the spin up of the multi-node database will begin. You’ll be greeted with a message notifying you that it’ll take a little bit of time for the database to spin up and an email will be sent once it is done. Enjoy a coffee in the meantime.

prompt

Once the database spins up there are two key sections on the database page. First, there is the connection details. They’re located in the bottom left of the database page.

database-connection-details

If you click on the “Learn How” you’ll get directly linked to the docs pages with multiple examples of how to get connected to the database you’ve just created. You can also reset your password here and retrieve the security bundle (it’s a tar/zip file) that you’ll need to authenticate any applications with.

The other part that can be really helpful, especially as you do any development or testing with your database is the grafana dashboard. It’s on the Health tab of the database page.

grafana-metrics

A trick that I used, to get an easier and full screen view of all the metrics, is to inspect the page right at the metrics, within that you’ll find the iframe in which to get the link specifically to the Grafana metrics. They look pretty nice broken out of frame! As you work through queries and such keep an eye on this for extra insight.

broken-out

Any other thoughts, contemplation, or otherwise do get in touch!

 

 

 

Schedule Updates: Coding, Meetups, Twitch Streams, Etc. Starting Monday 7th

Another updated schedule for the coming weeks starting September 26th onward.

SeriesThrashing Code General Calamity

This is going to be a mix of tech this week. Probably some database hacking, code hacking, samples, and setup of even more examples for use throughout your coding week!

Series: Meetups!

Series: Emerald City Tech Conversations

Join me and several guests, on several different days to get into particulars about programming, coding, hacking, ops, devops, or whatever comes up. Ask questions, inquire, infer, or inform we’re here for the conversation. Join my guests and I!

Wat?! Ugh Terraform State is Complicated Sometimes! ‘url has no host’

As I’ve been working through the series (part 1, 2, 3, and 4 so far), a number of issues come up (like this one), and this seemed like a good one to post too. As I’ve been working through I started stumbling into this error around destroying images via terraform destroy . Now, I’m not just creating them with terraform apply and then trying to destroy them. I’m creating the images via Packer, then importing the state (see part 4 for the series for details) and then when I clean up the environment trying to terraform destroy which shows this error.

[…lost image…]

I had taken the default azurerm_image resource configuration from the Hashicorp docs site that I tweaked just a little bit.

[code language=”bash”]
resource “azurerm_image” “basedse” {
name = “basedse”
location = “West US”
resource_group_name = azurerm_resource_group.imported_adronsimages.name

os_disk {
os_type = “Linux”
os_state = “Generalized”
blob_uri = “{blob_uri}”
size_gb = 30
}
}
[/code]

The thing causing the error is the “{blog_uri}”. Which in general, I’d assume that this should be pulled or derived from the existing image created by packer when imported. But the syntax above just doesn’t cut it for actions post-import of the image state.

Time Consuming Troubleshooting

To troubleshoot and confirm this issue takes a long time. Create the image, which is ~15-20 minutes, then run an apply. The apply, even if most of the creation is minimized to imports and the few other things that are created, takes several minutes in Azure. Then a destroy takes several minutes. So all in all, one test cycle is about ~30 minutes.

The First Tricky Fix

I went through several iterations of attempting to get that part of the import of the state pulled in. That didn’t work out so well. What did though, was the simplist of actions, I deleted blob_uri = "{blog_uri}"!  Then upon terraform apply or terraform destroy I got a full cycled application of changes, etc, after adding the state and on destroy terraform wiped out everything as expected!

Problem Fixed, Problem Created

On to the next things! But oh wait, there is another problem. Now if I setup a VM to be created based off of the image, the state doesn’t have the blog_uri. Great, back to square one right? Not entirely, subscribe, keep reading and I’ll have the next steps for this coming real soon!