Skip to content

Instantly share code, notes, and snippets.

View dopatraman's full-sized avatar
🎯
Focusing

Prakash Venkatraman dopatraman

🎯
Focusing
View GitHub Profile
@dopatraman
dopatraman / playbookexample.yml
Last active April 23, 2020 00:44
Example playbook
- hosts: all # 1
remote_user: user_name # 2
tasks:
- name: <task name> # 3
module_name: # 4
module_arg1: "foo" # 5
register: my_output # 6
@dopatraman
dopatraman / ansible-deployment.sh
Last active April 13, 2020 22:51
Release Deployments
$ ansible-playbook deploy/deploy.yml
$ ansible-playbook deploy/migrations.yml
$ ansible-playbook deploy/startup.yml
@dopatraman
dopatraman / generate_release
Last active November 23, 2019 00:25
cross-platform-releases-06-generate-release
#!/usr/bin/env bash
docker run -v $(pwd):/opt/build --rm -it my-project:latest /opt/build/bin/build
[1] [2] [3]
@dopatraman
dopatraman / mix.exs
Created November 23, 2019 00:19
cross-platform-releases-05-mix-alias
defp aliases do
[
pkg: ["cmd ./local/build_container"]
]
end
@dopatraman
dopatraman / build_container
Last active November 23, 2019 00:18
cross-platform-releases-04-build-container
#!/usr/bin/env bash
# This file is meant to be private!
# You should remove it from source control if
# you plan on using this repo.
docker build --build-arg env=prod \
--build-arg env=prod \
-t my-project:latest .
@dopatraman
dopatraman / prod.secret.exs
Created November 23, 2019 00:17
cross-platform-releases-03-prod-config
# config/prod.secret.exs
config :my_project, MyProjectWeb.Endpoint, server: true
@dopatraman
dopatraman / build
Created November 23, 2019 00:14
cross-platform-releases-02-build-script
#!/usr/bin/env bash
set -e
echo "Starting release process..."
cd /opt/build # [1]
echo "Creating release artifact directory..."
mkdir -p /opt/build/rel/artifacts # [2]
echo "Installing rebar and hex..."
@dopatraman
dopatraman / Dockerfile
Created November 23, 2019 00:04
cross-platform-release-01-Dockerfile
FROM elixir:1.9.4 # [1]
ARG env=dev # [2]
ENV LANG=en_US.UTF-8 \ # [3]
TERM=xterm \
MIX_ENV=$env
WORKDIR /opt/build # [4]
@dopatraman
dopatraman / SystemTestPlan.md
Created September 7, 2018 17:45
System Test Plan

System Test Plan

The goal of this plan is to test the end-to-end functionality of our entire system.

The system consists of 4 parts:

  1. Trader App
  2. Ledger
  3. Orderbook
  4. Verifiers