Digital Transformation for an NGO with Alibaba Cloud
With the help of latest Alibaba cloud “ crowdsourcing the cloud” campaign. We are attempting to move a non-profit organization from a completely manual process to digital with the help of Alibaba cloud. In this information age, we see people communicate through different mediums like phone calls, WhatsApp , and several other channels. We are creating a mobile app named “Vasavi Sandesh,” which in turn help the members to communicate recognize of the non-profit organisation and to initiate several other social activities at ease.
we have several features in our roadmap,
however, for now, we are focusing on
1. Share the social activities performed with several other members in the way of posting
2. like share and comment on the activities.
3. Idealize and initiate a new social activity through groups
4. every user is provided with a proper Role to control the information they upload into the application.
Who support the speeches in the backend and to include new features going forward we need a scalable and performing Backend with proper security rules. For this particular solution, we are going with “Parse.”
Parse Server is an open source version of Parse backend that can be deployed to any infrastructure that can run Node.js.
Parse Server works with the Express web application framework. It can be added to existing web applications or run by itself.
parse has great support for different programming languages; they even have several software development kits which we can quickly leverage in Android, web, and Ios.
now we will see how we can setup parse server and parse dashboard on Alibaba cloud.
the weather following steps to follow while setting up parse server and dashboard
1. Create an ECS instance
2. Create an ApsaraDB for Mongo Instance
3. setup parse server and get the parameters required for setting up parse dashboard
4. setting up parse dashboard
Creating and ECS instance. Login to Alibaba cloud console if you haven’t already. Navigate to Products elastic Compute service. By default will be saying the instance is running in all the regions. You can you can navigate to instances, select the relevant agent and then click on create the instance.
I’ll configure the whole ECS instance in 5 different steps.
1. Basic Configurations
2. Networking
3. System Configurations
4. Grouping
5. Preview
In basic configurations screen, we select Ubuntu 16.04 as the base OS image for every ECS instance. Since we are going to use Apsara DB from MongoDB as a database, we almost need 1vCPU and 4GB of RAM.
In networking, we select the default vpc, unless you have several other PC is configured.
In system configurations, you can create login credentials along with the server name description and the hostname.
You can also group the ECS instance with a particular tag; this will help to identify the instances when there several instances.
In preview screen, we will see the summary of all the information we have selected, make sure you agree to the terms of service of ECS to create the ECS instance.
Why play instance is successfully connected you will be able to see the instance in the console. I’ll also see the intranet and internet IP address to connect within Alibaba cloud and from outside Alibaba cloud respectively.
Now we will create the ApsaraDB for MongoDB instance for parse; this is the efficient way to create a parsing server and perform fewer operation activities.
The ApsaraDB for MongoDB creation is quite simple, at a high level you need to
Navigate to the Console > ApsaraDB for MongoDB > Create Instance in your region
Select all the values as required (Remember “Wired Tiger” is only supported by parse)
Select the storage space and RAM as required, the starter version should be OK as we can scale later.
If you want a more detailed walkthrough of how you can customize each field follow the below link, where I showed how I migrated the self-hosted database to the ApsaraDB
Once the ECS instance is setup and the ApsaraDB for MongoDB instance is also created, you need setup the parse server.
Before we set up the parsing server we need to install nodejs
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash — sudo apt-get install -y nodejs
Once the installation is successful, then we need to build the essential packages.
sudo apt-get install -y build-essential
Then install the parse server and dashboard.
npm install -g parse-server parse-dashboard pm2
If you face any error regarding python, then you need to install python by issuing the following command
apt-get install python
Running the parsing server
parse-server — appId YOUR_APP_ID — masterKey YOUR_APPMASTER_KEY — databaseURI mongodb://root:<passwordinURIEncodedFormat>@dds-6gj787c8814b100841.mongodb.ap-south-1.rds.aliyuncs.com:3817,dds-6gj787c67881b12300842.mongodb.ap-south-1.rds.aliyuncs.com:3817/admin?replicaSet=mgset-10500890849
After you run this command you can see the parse server is running at
https://localhost:1337/parse
You can also access this from internet using the http://<ECS_INTERNET_IP>:1337/parse,
Make sure you keep a track of the APP ID, MASTER KEY & URI to pass this as parameters for the dashboard creation
If you hit the parse server URI in browser you will see the following
{“error”:”unauthorized”}
This means your parse installation is working fine and we will go ahead with setting up the parse-dashboard
Setting up parse dashboard
Create a config file with a json similar to tHe below and update the following fields
{“apps”: [{“serverURL”: “PARSE URI”,“appId”: “APP_ID”,“masterKey”: “MASTER_KEY”,“appName”: “APP_NAME”}],“users”: [{“user”:”admin”,“pass”:”PASSWORD”}]}
After you have created this you can start the dashbard with the following command
parse-dashboard — config parse/dashboardConfig/config.json — allowInsecureHTTP true
The –allowInsecureHTTP flag is only for development purposes, in real production scenarios you will use specific ssl’s
You will see a message that parse dashboard is started at http://0.0.0.0:4040/apps
If you hit the URI in browser with http://<ECS_INTRANET_IP>:4040/apps
You will see the following login screen
After you login you will see the apps you configured and clicking on that will give you the resultant dashboard.