Example: Local Deployment
In this example we will demo how to deploy SOAJS by leveraging a local Kubernetes cluster. You need the following:
- A macbook, any decent MacBook will do the trick
- Local Docker with enabled Kubernetes from the Preferences. click here to learn more
- SOAJS Installer. click here to learn more
Installation steps
1- you need to create a configuration file as follow:
- mongo: This is where you specify the mongo cluster you want to use. external=false means SOAJS will install an instance of mongo to persist its data there.
- kubernetes: This where you specify the kubernetes information.
- nginx: This is where you specify the following:
- domain: is the main domainÂ
- apiPrefix: the api prefix which will end up as [apiPrefix.domain]
- sitePrefix: the site prefix which will end up as [sitePrefix.domain]
- deployType: can be one of the following:
- NodePort
- LoadBalancer
- sslType: This where where you specify how you want to add the https certificate. You have 2 options: secret or pvc. Check below for more information
- sslSecret: If sslType is 'secret'  then you must provide the path for both needed files private_key and fullchain_crt. Check below for more information
- httpPort: Usually this is 80. in the above example we used 30080 because locally port 80 is not free
- httpsPort: Usually this is 443. in the above example we used 30443 because locally port 443 is not free
- owner: the owner user and credential informationÂ
2- Run the following command:
sudo soajs remote-installer install /..PATH_TO../myconfigfile.json
3- Access SOAJS console
You need to update your local /etc/hosts as follow:
127.0.0.1 dashboard-api.soajs.org 127.0.0.1 dashboard.soajs.org
Once you update the /etc/hosts, open your browser and go to http://sitePrefix.domain:httpPort/, based on  the above configuration it will be: http://dashboard.soajs.org:30080/Â
HTTPS as Secret
click here for more information
HTTPS as PVC
click here for more information
Serviceaccount problem
If you face an error related to service account, for example:
ERROR SOAJS Installer: namespaces is forbidden: User "system:serviceaccount:default:default" cannot list resource "namespaces" in API group "" at the cluster scope
you need to create the service account as explained here