我有StarCluster配置文件,如下所示:
####################################
## StarCluster Configuration File ##
####################################
[global]
DEFAULT_TEMPLATE=smallcluster
#############################################
## AWS Credentials and Connection Settings ##
#############################################
[aws info]
AWS_ACCESS_KEY_ID = AKXXXXXXXXXXXXXXXXRQ
AWS_SECRET_ACCESS_KEY = W57kWxzzzdsfasdfasfdsflk981mc4mmsPat7+C3
# replace this with your account number
AWS_USER_ID=006171111111
# Uncomment to specify a different Amazon AWS region (OPTIONAL)
# (defaults to us-east-1 if not specified)
# NOTE: AMIs have to be migrated!
AWS_REGION_NAME = ap-northeast-1
AWS_REGION_HOST = ec2.ap-northeast-1.amazonaws.com
# AWS_REGION_NAME = us-east-1
# AWS_REGION_HOST = ec2.us-east-1.amazonaws.com
###########################
## Defining EC2 Keypairs ##
###########################
# Sections starting with "key" define your keypairs. See "starcluster createkey
# --help" for instructions on how to create a new keypair. Section name should
# match your key name e.g.:
[key mykey]
KEY_LOCATION=~/.ssh/mykey.rsa
################################
## Defining Cluster Templates ##
################################
[cluster smallcluster]
# change this to the name of one of the keypair sections defined above
KEYNAME = mykey
# number of ec2 instances to launch
CLUSTER_SIZE = 2
# create the following user on the cluster
CLUSTER_USER = sgeadmin
# optionally specify shell (defaults to bash)
# (options: tcsh, zsh, csh, bash, ksh)
CLUSTER_SHELL = bash
NODE_IMAGE_ID = ami-3393a45a
NODE_INSTANCE_TYPE = m1.small
使用以下命令启动群集没有问题:
AWS_REGION_NAME = us-east-1
AWS_REGION_HOST = ec2.us-east-1.amazonaws.com
但是当我把它改为:
AWS_REGION_NAME = ap-northeast-1
AWS_REGION_HOST = ec2.ap-northeast-1.amazonaws.com
我收到此错误:
$ starcluster start mycluster
StarCluster - (http://star.mit.edu/cluster) (v. 0.95.6)
Software Tools for Academics and Researchers (STAR)
Please submit bug reports to starcluster@mit.edu
>>> Using default cluster template: smallcluster
>>> Validating cluster template settings...
!!! ERROR - Cluster settings are not valid:
!!! ERROR - Keypair 'mykey' does not exist in region 'ap-northeast-1'
做正确的方法是什么?
答案 0 :(得分:1)
密钥对分别存储在每个区域中。您需要在ap-northeast-1
区域中创建新的密钥对,或者在该区域中导入密钥对。
您需要私钥(.pem
文件)才能导入密钥对。