Installing CWCloud on K8S is so easy!
Hi and Merry Christmas 🎄.
With all the demos we've done lately, some people asks us a way to install CWCloud easily on localhost to give it a try, especially for the serverless part.
Let's start with a quick reminder on what is CWCloud: it's an agnostic deployment accelerator platform which provides the following features:
- DaaS or Deployment as a Service: you can checkout this tutorial to understand how DaaS is working with cwcloud and what's the difference between IaaS, PaaS and DaaS.
- FaaS or Function as a Service: you can checkout this blogpost to understand what is the purpose of this feature
- Observability and monitoring: you can checkout this tutorial
At the time of writing, here's the different component used by CWCloud to run:
- A RESTful API
- A Web GUI1
- Some asynchronous workers to schedule run the serverless function
- ObjectStorage
- PostgreSQL as relational and JSON database
- Redis for the cache and message queuing
- Flyway DB SQL migrations
It can be seen as a bit heavy but believe me it's not, it can run on a single Raspberry PI!
In order to self-host CWCloud, we provide three ways (the three are relying on docker images):
But this is not enough to bootstap it in seconds. In this blogpost we will show you how to run CWCloud with our CLI cwc using kind2 in order to use some feature which doesn't not depends on the external services like the FaaS or the monitor features.
Just a bit of reminder, here's how to install kind
, kubect
and helm
with brew
:
brew install kubectl
brew install helm
brew install kind
Then you can also install our cwc
cli using brew
3:
brew tap cwc/cwc https://gitlab.comwork.io/oss/cwc/homebrew-cwc.git
brew install cwc
Once it's done, you can create your cluster with kind
:
kind create cluster
And then, simply run the following command:
cwc bootstrap
Then, wait until the pods are Running:
kubectl -n cwcloud get pods
Then you can open port-forward to the API and GUI in order to be able to open the GUI in a web browser:
cwc bootstrap pfw
You'll be able to access the GUI through this URL: localhost:3000
The default user and password are the following:
- Username:
sre-devops@comwork.io
- Password:
cloud456
Of course if you need to override some helm configurations, you can with this command:
cwc bootstrap --values my-values.yaml
It's might be necessary if you want to configure the DaaS feature which is in a "no operation" mode by default. In order to fully use it, you'll have to follow all those configurations tutorials depending on the cloud provider you want to enable.
And finally if you want to uninstall, here's the command:
cwc bootstrap uninstall
Now I'll let you with this five minutes video tutorial on how to use the FaaS, you can fully reproduce on your local environment:
Enjoy!
Footnotes
-
Graphical User Interface ↩
-
Of course you can replace kind, by something equivalent like k3d or minikube as you wish. ↩
-
We also provide other way to install our cli if you don't have
brew
available on your operating system, you can refer to this tutorial. We're supporting Linux, MacOS and Windows for both amd64 and arm64 architectures. ↩