Skip to content

Instantly share code, notes, and snippets.

Avatar

Michiel Sikkes michiels

View GitHub Profile
View full-azure-kubernetes-secret-sample.tf
data "azurerm_key_vault_secret" "mailjet-smtp-username" {
name = "mailjet-smtp-username"
key_vault_id = "${data.azurerm_key_vault.firmhouse.id}"
}
data "azurerm_key_vault_secret" "mailjet-smtp-password" {
name = "mailjet-smtp-password"
key_vault_id = "${data.azurerm_key_vault.firmhouse.id}"
}
View azurerm-key_vault-secret.tf
data "azurerm_key_vault_secret" "mailjet-smtp-username" {
name = "mailjet-smtp-username"
key_vault_id = "${data.azurerm_key_vault.firmhouse.id}"
}
View app-secret.tf
resource "kubernetes_secret" "dispatch-staging" {
metadata {
name = "dispatch-env"
namespace = "platform-staging"
}
data = {
SECRET_KEY_BASE: ""
DATABASE_URL: ""
SMTP_USERNAME: ""
SMTP_PASSWORD: ""
View aiven-user-account.tf
resource "aiven_service_user" "airstrip-staging" {
project = "${aiven_project.firmhouse.project}"
service_name = "${aiven_service.firmhouse-postgresql.service_name}"
username = "airstrip_staging"
}
View app-deployment.tf
resource "kubernetes_deployment" "platform-staging" {
metadata {
name = "dispatch"
labels = {
app = "Dispatch"
}
namespace = "platform-staging"
}
spec {
@michiels
michiels / rules.toml
Created Nov 14, 2018
Simple Traefik routing configuration with LetsEncryot termination
View rules.toml
[file]
# Backends
[backends]
[backends.backend1]
[backends.backend1.servers]
[backends.backend1.servers.server1]
url = "https://167.99.19.114:443"
@michiels
michiels / deploy.rb
Last active Aug 29, 2015
intercity CLI deploy.rb
View deploy.rb
set :application, 'APPNAME'
set :repo_url, 'git@github.com:YOU/APPNAME.git'
# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
# Default deploy_to directory is /var/www/my_app
set :deploy_to, '/u/apps/APPNAME'
# Use agent forwarding for SSH so you can deploy with the SSH key on your workstation.
@michiels
michiels / 0_site.conf
Last active Aug 29, 2015
Ideas for custom server configs
View 0_site.conf
server {
listen 80;
server_name intercityup.com intercityup.nl www.intercityup.com www.intercityup.nl;
root /u/apps/intercity_site_production/current/public;
passenger_enabled on;
passenger_app_env production;
}
server {
@michiels
michiels / deploy.rb
Last active Jan 4, 2016
Capistrano deploy.rb for Intercity
View deploy.rb
require 'bundler/capistrano'
set :application, ">> set application name <<"
set :repository, ">> change to your Git repository <<"
set :ssh_options, { forward_agent: true }
set :default_run_options, { pty: true }
set :user, "deploy"
set :use_sudo, false
set :default_environment, {
"PATH" => "/opt/rbenv/shims:/opt/rbenv/bin:$PATH"
View sample_host.json
{
"run_list":["role[mysql]","role[rails]"],
"mysql": {
"server_debian_password": "our_secret_debian_password",
"server_root_password": "our_secret_root_password",
"server_repl_password": "our_secret_repl_password",
},
"authorization": {
"sudo": {
"users": ["intercity"],