Skip to content

Instantly share code, notes, and snippets.

View michiels's full-sized avatar

Michiel Sikkes michiels

View GitHub Profile
gomonthly % waypoint build -vvv
2022-11-10T10:35:43.906+0100 [INFO] waypoint: waypoint version: full_string="v0.10.3 (136a885b9)" version=v0.10.3 prerelease="" metadata="" revision=136a885b9
2022-11-10T10:35:43.907+0100 [TRACE] waypoint: starting interrupt listener for context cancellation
2022-11-10T10:35:43.909+0100 [TRACE] waypoint: interrupt listener goroutine started
2022-11-10T10:35:43.913+0100 [DEBUG] waypoint: home configuration directory: path=/Users/michiel/Library/Preferences/waypoint
2022-11-10T10:35:43.929+0100 [TRACE] waypoint: no API client provided, initializing connection if possible
2022-11-10T10:35:43.929+0100 [TRACE] waypoint.server: Local server may be created later - server credentials optional
2022-11-10T10:35:43.929+0100 [INFO] waypoint.server: attempting to source credentials and connect
2022-11-10T10:35:44.756+0100 [INFO] waypoint.serverclient: utilizing credentials fetched via oauth for server auth: oauth-url=https://auth.hashicorp.com/oauth/token oauth-client-id=ASvzyc4lQ8POtFjs
# First configure your models to use Amazon s3 as storage option and setup the associated S3 config.
# Then add the classes your want to migrate in the klasses array below.
# Then run rake paperclip_migration:migrate_to_s3
# Should work but this is untested and may need some tweaking - but it did the job for me.
namespace :paperclip_migration do
desc "migrate files from filesystem to s3"
task :migrate_to_s3 => :environment do
klasses = [:product] # Replace with your real model names. If anyone wants to this could be picked up from args or from configuration.
klasses.each do |klass_key|
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}"
}
data "azurerm_key_vault_secret" "mailjet-smtp-username" {
name = "mailjet-smtp-username"
key_vault_id = "${data.azurerm_key_vault.firmhouse.id}"
}
resource "kubernetes_secret" "dispatch-staging" {
metadata {
name = "dispatch-env"
namespace = "platform-staging"
}
data = {
SECRET_KEY_BASE: ""
DATABASE_URL: ""
SMTP_USERNAME: ""
SMTP_PASSWORD: ""
resource "aiven_service_user" "airstrip-staging" {
project = "${aiven_project.firmhouse.project}"
service_name = "${aiven_service.firmhouse-postgresql.service_name}"
username = "airstrip_staging"
}
resource "kubernetes_deployment" "platform-staging" {
metadata {
name = "dispatch"
labels = {
app = "Dispatch"
}
namespace = "platform-staging"
}
spec {
@michiels
michiels / rules.toml
Created November 14, 2018 00:19
Simple Traefik routing configuration with LetsEncryot termination
[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 January 4, 2016 18:59
Capistrano deploy.rb for Intercity
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"
{
"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"],