Publish Free Static Websites With Firebase, Hugo and Google Cloud Builder -- Part 2

Posted on Tue 30 April 2019 in hosting • Tagged with gcp, firebase, hugo, google-cloud-builder, tutorialLeave a comment

In Part 1, we completed our development environment, including setting up Hugo and our repo.

Here we'll publish our site to Firebase Hosting, and create the CI tools on Google Cloud Build to build and publish upon push.

Open Your Cloud Shell

In Part 1, we enhanced our cloud shell with hugo and set up our repo. In Part two, we'll use it to create the builder and configure hosting.

See the Quickstart for complete instructions

Create a Firebase Site & Configure Your Project

First, authenticate your cli

# --no-localhost let's us authenticate our cloud shell by code
$ firebase login --no-localhost …
Continue reading

Publish Free Static Websites With Firebase, Hugo and Google Cloud Builder -- Part 1

Posted on Fri 15 February 2019 in hosting • Tagged with gcp, firebase, hugo, google-cloud-builder, tutorialLeave a comment

Static site frameworks like Hugo allow you to manage content with Markdown and publish content via scalable hosting platforms like Firebase hosting. Uptime, performance and operations cost per user can't be beat -- you can easily hit millions of pageviews for less than $10/ month

In this tutorial we'll make a production-ready personal website site, that supports multiple collaborators, built using Hugo. Moreover, we'll publish with the free-to-start Firebase Hosting CDN, and build automatically using Google Cloud Builder.

Prerequisites

  1. A Google Cloud Platform Account & Project -- You can use the free tier
  2. A Firebase project -- also free
  3. Access to the Google Cloud …
Continue reading

Writing Custom Metrics to Stackdriver in Golang

Posted on Wed 13 February 2019 in golang • Tagged with gcp, stackdriver, monitoring, tutorialLeave a comment

Instrumentation is a critical part of any application. Along with system counters like cpu, heap, free disk, etc-- it's important to create application-level metrics to make sure health is measured closer to your customer's experience.

Example metrics could be user-registration, password-change, profile-change, etc. If you see a major spike or dip in these metrics, a wider problem could be indicated.

For this example a custom metric was needed, and no infrastructure was in place for harvesting it (e.g. collectd). Golang is handy for creating an easy-to-install daemon which performs the measurement and periodically harvests the data into stackdriver.

The …

Continue reading

Using AWS IOT To Arm Blink Cameras

Posted on Sat 16 December 2017 in iot • Tagged with iot, lambda, security, tutorial, awsLeave a comment

Blink security cameras are an affordable home security camera system. Although they lack a formal public API, inventive devs have reverse-engineered their private API to allow for better integration.

Here we'll use AWS IOT Core, Lambda and node-blink-security to arm and disarm Blink security cameras using an AWS IOT Button.

Activating Your IOT Button

The IOT Button must be configured to your account, which includes joining it to your wifi access point, and installing the client certificates.

The easiest way to perform activation is by using the AWS IOT Button App for Android or IOS. Complete instructions are found on …

Continue reading

Get Started with Bitcoin Using Docker

Posted on Thu 30 November 2017 in bitcoin • Tagged with docker, bitcoin, secuity, tutorialLeave a comment

Like me, you're probably more comfortable on a CLI. Here's a quick way to use docker to set up a Bitcoin Wallet and trade Bitcoin for free on Testnet with Electrum. You can use the same tools to manage your real Bitcoin wallet too.

Setup

Make sure you have Docker for your OS ( Mac, Windows, Linux)

Run the electrum-cli docker image

Electrum is a python-based Docker wallet with a both a gui and good cli. I've put together electrum-cli, a lightweight Alpine-linux Docker image with Electrum signed and installed with jq.

docker run -it tonymet/electrum-cli

Create a wallet

First …

Continue reading

First Things First, on AWS

Posted on Fri 07 August 2015 in android • Tagged with aws, secuity, tutorialLeave a comment

I was chatting with a buddy who was moving his web sites from dedicated hosting to AWS. Let's just say the FTUE isn't great. That triggered a quick brain-dump of what you should do when you first get started with AWS.

  • understand pets v cattle. In aws all resources should be "cattle", not pets. Periodically terminate instances to test this.
  • activate cloudtrail (in all regions). Use Loggly to index cloudtrail (free or ~$20/mo)
  • create restricted IAM users. Never use your root acct. Activate MFA.
  • Use IAM ec2-instance roles instead of stored credentials whenever possible.
  • Get familiar with IAM management …
Continue reading