Skip to content

Instantly share code, notes, and snippets.

View ivermac's full-sized avatar
👋
Hi there!

Mark Ekisa ivermac

👋
Hi there!
View GitHub Profile

We keep all our Terraform files under the terraform directory.

Terraform allows to reuse definitions across environments. We thus don't have to have a set of definitions for provisioning Onadata resources in the production environment and a different set of definitions for provisioning Onadata resources in the staging environment. How we go about this is by creating a shared Terraform module for our setup, then including this module in Terraform files corresponding to each of the environments we plan to deploy the setup.

The following subsections will take you through how to codify your setup using Terraform, the Ona way. As a reference, we will use Onadata's Terraform files:

1. Create a Reusable Module

Keep the Terraform resource blocks for your setup in ../terraform/modules/. For instance, the Onadata setup's resource blocks are kept in terraform/modules/onadata. Then isolate the Ter

@bmwant
bmwant / ansbile_tips.yml
Last active July 9, 2021 09:53
ansible quick tips for some modules
# Check existing
- name: Ansible check file exists.
stat:
path: /etc/filename
register: file_status
- debug:
msg: "File exists..."
when: file_status.stat.exists
- debug:
msg: "File not found"
@Geoff-Ford
Geoff-Ford / composing-software.md
Last active July 18, 2024 08:32
Eric Elliott's Composing Software Series

Eric Elliott's "Composing Software" Series

A collection of links to the excellent "Composing Software" series of medium stories by Eric Elliott.

Edit: I see that each post in the series now has index, previous and next links. However, they don't follow a linear flow through all the articles with some pointing back to previous posts effectively locking you in a loop.

@john2x
john2x / 00_destructuring.md
Last active July 9, 2024 01:38
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences