Difference between revisions of "Deprecated: Cross Platform App Deployment with Lianja"

From Lianjapedia
Jump to: navigation, search
(Created page with "''Under Construction'' =See Also= Category:Deployment, Understanding Live Preview in Lianja Develop native on Windows, Linux or macOS and deploy directly from the...")
 
Line 2: Line 2:
  
 
=See Also=
 
=See Also=
[[:Category:Deployment]], [[Understanding Live Preview in Lianja]]
+
[[A Guide to Deploying Web Apps]], [[:Category:Deployment|Deployment (Category)]], [[Deploying to Local Directory]], [[Understanding Live Preview in Lianja]]
  
  
 
Develop native on Windows, Linux or macOS and deploy directly from the IDE to Windows,
 
Develop native on Windows, Linux or macOS and deploy directly from the IDE to Windows,
 
Linux, macOS, iOS or Android.
 
Linux, macOS, iOS or Android.
 +
 +
=Web Apps=
 +
# '''Deploy''' in [[#Web App View|Web App View]] to generate the HTML5 index.html code and deploy the App's files to your local Lianja Cloud Server deployment path.
 +
# Deploy your Apps, databases and Library and [[MetaTypes]] files to a remote location, using the '''Deploy''' workspace.
 +
 +
==Web App View==
 +
