Skip to content

Instantly share code, notes, and snippets.

View jyidiego's full-sized avatar

John Diego Yi jyidiego

View GitHub Profile
@jyidiego
jyidiego / Packer Rackspace Cloud Server Issue
Created June 4, 2014 19:42
Tried to build a simple Rackspace Cloud Server with packer, no provisioners
2014/06/04 11:59:28 Packer Version: 0.6.0 12e28f257f66299e3bb13a053bf06ccd236e7efd
2014/06/04 11:59:28 Packer Target OS/Arch: darwin amd64
2014/06/04 11:59:28 Built with Go Version: go1.2
2014/06/04 11:59:28 Detected home directory from env var: /Users/johnme
2014/06/04 11:59:28 Attempting to open config file: /Users/johnme/.packerconfig
2014/06/04 11:59:28 File doesn't exist, but doesn't need to. Ignoring.
2014/06/04 11:59:28 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-instance:packer-builder-amazon-instance docker:packer-builder-docker vmware-vmx:packer-builder-vmware-vmx null:packer-builder-null digitalocean:packer-builder-digitalocean openstack:packer-builder-openstack virtualbox-ovf:packer-builder-virtualbox-ovf vmware-iso:packer-builder-vmware-iso amazon-chroot:packer-builder-amazon-chroot virtualbox-iso:packer-builder-virtualbox-iso amazon-ebs:packer-builder-amazon-ebs googlecompute:packer-builder-googlecompute qemu:packer-builder-qemu parallels-iso:packer-builder-parallels-is
@jyidiego
jyidiego / template.json
Created June 4, 2014 19:58
This is a sample gist for building an image of Rackspace public cloud
{
"builders": [
{
"type": "openstack",
"username": "",
"password": "",
"provider": "rackspace-us",
"region": "IAD",
"ssh_username": "root",
"image_name": "Test image",
@jyidiego
jyidiego / wrong URL referenced
Created June 12, 2014 20:45
shows a URL that is unexpected
ML70RSFFT3->$ packer build openstack-client.json
openstack output will be in this color.
==> openstack: Creating temporary keypair for this instance...
==> openstack: Error launching source server: Expected HTTP response code [202] when accessing URL(https://cdn5.clouddrive.com/v1/MossoCloudFS_b4b1d009-0ac9-4138-9ce8-67961d3dfa90/servers); got 404 instead with the following body:
==> openstack: <html><h1>Not Found</h1><p>The resource could not be found.</p></html>
==> openstack: Deleting temporary keypair...
==> openstack: Error cleaning up keypair. Please delete the key manually: packer 53991043-2c95-d59a-a277-68940c7e3db3
Build 'openstack' errored: Error launching source server: Expected HTTP response code [202] when accessing URL(https://cdn5.clouddrive.com/v1/MossoCloudFS_b4b1d009-0ac9-4138-9ce8-67961d3dfa90/servers); got 404 instead with the following body:
<html><h1>Not Found</h1><p>The resource could not be found.</p></html>
heat_template_version: 2013-05-23
description: |
Simple template to deploy Redis on a cloud server
parameters:
key-name:
type: string
description: Name of a nova ssh keypair to use for server access
@jyidiego
jyidiego / gist:82b73f67f432866bd6ee
Last active August 29, 2015 14:09
django single server rackspace
parameter_groups:
-
parameters:
- flavor
- image
- server_count
label: 'Server Settings'
-
parameters:
- db_flavor
@jyidiego
jyidiego / sendRawEth.c
Last active September 4, 2015 01:44 — forked from twaldecker/sendRawEth.c
Send a raw Ethernet frame in Linux
/*
* Added the command line arguments for interface and MAC Address
*
* Based on raw Ethernet from austinmarton: https://gist.github.com/1922600
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
@jyidiego
jyidiego / gist:1ec3bc3dba60141970b6
Created December 9, 2015 21:58
Simple script to associate Elastic IP to a EC2 instances in the public subnet
#!/bin/bash
REGION=$(curl http://169.254.169.254/latest/meta-data/placement/availability-zone 2>/dev/null)
INSTANCE_ID=$(curl http://169.254.169.254/latest/meta-data/instance-id 2>/dev/null)
aws configure set region ${REGION%[a-z]}
aws ec2 associate-address --instance-id $INSTANCE_ID --allocation-id <allocation id>