Q:
In the app builder when I click Web App View my app opens in dev view-mode and when I click 'Preview' it opens in the browser as it would appear at runtime.
For this to work I assume then that clicking 'Preview' actually deploys the app to the local server - but ONLY the app, db and other files need to be deployed manually.
If this is correct then what is the purpose of the 'Deploy' button on the Web App View?
A:
Deploy deploys the App without opening your default browser.
Preview deploys and opens your default browser.
Q:
I am having difficulty deploying my first app to a windows client. I have downloaded the windows installer, created an installer file, chose my app and database and it completes the compile without errors. Upon launch, the install program runs and completes, but when I go to the app center I cannot log on as an admin.
I initially tried the default password, but then thought I might have changed it so I changed it again in the app builder and reinstalled. Still cannot gain access. I then had a second log in created for a different user with the same roles as the admin. This one I can log into but it give me a notice that it has no published apps available.
Any suggestions on 1 how to gain admin access to the app center and determine if the app actually installed?
I have compiled the program and installed it into the app center without errors in the process.
All data files appear to be where the installer said it would put them, but I get the errors below upon launch of the app in the app center. and if I try to open a record, it says no table found.
A:
On the client machine where you have run your installer, have a look at the drive:\lianja\log\log.txt file. This will include the dataDirectory and other directory settings it is using.
Check that this directory contains the databases that you are expecting.
You can also use the --debug command line switch in your Lianja App Center shortcut, e.g. if installed on C:
Quote:
C:\lianja\bin\lianjaruntime.exe --debug
This will then output debugging information to the debug.txt and/or debug_client.txt files in the C:\lianja\debug directory.
Q:
I tried to deploy my App locally on my desktop. The creation of the exe file went well and the installation of the package. However when I created the shortcut and tried to run the app it failed.
I went back to my APP builder to try to access my app; it failed also. Checking database directory, I saw that 2 tables missed and I restored them from my backup.
But unfortanatly when I restart my APP builder, it failed again and 1 of the two tables disappeared.
Table missed in the directory as if it was deleted; only the index file (dbx) remained. This issue happened every time the app failed.
I restored it and once again the APP builder failed and everytime it failed, the table is missed.
I restored the app from the backup I made before the deployment but the same issue persist. So in last ressort, I re-install the APP builder, but the issue is still there.
A:
You need to rebuild the database so that tables are included in the database catalog if you have copied them in externally. You can issue the REBUILD DATABASE command from the Lianja/VFP command window in the Console, or use the right-click context menu in the Data workspace.
Note: if you are running an installer on your development machine, make sure that you do not include the Lianja App Center in the installer.
If you install the App Center on top of the App Builder, you change the Lianja root directories for data, Apps etc. Now you have the App Builder reinstalled, these will have been set back to the correct directories.
If you just want to test your App in the App Center on your development machine, there is no need to build an installer, just deploy
If you are testing an installer, then ideally run this on another machine or VM, but if you must test it on your development machine, it is important not to include the App Center.
Q2:
After I reinstall the APP builder everthing is ok now; I can use agian my app in the APP builder.
For the deployment, I understand the mistake; I included the App center in the installer.
Q:
a server (file server: drive mapped to Z[IMG]file:///C:/Users/Kruno/AppData/Local/Temp/enhtmlclip/Image(3).png[/IMG]:
some client (win)
I did deploy the application on the server:
Z:\Lianja\cloudserver\tenants\public\
copying application and data
I installed the runtime on the client.
Then, launch:
Quote:
C:\lianja\bin>lianjaruntime -a z:\Lianja\cloudserver\tenants\public\apps\martinel li_articoli\martinelli_articoli.lianja
I've try this:
Quote:
lianjaruntime -a --runtimedatadir Z:\Lianja\cloudserver\tenants\public\data\cogema --networkshare z:\Lianja\cloudserver\tenants\public\apps\martinel li_articoli\martinelli_articoli.lianja
A:
Quote:
C:\lianja\bin\lianjaruntime.exe --runtimedir Z: -a martinelli_articoli
where Z: is mapped to the parent drive or directory of the lianja directory on the server.
or
Quote:
C:\lianja\bin\lianjaruntime.exe --tenancy Z: -a martinelli_articoli
where Z: is mapped to the \lianja\cloudserver\tenants\public directory on the server.
Note: --runtimedir may be deprecated in favour of --tenancy from Lianja v2.1.
Q2:
In this way, app and data are stored on the server. But when I run the app, is executed locally, right?
A: Correct
Q:
I deployed my app on a windows server 2k8 and built the desktop installer to install on the desktop machines.
I created a local drive Z: pointing to the shared folder on the server containing the deployed application \lianja\cloudserver\tenants\public.
The shortcut to the application has the following command to run the application
Quote:
c:\lianja\bin\lianjaruntime.exe --tenancy Z: --app gesavoc (app name)
The application is executed properly but I can't get the authentication screen, the main form of the application automatically.
I deployed the system and application databases on the server and the application has the "published" and "Login required" properties are set to "true".
A:
The --app <appname> command line switch causes the App to be loaded without the App Center login page being displayed.
With no switch, the user logs in then sees the App Center and all published Apps available to them.
The switch you need to use is --loginapp <appname>. With this, the user logs in then goes straight to the App you specify without seeing any other published Apps.
Q:
the --runtimedir will be the same as the --tenancy parameter which use the mapped network shared folder.
A:
No, --runtimedir points to the root drive or directory where the lianja sub-directory contains the runtime path for Apps, Library and Data, e.g. F: (where files are located in F:\lianja\cloudserver\tenants\public\...).
Q:
I had to deploy my app from the laptop to my win server. I installed the APaas Dev on the server and I deployed the application in a the shared folder. So I used the server itself as the development machine and the application was deployed properly.
I created users and roles on the server and also deployed the system and application in the server.
Now I have to install client machines to access to the application. For this purpose I built an installer file to install the application on client machines.
It is done but when I launched the application, it is displaying directly the starting page of the application without the authentication screen.
I used a shortcut on the client machine with the tenancy parameter refereing to the mapped local drive.
I would like to have my client machines display the login screen prior to launch the application main form.
In my case files and programs are located in the server and the \lianja\cloudserver\tenants\public is shared and mapped to a local drive on client machine.
So should I share the drive where lianja is installed in the server and map this drive also to a local disk?
A:
Yes, exactly.
Q:
when a DB is deployed from the app builder the entire database is copied in as-is (structure and data) to the cloud server. This means that if I have a live running app and I make a change to the database in app builder (eg. add a column) and I then re-deploy, this will overwrite everything in the live database?
If this is correct then it seems that the database should actually not be part of the deployment at all, but rather it should be created completely in code which would run the startup prg. I had (incorrectly, it seems) assumed that deployment of a database would sync structure changes but keep the live data intact.
Also, what is the process to deploy to a client that is running an on-premise cloud-server? is there a package that can be sent to the remote site to update the app or similar?
A:
With regards to deployment, best practices dictate that you have:
1. Development database and apps. This is where you use the app builder to build the apps with live views against the development data.
2. Staging database and apps. This is where you deploy to from the app builder and "Preview". It's normally on the development machine.
3. Customer deployment target at a remote site. Build an installer package using the installer of your choice. See below.
As part of your release management, build a company branded installer, include an upgrade script as a .rsp page that upgrades the database using the functions mentioned in this thread:
http://www.lianja.com/community/show...tabase+compare
Alternatively if you are deploying in a public cloud such as AWS you can sftp your files up as well as your upgrade_version.rsp script then run it to update the database.
Well, the cloud server can run rsp pages on a remote site so this is the simplest way to perform the upgrade.
Many web based applications (e.g. CMS) perform system upgrades this way.
Q:
For some individual developers, its possible that they may develop and deploy on a single server (not ideal - I know).
Or perhaps they develop and use the same box for UAT before deploying to a production server.
I was wondering if it's possible to open the production database from inside the app builder to get all the data definitions for comparison.
Something like
Quote:
Open database C:\lianja\cloudserver\tenants\public\data\Southwin d
A:
The best way to handle this is take a snapshot of your database schema at the time you release version 1. You can right-click on the database name in the data workplace and choose "Copy..." then give it a name such as:
southwind_v10
It is then just a matter of creating your own "diff" using the functions provided and creating an updatedb.prg script (possibly as the open database trigger from v1.0 of your database).
Each time you release a new version that has schema changes take a snapshot...
southwind_v11
etc
You then have a general updater that will modify the schema and provide continuous delivery of schema changes by generating a new updatedb.prg and replacing it in the database.
You also have a complete history of schema changes for all versions that you have deployed.
Thats the way I would handle schema changes onto a live site.
Q:
I have compiled the program and installed it into the app center without errors in the process.
I am getting runtime errors when I launch the app from the app center. In the app builder, the app runs with out any runtime errors. It appears that the database is either unavailable or it is not pointing to the correct location since it is not loading my memory variables and when I search for a record it says no record found. I included the databases when I created the build. Is there a place to look to see if it is pointing to the correct location for the database?
Below is the file location call out in the builder. invoice being the name of the database.
Quote:
Section -DATAFILES
SetOverwrite ifnewer
SetOutPath "${PRODUCT_SHAREDINSTALLDRIVE}\lianja\cloudser ver\ tenants\public\data\system"
File /r /x *.bak "${LIANJA_INSTALLDIR}\data\system\*.*"
SetOutPath "${PRODUCT_SHAREDINSTALLDRIVE}\lianja\cloudser ver\ tenants\public\data\invoicer"
File /r /x *.bak "${LIANJA_INSTALLDIR}\data\invoicer\*.*"
SectionEnd
A:
On the client machine where you have run your installer, have a look at the drive:\lianja\log\log.txt file. This will include the dataDirectory and other directory settings it is using. Check that this directory contains the databases that you are expecting.
You can also use the --debug command line switch in your Lianja App Center shortcut, e.g. if installed on C:
Quote:
C:\lianja\bin\lianjaruntime.exe --debug
This will then output debugging information to the debug.txt and/or debug_client.txt files in the C:\lianja\debug directory.
A2:
One of my tables was in a separate folder so when I built the installer it was not included. After moving the table to the correct database folder and rebuilding the database, everything worked.
Q:
I am having difficulty deploying my first app to a windows client. I have downloaded the windows installer, created an installer file, chose my app and database and it completes the compile without errors. Upon launch, the install program runs and completes, but when I go to the app center I cannot log on as an admin.
A:
To publish the app, open the app, go to Settings (lower left), and then check the Publish checkbox (upper right). Save, exit, deploy.
Whether an app is published or not is contained in the .lianja file for the app.
The App Center inspects the .lianja files in their App directories, and publishes the ones that are marked as published.
There is no such thing as "administrative access," in other words. So, if you were to open up the .lianja files in your deployed app directory, you could find the <apppublished> element and change the value to 1.
Then when you reopen the app center you will see the app icon.
As for users tied to an App: it may be the case that if the app isn't published, they aren't allowed into the app center. You'll see. If there are still issues, it is likely due to your setup of the roles.
that's what makes Lianja so special: write once, deploy anywhere.
Q:
I'm trying to deploy my app on my production server where I already installed the cloud server and shared the public tenancy folder.
The deployement log show that all data where copied successfully but nothing was written on the server. The production server is running Win 2k8 server R2.
Below are some last lines of the logfile
Quote:
---
Copying Selected Library files.
Copying file 'C:\Lianja\library\report.rsp' to 'd:\Lianja\cloudserver\tenants\public\library\repo rt.rsp'
Copying file 'C:\Lianja\library\report.rsp' to 'd:\Lianja\cloudserver\tenants\public\wwwroot\libr ary\report.rsp'
Copying file 'C:\Lianja\library\login_forgot_password.rsp' to 'd:\Lianja\cloudserver\tenants\public\library\logi n_forgot_password.rsp'
Copying file 'C:\Lianja\library\login_forgot_password.rsp' to 'd:\Lianja\cloudserver\tenants\public\wwwroot\libr ary\login_forgot_password.rsp'
Copying file 'C:\Lianja\library\login_learn_more.rsp' to 'd:\Lianja\cloudserver\tenants\public\library\logi n_learn_more.rsp'
Copying file 'C:\Lianja\library\login_learn_more.rsp' to 'd:\Lianja\cloudserver\tenants\public\wwwroot\libr ary\login_learn_more.rsp'
Deployment completed successfully.
----
A:
If you mapped your server drive to drive D:, than it is copied OK.
From log file, I suspect all is copied to (development) local drive D:
Good structure but wrong drive, I think.
You can check your local drive D: .
You should map your server drive to X: or something and set it to copy to X:
All topics in [Answers] alphabetically: http://www.lianja.com/community/show...p?2717-Answers
This same topic is extended to another thread: http://www.lianja.com/community/show...s-Deployment-2 (dont ask why: I was young)