Telar Social one-click deploy: OpenFaaS

Amir Movahedi
Red Gold
Published in
4 min readMar 22, 2020

--

By the end of this article you will learn how to install Telar Social Network on OpenFaaS in ~5 minutes using Telar CLI.

Ingredient 🍲🍜

You can skip this if you have the ingredients already and it take only ~5 minutes to lunch Telar Social.

Get started

OpenFaaS® makes it simple to deploy both functions and existing code to Kubernetes

OpenFaaS option

If you need help you can use NEED HELP? button in each step of setup.

Let’s start
You can set the Telar Social project directory with entering the path in the Project Directory Field. (e.g. ~/projects/telar-social)

  • Click on NEXT moving to the next step.

General Settings

  • Enter your social network app ID We use this identifier to detect social network functions in the cluster.
  • Enter OpenFaaS username. Default is admin. We use OpenFaaS username to login with to handle some OpenFaaS functionalities like delete or deploy function.
  • Enter OpenFaaS gateway e.g. domain.com or localhost.com:31112 This is the OpenFaaS gateway address to interact with OpenFaaS.
  • Enter your social network URL e.g. https://social.com The URL can access to social network UI and api which could be different with OpenFaaS gateway.
  • Enter OpenFaaS function namespace. Default is openfaas-fn Enter functions namespace, in the case your OpenFaaS functions are in different K8S namespace .
  • Enter secret name that will be created on your K8S cluster. Default is secrets Enter secret name that you want to create in K8S cluster for social network.
  • Enter your KUBECONFIG path In the case you want to use KUBECONFIG path instead of default context, enter the kube config path. If not let the textbox empty.

Check ingredients
Check ingredients To install Telar Social we need to prepare some ingredients. Some ingredients will be prepared automatically but some need to be done by you. You can follow instruction by clicking on NEED HELP? if you need.

  • Click on NEXT moving to the next step.

Firebase Storage
Firebase Storage We use Firebase storage to store image/video.

  • We provided a public Firebase storage for testing purpose that you can apply by clicking on USE PUBLIC FIREBASE STORAGE. However we highly recommend to user your own Firebase storage.
  • Click on NEXT moving to the next step.

MongoDB Database
MongoDB We use MondoDB as a Database for Telar Social.

  • We provided a public MongoDB for testing purpose that you can apply by clicking on USE PUBLIC FIREBASE STORAGE. However we highly recommend to user your own MongoDB.
  • Click on NEXT moving to the next step.

Google reCaptcha
reCAPTCHA is a CAPTCHA-like system designed to establish that a computer user is human.

  • Create the reCAPTCHA for your domain following the instruction.
  • Click on NEXT moving to the next step.

Github OAuth
Github OAuth We use Github OAuth so users can login by their own Github account.

  • Enter your Github OAuth Secret Key following instruction.
  • Click on NEXT moving to the next step.

User Management

  • Enter email and password Telar Social admin account.
  • Telar Social use your Gmail account to send confirmation email to the users. Enter your Gmail user name password.
  • Click on NEXT moving to the next step.

Websocket
To have real-time connection for chat and notification in Telar Social we use Websocket.

  • For simplicity we use Heroku to setup Websocket server. Follow the instruction and enter the information.
  • Click on DEPLOY and we are done :)

To see the deployment log check the each repository commits.

It may takes some minutes to deploy functions running on OpenFaaS.
Wait until the build and deployment is done. To start go https://[your-social-domain]/admin/login page. Wait until you seen welcome page.

Now your Telar social is ready to use!😍🏆

Access pages
- Signup page: `https://[your-social-domain]/auth/signup`
- Login page: `https://[your-social-domain]/auth/login`

Learn more about the project 🥧 🍰 🎂 🍮 🍭 🍬

👋 For more information please visit Telar official website.

--

--

Amir Movahedi
Red Gold

Full-Stack, Cloud, Kubernetes, IoT lover, distributed system and clean architecture. (every click is valuable!) https://amir.telar.dev