Skip to content

Instantly share code, notes, and snippets.

View torumakabe's full-sized avatar

Toru Makabe torumakabe

View GitHub Profile
@torumakabe
torumakabe / Vagrantfile
Last active August 29, 2015 14:00
Vagrantfile for HP Public Cloud
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :hp do |rs|
rs.access_key = "your_access_key"
rs.secret_key = "your_secret_key"
rs.flavor = "standard.xsmall"
rs.tenant_id = "your_tenant_id"
rs.server_name = "hogehoge"
rs.image = "df3debd0-9391-4292-b4fe-fd3a700e7f4e"
@torumakabe
torumakabe / Vagrantfile
Last active August 29, 2015 14:06
Vagrantfile for HP Public Cloud
require 'vagrant-openstack-plugin'
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
# Make sure the private key from the key pair is provided
config.ssh.private_key_path = "~/.ssh/your_key"
config.vm.provider :openstack do |os|
os.username = "#{ENV['OS_USERNAME']}"
@torumakabe
torumakabe / Vagrantfile
Last active August 29, 2015 14:06
Vagrantfile for a host of OpenStack tools
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "opscode-ubuntu1404"
config.vm.network "private_network", ip: "192.168.33.10"
@torumakabe
torumakabe / provision.sh
Last active August 29, 2015 14:06
shell for a host of OpenStack tools
#!/bin/sh
ANSIBLE_PLAYBOOK=$1
ANSIBLE_HOSTS=$2
TEMP_HOSTS="/tmp/ansible_hosts"
if ! [ `which ansible` ]; then
apt-get install -y software-properties-common
apt-add-repository -y ppa:ansible/ansible
apt-get update
@torumakabe
torumakabe / minimum.tf
Created April 4, 2015 11:53
Minimum Terraform configuration for OpenStack
# Configure the OpenStack Provider
provider "openstack" {
}
# Create a sample server
resource "openstack_compute_instance_v2" "sample-server" {
name = "tf-sample"
image_id = "your_image_id"
flavor_id = "your_flavor_id"
key_pair = "your_keypair"
#!/bin/sh
echo "Hello World. The time is now $(date -R)!" | tee /home/ubuntu/output.txt
echo 127.0.1.1 $(hostname) >> /etc/hosts
@torumakabe
torumakabe / hpcos_vboxsetup_net.sh
Last active January 2, 2016 05:09
Creare VirtualBox host-only network for HP Cloud OS Sandbox 1.20
#!/bin/sh
VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.124.1 --netmask 255.255.255.0
VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet1 --ip 192.168.122.1 --netmask 255.255.255.0
@torumakabe
torumakabe / hpcos_vboxsetup_admin.sh
Created January 4, 2014 13:27
Creare VirtualBox VM for HP Cloud OS Sandbox 1.20 admin node
#!/bin/sh
VBoxManage createvm --name "admin" --ostype Ubuntu_64 --register
VBoxManage modifyvm "admin" --cpus 1
VBoxManage modifyvm "admin" --memory 4096
VBoxManage modifyvm "admin" --nic1 hostonly
VBoxManage modifyvm "admin" --hostonlyadapter1 vboxnet0
VBoxManage modifyvm "admin" --nictype1 Am79C973
VBoxManage modifyvm "admin" --nicpromisc1 allow-all
VBoxManage modifyvm "admin" --nic2 intnet
@torumakabe
torumakabe / hpcos_vboxsetup_controller.sh
Created January 4, 2014 13:28
Creare VirtualBox VM for HP Cloud OS Sandbox 1.20 controller node
#!/bin/sh
VBoxManage createvm --name "controller" --ostype Ubuntu_64 --register
VBoxManage modifyvm "controller" --cpus 1
VBoxManage modifyvm "controller" --memory 4096
VBoxManage modifyvm "controller" --nic1 hostonly
VBoxManage modifyvm "controller" --hostonlyadapter1 vboxnet0
VBoxManage modifyvm "controller" --nictype1 Am79C973
VBoxManage modifyvm "controller" --nicpromisc1 allow-all
VBoxManage modifyvm "controller" --nic2 intnet
@torumakabe
torumakabe / hpcos_vboxsetup_compute.sh
Created January 4, 2014 13:29
Creare VirtualBox VM for HP Cloud OS Sandbox 1.20 compute node
#!/bin/sh
VBoxManage createvm --name "compute" --ostype Ubuntu_64 --register
VBoxManage modifyvm "compute" --cpus 1
VBoxManage modifyvm "compute" --memory 2048
VBoxManage modifyvm "compute" --nic1 hostonly
VBoxManage modifyvm "compute" --hostonlyadapter1 vboxnet0
VBoxManage modifyvm "compute" --nictype1 Am79C973
VBoxManage modifyvm "compute" --nicpromisc1 allow-all
VBoxManage modifyvm "compute" --nic2 intnet