So if you want to keep using this platform, you'll have to pay a fee, or you can choose another free platform to host your application. If you're willing to pay so your application can keep running, there's nothing more to say — but if you're looking for a free platform to deploy or test an application, this post is for you. This will be the first post in a series where I'll share how to deploy applications onto BizflyCloud App Engine
What is BizflyCloud App Engine?
This is a Platform as a Service (PaaS) product that gives everyone a Platform to run applications across protocols from HTTP to TCP (API, Web Static, Database, etc.). This product is aimed at developers who don't have infrastructure experience, or small and medium businesses who want to deploy an application to reach users as quickly as possible. When using Bizflycloud App Engine, you no longer need to worry about how the infrastructure operates — you can just focus on the application, like building new features, debugging, etc.
This product was just released a few days ago and is currently in Beta, so there will likely still be plenty of bugs and gaps — if you have any feedback or a feature you'd want App Engine to have while using it, don't hesitate to message me.
Okay, that's a lot of theory that might be hard to follow — let's just start trying to deploy an application onto this platform to understand how it's used.
Deploying an application
In this post I'll walk you through deploying a static website onto the BizflyCloud App Engine platform. A static website is a simple website with just a UI, no backend to handle logic behind it. Static websites aim to provide info to users, for example:
- A personal website
- A landing page
- A survey form
- And plenty of other purposes...
Preparation
Preparing the application
To deploy an application, first you definitely need to have that application, right. The application here can be source code or an already-packaged image. Deploying an Image is simple enough — in this post I'll deploy via Source code to match reality more closely, since not everyone knows how to package an application as an image.
The source code I use in this post is at this link: github.com/bizflycloud/app-engine-static-sample
You can use the code above, or apply it to your own existing code.
The source has nothing special — it's just an ordinary static web, but there are 2 files worth paying attention to: nginx.conf and mime.types. These 2 files help App Engine know your application needs to be deployed as static with the Nginx Webserver, so these are 2 essential files in the source code when you want to deploy an application with the Nginx webserver — App Engine also supports the Apache Webserver.
App Engine lets users deeply customize the webserver system (nginx, apache) used to run the static web, by editing info in the nginx.conf and mime.types files above. Let's take a quick look at the content of these 2 files.
First, the nginx.conf file — this is the nginx webserver's config file, with a few important fields explained beside them
worker_processes 1; # Number of Worker Processes
daemon off;
error_log stderr;
events { worker_connections 1024; }
http {
charset utf-8;
log_format cnb 'NginxLog "$request" $status $body_bytes_sent'; # Log config
access_log /dev/stdout cnb;
default_type application/octet-stream;
include mime.types;
sendfile on;
tcp_nopush on;
keepalive_timeout 30;
port_in_redirect off;
server {
listen 80; # The port your application runs on
root /workspace; # Where your source code lives inside the container (no need to change)
index index.html index.htm Default.htm; # Index file name config
}
}
Next is the mime.types file. This file defines how the browser processes different file types — you don't need to edit this file unless you truly understand it; the content below is a standard that works for most websites already.
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
application/rss+xml rss;
font/ttf ttf;
font/woff woff;
font/woff2 woff2;
text/mathml mml;
text/plain txt;
text/vnd.sun.j2me.app-descriptor jad;
text/vnd.wap.wml wml;
text/x-component htc;
text/cache-manifest manifest;
image/png png;
image/tiff tif tiff;
image/vnd.wap.wbmp wbmp;
image/x-icon ico;
image/x-jng jng;
image/x-ms-bmp bmp;
image/svg+xml svg svgz;
image/webp webp;
application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
application/postscript ps eps ai;
application/rtf rtf;
application/vnd.ms-excel xls;
application/vnd.ms-powerpoint ppt;
application/vnd.wap.wmlc wmlc;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeself run;
application/x-perl pl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-cert der pem crt;
application/x-xpinstall xpi;
application/xhtml+xml xhtml;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;
application/json json;
audio/midi mid midi kar;
audio/mpeg mp3;
audio/ogg ogg;
audio/x-m4a m4a;
audio/x-realaudio ra;
video/3gpp 3gpp 3gp;
video/mp4 mp4;
video/mpeg mpeg mpg;
video/quicktime mov;
video/webm webm;
video/x-flv flv;
video/x-m4v m4v;
video/x-mng mng;
video/x-ms-asf asx asf;
video/x-ms-wmv wmv;
video/x-msvideo avi;
}
Preparing an account
Basically, the application prep is done — now let's deploy this application onto App Engine. To deploy the application onto Bizflycloud's App Engine, you need an account first — this isn't too hard, go ahead:
Register an account here: manage.bizflycloud.vn/register
Once you have an account, log in, and you'll see the App Engine service in the left-side menu
Deploying
Creating an App
Applications you deploy on App Engine that are related to each other can be grouped into the same App. So first we need to create an App. Here I'll create an app named example. Once created, we'll get pushed into that app — since we don't have any service yet, there will be sample repos and Docs for each service type for reference.
Creating a Service
Next, let's choose to create a Service and enter the info as shown:
- Service name: This is the name of the service you want to deploy — this name will be used as the path when you create the 2nd service onward.
- Location: The location where your application gets deployed — choose the closest to reduce latency. (We currently only support Hanoi, more locations in the future)
In the deployment info section, this covers info about the application source you'll deploy.
- Source type: You can choose to deploy via image or source code. I have source code on git so I'll choose GIT
- Source URL: The link to your repo, in http:// or https:// form.
- Branch: The branch you want to deploy code from.
- Private mode: For private repos. My repo is Public so I don't need to check this.
Application config is the section holding info about the infrastructure and network you'll deploy:
- Config: This is the config of each container running your application.
- Replicas: The number of copies running with the config above.
- Port: The port your service is running on
- Application type: Each type of application gets packaged differently — choose the correct type for the application you want to deploy. You can hover over each button to understand each application type.
Once everything's filled in, just hit Confirm Info to deploy the application immediately.
Result
After a few minutes waiting for App Engine to package and install everything needed, you'll get back a link to access the deployed application right away
Clicking that URL will take you to your website — try it right now: example-nnwpu.appengine.bfcplatform.vn
The deployment process is fairly simple, right?
Other features
Monitoring
Monitor your application's CPU, RAM, Disk, and Network metrics 24/7 right in the Monitoring tab on the left.
Logs
App Engine gives you Runtime Logs and Build Logs
- Runtime Logs: These are logs generated while the application is running — for Nginx or Apache Webservers, this is the users' access log.
- Build Logs: These are logs from the process of packaging your application when you use Git as the Source type
There are plenty more features we're developing, have developed, and will develop. I'll keep sharing more in upcoming posts.
Wrapping up
So in this post I've shared with you a Made in Vietnam platform that lets you deploy not just Static sites but also APIs, Backends, etc. Hope this platform helps you out at work. If you run into any difficulty or have feedback while using it, feel free to reach me directly on Telegram: @HoangViet12
If you found this post good, and this platform useful, give me an Upvote and Follow me to see more posts.
If you're running into technical challenges or need help with systems, DevOps tools, I'm confident I can help. Get in touch at hoangviet.io.vn