Skip to content

Instantly share code, notes, and snippets.

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 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"],
View organization.rb
class Organization
has_many :organization_histories
history_methods = [
:coc_number,
:coc_office
]
history_methods.each do |method|
View dashboard_metrics.rb
class DashboardMetrics < MetricsDefinition
metric "github stargazers" do |m|
m.reason = "Hallo!"
m.fetch_with do
5
end
end