Skip to content

Instantly share code, notes, and snippets.

View yuanying's full-sized avatar
🌴
On vacation

O. Yuanying yuanying

🌴
On vacation
View GitHub Profile
@yuanying
yuanying / create-dev-env-magnum.md
Last active March 11, 2019 09:16
Develop Magnum with Devstack

Develop Magnum with Devstack

Vagrant

I'm using vagrant (parallels on Mac) to boot a devstack. Vagrantfile is below. Devstack IP Address is 192.168.11.197.

Vagrant.configure('2') do |config|

config.vm.box = "trusty64"

@yuanying
yuanying / magnum-heat.md
Last active August 29, 2015 14:11
Testing Magnum-Heat

devstack

git checkout -b stable/juno origin/stable/juno
mysql -h 127.0.0.1 -u root -pstackdb mysql <<EOF
CREATE DATABASE IF NOT EXISTS magnum DEFAULT CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON magnum.* TO
    'root'@'%' IDENTIFIED BY 'stackdb'
EOF

Install larsks/heat-kubernetes

@yuanying
yuanying / vagrant-kvm.md
Last active January 4, 2025 20:29
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@yuanying
yuanying / readme.rst
Last active August 29, 2015 14:10
Magnum README Test
@yuanying
yuanying / Vagrantfile
Created October 30, 2014 00:23
Vagrantfile Example
# VMware Fusion
config.vm.provider "vmware_fusion" do |vmware, override|
override.vm.box = "trusty64_fusion"
... snip ...
vmware.vmx["memsize"] = "6144"
vmware.vmx["numvcpus"] = "2"
vmware.vmx["vhv.enable"] = "TRUE"
end
@yuanying
yuanying / scripts
Last active August 29, 2015 14:06
TripleO Environment
scripts/devtest.sh --trash-my-machine --build-only --existing-environment
@yuanying
yuanying / backup-iphoto.rb
Last active August 29, 2015 13:58
Backup iPhoto Library.
#!/usr/bin/env ruby -wKU
require 'time'
require 'nokogiri'
require 'fileutils'
class IPhotoBackup
IPHOTO_ALBUM_PATH = "~/Pictures/iPhoto Library/AlbumData.xml"
DEFAULT_OUTPUT_DIRECTORY = "~/Google Drive/Dropbox"
IPHOTO_EPOCH = Time.utc(2001, 1, 1)
require 'sinatra'
get '/' do
hello
end
helpers do
def hello
'Hello World!'
end
require 'sinatra'
get '/' do
hello
end
helpers do
def hello
'Hello World!'
end
#!/usr/bin/env ruby -KU
require 'pp'
require 'optparse'
require 'cfoundry'
target = 'http://api.paas.fwdns.org'
org_admin_user = '[email protected]'
org_admin_password = 'micr0@micr0'