TwitterFacebookRSS Feed

Callback Insanity

Trials and Tribulations In Engineering

Problem: ESLint complains that my React Component variable is not being used

The violation alleged by ESLint: > 'Routes' is assigned a value but never used.eslint(no-unused-vars) The ESLint rule: https://eslint.org/docs/rules/no-unused-vars The screenshot of the ESLint violation: React SFC 'Routes' is assigned a value but never used.eslint(no-unused-vars).The proof that it's being used: The Routes SFC is being used above.And a complaint about this issue and suggested solutions in Github: https://github.com/eslint/eslint/issues/2283 The solution I used: Use the h
The Engineer
The Engineer
1 min read

Visual Studio Code Remote Development

With this newest release of VSC [https://code.visualstudio.com/updates/v1_37], Microsoft has been kind enough to include three tutorials on how to bring VSC's remote development capabilities to bear. You get three flavors: * SSH [https://code.visualstudio.com/remote-tutorials/ssh/getting-started] * WSL [https://code.visualstudio.com/remote-tutorials/wsl/getting-started] (Windows Subsystem for Linux) * Docker Containers [https://code.visualstudio.com/remote-tutorials/containers/getting
The Engineer
The Engineer
1 min read

Reducing Docker image size with multi-stage builds

There's been some [https://towardsdatascience.com/slimming-down-your-docker-images-275f0ca9337e] posts [https://blog.replicated.com/optimizing-docker-images-with-multi-stage-builds/] appearing as of lately on medium.com and other blogs extolling the virtues of multi-stage builds in Docker, a feature that was not available as of 3 years ago (a long time in development). So since I spend a lot of time rebuilding my own images, I decided to give this staged build methodology a try. I'm happy to
The Engineer
The Engineer
1 min read

Docker build protips

On this very short post I'm going to be mentioning some of the tools you can use to make your Dockerfile s better: * su-exec [https://github.com/ncopa/su-exec]: Switch user and group id, setgroups and exec. * dumb-init [https://github.com/Yelp/dumb-init]: Process supervisor and init system designed to run as PID 1 in containers. * yarn info [https://yarnpkg.com/en/docs/cli/info]: Show information about a package. * jq [https://stedolan.github.io/jq/]: A lightweight and flexible co
The Engineer
The Engineer
4 min read
Kubernetes, Cert Manager, Helm, OSX

Using "fake" certificates for development on OSX with Cert Manager, Let's Encrypt Staging, and Kubernetes Helm

I am planning on using Kubernetes and Cert Manager along with Docker for Desktop locally for development. Cert Manager provides a "staging" certificate authority that creates free, "fake" certificates using Let's Encrypt for development purposes. The reason for using the staging certificates as opposed to the production certificates is that the production certificate authority 1) takes longer to provision certificates, and; 2) is rate limited [https://letsencrypt.org/docs/rate-limits/]; 3) you
The Engineer
The Engineer
3 min read

Local development environment with Kubernetes in 2019

It's 2019, and Docker for Desktop comes with local Kubernetes support enabled out of the box. This post is about setting up a local Kubernetes development environment using Docker for Desktop. This Git repo contains the files used in this blog post: https://github.com/AlexanderAllen/k8-local-nginx-ingress-tls -------------------------------------------------------------------------------- Let's make sure Kubertes is running with kubectl get pods -n kube-system. NAME
The Engineer
The Engineer
6 min read

Ghost + Cloudinary: Deliver automatically optimized images from a CDN for free

Thursday, June 6, 2019 Here's the current state of my blog infrastructure: * Digital Ocean Kubernetes --> Hosts Ghost backend in a Docker container * Netlify --> Hosts Gatsby static site generator, and builds html, .css, and .js static assets, but not the images, those are still served directly from Ghost on DO. Gatsby uses Ghost as the source for it's content. * Cloudfare -> Hosts cached images. Cloudfare is a reverse proxy that automatically caches images, as well as other static
The Engineer
The Engineer
3 min read

Ghost - your connection to this site is not fully secure

Also, attacker might be able to see the images you're looking at on this site and trick you by modifying them. Also, you must construct additional (HTTPS) pylons.Trick me, you say ? Sounds like something like an evil clown might try to do: Scary right? Upon closer inspection, it does look like Ghost/Gatsby are rendering image elements with http:// instead of https://. That's not good. HTTP on an HTTPS site: this is no bueno.I decided to check some of Ghost/Gatsby configs, and did find that t
The Engineer
The Engineer
2 min read

Bonus Post II - Tilt Tuesdays: SSL/TLS CAA Records w/ Let's Encrypt on Digital Ocean Kubernetes and Cert Manager

TL;DR: I got HTTPS working. This is where I left off on last post: Certificate issuance in progress. Temporary certificate issued.So after waiting for at least three hours, the message was still the same: "Certificate issuance in progress. Temporary certificate issued." On the events section, kubectl describe certificate letsencrypt-prod showed: Events: Type Reason Age From Message ---- ------ ---- ---- ------- N
The Engineer
The Engineer
4 min read

Bonus Post: Tilt Tuesday, June 4 2019

As I was explaining on my previous post ... I was setting up SSL/TLS for HTTPS on my new blog, callbackinsanity.com. Before going driving home I decided to publish to my CDN, Netlify, because why not. I wanted to see my first blog post. Since I have a temporary, fake HTTPS certificate running on the backend service, I got this beauty on Netlify: Well, let's check the Netlify deployment logs!! > ERROR: UNABLE TO VERIFY THE FIRST CERTIFICATE Cool. Could it be related to the fact that we hav
The Engineer
The Engineer
2 min read

Working with Kubernetes Ingress Nginx

Previously this week ... While working on the Digital Ocean Kubernetes, I set up a native load balancer service to serve the Ghost CMS. Whenever a Kubernetes service has spec.type: LoadBalancer, it automatically creates an actual virtual Load Balancer on DO like this: Here's the manifest: # manifest.yml kind: Service apiVersion: v1 metadata: name: ghost spec: type: LoadBalancer selector: app: ghost ports: - name: ghost-backend protocol: TCP port: 80 targetPor
The Engineer
The Engineer
3 min read

test remote to local

test remote to local gatsby integration testing locally OSX on 0.0.0.0:8000 - working!
The Engineer
The Engineer
1 min read