elastic-beanstalk


Elastic Bean Stalk - Failed to add user


I'm trying to add celery service to elastic bean stalk environment. So I decided to create first user and group "celery". I follow instructions from page http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-users, and I created config:
groups:
celery:
gid: "101"
users:
celery:
groups:
- celery
uid: "1501"
homeDir: "/opt/python/celery"
But during deploy, I get error:
[2017-02-10T08:59:23.899Z] INFO [16595] - [Application update app-43a4-170210_095832#474/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild] : Activity execution failed, because: Failed to add user celery (ElasticBeanstalk::ExternalInvocationError)
I also was modifing homeDir, and uid, and login, and gruop id, but it doesn't help. How to fix it? Or how to debug useradding by elastic bean stalk?
Workaround with commands sections:
groups:
celery:
gid: "101"
commands:
command 00_add_user_celery:
command: useradd -d /opt/python/celery -g celery -u 1501 celery
ignoreErrors: true
The workaround by 404pio offers a solution, but the ignoreErrors set to true can hide surprise errors.
I commented on that answer, but formatting is limited and gets hard to understand. Here is a way to improve on error cases:
groups:
celery:
gid: "101"
commands:
command 00_add_user_celery:
test: test ! "`id -u celery 2> /dev/null`"
command: useradd -d /opt/python/celery -g celery -u 1501 celery
ignoreErrors: false
ignoreErrors: false is the default and could also be omitted.

Related Links

Creating custom scaling trigger for elastic beanstalk
Failing to deploy flask app on AWS Elastic Beanstalk environment
Elastic Beanstalk IAM developer permissions
Elastic beanstalk not using reserved instance
Updating AWS Elastic Bean has encountered a . How to resolve this?
How to automatically remove instances in EB whose status OutOfService is?
chmod configuration in elastic beanstalk
Where can I find elastic beanstalk “instance health for details”
Elastic Cache stuck in creating state
How to get Elastic Beanstalk to send notifications for all log messages?
In elastic beanstalk, how do I run a command before the container is launched?
Unable to add new environment variable to elastic beanstalk
AWS ElasticBeanstalk and AWS CloudWatch
How do I creating a Route53 DNS record for my beanstalk environment?
Hook or something in Gitlab to do a git aws.push to AWS Elastic Beanstalk
cannot deploy - ERROR: You cannot have more than 500 Application Versions

Categories

HOME
apache-spark
web-services
performance-testing
isis
xamarin.forms-listview
libreoffice
gluon
wikipedia-api
restsharp
whitespace
drag
wav
light-inject
editor
jscrollpane
asp.net-mvc-5.2
aar
game-maker-language
haml
montecarlo
iteration
code-signing
simple-html-dom
effects
arduino-esp8266
sql-server-2014-express
laravel-valet
plm
instance
scom
swipe
petrel
advanced-installer
google-domain-api
gridstack
argparse
ibm-wcm
google-slides
php-5.5
ulimit
freerdp
oracle-aq
uifont
easyhook
db2400
kombu
surroundscm
directsound
sizeof
ng-annotate
webclient-download
administrator
subroutine
mtp
hypervisor
avalonedit
pegkit
stringr
solr-boost
iife
openxls
json-web-token
computer-science-theory
asf
hebrew
disabled-input
ioerror
sizzle
dependency-walker
clean-urls
mixing
datakey
msxsl
working-directory
force.com
hpple
j#
proxy-classes
consistent-hashing
data-oriented-design
jetspeed2
facebook-authentication
machine.config
apache-config
high-traffic
net-ssh
metaphone
plumtree

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App