superset icon indicating copy to clipboard operation
superset copied to clipboard

Any Instruction on Deploying Superset on AWS Elastic beanstalk?

Open Him121 opened this issue 8 years ago • 8 comments

Hi Can you please direct me on instruction if available to deploy Superset on AWS Elastic beanstalk? and also setup HTTPS.

Thanks,

Him121 avatar Apr 13 '18 17:04 Him121

I know nothing about Beanstack, but maybe this helps: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-flask.html

If you get through hardships please share with the rest of the community.

mistercrunch avatar Apr 13 '18 21:04 mistercrunch

Sure... planning to setup on next few weeks for demo.... Will share. Thanks.

Him121 avatar Apr 13 '18 23:04 Him121

Hi,

I have tried setting it up on Elastic Beanstalk. Initially ELB is throwing many errors as many of the pre-requisite tools that are required for deploying superset are not available when ELB tries to deploy the application. So, in order to overcome that, I had to use prehooks feature for ELB to install pre-requisites before actually AWS tries to deploy the application.

This is what i have setup in .ebextensions folders

01_pre_deps.config packages: yum: gcc: [] gcc-c++: [] libffi-devel: []

91_update_env.config files: "/opt/elasticbeanstalk/hooks/preinit/91_update_env.sh": mode: "000755" owner: root group: root content: | #!/usr/bin/env bash yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel cyrus-sasl-devel.x86_64

99_init_superset.config files: "/opt/elasticbeanstalk/hooks/appdeploy/post/99_init_superset.sh": mode: "000755" owner: root group: root content: | #!/usr/bin/env bash . /opt/python/run/venv/bin/activate fabmanager create-admin --app superset --username admin --password admin --firstname admin --lastname admin --email [email protected] superset db upgrade superset load_examples superset init gunicorn -w 4 -k gevent --timeout 120 -b 0.0.0.0:443 --limit-request-line 0 --limit-request-field_size 0 --statsd-host localhost:8088 superset:app wsgi &

After doing the above, I was able to get the environment up and running but on AWS Beanstalk AWS automatically does a health check and deletes an instance if it finds the instance health is not right.

For the ELB environment that's being setup for superset, AWS is continuously failing health checks and it's invoking EC2 instances replacement due to which i wasn't able to get a stable ELB env up and running.

I need to find out why health checks are failing on AWS EC2 instances invoked by ELB and if that's resolved, then should be able to bring up stable env on ELB.

Thanks

kirankumarpv avatar May 07 '18 19:05 kirankumarpv

good job @kirankumarpv

Please share as soon as you find a fix. I'm also trying for same. Did you have the whole incubator-superset-master in your .zip file? What other changes did you made apart from .ebextensions?

aayani avatar May 09 '18 07:05 aayani

Note that we now have a install/ folder in the repo where you could you could add a install/beanstack folder and share a reference implementation if you think it makes sense to do that.

mistercrunch avatar May 09 '18 15:05 mistercrunch

@kirankumarpv That seems pretty tough. Why not use docker? I have got it working fine via a multi-docker container deploy on elastic beanstalk, using the official redis image and https://hub.docker.com/r/amancevice/superset/ image. Of course you can tailor the installation with your own docker image by uploading something to ECS. Your Dockerrun.aws.json would simply just be those two images with a superset_config.py volumed in ~50 lines of code. Just make sure the ELBs and SGs are all playing nice and talking.

frankhsu avatar Jul 24 '18 04:07 frankhsu

any updates on this?

aboganas avatar Nov 06 '18 16:11 aboganas

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 10 '19 12:04 stale[bot]