Build, Preview & Cloud Hosting
Build & Preview
At any point in the application development phase, you can build your application in PIES studio. Building an application means that you can identify inconsistencies or errors in the current application before it is taken up for deployment. Build helps in saving valuable resources and developers time as any inconsistencies or issues in the application objects (Database Tables (except for system generated tables), Screens & Functions) can be identified and rectified.
Once you login and navigate to any created application, on the top right corner of your screen, you will be able to see an option called Build. On clicking build, a build console will open up on your screen and system will start generating code and check for errors.
In this console you will get three icons on the extreme right - 1. Bug icon 2. Collapse icon 3. Close icon. Build will run for all the modules in your application and you will be able to see the status of Database, Screens & Functions separately under respective modules in build console. Events are not a part of build as they connect screens & functions and if there are any errors in screens or functions it automatically relates to its respective event as well.
Once build is complete, if there are any errors in your current application, you will be able to see that under Bug section. You can click on bug icon to check and analyze errors. Each error will be reported individually with an icon right next to each error which upon clicking will take you directly to the respective data table, screen or function. Sometimes, you will also see Warnings under each module. These warnings are not blockers for application deployment, but it is always good to check these warnings and take action if needed. If there are no errors in your application, you will be able to see a message stating No errors reported under each module. You will get a reload option which upon clicking will start the build process all over again. You can use this option if you have made any changes after the first build. Clicking collapse icon will minimize the build console and clicking close icon will close the build console.
You can also download the application code from this console using Download Code option. Note: You can either download from here or you can also from the Code Export section. Download process is the same.
In case of zero errors, you will also get an option called Live Preview in the build console to preview your application. Clicking on Live Preview will open up a new window where you will be able to see a preview of deployed application. Once a preview session has started, it will be active for 15mins. After 15mins, current preview will end and you can start a new session from build console if needed. You will be able to access the preview just like deployed application and verify if the application functionality is as expected. In preview, you can also change user roles and verify access controls. This can be achieved by changing roles under Previewing As field. In preview, you can also switch between light & dark theme by clicking on the icon right before Previewing As field.
You can zoom in and zoom out of preview screen by increasing or decreasing zoom percentage on top left corner. Clicking on reset button will revert the set screen size to 100%. When you click on End Session, you will get a popup stating, “Are you sure you want to end this preview session?” Upon confirmation, current preview will be ended. You can click on Live Preview again in build console to start a new session.
Preview errors can be debugged using a feature called Preview Debugger. When you click on Preview Debugger icon, a debugger console will open. You will get the application logs with input & execution result in this console, as you navigate through the preview screen. You can refresh the debugger console or clear all the current logs using the reload and clear icons present on the right side of console (refer Fig 3). Clicking collapse icon will minimize the preview debugger console and clicking close icon will close the console.
https://youtu.be/vvX-gFNUZkk?si=AakX5hUqDCv7INr8
Hosting
When you have developed & successfully built the application, you can go ahead and host or deploy the application on our cloud infrastructure. The following section explains how to host or deploy your application in the environment that's created.
Go to Host & Export section on the left pane of desired application
Under Hosting, click New Request. Note: You will only be able to create a new request if you are an admin or if you have purchase access granted by admin
You will get two types of requests- Cloud Hosting & Self Hosted. If you choose Cloud Hosted, you can deploy your application in created environments. If you choose Self Hosted, you can download docker containers and host it yourself. In this section, we will detail out Cloud Hosted type. To know more about Self Hosted, please go to Self-Hosting section which includes database script download & container download.
Once you click on Create, application build will start running. You will be able to deploy the application only when build is successful without any errors. If build fails, you need to fix the reported errors and raise new request.
When your application build is successful, you will get a request form to fill in deployment details.
Title is set to application name by default based on the name you provided during application creation process. You can also change the title if required
Enter a version to your application deployment in Version field. This will come in handy if you would like to have version control
Description field is set to application name by default. You can also modify the description if required
Under Target Platform, you can find Web which implies, currently, applications can only be deployed as a Web Application. If you like a mobile application, you need to download code, refer Code Export section for the same. When application is deployed successfully, you will get application URL through which you can access the application. You can access the URL as long as the deployment is not deleted or shutdown
If you have not provided Admin Details in Access Control - Configurations section, you need to enter the Name & Email Address of user who will be the application's admin. If you have provided admin details in Access Control section, the same will automatically reflect in this form
Ensure that the admin details are entered correctly in deployment form. Admin will not receive Set Your Password email if incorrect information is provided
SMTP details added under Email Servers section of Resources, will appear in Email Server dropdown. Select the desired SMTP details from dropdown. It is mandatory to provide email server SMTP details. If you have not provided SMTP details in Email Server section, you need to go back, provide the details & raise a new request. Once the application is deployed, system will use the selected SMTP server to send emails.
Click Proceed to create deployment request. Deployment request status will be pending at this point
Under Host Environment, select the desired environment which is already created or you can also create a new environment directly from here. Note: You can only create new environment if you are an admin or if you have purchase access granted by admin. Clicking on new environment will open a popup where you can provide necessary environment details like Location, Environment Type, Details such as Name & Description and proceed by making payment.
If you select an existing environment, you will be able to see the selected environment’s status. Only if the environment status is Active, you will be able to host your application in the selected environment. Else, you will have to choose a different environment or wait until the environment status changes to active
Under Hosting Costs, you will be able to select the cost of deploying or hosting your application. Cost depends on the maximum number of users who will be using the deployed application. Under User Count dropdown, select required number of users. You will be able to see the flat pricing for selected number of users per month, right below the dropdown. If you select 1000+ as the user count, you will be charged flat rate pricing for 1000 users plus additional users in multiples of 1000, with an additional $50 for every 1000 users.
Click Confirm & Pay once you have selected the user count. You will be redirected to payments page. Once you complete the payment, you will be redirected to Hosting page, where you can find your deployment under Active Requests and the deployment will start. Status of deployment will be changed to deploying
When you click on View, you will be taken to hosting details page
If deployment fails for some reason, you can check the Request Logs and retry request under Actions or create a ticket using Contact Us button
When you click Contact Us, you will get Create Request popup. In Type dropdown, you can choose between Support, Upgrade & Deactivate. In Description field, you can provide a brief description to the request. Do not delete the deployment id & license number, which is for support team’s reference. Click Submit to create request or click Cancel.
When you click on Retry Request, you will get a popup to confirm. Upon confirmation, deployment will start again
Towards the end of deployment, admin will receive Set Your Password email to set password & can login to application from there
When the deployment is successful, you can click on View against desired deployment in Active Request to go to hosting details page
In hosting page, you will see the status of deployment and the host environment details like, Name & Location, that was provided during environment creation
Under Application URL, you can find the URL to your application. You can also click on this link, to navigate to the application & start using
Under Database Server and Access Control Server, you will get the server details for application’s database and for access control of the application respectively
Set Password & Login
Click on Set Password button or the link mentioned in email
Admin will be redirected to Set Your Password page
Provide a password that meets the specified criteria and click Set Your Password button, you will be taken to the application's login screen
Login screen is automatically generated. It is not developed as part of application builder in the development phase.
As Admin, enter the email address & enter the set password. Click Login
Landing screen will be the screen you have set during development phase under application settings
Admin can start adding users & assign them to created user groups via Admin Console
View Node IP List
If you wish to view the list of node IPs, you can use this section.
Go to Host & Export → Hosting section and click View against desired deployment
Under Advanced section, click View Node IP List
Node IPs popup will appear where you will be able to see the list of IPs. If there are no node IPs found, you will get a message in the popup stating No Node IP found.
Download SSH Key
If you wish to authenticate with remote server, you can download SSH key using this section.
SSH (Secure Shell) Keys are authentication credentials.
Go to Host & Export → Hosting section and click View against desired deployment
Under Advanced section, click Download SSH Key
A public key will be generated and downloaded
You can add the downloaded public key to server for authentication purposes
Manage Deployment
This section describes how to shut down or delete a deployed application when the deployment is not needed.
It is recommended that you take necessary back-ups for such applications before it gets shut down or deleted from the server.
Delete Deployment
To delete a deployment,
Go to Host & Export → Hosting section
Under Active Requests, click View against the desired deployment
Under Manage Request, click Delete Request
Deletion Warning popup will appear. To confirm deletion, enter the full name of application as it is in the text box provided
Click Continue
Next, Deletion Confirmation popup will appear. You will be asked to enter your account password to confirm deletion
Once you enter the password, click Confirm. Deployment deletion will be initiated and the deployment will be deleted in few seconds
All the deleted deployments will be removed from Active Requests and added to Other Requests list
Once you delete a deployment, you wont be charged for the deployment anymore.
Shutdown Deployment
To shut an active deployment,
Go to Host & Export → Hosting section
Under Active Requests,, click View against the desired deployment
Under Manage Request, click Shutdown Request
You will get Shutdown Application popup. Read the content & click I understand checkbox. Click Shutdown to proceed or Cancel to go back.
You will be shown another popup to enter private cloud infrastructure details like Project Id, Client Id, Client Email, Private Key Id, Private Key (PEM Format)
Upon confirmation, application shutdown process will be initiated and the deployment will be shutdown in few seconds. Once you shutdown a deployment, end users wont be able to use the deployed application anymore
In Hosting page, you can see that the status of deployment has changed to Shutdown
All the shut deployments will be removed from Active Requests, and added to Other Requests list
If you shutdown an active deployment, you will still be charged for the deployment, as the deployment continues to exist in cloud.
Start Deployment
You can only start an already shut deployment. Start button will not be enabled for an already active deployment. To start a deployment,
Go to Host & Export section
Under Active Requests, click View against the desired deployment
Under Manage Request, click Start
Start Application popup will appear. Click I understand, start the app to proceed or Cancel to go back
You will get a success message stating, Application started successfully. Started deployment will reflect under Other Requests list with Starting status. The started deployment will appear under Active Requests, when the process is complete