Skip to content

Instantly share code, notes, and snippets.

View torumakabe's full-sized avatar

Toru Makabe torumakabe

View GitHub Profile
@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/bash
apt-get -y update
# install Apache2
apt-get -y install apache2
# write some HTML
echo \<center\>\<h1\>Welcome to Azure!!\</h1\>\<br/\>\</center\> > /var/www/html/index.html
# restart Apache
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminUsername": {
"type": "string",
"metadata": {
"description": "User name for the Virtual Machine."
}
},
{
"builders": [{
"type": "azure-arm",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"resource_group_name": "{{user `resource_group`}}",
"storage_account": "{{user `storage_account`}}",
"subscription_id": "{{user `subscription_id`}}",
"tenant_id": "{{user `tenant_id`}}",
2016/03/17 16:32:57 [INFO] Packer version: 0.10.0 0d4ee09ea5b0458d6e85a52ae82eb5add16bf6bb
2016/03/17 16:32:57 Packer Target OS/Arch: windows amd64
2016/03/17 16:32:57 Built with Go Version: go1.6
2016/03/17 16:32:57 Using internal plugin for qemu
2016/03/17 16:32:57 Using internal plugin for vmware-vmx
2016/03/17 16:32:57 Using internal plugin for amazon-chroot
2016/03/17 16:32:57 Using internal plugin for amazon-ebs
2016/03/17 16:32:57 Using internal plugin for googlecompute
2016/03/17 16:32:57 Using internal plugin for parallels-iso
2016/03/17 16:32:57 Using internal plugin for parallels-pvm
#!/bin/sh
touch /tmp/hello_IaC_world
#!/bin/sh
docker pull torumakabe/cntk-cpu:latest
sudo echo "host 10.0.2.*" >> /home/hpcuser01/.ssh/config
sudo echo "StrictHostKeyChecking no" >> /home/hpcuser01/.ssh/config
# Learn more: http://boxstarter.org/Learn/WebLauncher
# Install manually (Ubuntu, VS, Azure PS, 1Password 6, Driver Management Tool)
#---- TEMPORARY ---
Disable-UAC
#--- Fonts ---
choco install inconsolata
#--- Windows Settings ---
#!/bin/bash
# This script was tested for Ubuntu 16.04 LTS
# An set of disks to ignore from partitioning and formatting
BLACKLIST="/dev/sda|/dev/sdb"
# Base directory to hold the data* files
DATA_BASE="/datadrive"
usage() {