This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "docker" | |
docker_host = ENV['DOCKER_HOST'].dup | |
if(ENV['DOCKER_TLS_VERIFY']) | |
cert_path = File.expand_path ENV['DOCKER_CERT_PATH'] | |
Docker.options = { | |
client_cert: File.join(cert_path, 'cert.pem'), | |
client_key: File.join(cert_path, 'key.pem') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "spec_helper" | |
describe "dockerfile built my_app image" do | |
before(:all) do | |
@image = Docker::Image.all(:all => true).find { |image| | |
Docker::Util.parse_repo_tag( image.info['RepoTags'].first ).first == 'my_app' | |
} | |
p @image.json["Env"] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rails:onbuild | |
ENV HOME /usr/src/app | |
ADD docker/run.sh /run.sh | |
RUN chmod 755 /run.sh | |
EXPOSE 3000 | |
CMD /run.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copied shamelessly from: https://gist.githubusercontent.com/masterzen/6714787/raw/3166173255caef341f578e1ea3fff1eea3072d5b/Bootstrap-EC2-Windows-CloudInit.ps1 | |
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM | |
# AND install 7-zip, curl and .NET 4 if its missing. | |
# Then use the EC2 tools to create a new AMI from the result, and you have a system | |
# that will execute user-data as a PowerShell script after the instance fires up! | |
# This has been tested on Windows 2008 SP2 64bits AMIs provided by Amazon | |
# | |
# Inject this as user-data of a Windows 2008 AMI, like this (edit the adminPassword to your needs): | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.NOTES | |
=========================================================================== | |
Created with: PowerShell Studio 2014, Version 4.1.74 | |
Created on: 11/10/2014 4:06 PM | |
Company: SAPIEN Technologies, Inc. | |
Contact: June Blender, [email protected], @juneb_get_help | |
Filename: Update-OneGet.ps1 | |
=========================================================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Microsoft's OneGet and start using it | |
icm $executioncontext.InvokeCommand.NewScriptBlock((New-Object Net.WebClient).DownloadString('https://gist.githubusercontent.com/ianblenke/27f29e3a4a64f0296abe/raw/428e4a8f043d67a1ecce764c1173856f7b1002be/Update-OneGet.ps1')) -ArgumentList $home\Documents\WindowsPowerShellModules\OneGet | |
Import-Module $home\Documents\WindowsPowerShellModules\OneGet\OneGet.psd1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((Get-CimInstance -ClassName Win32_OperatingSystem).Version -eq '6.3.9600') | |
{ | |
if ((Get-Ciminstance -ClassName Win32_Processor).Addresswidth -eq '64') | |
{ | |
$url = 'http://download.microsoft.com/download/5/5/2/55277C4B-75D1-40FB-B99C-4EAFA249F645/WindowsBlue-KB2894868-x64.msu' | |
} | |
else | |
{ | |
$url = 'http://download.microsoft.com/download/5/5/2/55277C4B-75D1-40FB-B99C-4EAFA249F645/WindowsBlue-KB2894868-x86.msu' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name := "Lab1a" | |
version := "1.0" | |
scalaVersion := "2.10.4" | |
libraryDependencies += "org.apache.spark" %% "spark-core" % "1.1.1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: target/scala-2.10/lab1a_2.10-1.0.jar | |
spark-submit \ | |
--class "Lab1a" \ | |
--master local[4] \ | |
target/scala-2.10/lab1a_2.10-1.0.jar | |
target/scala-2.10/lab1a_2.10-1.0.jar: lab1a.scala | |
sbt package | |
clean: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.spark.SparkContext | |
import org.apache.spark.SparkContext._ | |
import org.apache.spark.SparkConf | |
object Lab1a { | |
def main(args: Array[String]) { | |
val conf = new SparkConf().setAppName("lab1a") | |
val sc = new SparkContext(conf) |