Skip to content

Instantly share code, notes, and snippets.

@threecourse
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save threecourse/cff80f2844e7a6f97bc5 to your computer and use it in GitHub Desktop.
Save threecourse/cff80f2844e7a6f97bc5 to your computer and use it in GitHub Desktop.
# 各自の環境に依存する変数
$ec2path = "ec2-api-tools-x.x.x.xのディレクトリのパス"
$aws_access_key = "aws_access_keyを入力"
$aws_secret_key = "aws_secret_keyを入力"
# 環境変数
$Env:JAVA_HOME = "C:\Program Files (x86)\Java\jre7"
$Env:EC2_HOME = $ec2path
$Env:Path += ";%EC2_HOME%\bin"
$Env:AWS_ACCESS_KEY = $aws_access_key
$Env:AWS_SECRET_KEY = $aws_secret_key
$Env:EC2_URL="ec2.ap-northeast-1.amazonaws.com"
.\create_Ad_security.bat
.\create-HPC-sec-group.bat
.\create_Ad_security2.bat
set DM2="SG - Domain Member2"
set CIDR="<ローカルPCのIPアドレス>"
:: ==============================================================================
:: Creates Security groups Prior to Adding Rules
:: ==============================================================================
call ec2addgrp %DM2% -d "Active Directory Domain Member2"
:: ==============================================================================
:: Security group for Domain Member2
:: ==============================================================================
:: http://langisser.wordpress.com/2013/05/29/how-to-share-folder-on-amazon-ec2-windows-server/
call ec2auth %DM2% -o %DM2% -P TCP -p 139
call ec2auth %DM2% -o %DM2% -P TCP -p 445
call ec2auth %DM2% -o %DM2% -P UDP -p 137
call ec2auth %DM2% -o %DM2% -P UDP -p 138
call ec2auth %DM2% -s %CIDR% -P TCP -p 139
call ec2auth %DM2% -s %CIDR% -P TCP -p 445
call ec2auth %DM2% -s %CIDR% -P UDP -p 137
call ec2auth %DM2% -s %CIDR% -P UDP -p 138
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment