Can any Bluemix application run on AWS? or Local server? - amazon-web-services

I know this kind of question is basic concept of bluemix but, I just worder if I develop an application on public bluemix using certain runtime, such as Node.js or Liberty, can this application run on my own Local server or AWS?
Is it depends on bluemix-provided services that I bind to application?
or If I install cloudfoundry on my local server or AWS cloud host, can the application run without any problem or issue?
thank you

You can try out Lattice. It will allow you to run your own local or AWS hosted minimal cloudfoundry runtime. This will allow you to run your applications. If the services you are talking to are publicly accessible ie. Have a publicly routable host and port, then you can expose them as environment variables in your CF app manifest and reach out to them from your own CF or you could look at user provided services. You will need to upload buildpacks to your lattice/cf installation that are not a part of the standard installation.
DISCLAIMER: Lattice is useful during development and NOT recommended for production use. You should setup the entire cloudfoundry for that.

Related

What are the differences: Django, Apache, AWS

I'm studying web and confused about the concepts of Django, Apache, and AWS.
I have an experience of developing web backend with Django and AWS.
Django handled the interactions between web browser and server.
AWS enabled the clients to share the same server and data.
But, what is Apache? This wasn't considered during the development.
According to my research, Apache is web server application.
But, I can't tell the exact difference of it with AWS.
Does AWS include Apache?
Please help me make sure what Apache is. Thanks :)
Django
Django itself is web framework used for developing web applications based on python. Which is used for making development proccess more simple and easy. It provides various built in things such as Django ORM, Forms, Security, Authentication, Admin and many third party packages that are available on django packages. Which enables you to develop your application rapidly.
AWS
AWS stands for amazon web services which provides cloud applications such as computation units, cloud storage, databases, cache servers and so on. It provides computation units to deploy your web apps on. i.e EC2 intances (Elastic compute cloud). As well as it provides database such as RDS (Amazon relational database) along with S3 buckets (Amazon storage) for storing media files and serving static ones.
Apache
Apache is web server which is used to deploy web applications on production. You can setup Apache web server on you premises or let you setup in cloud platform such as Amazon EC2 instances. By defalt Django or any other web apps run on single thread which do not give better performance. Apchae web server enables you to run multiple threads/ workers to handle parallel request simultaneously.
By putting all together You can develop you application using Django framework. Than choose AWS for deployment steps. i.e EC2 instance for Apache web server setup, RDS or any other database instance and S3 bucket for storage option.
Please note that this setup may be vary upon your requirements
These are two completely different services/software. AWS (Amazon Web Services) is a cloud platform where you run applications and softwares.
Apache on the other hand is a SOFTWARE that run on servers. So, essentially you can run Apache on AWS.
That is the basic idea. AWS is a platform and Apache can run on top of AWS.
The stated goal for Django is to offer a web application framework that enables quick development and minimal code.That goal can be accomplished with a simple single-threaded web server that simply facilitates development and testing.
The goal of Apache httpd, Nginx, IIS, etc. on the other hand is to offer exceptionally scalable and performant web servers. These applications are highly configurable as all applications differ and there's no one size fits all. They also require different expertise to design, implement and maintain.

Migrate from Dedicated Server to Google Cloud Platform. Is that possible?

My dedicated server will expire soon. I just consider whether to renew it or migrate to Google cloud platform.
There are several points needs to consider:
Currently I am using Google Cloud Storage API to host static large files for my website. That will be fine.
My website also contain dynamic contents, such as PHP. Will Google supports to host such contents?
My website also use WordPress and MySQL database. Will Google support to host such contents?
My server is also host mailboxes and mail forwarders. Will Google support to host these?
My server is also host several add-on domains via cPanel. Will Google support to host these?
To the best, is it possible to use cPanel on Google cloud platform as I am familiar with cPanel.
Thank
Yes, you can migrate a dedicated server to Google Compute Engine. It is possible to run cPanel on a GCE instance. From your question, it sounds like you are used to a managed service where they have configured the server for you. GCE is not managed, so you will have to do much more systems administration to set it up and operate the server.
It is not easy to run email on a GCE instance because outbound port 25 is blocked by default.

AWS - What are the exact differences between EC2, Beanstalk and LightSail?

