Skip to content

Instantly share code, notes, and snippets.

@cdelorme
cdelorme / services build
Created June 23, 2015 15:20
ellucian terraform
# service iam role
resource "aws_iam_role" "services" {
name = "${var.target_env}-services"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
@cdelorme
cdelorme / build 10
Created June 23, 2015 15:15
jenkins builds console output
template_file.hub-message-queue-service: Refreshing state... (ID: 530d0bf8ad59ef8a347a5a672664a3db4b2482c8ecc2b7ceab1cfda3515d0bf7)
template_file.hub-configuration-api: Refreshing state... (ID: ace549d5514dda41c7b676e5aafdb6ff4adeed95c28128203bb1edd815a86873)
template_file.hub-www-auth: Refreshing state... (ID: dd6213e008902fafb74c6980dedb84160e28e33634d14aeb140c661aeabf89a1)
template_file.hub-configuration-ui: Refreshing state... (ID: c1689b14f84e095ea525f063fc18ef6f8e929943dfd97966163e8f88dbef68d4)
template_file.mock-auth: Refreshing state... (ID: 61bc24ead85bc99a6f83782dfd96d2895eb12e446c0f92a384cf9bb01a1b22c6)
template_file.nat1_userdata: Refreshing state... (ID: 54dc1661af37b6e1da56705601521026b0a4fb214fe09e1332b01c6b7a9a94a8)
template_file.hub-proxy-api: Refreshing state... (ID: f8d46fd9d258efeaac5f2b70afd37f0cea0310ec544a32fe71326f825b19f5e7)
template_file.nat2_userdata: Refreshing state... (ID: 54dc1661af37b6e1da56705601521026b0a4fb214fe09e1332b01c6b7a9a94a8)
template_file.nat3_userdata: Refreshing s
This file has been truncated, but you can view the full file.
2015/06/17 19:33:38 [INFO] Terraform version: 0.5.3 b62875a0f01db282a536404b876430ae8e4c1a48+CHANGES
2015/06/17 19:33:38 Detected home directory from env var: /var/lib/jenkins
2015/06/17 19:33:38 [DEBUG] Discovered plugin: atlas = /usr/local/bin/terraform-provider-atlas
2015/06/17 19:33:38 [DEBUG] Discovered plugin: aws = /usr/local/bin/terraform-provider-aws
2015/06/17 19:33:38 [DEBUG] Discovered plugin: cloudflare = /usr/local/bin/terraform-provider-cloudflare
2015/06/17 19:33:38 [DEBUG] Discovered plugin: cloudstack = /usr/local/bin/terraform-provider-cloudstack
2015/06/17 19:33:38 [DEBUG] Discovered plugin: consul = /usr/local/bin/terraform-provider-consul
2015/06/17 19:33:38 [DEBUG] Discovered plugin: digitalocean = /usr/local/bin/terraform-provider-digitalocean
2015/06/17 19:33:38 [DEBUG] Discovered plugin: dme = /usr/local/bin/terraform-provider-dme
2015/06/17 19:33:38 [DEBUG] Discovered plugin: dnsimple = /usr/local/bin/terraform-provider-dnsimple
@cdelorme
cdelorme / install_go1.4.2.sh
Created February 24, 2015 14:07
debian-build-golang-1.4.2
#!/bin/bash
aptitude install -ryq build-essential
pushd /tmp
git clone https://go.googlesource.com/go go/
pushd go/
git checkout go1.4.2
pushd src/
GOROOT_FINAL="/usr/lib/go" ./all.bash
popd
popd
@cdelorme
cdelorme / instructions
Last active May 3, 2023 12:30
Automatically Update Remote Authorized Keys
I tend to break and rebuild my systems regularly. It has gotten to the point that I generally do not have an SSH key for over a year.
This has created a serious dilemma when it comes to maintaining access to remote systems. I usually disable normal password access on any servers I maintain, which means unless I have multiple systems that can access so I can replace the keys I could permanently loose access to those systems. In considering possible solutions I came up with one that has saved my bacon regularly.
First, I use my [dot-files](https://github.com/cdelorme/dot-files) repository after installing any new system. If that system is secure I will generate a new SSH key and load it into github via curl through their api.
On servers which I need to retain access, I create a simple bash script to poll my github accounts keys. I throw it into a user-local `~/.bin/update-keys` file, and make it executable.
Finally, I modify the crontab to execute this script regularly:
#!/bin/bash
hg clone -u go1.3.1 https://code.google.com/p/go /tmp/go
(cd /tmp/go/src && GOROOT_FINAL="/usr/lib/go" ./make.bash)
mv /tmp/go /usr/lib/
mkdir -p /usr/share/doc/golang-doc /usr/share/go/
mv /usr/lib/go/src /usr/share/go/
mv /usr/lib/go/doc /usr/share/doc/golang-doc/html
mv /usr/lib/go/favicon.ico /usr/share/doc/golang-doc/
ln -sf /usr/share/go/src /usr/lib/go/src
ln -sf /usr/share/doc/golang-doc/html /usr/lib/go/doc