MacOS start up key combinations

MacOS had a number of start up options that you can select buy holding key combinations on boot.

Most useful I’ve found are:

C = boot from removable media,  e.g. a usb flash drive

Option = show the boot menu to select which bootable partition you want to boot from

Retro collection just acquired a more recent, not-so-retro, addition (2008 Mac Pro 8 core)

Having grown up with 8 bit computers, starting with an Atari VCS and then a Sinclair ZX Spectrum, I find it fascinating that decades later there’s an increasing level of interest in computers from the 80s and 90s with thriving online communities, podcasts and even meetup groups of enthusiasts who get together to discuss the original hardware and also new device add-ons, blending modern tech (e.g. using SD cards for storage) with old.

The ZX Spectrum recently has a number of modern remakes:

As much as I really wanted to get a ZX Spectrum Next, I couldn’t bring myself to put down 175UKP for the base model. I suspect I might come back and pick one up at some point.

My other favorite computer was an Atari ST, I had an 520STFM. I picked up an 1040STF with an Atari monitor on eBay a while back, and it sits on my desk in my office. I also picked up an CosmosEx device which is an interesting example of current tech complementing old – it’s a Raspberry Pi based device that provides SD card support for floppy disk and hard disk images, as well as USB keyboard and mouse support, and also networking.

Something that’s interested me for a while is what it looks like to browse the web using old hardware. The short story is that it’s generally a terrible experience (slow, and current web technologies are poorly supported, if at all). I’ve tried setting up CAB on my ST, but with only 1MB RAM it can’t load anything but the simplest HTML page with text and 1 or 2 images before it fails from not enough memory.

For a while I browsed eBay looking to pick up a used Atari Falcon, but for a 25 year old 16/32 bit computer, it’s incredible that they typically go for anything about $800 to $1000 if you can even find one (they cost 599 UKP new when the launched). With it’s 68030, it has significantly more grunt than the original 68000 based STs.

I then got distracted by the idea of picking up a modern remake of an ST – the Coldfire project has developed the Firebee, which uses a 264MHz Coldfire processor and 512MB RAM, with 68000 backwards compatibility, but with the addition of modern hardware features like USB, PCI expansion slots, ethernet networking, and many of features we currently take for granted in current devices. Despite torturing myself by watching every Firebee video on YouTube, the current price of a new Firebee of 560 Euros is a little more than I can justify to buy a modern Atari ST in 2017 (despite how awesome it actually is).

Continuing with my (odd) interest of browsing the web on old hardware, I picked up a Power Mac G4 2002 Quicksilver.  Classilla in OS9 is perfectly usable and TenFourFox in Mac OS 10.4 is ok, but (at least on my single cpu G4) not really good enough for a daily driver (scrolling is sluggish).

I very nearly decided to up the horsepower and look for a dual G5 Mac Power Mac,

but noticed the price started to get close to what you could pick up a used Intel Xeon Mac Pro for, so … long story short, I just picked up a 2008 8 core Mac Pro on eBay. Super excited for when it arrives!

Deploying Docker Containers to AWS EC2 Container Service (ECS)

I’ve spent a lot of time playing with Docker containers locally for various personal projects, but haven’t spent much time deploying them to the cloud. I did look at IBM Bluemix a while back, and their web console and toolset was a pretty good developer experience. I’m curious about how OpenShift Online is evolving into a container based service as I’ve deployed many personal projects to OpenShift, and it has to be my favorite PaaS for features, ease of use, and cost.

AWS is the obvious leader in this space, and despite playing with a few EC2 services during the developer free year, I hadn’t tried yet to deploy Docker Containers there.

AWS’s Docker support is EC2 Container Service, or ECS.

To get started:

Install the AWS CLI: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html

On the Mac I installed this easily with ‘brew install awscli’, which was much simpler than installing Python and PIP per the official instructions (see here).

Create an AWS user in AWS IAM for authenticating between your local Docker install and with ECS (this user is used instead of your master Amazon account credentials).

Run ‘aws configure’ locally and add secret key credentials from when you created your admin user in IAM

Follow through the step in the ECS Getting Stared guide here: https://console.aws.amazon.com/ecs/home?region=us-east-1#/firstRun

To summarize the steps in the getting started guide:

  • From the ECS Control Panel, create a Docker Image Repository: https://console.aws.amazon.com/ecs/home?region=us-east-1#/repositories
  • Connect your local Docker client with your Docker credentials in ECS:
    aws ecr get-login --region us-east-1
  • Copy and paste the docker login command from the previous step, this will log you in for 24 hours
  • Tag your image locally ready to push to your ECS repository – use the repo URI from the first step:
docker tag imageid ecs-repo-uri

The example command in the docs looks like this:

docker tag e9ae3c220b23 aws_account_id.dkr.ecr.region.amazonaws.com/repository-name

For the last param, the tag name, use the ECS Docker Repo URI when you created the repo.

Push the image to your ECS repo with (where image-tag-name is the same as the tag name above):

docker push image-tag-name

Docker images are run on ECS using a task config. You can create with the web ui (https://console.aws.amazon.com/ecs/home?region=us-east-1#/taskDefinitions), or manually create as a json file. If you create from the web ui you can copy the json from the configured task as a template for another task.

Before you can run a task, you need to create a Cluster, using the web ui: https://console.aws.amazon.com/ecs/home?region=us-east-1#/clusters

Run your task specifying the EC2 cluster to run on:

aws ecs run-task –task-definition task-def-name –cluster cluster-name

If you omit the –cluster param, you’ll see this error

Error: "An error occurred (ClusterNotFoundException) when calling the RunTask operation: Cluster not found."

To check cluster status:

aws ecs describe-clusters --cluster cluster-name

Ensure you have an inbound rule on your EC2 security to allow incoming requests to the exposed port on your container (e.g. TCP 80 for incoming web traffic).

Next up: deploying a single container is not particularly useful. Next I’m going to take a look at adding Netflix Eureka for discovery of other deployed services in containers.

Checklist for accessing an AWS EC2 instance with ssh

Quick checklist of items to check for enabling ssh instance into a running EC2 instance:

  • EC2 instance is started (check from AWS console)
  • From AWS console, check Security Group for the instance has an inbound rule for SSH – if only accessing remotely from your current IP, you can press ‘My IP’ to set your current public IP
  • From Network & Security, create a keypair and download the .pem file
  • Check the public DNS name for your EC2 instance from the console
  • chmod 400 your .pem file, otherwise you’ll get an error that it’s publicly readable

Connect with:

ssh -i path-to-.pem-file ec2-user@ec2-your-instance-name.compute-xyz.amazonaws.com