What are the exact differences between EC2, Beanstalk and LightSail in AWS?
What are good real time scenarios in which I should use these services?
They are all based on EC2, the compute service from AWS allowing you to create EC2 instances (virtual machines in the cloud).
Lightsail is packaged in a similar way than Virtual Private Server, making it easy for anyone to start with their own server. It has a simplified management console and many options are tuned with default values that maximize availability and security.
Elastic Beanstalk is a service for application developers that provisions an EC2 instance and a load balancer automatically. It creates the EC2 instance, it installs an execution environment on these machines and will deploy your application for you (Elastic Beanstalk support Java, Node, Python, Docker and many others)
Behind the scenes, Elastic Beanstalk creates regular EC2 instances that you will see in your AWS Console.
And EC2 is the bare service that allows the other to be possible. If you choose to create an EC2 instance, you will have to choose your operating system, manage your ssh key, install your application runtime and configure security settings by yourself. You have full control of that virtual machine.
In simple terms:
EC2 - virtual host or an image. which you can use it to install apps and have a machine to do whatever you like.
Lightsail - is similar but more user friendly management option and good for small applications.
Beanstalk - an orchestration tool, which does all the work to create an EC2, install application, software and give you freedom from manual tasks in creating an environment.
More details at - https://stackshare.io/stackups/amazon-ec2-vs-amazon-lightsail-vs-aws-elastic-beanstalk
I don't know if my scenario is typical in any way, but here are the differences that were critical for me. I'm happier EC2 than EB:
EC2:
just a remote linux machine with shell (command line) access
tracable application-level errors, easy to see what is wrong with your application
you can use AWS web console panel or AWS command line tool to manage
you will need repeated steps if you want to reproduce same environment
some effort to get proper shell access (eg fix security rule to your IP only)
no load balancer provided by default
Elastic Beanstalk
a service that creates a EC2 instance with a programming language of your choice (eg Python, PHP, etc)
runs one application on that machine (for python - application.py)
upload applications as .zip file, extra effort needed to use your git source
need to get used to environment vs applications mental model
application level errors hidden deep in the server logs, logs downloaded in separate menu
can be managed by web console, but also needs another CLI tool in addition to AWS CLI (you end up installing two CLI tools)
provides load balancer and other server-level services, takes away the manual setup part
great for scaling stable appications, not so much for trial-and-see experimentaion
probably more expensive than just an EC2 instance
Amazon EC2 is a virtual host, in other words, it is a server where you can SSH configure your application, install dependencies and so on, like in your local machine. EC2 has a dozen of AMI (Amazon Machine Image: it is some kind of operating system of your EC2 server, for instance, you can have EC2 running on Linux based OS or in windows OS). To summarize, it is a great idea if you need a machine in your hands.
Amazon Lightsail is a simple tool that you can deploy and manage application with small management of servers. You can find it very practical if your application is small, For instance, it will perfectly fit your application if you use Wordpress or other CMS.
AWS Elastic Beanstalk is an orchestration tool. You can manage your application within that service, it is more elevated then AWS Light Sail.
If you still do not understand the differences, you can take a look at each service overview.
There is also an answer in Quora
I have spent only 10 mins on these technologies but here is my first take.
EC2 - a baremetal service. It gives you a server with an OS. That is it. There is nothing else installed on it. So if you need a webserver (nginx) or python, you'll need to do it yourself.
Beanstalk - helps you deploy your applications. Say you have a python/flask application which you want to run on a server. Traditionally you'll have to build the app, move the deployable package to another machine where a web server should be installed, then move the package into some directory in the web server. Beanstalk does all this for you automatically.
LightSail - I haven't tried it but it seem to be an even simpler option to create a server with pre-installed os/software.
In summary, these seem to make application deployment more easier by pre-configuring the server/EC2s with the required software packages and security policies (eg. port nos. etc.).
I am not an expert so I could be wrong.

Deploying a web application for Selenium testing on AWS EC2

I have a web application that uses Selenium in backend to run few scripts when invoked by user. I want to deploy this web app on AWS.
Here are my findings so far:
I can have a windows EC2 instance created and then I can install tomcat, firefox and all the necessary stuff. Then using putty or any other client, I can deploy my war and start tomcat.
I can directly make use of Elastic Beanstalk and deploy my war file there itself but then, there is no windows EC2 available for beanstalk and I don't know how to install firefox there and make my application work.
What is the best way to achieve this and what steps should I follow. I want to install a specific firefox version to be able to make it run with my selenium scripts.
There are two separate things here:
Deployment of web application on AWS cloud
Run the selenium tests against your web application
According to me, you should first think of deploying a web application to AWS cloud. There are many ways by which you can get it deployed to AWS cloud with below services:
Spin a new AWS EC2 instance, install all required software and deploy the web application.
Use AWS elastic beanstalk service with either with tomcat or docker.
Use AWS ECS if you prefer docker
According to me, second option will be quick for you with tomcat environment option. If you select tomcat environment, then your platform will be Tomcat 8 Java 8 on 64bit Amazon Linux.
Now, here comes the second part. You can have below options for your browser environments.
Spin a new separate AWS EC2 instances with correct AMI and install your specific browsers on these instances.
If you prefer SaaS, then you can take a look at browserstack or SauceLabs for remote environment.
If you have CI(jenkins/travis/Circle CI), then make use of that infrastructure to luanch your tests with either option from the above.

Communication between PCF and External Application

I am trying to have a simple client and server application that will communicate over SMPP(TCP/IP) protocol.
I was successful when both the client and server were run on my local, but when I tried to push the client to Pivotal Cloud Foundry, it could not connect anymore to the server running on my local
Does Pivotal have restrictions in terms of communication between an app on PCF to external applications?
Thanks in advance :)
I know it is bit late to answer this.
Your question does not say whether you are using PCF DEV on your local computer or deployed it on cloud.
If you deployed it on PCF DEV, then it cannot access any of the local resources directly. You may have to define CUPS (create-user-provided-service) and then access it.
If you have deployed it on cloud, you may not be able to access a service running on your local machine, unless you have a publicly accessible IP address. If so, again, define it as CUPS and use it.