Skip to content

Instantly share code, notes, and snippets.

View sodre's full-sized avatar

Patrick Sodré sodre

  • ZeroAE LLC
  • Bethesda, MD
View GitHub Profile

Notes on using Geodesic with repos created by cloudposse/reference-architectures

How to Use this Repo

AWS Setup

  1. Log in to console for root account as your IAM user name@example.com
  2. Go to https://console.aws.amazon.com/iam/home
  3. Add an MFA device to your user
  4. Generate an access key and store it securely to be added to aws-vault
@dreampuf
dreampuf / readme.md
Last active March 19, 2024 19:24
How to use Amazon ECR as service in GitlabCI jobs

Source: https://gitlab.com/gitlab-org/gitlab-runner/issues/1583#note_93170156

OK, I've experimented a lot getting this going with the docker+machine executor (specifically with the amazonec2 driver, which I suspect is quite common for people looking at this thread!), it may also be helpful to others when debugging what's going on for them.

docker+machine is interesting because it has several relevant contexts (i.e. a file system and environment variables), which I shall refer to as:

  • "runner": what is running the gitlab-runner binary - in my case this is an ECS-managed docker container for the gitlab/gitlab-runner image on docker hub, but it could the systemd service configuration if you're running directly on the machine.
  • "job host": the docker-machine created machine (e.g. EC2 instance) that runs the docker daemon
  • "job container": the docker container for the image specified in the project .gitlab-ci.yaml (or the default in config.toml)
@weavenet
weavenet / console.py
Last active August 5, 2023 17:57
Python script to assume STS role and generate AWS console URL.
#!/usr/bin/env python
import getpass
import json
import requests
import sys
import urllib
import boto3
@cdhowie
cdhowie / README.md
Last active July 17, 2019 02:27
DNS proxy to fix Netflix stupidity
@sr75
sr75 / wget-jdk-oracle-install-example.txt
Last active March 16, 2023 11:28
wget command to install Oracle JAVA JDK from stupid oracle website for centos and ubuntu
http://d.stavrovski.net/blog/post/how-to-install-and-setup-oracle-java-jdk-in-centos-6
# rpm
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/7u55-b13/jdk-7u55-linux-x64.rpm" \
-O jdk-7-linux-x64.rpm
# ubuntu
@ib-lundgren
ib-lundgren / github_flask_oauth2.py
Created September 10, 2013 10:53
Example of how to use Flask with requests-oauthlib to fetch a GitHub user profile using an OAuth 2 token.
from requests_oauthlib import OAuth2Session
from flask import Flask, request, redirect, session, url_for
from flask.json import jsonify
import os
app = Flask(__name__)
# This information is obtained upon registration of a new GitHub
client_id = "<your client key>"
@thinkerbot
thinkerbot / public_enc_example.sh
Created November 19, 2010 04:56
Public-key encryption example using OpenSSL
#!/bin/bash
#
# Public-Key Encryption and Decryption
# * http://www.openssl.org/
# * http://barelyenough.org/blog/2008/04/fun-with-public-keys/
#
# Mac OS X 10.6.4
# OpenSSL 0.9.8l 5 Nov 2009
# Generate keys