Setup a scalable architecture with social engine 4.7 - amazon-web-services

I am having a SocialEngine 4.7 website and want to deploy it on a clustered environment on AWS. The trouble I am facing is that social engine keeps related files locally. I am not able to find a configuration to set these things.
Ex - It keeps all the images in public/ directory. I am not sure how that is mapped.
Can someone help on how to configure a scalable social engine environment? Some pointers around this are encouraged.

Looks like S3 is not a viable option here. Which AWS region are you deploying ? If it is not Mumbai; you can use EFS from AWS.

Related

How to host based routing different version in same AWS EB application

The question come from here that recently I am required to start a new project using AWS, while I was GCP developer before.
In GCP, I can deploy my application to AppEngine(similar to EB) with versioning like gcloud app deploy settings.yaml --version dev. Such that I can have host based routing on two links --
my-project.xxxx.com
dev.my-project.xxxx.com
Such that I can let others to have a domain for testing without starting an new instance, sharing all environment settings, dbs and storage.
However, when I come to AWS, it seems the story is completely different.
I try to follow this guide https://aws.amazon.com/blogs/aws/new-host-based-routing-support-for-aws-application-load-balancers/, but it is just for routing to different instances.
By the way I know that EB application can have multiple versions, so is it possible to do something like
my-project.xxxx.com -> go to default version
dev.my-project.xxxx.com -> go to version with tag 'dev'
So 2 questions,
Can I achieve what I want?
If can't, is starting another EB instance for testing only choice?

django deployment on GCP with kubernetes

I finally got my first django project and I need help in deploying it in GCP with kubernetes.
I've never deployed any project before so it's a bit frustrating for me with the client nagging on my head.
it's an E-learning platform so I want to use GCP with kubernetes (for CI/DI since there will be a lot of updates for the project) and Google cloud storage for storing media files.
i'd love to have some help concerning deployment, things to do/don't, and some useful links to start with.
ps: this is my first question so be easy on me
Your question is too wide, try starting first and then asking a question - as we won’t be able to explain an universal way of deploying Django applications in GCP. I recommend starting from getting familiar with GCP services.
There is a really cool but paid course on Coursera platform ("Getting Started with Google Kubernetes Engine") with practical hands-on labs on how to use Kubernetes on GCP in pair with CI/CD tool like Jenkins. You can also find more about Jenkins in GCP in here.
You will also find there how to:
Use different deployment strategies with Kubernetes (Rolling Updates,
Canary and Blue-Green Deployments) with simple hello-world app.
Create a continuous delivery pipeline using Jenkins
You can enroll into this course with free trial account.

AWS Elastic Beanstalk - Using Mongodb instead of RDS using Python and Django environment

I've been following the official Amazon documentation on deplaying to the Elastic Bean Stalk.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python.html
and the customization environment
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html#customize-containers-format
however, I am stuck. I do not want to use the built in RDS database I want to use mongodb but have my django/python application scale as a RESTful frontend or rather API endpoint for my users.
Currently I am running one EC2 instance to test out my django application.
Some problems that I have with the Elastic Bean:
1. I cannot figure out how to run commands such as
pip install git+https://github.com/django-nonrel/django#nonrel-1.5
Since I cannot install the device mongo driver for use by django I cannot run my mongodb commands.
I was wondering if I am just skipping over some concepts or just not understanding how deploying on the beanstalk works. I can see that beanstalk just launches EC2 instances and possibly need to write custom scripts or something I don't know.
I've searched around but I don't exactly know what to ask in regards to this. Top results of google are always Amazon documents which are less than helpful in customization outside of their RDS environment. I know that Django traditionally uses RDS environments but again I don't want to use those as they are not flexible enough for the web application I am writing.
You can create a customize AMI to your specific needs the steps are outline in the AWS documentation below. Basically you would create a custom AMI with the packages needed to host your application and then update the Beanstalk config to use your customize AMI.
Using Custom AMIs