'''Web App View''' gives you options to Deploy your App for your local Lianja Cloud Server (this generates the HTML5 index file and copies the App's files to the deployment path) and to Preview the App running in your default browser prior to deploying to a remote server.
 +
 +
[[{{ns:file}}:lp_web1a.png|450px|thumb|left|link={{filepath:lp_web1a.png}}|Deploy and Preview]]
 +
 +
 +
 +
Click the toolbutton in the header to access '''Web App View'''.
 +
 +
Click '''Deploy''' in '''Web App View''' to generate the HTML5 index file and copy the App's files to the [[#Deployment_Directories|deployment path]].
 +
 +
For testing purposes, you can click '''Preview''' to preview your App live in your default browser.
 +
 +
<br clear=all>
 +
 +
Now deploy your Apps, databases and Library and [[MetaTypes]] files to a remote location, using the '''Deploy''' workspace.
 +
 +
=Deploying Desktop and Web Apps=
 +
You can go directly to the '''Deploy''' workspace via the system menu or Modebar, or use the '''Quick Deploy''' toolbutton in the headerbar of the '''Pages''' and other workspaces.
 +
 +
==Quick Deploy==
 +
Quick Deploy can be run while the App is open.  Quick Deploy automatically saves and restores the environment, closing the database and tables for the deployment then reopening them when the operation is complete.
 +
 +
Quick Deploy defaults to using the App Deployment Settings:
 +
 +
{| class="wikitable" width="100%"
 +
!width="25%"|Attribute
 +
!width="75%"|Description
 +
|-
 +
|valign="top"|Publisher||The way to publish the Apps (Copy &#124; SFTP &#124; Custom).
 +
|-
 +
|valign="top"|Publisher path||The optional full path of the publisher program, e.g. /usr/bin/rsync.
 +
|-
 +
|valign="top"|Publisher arguments||The optional arguments to the publisher program, e.g. -avc for rsync.
 +
|-
 +
|valign="top"|Server||The server IP address or nodename where the App will be deployed, e.g. localhost or myserver.mydomain.com.
 +
|-
 +
|valign="top"|Directory||The root lianja directory on the LAN or server where the Apps will be deployed.
 +
|-
 +
|valign="top"|Build an installer||Build an installer for Windows desktop deployment (True &#124; False).
 +
|-
 +
|valign="top"|Username||The optional username to authenticate with the remote server.
 +
|-
 +
|valign="top"|Password||The optional password to authenticate with the remote server.
 +
|-
 +
|valign="top"|Private key (.pem file)||The (optional) private key (.pem file) to authenticate with the remote server.
 +
|-
 +
|}
 +
 +
[[{{ns:file}}:app_settings2.png|450px|thumb|left|link={{filepath:app_settings2.png}}|App Deployment Settings: COPY]]
 +
 +
 +
 +
 +
 +
 +
 +
For example, here the files will be deployed:
 +
 +
- using Copy ('''Publisher''')
 +
 +
- to the networked drive location G:\lianja\cloudserver\tenants\public\ ('''Directory''')
 +
 +
<br clear=all>
 +
 +
[[{{ns:file}}:app_settings.png|450px|thumb|right|link={{filepath:app_settings.png}}|App Deployment Settings: SFTP]]
 +
 +
 +
 +
 +
 +
 +
 +
And another example, here the files will be deployed:
 +
 +
- using SFTP ('''Publisher''')
 +
 +
- to the server on 192.168.80.133 ('''Server''')
 +
 +
- to the server location /opt/lianja/cloudserver/tenants/public/ ('''Directory''')
 +
 +
- logged in as root ('''Username''')
 +
 +
- the password ('''Password''') is not specified, but a prompt dialog will be displayed
 +
 +
<br clear=all>
 +
 +
Note that the '''Directory''' location is the root location.  Files will be deployed to the [[#Deployment_Directories|sub-directories]] of this location.  The trailing directory separator ('\' or '/') should be included.
 +
 +
'''Publisher path''' and '''Publisher arguments''' are only required when using a ''Custom'' '''Publisher'''.
 +
 +
===Setup===
 +
[[{{ns:file}}:qdeploy1.png|450px|thumb|left|link={{filepath:qdeploy1.png}}|Quick Deploy]]
 +
 +
 +
 +
 +
 +
 +
Click the '''Quick Deploy''' toolbutton in the headerbar to open the dialog.
 +
 +
The first step in using '''Quick Deploy''' is '''Setup'''.
 +
 +
<br clear=all>
 +
 +
Clicking the '''Setup''' button takes you into the '''Deploy''' workspace.  Here you can select the databases, Apps and Library files that will be included in your deployment.
 +
 +
[[{{ns:file}}:qdeploy2.png|450px|thumb|left|link={{filepath:qdeploy2.png}}|Quick Deploy Setup: Deploy Workspace]]
 +
 +
 +
 +
 +
Check the box next to the databases, Apps and Library files to be deployed.
 +
 +
While in the '''Deploy''' workspace, you can change the [[#Deployment Settings|Deployment Settings]] to specify an alternative location or additional options as required.
 +
 +
Then switch back to the Pages workspace and reopen the '''Quick Deploy''' dialog using the toolbutton in the headerbar.
 +
 +
Note that while this Lianja App Builder session is running your deploy setup will remain active until you change it.
 +
 +
<br clear=all>
 +
 +
===Preview===
 +
[[{{ns:file}}:qdeploy3.png|450px|thumb|left|link={{filepath:qdeploy3.png}}|Quick Deploy: Preview]]
 +
 +
 +
 +
 +
Clicking '''Preview''' will allow you to check the files and destination location of the files to be deployed.
 +
 +
<br clear=all>
 +
 +
===Commit===
 +
[[{{ns:file}}:qdeploy4.png|450px|thumb|left|link={{filepath:qdeploy4.png}}|Quick Deploy: Commit]]
 +
 +
 +
 +
When you are ready to deploy, click the '''Commit''' button and confirm when prompted by clicking '''Yes'''.
 +
 +
Then click '''Close'''.
 +
 +
<br clear=all>
 +
 +
==Deploy Workspace==
 +
As mentioned above, you can go directly to the '''Deploy''' workspace rather than use '''Quick Deploy'''. 
 +
 +
To deploy in the '''Deploy''' workspace, there should be no App or database open.
 +
 +
[[{{ns:file}}:deployws1.png|450px|thumb|left|link={{filepath:deployws1.png}}|Deploy Workspace: Select Files]]
 +
 +
 +
 +
 +
Check the box next to the databases, Apps and Library and [[MetaTypes]] files to be deployed.
 +
 +
Note that if your Apps are in a [[Lianja Projects|Lianja Project]], checking the box next to the Project name will automatically select all files associated with that Project in the Deployment files explorer tree.
 +
 +
While in the '''Deploy''' workspace, you can change the [[#Deployment Settings|Deployment Settings]] to specify an alternative location or additional options as required.
 +
 +
<br clear=all>
 +
 +
[[{{ns:file}}:deployws2.png|450px|thumb|left|link={{filepath:deployws2.png}}|Deploy Workspace: Preview Changes]]
 +
 +
 +
 +
 +
Clicking the '''Preview changes''' headerbar toolbutton will allow you to check the files and destination location of the files to be deployed.
 +
 +
<br clear=all>
 +
 +
[[{{ns:file}}:deployws3.png|450px|thumb|left|link={{filepath:deployws3.png}}|Deploy Workspace: Commit Changes]]
 +
 +
 +
 +
 +
Click the '''Commit changes''' headerbar toolbutton when you are ready to deploy and confirm when prompted by clicking '''Yes'''.
 +
 +
<br clear=all>
 +
 +
===Deployment Settings===
 +
As mentioned above, the deployment settings default to those in the App Settings.  These can be changed in the '''Deploy''' workspace and additional file permissions specified.
 +
 +
[[{{ns:file}}:deploy_settings.png|450px|thumb|left|link={{filepath:deploy_settings.png}}|Deploy Workspace: Deployment Settings]]
 +
 +
 +
 +
 +
 +
Click '''New''' to create a new '''Deployment Settings''' profile.
 +
 +
Enter a name for the profile then fill in the settings.
 +
 +
Settings descriptions are listed in the tables below.
 +
 +
Once complete, click '''Save'''.
 +
 +
The new settings profile can be selected from the '''Favorites''' combobox at any time in the future to override the App Settings defaults.
 +
 +
<br clear=all>
 +
 +
===Server details===
 +
{| class="wikitable" width="100%"
 +
!width="25%"|Setting
 +
!width="75%"|Description
 +
|-
 +
|valign="top"|Server||The server IP address or nodename where the App will be deployed, e.g. localhost or myserver.mydomain.com.
 +
|-
 +
|valign="top"|Username||The optional username to authenticate with the remote server.
 +
|-
 +
|valign="top"|Password||The optional password to authenticate with the remote server.
 +
|-
 +
|valign="top"|Private key (.pem file)||The (optional) private key (.pem file) to authenticate with the remote server.
 +
|-
 +
|valign="top"|Directory||The root lianja directory on the LAN or server where the Apps will be deployed.
 +
|-
 +
|valign="top"|Owner||The owner to be set for the deployed files, e.g. 'apache'.
 +
|-
 +
|valign="top"|Group||The group to be set for the deployed files, e.g. 'apache'.
 +
|-
 +
|valign="top"|Permissions||The permissions to be set for the deployed files, e.g. '766'.
 +
|-
 +
|}
 +
 +
===Publisher details===
 +
{| class="wikitable" width="100%"
 +
!width="25%"|Setting
 +
!width="75%"|Description
 +
|-
 +
|valign="top"|Publisher||The way to publish the Apps (Copy &#124; SFTP &#124; Custom).
 +
|-
 +
|valign="top"|Publisher path||The optional full path of the publisher program, e.g. /usr/bin/rsync.
 +
|-
 +
|valign="top"|Publisher arguments||The optional arguments to the publisher program, e.g. -avc for rsync.
 +
|-
 +
|}
 +
 +
==System Database==
 +
[[{{ns:file}}:deploy_systemdb.png|450px|thumb|left|link={{filepath:deploy_systemdb.png}}|Deploy System Database]]
 +
 +
 +
 +
 +
 +
The system database holds the definitions for [[Users and Roles]], [[:Category:Row Level Security|Row Level Security]] and [[Understanding Dynamic Data Masking in Lianja|Dynamic Data Masks]].
 +
 +
Make sure the system database is included in the deployment.
 +
 +
<br clear=all>
 +
=Deploying Mobile Apps=
 +
To deploy PhoneGap mobile Apps for iOS or Android ...
 +
 +
# Deploy data as above ...
 +
# PhoneGap build in Build workspace ...
 +
 +
=Deployment Directories=
 +
==Lianja Cloud Server==
 +
Using the standard installation settings, these are the Lianja Cloud Server default directories for Web/Mobile Apps:
 +
===Windows===
 +
{| class="wikitable" width="100%"
 +
!width="20%"|Files||width="80%"|Location
 +
|-
 +
|valign="top"|App||C:\lianja\cloudserver\tenants\public\wwwroot\apps
 +
|-
 +
|valign="top"|Databases||C:\lianja\cloudserver\tenants\public\data
 +
|-
 +
|valign="top"|Library||C:\lianja\cloudserver\tenants\public\wwwroot\library
 +
|-
 +
|}
 +
===Linux===
 +
{| class="wikitable" width="100%"
 +
!width="20%"|Files||width="80%"|Location
 +
|-
 +
|valign="top"|App||/opt/lianja/cloudserver/tenants/public/wwwroot/apps
 +
|-
 +
|valign="top"|Databases||/opt/lianja/cloudserver/tenants/public/data
 +
|-
 +
|valign="top"|Library||/opt/lianja/cloudserver/tenants/public/wwwroot/library
 +
|-
 +
|}
 +
===Mac===
 +
{| class="wikitable" width="100%"
 +
!width="20%"|Files||width="80%"|Location
 +
|-
 +
|valign="top"|App||/usr/local/lianja/cloudserver/tenants/public/wwwroot/apps
 +
|-
 +
|valign="top"|Databases||/usr/local/lianja/cloudserver/tenants/public/data
 +
|-
 +
|valign="top"|Library||/usr/local/lianja/cloudserver/tenants/public/wwwroot/library
 +
|-
 +
|}
 +
 +
==Lianja App Center==
 +
Using the standard installation settings, these are the Lianja App Center default directories for Desktop Apps:
 +
===Windows===
 +
{| class="wikitable" width="100%"
 +
!width="20%"|Files||width="80%"|Location
 +
|-
 +
|valign="top"|App||C:\lianja\cloudserver\tenants\public\apps
 +
|-
 +
|valign="top"|Databases||C:\lianja\cloudserver\tenants\public\data
 +
|-
 +
|valign="top"|Library||C:\lianja\cloudserver\tenants\public\library
 +
|-
 +
|}
 +
===Linux===
 +
{| class="wikitable" width="100%"
 +
!width="20%"|Files||width="80%"|Location
 +
|-
 +
|valign="top"|App||/opt/lianja/cloudserver/tenants/public/apps
 +
|-
 +
|valign="top"|Databases||/opt/lianja/cloudserver/tenants/public/data
 +
|-
 +
|valign="top"|Library||/opt/lianja/cloudserver/tenants/public/library
 +
|-
 +
|}
 +
===Mac===
 +
{| class="wikitable" width="100%"
 +
!width="20%"|Files||width="80%"|Location
 +
|-
 +
|valign="top"|App||/usr/local/lianja/cloudserver/tenants/public/apps
 +
|-
 +
|valign="top"|Databases||/usr/local/lianja/cloudserver/tenants/public/data
 +
|-
 +
|valign="top"|Library||/usr/local/lianja/cloudserver/tenants/public/library
 +
|-
 +
|}
 +
 +
[[Category:Deployment]]

Revision as of 07:39, 8 November 2017

Under Construction

See Also

A Guide to Deploying Web Apps, Deployment (Category), Deploying to Local Directory, Understanding Live Preview in Lianja


Develop native on Windows, Linux or macOS and deploy directly from the IDE to Windows, Linux, macOS, iOS or Android.

Web Apps

  1. Deploy in Web App View to generate the HTML5 index.html code and deploy the App's files to your local Lianja Cloud Server deployment path.
  2. Deploy your Apps, databases and Library and MetaTypes files to a remote location, using the Deploy workspace.

Web App View

Web App View gives you options to Deploy your App for your local Lianja Cloud Server (this generates the HTML5 index file and copies the App's files to the deployment path) and to Preview the App running in your default browser prior to deploying to a remote server.

Deploy and Preview


Click the toolbutton in the header to access Web App View.

Click Deploy in Web App View to generate the HTML5 index file and copy the App's files to the deployment path.

For testing purposes, you can click Preview to preview your App live in your default browser.


Now deploy your Apps, databases and Library and MetaTypes files to a remote location, using the Deploy workspace.

Deploying Desktop and Web Apps

You can go directly to the Deploy workspace via the system menu or Modebar, or use the Quick Deploy toolbutton in the headerbar of the Pages and other workspaces.

Quick Deploy

Quick Deploy can be run while the App is open. Quick Deploy automatically saves and restores the environment, closing the database and tables for the deployment then reopening them when the operation is complete.

Quick Deploy defaults to using the App Deployment Settings:

Attribute Description
Publisher The way to publish the Apps (Copy | SFTP | Custom).
Publisher path The optional full path of the publisher program, e.g. /usr/bin/rsync.
Publisher arguments The optional arguments to the publisher program, e.g. -avc for rsync.
Server The server IP address or nodename where the App will be deployed, e.g. localhost or myserver.mydomain.com.
Directory The root lianja directory on the LAN or server where the Apps will be deployed.
Build an installer Build an installer for Windows desktop deployment (True | False).
Username The optional username to authenticate with the remote server.
Password The optional password to authenticate with the remote server.
Private key (.pem file) The (optional) private key (.pem file) to authenticate with the remote server.
App Deployment Settings: COPY




For example, here the files will be deployed:

- using Copy (Publisher)

- to the networked drive location G:\lianja\cloudserver\tenants\public\ (Directory)


App Deployment Settings: SFTP




And another example, here the files will be deployed:

- using SFTP (Publisher)

- to the server on 192.168.80.133 (Server)

- to the server location /opt/lianja/cloudserver/tenants/public/ (Directory)

- logged in as root (Username)

- the password (Password) is not specified, but a prompt dialog will be displayed


Note that the Directory location is the root location. Files will be deployed to the sub-directories of this location. The trailing directory separator ('\' or '/') should be included.

Publisher path and Publisher arguments are only required when using a Custom Publisher.

Setup

Quick Deploy




Click the Quick Deploy toolbutton in the headerbar to open the dialog.

The first step in using Quick Deploy is Setup.


Clicking the Setup button takes you into the Deploy workspace. Here you can select the databases, Apps and Library files that will be included in your deployment.

Quick Deploy Setup: Deploy Workspace



Check the box next to the databases, Apps and Library files to be deployed.

While in the Deploy workspace, you can change the Deployment Settings to specify an alternative location or additional options as required.

Then switch back to the Pages workspace and reopen the Quick Deploy dialog using the toolbutton in the headerbar.

Note that while this Lianja App Builder session is running your deploy setup will remain active until you change it.


Preview

Quick Deploy: Preview



Clicking Preview will allow you to check the files and destination location of the files to be deployed.


Commit

Quick Deploy: Commit


When you are ready to deploy, click the Commit button and confirm when prompted by clicking Yes.

Then click Close.


Deploy Workspace

As mentioned above, you can go directly to the Deploy workspace rather than use Quick Deploy.

To deploy in the Deploy workspace, there should be no App or database open.

Deploy Workspace: Select Files



Check the box next to the databases, Apps and Library and MetaTypes files to be deployed.

Note that if your Apps are in a Lianja Project, checking the box next to the Project name will automatically select all files associated with that Project in the Deployment files explorer tree.

While in the Deploy workspace, you can change the Deployment Settings to specify an alternative location or additional options as required.


Deploy Workspace: Preview Changes



Clicking the Preview changes headerbar toolbutton will allow you to check the files and destination location of the files to be deployed.


Deploy Workspace: Commit Changes



Click the Commit changes headerbar toolbutton when you are ready to deploy and confirm when prompted by clicking Yes.


Deployment Settings

As mentioned above, the deployment settings default to those in the App Settings. These can be changed in the Deploy workspace and additional file permissions specified.

Deploy Workspace: Deployment Settings



Click New to create a new Deployment Settings profile.

Enter a name for the profile then fill in the settings.

Settings descriptions are listed in the tables below.

Once complete, click Save.

The new settings profile can be selected from the Favorites combobox at any time in the future to override the App Settings defaults.


Server details

Setting Description
Server The server IP address or nodename where the App will be deployed, e.g. localhost or myserver.mydomain.com.
Username The optional username to authenticate with the remote server.
Password The optional password to authenticate with the remote server.
Private key (.pem file) The (optional) private key (.pem file) to authenticate with the remote server.
Directory The root lianja directory on the LAN or server where the Apps will be deployed.
Owner The owner to be set for the deployed files, e.g. 'apache'.
Group The group to be set for the deployed files, e.g. 'apache'.
Permissions The permissions to be set for the deployed files, e.g. '766'.

Publisher details

Setting Description
Publisher The way to publish the Apps (Copy | SFTP | Custom).
Publisher path The optional full path of the publisher program, e.g. /usr/bin/rsync.
Publisher arguments The optional arguments to the publisher program, e.g. -avc for rsync.

System Database

Deploy System Database



The system database holds the definitions for Users and Roles, Row Level Security and Dynamic Data Masks.

Make sure the system database is included in the deployment.


Deploying Mobile Apps

To deploy PhoneGap mobile Apps for iOS or Android ...

  1. Deploy data as above ...
  2. PhoneGap build in Build workspace ...

Deployment Directories

Lianja Cloud Server

Using the standard installation settings, these are the Lianja Cloud Server default directories for Web/Mobile Apps:

Windows

Files Location
App C:\lianja\cloudserver\tenants\public\wwwroot\apps
Databases C:\lianja\cloudserver\tenants\public\data
Library C:\lianja\cloudserver\tenants\public\wwwroot\library

Linux

Files Location
App /opt/lianja/cloudserver/tenants/public/wwwroot/apps
Databases /opt/lianja/cloudserver/tenants/public/data
Library /opt/lianja/cloudserver/tenants/public/wwwroot/library

Mac

Files Location
App /usr/local/lianja/cloudserver/tenants/public/wwwroot/apps
Databases /usr/local/lianja/cloudserver/tenants/public/data
Library /usr/local/lianja/cloudserver/tenants/public/wwwroot/library

Lianja App Center

Using the standard installation settings, these are the Lianja App Center default directories for Desktop Apps:

Windows

Files Location
App C:\lianja\cloudserver\tenants\public\apps
Databases C:\lianja\cloudserver\tenants\public\data
Library C:\lianja\cloudserver\tenants\public\library

Linux

Files Location
App /opt/lianja/cloudserver/tenants/public/apps
Databases /opt/lianja/cloudserver/tenants/public/data
Library /opt/lianja/cloudserver/tenants/public/library

Mac

Files Location
App /usr/local/lianja/cloudserver/tenants/public/apps
Databases /usr/local/lianja/cloudserver/tenants/public/data
Library /usr/local/lianja/cloudserver/tenants/public/library