Expose Clojure Service using Ngrok
Exposing a local running services can be valuable when writing apps and web-hooks for Cloud API products, e.g. Slack, Atlassian Confluence, Hasura, Salesforce, etc.
ngrok exposes local networked services behinds NATs and firewalls to the public internet over a secure tunnel.
Create a free ngrok account to get an authorisation token for use with the ngrok agent to create a secure tunnel. Or add an SSH public key to use SSH reverse tunnel with the ngrok service.
Continue reading →Pin Emacs packages to manage issues
Emacs provides a huge amount of features via packages. Community configurations like Spacmacs orchestrate packages so they work seemlessly together. It is rare, but sometimes a package will have a breaking issue.
Melpa provides (5,544) up-to-date packages automatically built from each projects Git repository. Builds are defined by a recipe for each package.
A custom recipe can be used to control which version of a package is used with the Emacs configuration, to work around issues or changes to a package.
Continue reading →Cognitect Labs AWS API is an excellent data driven Clojure library for interacting with AWS from code. Essentially a client for an AWS Service is created which operations are invoked. The project includes working code examples (once a working AWS account is configured).
The hardest is configuring suitable AWS accounts, programmatic access and service permissions, especially when new to AWS. This article starts with nothing and steps through the simplest and quickest AWS account and permission setup, using the "AWS Free Tier". Note: every service has quota limits and some services are only free for a period of time (free trials & 12 months free).
The approach outlined is not intended for commercial work, only the bare essentials to start exploring what is possible with the Cognitect Labs library. (Or you could try out LocalStack if you have docker installed locally).
Continue reading →Docker: a simple workflow for Clojure
Docker enables a consistent approach to building and running Clojure projects along with a range of other services locally (database, cache, streams, etc.), The Clojure project is built from source when starting services (a watch
feature can rebuild on code changes). Heath checks and conditions are set to ensure dependant services start in the correct order.
Running Docker is relatively fast once image overlays (layers) are cached on their first run, so its a viable approach for local system integration testing and acceptance testing, before pushing changes to a remote Continuous Integration service.
A Docker workflow complements a REPL Driven Development workflow, it does not replace it. The main development effort should be more effective via a REPL connected editor with Docker Compose focused on orchestration of services.
Continue reading →Docker Desktop on Ubuntu Linux
Docker can support local development and provide an effective workflow for system integration before changes are pushed to a remote continuous integration service. Docker can be used to spin up local databases and persist data in a volume, helping keep a separation between applications and supporting test of schema changes, migrations and data loading.
Docker desktop simplifies the install and provides a desktop client to manage docker images, containers, volumes and the new dev environments. Extensions Marketplace for Docker Desktop provides tooling to unify logging, manage local resources and many more
The Docker install instructions are more of a reference of information than a simple tutorial. Essential Docker Community Edition is installed via the Docker package archive and Docker Desktop is installed from a manually downloaded DEB file.
Continue reading →