code deployments on EC2

There are quite a few resources on deployments of AMI's on EC2. But are there any solutions to incremental code updates to a PHP/Java based website?
Suppose I have 10 EC2 instances all running PHP / Java based websites with docroots local to the instance. I may want to do numerous code deployments to it through out the day.
I don't want to create a new AMI copy and scale that up to new instances each time I have a code update.
Any leads on how to best do this would be greatly appreciated. We use subversion as our main code repository and in the past we've simply done an SVN update/co when we were on one to two servers.
Thanks.
You should check out Elastic Beanstalk. Essentially you just package up your WAR or other code file, upload it to a bucket via AWS's command line/Eclipse integration and the deployment is performed automatically.
http://aws.amazon.com/elasticbeanstalk/
Elastic Beanstalk is exactly designed to do this for you. We use the Elastic Beanstalk java/tomcat flavor but it also has support for php, ruby, python environment. It has web console that allows you to deploy code (it even keeps history of it), it also has git tool to deploy code from command line.
It also has monitoring, load balancer, auto scaling all built in. Only a few web form entries to control all these.
Have you considered using a tool designed to manage this sort of thing for you, Puppet is well regarded in this area.
Have a look here:
https://puppetlabs.com/puppet/what-is-puppet/
(No I am not a Puppet Labs employee :))
Capistrano is a great tool for deploying code to multiple servers at once. Chef and Puppet are great tools for setting up those servers with databases, webservers, etc.
Go for a Capistrano . Its a good way to deploy your code on multiple servers .
As already mentioned Elastic Beanstalk is a good option if you just want a webserver and don't want to worry about the details.
Also, take a look at AWS CodeDeploy. You can have much more control over the lifecycle of your instance and you'd be looking at something very similar to what you have now (a set of EC2 instances that you setup). You can even get automatic deployments on instance launch with Auto Scaling.
You can either use Capsitrano or TravisCI.

Drupal with Amazon Web Services?

I'm not sure if this is the write place to ask, but this is the only site I know where I get my questions answered... anyways
I wanted to install drupal but where should I host it? Can amazon web service host this such application? Do I need to go somewhere else and host it? I do have an account with inmotionhosting, but I was thinking if Amazon does the job, why not just use it? Any thoughts and opinions?
You can install Drupal on AWS EC2 if you have sys admin experience. Otherwise you will need to use a managed platform, like Cloudways, for that. Configuring web server like Apache and Nginx, cache like Varnish and Memcached and other features on AWS is little difficult. Many managed servers have those features available in their platform so you don't have to configure anything or go through long process of installing application on AWS.
Amazon Web Services (AWS) will host Drupal no problem.
The service you're looking for is Amazon Elastic Compute Cloud (Amazon EC2). It's pretty much equivalent to a private server with which you can do almost whatever you want (Web hosting included). The downside is that you have to do all the setup yourself.
If you don't know how to install Apache or configure your own Linux machine, you'd probably be better off with managed hosting where they'll set everything up for you.
You can also just use AWS Cloudformation to set up your drupal environment. It's a service that is part of AWS that will set up your stack for you. you may still need to know how to handle your config files but at least you do not have to go into installing the DB , Apache etc all manually.
http://aws.amazon.com/cloudformation/
Bitnami provides a free (Apache-licensed) pre-built Drupal image for AWS that you launch easily. It is great for quickly testing something but if you choose the right instance for your expected load, also for production (disclaimer: I am a cofounder of Bitnami, though as I mentioned the image is open source)
Drupal can be deployed and hosted automatically on Jelastic PaaS. You won't need to configure it from scratch. And if you wish to make some custom settings while installation, you can also easily install it manually. Both variants are described in the guide.
As a result, you'll get automatic scaling, pay-per-use pricing, management via intuitive UI, a wide choice of local service providers from different countries and other options to run your Drupal effectively.