我試圖將芹菜服務添加到彈性豆莖環境。所以我決定創建第一個用戶和組「芹菜」。我遵循http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-users頁的說明,我創建的配置:Elastic Bean Stalk - 添加用戶失敗
groups:
celery:
gid: "101"
users:
celery:
groups:
- celery
uid: "1501"
homeDir: "/opt/python/celery"
但是部署過程中,我得到錯誤:
[2017-02-10T08:59:23.899Z] INFO [16595] - [Application update [email protected]/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: Failed to add user celery (ElasticBeanstalk::ExternalInvocationError)
我也被對矯正HOMEDIR,和UID,以及登錄,並gruop ID,但它沒有幫助。如何解決它?或者如何通過彈性豆莖來調試useradding?
我寧願將'ignoreErrors'設置爲'false'來避免意外。爲了使腳本正常工作,可以依靠測試選項。只需添加像'test:test! 「'id -u celery 2>/dev/null'」'到命令部分。 –