Wie kann ich eine RDS-Instanz mit dem create-environment
oder einem anderen Unterbefehl von aws elasticbeanstalk
erstellen? Ich habe mehrere Kombinationen von Parametern vergeblich versucht. Unten ist ein Beispiel.AWS CLI create RDS mit elasticbeanstalk create-environment
APP_NAME="randall-railsapp"
aws s3api create-bucket --bucket "$APP_NAME"
APP_VERSION="$(git describe --always)"
APP_FILE="deploy-$APP_NAME-$APP_VERSION.zip"
git archive -o "$APP_FILE" HEAD
aws s3 cp "$APP_FILE" "s3://$APP_NAME/$APP_FILE"
aws --region us-east-1 elasticbeanstalk create-application-version \
--auto-create-application \
--application-name "$APP_NAME" \
--version-label "$APP_VERSION" \
--source-bundle S3Bucket="$APP_NAME",S3Key="$APP_FILE"
aws --region us-east-1 elasticbeanstalk create-environment \
--application-name "$APP_NAME" \
--version-label "$APP_VERSION" \
--environment-name "$APP_NAME-env" \
--description "randall's rails app environment" \
--solution-stack-name "64bit Amazon Linux 2014.03 v1.0.0 running Ruby 2.1 (Puma)" \
--cname-prefix "$APP_NAME-test" \
--option-settings file://test.json
Und der Inhalt test.json
:
[
{
"OptionName": "EC2KeyName",
"Namespace": "aws:autoscaling:launchconfiguration",
"Value": "a-key-is-here"
},
{
"OptionName": "EnvironmentType",
"Namespace": "aws:elasticbeanstalk:environment",
"Value": "SingleInstance"
},
{
"OptionName": "SECRET_KEY_BASE",
"Namespace": "aws:elasticbeanstalk:application:environment",
"Value": "HAHAHAHAHAHA"
},
{
"OptionName": "DBPassword",
"Namespace": "aws:rds:dbinstance",
"Value": "hunter2"
},
{
"OptionName": "DBUser",
"Namespace": "aws:rds:dbinstance",
"Value": "random"
},
{
"OptionName": "DBEngineVersion",
"Namespace": "aws:rds:dbinstance",
"Value": "9.3"
},
{
"OptionName": "DBEngine",
"Namespace": "aws:rds:dbinstance",
"Value": "postgres"
}
]
Wer weiß, warum dies nicht möglich ist? Alles, was ich mit einem aws:rds:dbinstance
Namespace spezifiziere, scheint aus der Konfiguration entfernt zu werden.
Also ist die '01-rds.config' wie die EB Kommandozeilen-Tools es tun? – ranman
Haben Sie das auch versucht? Wenn ich es versuche, enden meine Umgebungen sofort und ich kann anscheinend keine Protokolle von ihnen bekommen. – ranman
SWEET Ich habe es herausgefunden. Die ekstatische Freude, die ich gerade erlebe, ist fantastisch. Ihr schaukelt. Ich habe eine kleine Bearbeitung zu Ihrer Antwort korrigiert die Parameter-Namen für 01-rds.config Ich habe herausgefunden, das ist, wie die eb Kommandozeilen-Tools es tun. – ranman