Eucalyptus 使用者手冊
【1.註冊】
$ wget http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-30349.zip
$ unzip ec2-api-tools-1.3-30349.zip
$ export EC2_HOME=/path/to/installed/ec2-commandline-tools
$ export PATH=$PATH:$EC2_HOME/bin
$ source ~/.euca/eucarc
【3.快速開始】
- 使用者使用 EC2 tools 來控制 Euc
- 查詢 Euc 系統
$ ec2-describe-images
$ ec2-describe-instances
$ ec2-describe-availability-zones
$ ec2-describe-keypairs
- 申請 key pair,以便 ssh 登入 instance
$ ec2-add-keypair mykey >mykey.private
('mykey' is the name for the key in Eucalyptus, 'mykey.private' is the file to be used by ssh)
$ chmod 0600 mykey.private
$ ec2-run-instances <emi-id> -k mykey -n <number of instances to start>
-
### 允許 instance 開啟 22 port ###
$ ec2-authorize default -P tcp -p 22 -s 0.0.0.0/0
### 給予 Instance IP ###
$ ec2-allocate-address
$ ec2-associate-address <IP from allocate> -i <instance ID>
### 使用 ssh 登入 ###
$ ssh -i mykey.private root@<accessible-instance-ip>
### 關掉 Instances ###
$ ec2-terminate-instances <instance-id1> <instance-id2> ... <instance-idn>
Regerence