NGINX & SOAJS Microservices Environment
Overview
Nginx & SOAJS Microservices Environment template includes instructions on how to provision a container cluster, configure and deploy the SOAJS API Gateway along with a Nginx Server while creating an environment. This template is only available for environment types Single Cloud Clustering and Multi-Cloud Clustering as it requires using container cluster as infrastructure.
Single Cloud Clustering
The SOAJS wizard will:
- Ask you to select which Infra Cloud Provider you would like to deploy a container technology cluster and use it as the infrastructure of this environment to deploy components at later stages
- Assis you in creating virtual machine layers if you already connected an infra cloud provider that supports virtual machines as a technology (optional)
- Ask you to provide the security phrase encryption that the SOAJS API Gateway should use to decrypt tenant keys provided in incoming requests
- Assist you in configuring and deploying the SOAJS API Gateway as a containerized service in your cluster using a catalog deployment recipe.
- Assist you in configuring and deploying the Nginx Server as a containerized service in your cluster using a catalog deployment recipe.
- Ask you to provide the domain and prefixes that should be associated with the Nginx Server so the later can capture arriving traffic.
Registry
The wizard will create the new environment and a new registry record for it in the database.
The tenant security phrase encryption will be added to the registry record so that the SOAJS API Gateway can use it along with the domain and prefixes that you have supplied for the Nginx server.
Container Technology Cluster
The wizard will create the container technology cluster at the infra cloud provider and establish a communication link with the SOAJS Console and update the registry of this environment with the details of that link.
Virtual Machine Layers
If instructed to, the virtual machine layers for this environment will be created at the infra cloud provider and will each have a label whose value is the environment code you entered.
Once the virtual machines are created and ready, you can then manage them under the infrastructure module.
SOAJS API Gateway
Once the infrastructure has been provisioned, SOAJS will then deploy its Gateway using container technology on the cluster that was created and will provide the gateway with the registry configuration.
Nginx Server
After the SOAJS API Gateway is deployed, SOAJS will then deploy the Nginx Server and provided it with the domain and prefix values you have entered along with the IP address ( computed ) of the SOAJS API Gateway Containers. The Nginx, in this case, will be configured to handle 2 types of requests based on the subdomains values you have provided:
SubDomains
API | Requests arriving to this subdomain are forwarded to the SOAJS API Gateway to handle them. |
---|---|
Static Content | Requests arriving to this subdomain are redirected to a virtual server within the Nginx container which servers static content such as HTML, CSS, JS files, images ... |
In this scenario, the Nginx Server is the entry point to your cloud for this environment and the Nginx Server uses default HTTP ports ( 80 and 443 ) to capture arriving traffic.
This means that these ports should be exposed and this is achieved by providing a catalog recipe that instructs which ports to expose and how.
At any stage after creating an environment, you can modify the port values by changing the catalog recipe you used to deploy the Nginx from, then redeploying the container of the Nginx Server.
Multi-Cloud Clustering
coming soon
Usage
This template is suitable if you want to create an environment that uses container technology as a backbone to deploy source code and resources and at the same time leverage the full capability and features offered by the SOAJS API Gateway.
The template also deploys a Nginx Server in front of the SOAJS API Gateway and masquerade the ports of the gateway. In addition, the Nginx also supports attaching SSL certificates thus adding an extra layer of security, Read More.
Once the environment is created and the gateway deployed, click on Deploy → Repositories to deploy from source code OR click on Deploy → Resources to deploy your resources using containers.