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:
remote installer install command
sudo soajs remote-installer install /..PATH_TO../myconfigfile.json
3- Access SOAJS console
You need to update your local /etc/hosts as follow:
etc hosts
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
0 Comments