Categories
AWS Homelab Money

AWS IoT Button

AWS IOT Button

Back Story:

My AWS Solution Archictect certification is due to expire in the next 6 months and given I have not done a huge amount with AWS since getting certified I thought it was worth kicking the tyres again and running a few bits and pieces within AWS. One of the first things I did was move my blog over to AWS lightsail.

In addition to the  above I thought I would purchase an AWS IOT button  and have a play. The setup for these is now MUCH simpler with the introduction of the iOS and Android  setup apps.

Part 1   Button setup to email

To start with I just wanted to do something easy so I set it up so that with a press of the button it would send me an email via SES  This was to get to grips with the button check I had the comms setup correctly etc etc. I chose to use one of the prebuilt python functions for this. It deliveries a basic email like the below.

[codeblocks name='Pythonmail']

Part 2 IFTTT integration

Once i had this working I then decided to hook it into my Phillips Hue setup to turn the lights on or off. This was done mainly with the help of  this post from Joseph Guerra This wasnt quite straightforward as IFTTT have renamed some of the parts of the site. Joseph did a great post explaining this, however where he describes maker this is now called webhooks within IFTTT.  This is the full code that i’m using ( just with my key masked

[codeblocks name=’IFTTTLambda’]

Part 3 Monzo

Once the AWS to IFTTT integration was setup the next steps were quite easy.   Monzo is becoming my goto bank for most things.  They recently announced IFTTT integration so I wondered if i could hook my IOT button into Monzo.  I decided to create an action that when my button was pressed it would move £1 into a savings pot.

First you need to login to your IFTTT account and then add the Monzo channel.  This is pretty straight forward if you do from your phone where IFTTT and Monzo is installed.

I then went back to IFTTT on my laptop  to create the new applet using the create link https://ifttt.com/create

Then click on the + icon and drill down to find the webhook section

Then you need to check that the eventname on the webhook matches the AWS lambda event in my case I am using “buttonpress”

This should complete the “this” section, Now you to sort the “that”

Click on the plus and select the Monzo service with an action to move money into a pot ( Within the Monzo app I have already created a savings pot called IFTTT)

At the end of the process you should have something that looks like the below

If everything is setup ok a button press will move money over in a few seconds.

Categories
Homelab Nutanix

Nutanix CE 5.6

Nutanix CE 5.6

 

I have been running Nutanix CE at home for quite a while now and the new version has just dropped so I had to try it out.   I decided to destroy the current ( Single Node ) Cluster that I was running and start again.   This was for a few reasons but primarily I wanted to introduce disk redundancy and add some extra drives.  I was previously running this on a Dell T20 with 1x Sandisk 240GB SSD and 1x WD Red 3TB drive.    So I added another WD Red and SSD.  I have also moved over to using an old Intel 80Gb SSD as the boot volume (rather than a USB stick)

I decided to stck with the orginal installer method and copyied the new build onto the SSD

[codeblocks name='ntnxprep']

Then run the installer and choose not to build a cluster.  I then needed to revoke the previous SSH keys for the Host and the CVM ( as i had used the same address’s)

I then SSH’d into the CVM and create the single node cluster but with disk redundancy

[codeblocks name='clustercreate']

On login to Prism Element the cluster shows that Im now on the later version and I now do indeed have storage redundancy.   The big green ok shows this at a glance.  The middle image shows a detailed view confirming that all the required components can tolerate a failure but obviously I cant tolerate a host loss as i only have 1 (last image ) 🙁

The cluster is pretty bare at the moment but I will start adding back the various systems.

Data is all ok
I am fully protected at the storage component level
I cant loose a host 🙁

 

Categories
Nutanix

Nutanix Command Reference Guide

 

Nutanix Command List

This is a list of Nutanix commands I have found useful. Its here as a reference and if i need a command more than a few times ill generally add it here.

CLI

  • ncli cluster get-domain-fault-tolerance-status type=node  ( Checks if all of the storage components meet the desired replication factor)
  • cvm_shutdown -P now  ( Correct way to shutdown a CVM)
  • ncc health_checks run_all –parallel=4 .  ( 4 is the max number)
  • curator_cli get_under_replication_info summary=true Checks if any objects are not at the desired replication factor
  • curl localhost:2019/prism/leader . Find the leader

WEB

  • http://{curator-master-cvm-ip}:2010/master/control ( If you want to invoke a curator scan manually )