I hereby claim:
- I am philroche on github.
- I am philroche (https://keybase.io/philroche) on keybase.
- I have a public key whose fingerprint is 77BB A519 ABC5 FDE7 ED9D 30AA 50DC BC7C 3339 F00F
To claim this, I am signing this object:
#!/bin/sh | |
cat > lifecycle.json <<EOF | |
{ | |
"Rules": [ | |
{ | |
"Expiration": { | |
"Days": 7 | |
}, | |
"ID": "Expire, delete, and cancel", |
#!/bin/bash | |
cat <<EOF > meta-data | |
instance-id: iid-local01 | |
local-hostname: cloudimg | |
EOF | |
cat <<EOF > user-data | |
#cloud-config | |
ssh_import_id: [ yourlaunchpadid ] |
# log from ipython as I played with the pricing api | |
#index.json from https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json | |
# Per http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html#download-the-offer-index | |
# But this may no longer be supported as it (EC2) is not part of the parent index of all services any longer | |
import json | |
with open('index.json', 'r') as foo: | |
data = json.read(foo) | |
with open('index.json', 'r') as foo: |
I hereby claim:
To claim this, I am signing this object:
# Get the Ubuntu cloud image of your choosing (this example uses the latest Xenial daily) | |
wget http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img | |
# Set the cloud-init datasource to use explicitly (this example uses the EC2 datasource) | |
sudo mount-image-callback xenial-server-cloudimg-amd64-disk1.img -- \ | |
sh -c 'echo "datasource: Ec2" > $MOUNTPOINT/etc/cloud/ds-identify.cfg' | |
# Confirm the current datasource configuration | |
sudo mount-image-callback xenial-server-cloudimg-amd64-disk1.img -- \ | |
chroot _MOUNTPOINT_ cat /etc/cloud/ds-identify.cfg |
#!/usr/bin/env python3 | |
""" | |
Shipit script will shipt all commits from a given feature branch | |
as a single non fast forward merge, while adding the proper agreed upon | |
commit message formatting. | |
You must sit on a local clone of the target branch. | |
If you are happy with how shipit merged, you just "git push" the result | |
to the remote branch. | |
""" |
sudo gpg --keyserver keyserver.ubuntu.com --recv-keys 2E0CC76D | |
sudo gpg -a --export 2E0CC76D > 2E0CC76D.key | |
sudo gpg --no-default-keyring --keyring ./2E0CC76D.gpg --import 2E0CC76D.key | |
cp 2E0CC76D.gpg squashfs-root/etc/apt/trusted.gpg.d/ | |
echo 'deb http://ppa.launchpad.net/philroche/philroche-staging/ubuntu yakkety main' > squashfs-root/etc/apt/sources.list.d/philroche-staging.list | |
sudo chroot squashfs-root/ apt-get update |
# Get the squashfs file system for the image we want to alter | |
wget http://cloud-images.ubuntu.com/yakkety/current/yakkety-server-cloudimg-amd64.squashfs | |
# Extract the squashfs filesystem to a local directory | |
unsquashfs yakkety-server-cloudimg-amd64.squashfs | |
# Mount and bind local /dev/ to local directory squashfs-root/dev | |
sudo mount --bind /dev/ squashfs-root/dev | |
# Update the resolv.conf so that we can make network calls within a chroot | |
sudo rm squashfs-root/etc/resolv.conf | |
sudo cp /etc/resolv.conf squashfs-root/etc/ | |
# Add the Google Cloud Packages signing key |
gcloud compute instances create yakkety-$(date +%y%m%d-%H%M) --image-family ubuntu-1610 --image-project ubuntu-os-cloud |