This commit is contained in:
4
dist/install/windows/x64/lan.iss
vendored
4
dist/install/windows/x64/lan.iss
vendored
@@ -21,8 +21,8 @@ AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={autopf}\ayanova
|
||||
DisableProgramGroupPage=yes
|
||||
LicenseFile=C:\data\code\raven\dist\assets\license.rtf
|
||||
OutputDir=C:\data\code\raven\dist\install\windows\x64\output
|
||||
OutputBaseFilename=ayanova-lan-setup
|
||||
OutputDir=C:\data\code\raven\dist\installers
|
||||
OutputBaseFilename=ayanova-windows-x64-lan-setup
|
||||
SetupIconFile=C:\data\code\raven\dist\assets\logo.ico
|
||||
UninstallDisplayIcon={app}\ayanova-app-logo.ico
|
||||
Compression=lzma
|
||||
|
||||
4
dist/install/windows/x64/standalone.iss
vendored
4
dist/install/windows/x64/standalone.iss
vendored
@@ -23,8 +23,8 @@ AppUpdatesURL={#MyAppURL}
|
||||
DefaultDirName={autopf}\ayanova
|
||||
DisableProgramGroupPage=yes
|
||||
LicenseFile=C:\data\code\raven\dist\assets\license.rtf
|
||||
OutputDir=C:\data\code\raven\dist\install\windows\x64\output
|
||||
OutputBaseFilename=ayanova-single-setup
|
||||
OutputDir=C:\data\code\raven\dist\installers
|
||||
OutputBaseFilename=ayanova-windows-x64-single-setup
|
||||
SetupIconFile=C:\data\code\raven\graphics\logo.ico
|
||||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
|
||||
@@ -81,6 +81,7 @@ Command line parameters are appended to the command to start the ayanova server,
|
||||
|
||||
### REPORTING
|
||||
|
||||
- [AYANOVA_REPORT_RENDER_BROWSER_PATH](ops-config-report-render-browser-path.md)
|
||||
- [AYANOVA_REPORT_RENDERING_TIMEOUT](ops-config-report-rendering-timeout.md)
|
||||
- [AYANOVA_REPORT_RENDERING_MAX_INSTANCES](ops-config-report-rendering-max-instances.md)
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# REPORT RENDER BROWSER PATH SETTING
|
||||
|
||||
This optional setting sets the _full_ path to the Chromium web browser executable that is used by AyaNova to render reports.
|
||||
|
||||
If not set, AyaNova will attempt to automatically download a copy of Chromium to a `.local-chromium` folder under the AyaNova executable folder on first report rendering.
|
||||
|
||||
This setting should be used only in cases where it's more appropriate to use a previously installed Chromium browser installation.
|
||||
|
||||
## Default
|
||||
|
||||
Default is empty / not set.
|
||||
|
||||
## Overriding
|
||||
|
||||
AyaNova expects the report rendering browser path to be provided by an environment variable or command line parameter named
|
||||
|
||||
`AYANOVA_REPORT_RENDER_BROWSER_PATH`
|
||||
|
||||
The value specified should be a string containing a fully qualified file path to the pg_dump utility.
|
||||
|
||||
Example command line parameter
|
||||
|
||||
`ayanova.exe --AYANOVA_REPORT_RENDER_BROWSER_PATH="/snap/chromium/current/bin/chromium.desktop/chrome.exe"` )
|
||||
|
||||
Example environment variable
|
||||
|
||||
Windows
|
||||
|
||||
`set "AYANOVA_REPORT_RENDER_BROWSER_PATH=o C:\Program Files\Chromium\chrome.exe"`
|
||||
|
||||
Linux / MAC
|
||||
|
||||
`export AYANOVA_REPORT_RENDER_BROWSER_PATH="/snap/chromium/current/bin/chromium.desktop/chrome.exe"`
|
||||
@@ -17,6 +17,10 @@ todo: distribute linux distros in zip and versioned, separate for docker and for
|
||||
rejig the build so it's output to a single folder since the build is the same for docker or baremetal
|
||||
then copy the necessary files and archive each into a final ready to upload archive in installs output or wherever but consolidated to single folder for easy upload of all installs
|
||||
|
||||
todo: Docker config add path to chromium in env variable:
|
||||
lo.ExecutablePath = ServerBootConfig.AYANOVA_REPORT_RENDER_BROWSER_PATH;//"/usr/bin/chromium-browser";//this is the default path for docker based alpine dist
|
||||
|
||||
|
||||
single standalone ubuntu desktop
|
||||
todo: put running on desktop image at top here
|
||||
Where it's at: working in all respects except for report rendering need to re-code that shit
|
||||
@@ -34,7 +38,7 @@ single standalone ubuntu desktop
|
||||
- Make AyaNova data folder: ~/.ayanova-data
|
||||
|
||||
- download ayanova linux x64 archive
|
||||
https://www.ayanova.com/Downloads/v8/linux-x64-ayanova-server.zip
|
||||
https://www.ayanova.com/Downloads/v8/ayanova-linux-x64-server.zip
|
||||
- Unzip the archive into an appropriate folder (/usr/bin/ayanova)
|
||||
- edit config.json
|
||||
set postgres password
|
||||
@@ -54,4 +58,8 @@ server lan ubuntu
|
||||
|
||||
//#############################################################
|
||||
nginx lan ubuntu
|
||||
internet
|
||||
internet
|
||||
|
||||
|
||||
//DOCKER
|
||||
https://www.ayanova.com/Downloads/v8/ayanova-linux-docker-x64-server.zip
|
||||
@@ -103,7 +103,7 @@ AyaNova is built upon the ASP.NET Core runtime version 6.0 or newer and it shoul
|
||||
|
||||
### AyaNova server installation
|
||||
|
||||
Download and run the AyaNova network installer: [https://www.ayanova.com/Downloads/v8/ayanova-lan-setup.exe](https://www.ayanova.com/Downloads/v8/ayanova-lan-setup.exe). Follow the prompts to complete installation but **DO NOT** select to start AyaNova with Windows, IIS will be responsible for starting and stopping AyaNova. If you do select start with windows re-run the installer and uncheck it.
|
||||
Download and run the AyaNova network installer: [https://www.ayanova.com/Downloads/v8/ayanova-windows-x64-lan-setup.exe](https://www.ayanova.com/Downloads/v8/ayanova-windows-x64-lan-setup.exe). Follow the prompts to complete installation but **DO NOT** select to start AyaNova with Windows, IIS will be responsible for starting and stopping AyaNova. If you do select start with windows re-run the installer and uncheck it.
|
||||
|
||||
#### Server configuration
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ AyaNova is built upon the ASP.NET Core runtime version 6.0 or newer and it shoul
|
||||
|
||||
### AyaNova server installation
|
||||
|
||||
Once you have ensured the two requirements above are installed and available; download and run the AyaNova network installer: [https://www.ayanova.com/Downloads/v8/ayanova-lan-setup.exe](https://www.ayanova.com/Downloads/v8/ayanova-lan-setup.exe). Follow the prompts and complete the installation.
|
||||
Once you have ensured the two requirements above are installed and available; download and run the AyaNova network installer: [https://www.ayanova.com/Downloads/v8/ayanova-windows-x64-lan-setup.exe](https://www.ayanova.com/Downloads/v8/ayanova-windows-x64-lan-setup.exe). Follow the prompts and complete the installation.
|
||||
|
||||
#### Server configuration
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ The single user installer will use TCP/IP ports 6432 for the Postgres server and
|
||||
|
||||
## Installation procedure
|
||||
|
||||
- Download and run the standalone installer from our web site: [https://www.ayanova.com/Downloads/v8/ayanova-single-setup.exe](https://www.ayanova.com/Downloads/v8/ayanova-single-setup.exe). Follow the prompts and accept the defaults. At the end of setup the ayanova-launcher application will start if selected (or you can run it from the desktop icon) and in turn it will start the Postgres server, AyaNova server and then open the default web browser to both the AyaNova server interface and the AyaNova User interface.
|
||||
- Download and run the standalone installer from our web site: [https://www.ayanova.com/Downloads/v8/ayanova-windows-x64-single-setup.exe](https://www.ayanova.com/Downloads/v8/ayanova-windows-x64-single-setup.exe). Follow the prompts and accept the defaults. At the end of setup the ayanova-launcher application will start if selected (or you can run it from the desktop icon) and in turn it will start the Postgres server, AyaNova server and then open the default web browser to both the AyaNova server interface and the AyaNova User interface.
|
||||
|
||||
## Starting and stopping AyaNova server
|
||||
To shut down the AyaNova server press the ctrl-c key combination in the ayanova-launcher window.
|
||||
|
||||
@@ -249,7 +249,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
//Let postgres sort the names so that they appear with the emoji symbols last in the list which we use for sample reports to
|
||||
//not pollute the regular reports
|
||||
var rpts = await ct.Report.AsNoTracking().Where(z => z.AType == aType && z.Active == true).Select(z => new { id = z.Id, name = z.Name, roles = z.Roles }).OrderBy(z=>z.name).ToListAsync();
|
||||
var rpts = await ct.Report.AsNoTracking().Where(z => z.AType == aType && z.Active == true).Select(z => new { id = z.Id, name = z.Name, roles = z.Roles }).OrderBy(z => z.name).ToListAsync();
|
||||
var ret = new List<NameIdItem>();
|
||||
foreach (var item in rpts)
|
||||
{
|
||||
@@ -258,7 +258,7 @@ namespace AyaNova.Biz
|
||||
ret.Add(new NameIdItem() { Name = item.name, Id = item.id });
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -444,36 +444,25 @@ namespace AyaNova.Biz
|
||||
}
|
||||
|
||||
//initialization
|
||||
log.LogDebug("Initializing report system");
|
||||
log.LogDebug("Initializing report rendering system");
|
||||
bool AutoDownloadChromium = true;
|
||||
if (string.IsNullOrWhiteSpace(ServerBootConfig.AYANOVA_REPORT_RENDER_BROWSER_PATH))
|
||||
{
|
||||
log.LogDebug($"Using default Chromium browser (downloaded)");
|
||||
}
|
||||
else
|
||||
{
|
||||
log.LogDebug($"Using user specified Chromium browser at {ServerBootConfig.AYANOVA_REPORT_RENDER_BROWSER_PATH}");
|
||||
AutoDownloadChromium = false;
|
||||
}
|
||||
|
||||
var ReportJSFolderPath = Path.Combine(ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH, "resource", "rpt");
|
||||
|
||||
// //===================
|
||||
// //TRY TO FORCE LANGUAGE
|
||||
// //language - mirror client's language so that pdf footer header stuff like date prints in their desired format, otherwise those items take the server's settings automatically
|
||||
// var ClientLanguage = reportRequest.ClientMeta["LanguageName"].Value<string>();
|
||||
// string LaunchParamLanguage = string.Empty;
|
||||
// if (!string.IsNullOrWhiteSpace(ClientLanguage))
|
||||
// {
|
||||
// LaunchParamLanguage = $"--lang={ClientLanguage}";
|
||||
// }
|
||||
// //======================
|
||||
|
||||
|
||||
var lo = new LaunchOptions { Headless = true };
|
||||
|
||||
|
||||
//TODO: this needs to be changed to a config variable to trigger automatically downloading chromium and in docker distro set it to false
|
||||
//so maybe what is needed is to specify chromium executable path and if not set then it attempts a download automatically
|
||||
//that would cover many scenarios beyond docker / linux desktop
|
||||
|
||||
|
||||
bool isWindows = System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);
|
||||
if (!isWindows)
|
||||
if (!AutoDownloadChromium)
|
||||
{
|
||||
//LINUX / MAC / NOT WINDOWS
|
||||
log.LogDebug($"Not Windows: setting executable path for chrome to expected '/usr/bin/chromium-browser'");
|
||||
lo.ExecutablePath = "/usr/bin/chromium-browser";//this is the default path for docker based alpine dist, but maybe not others, need to make a config setting likely
|
||||
// lo.Args = new string[] { "--no-sandbox" };
|
||||
lo.ExecutablePath = ServerBootConfig.AYANOVA_REPORT_RENDER_BROWSER_PATH;//"/usr/bin/chromium-browser";//this is the default path for docker based alpine dist, but maybe not others, need to make a config setting likely
|
||||
// lo.Args = new string[] { "--no-sandbox" };
|
||||
/*
|
||||
troubleshooting links:
|
||||
https://developers.google.com/web/tools/puppeteer/troubleshooting
|
||||
|
||||
@@ -77,6 +77,9 @@ namespace AyaNova.Util
|
||||
//BACKUP PG_DUMP PATH (IF NOT IN PATH ALREADY)
|
||||
internal static string AYANOVA_BACKUP_PG_DUMP_PATH { get; set; }
|
||||
|
||||
//REPORT RENDERING BROWSER PATH (if not set then will attempt to auto-download on first render)
|
||||
internal static string AYANOVA_REPORT_RENDER_BROWSER_PATH { get; set; }
|
||||
|
||||
//LOGGING
|
||||
internal static string AYANOVA_LOG_PATH { get; set; }
|
||||
internal static string AYANOVA_LOG_LEVEL { get; set; }
|
||||
@@ -165,7 +168,12 @@ namespace AyaNova.Util
|
||||
//backdoor back door password superuser reset
|
||||
AYANOVA_SET_SUPERUSER_PW = config.GetValue<string>("AYANOVA_SET_SUPERUSER_PW");
|
||||
|
||||
//REPORT RENDERING PROCESS CONTROL
|
||||
//REPORT RENDERING
|
||||
|
||||
//RENDER ENGINE PATH
|
||||
AYANOVA_REPORT_RENDER_BROWSER_PATH = ActualFullPath(config.GetValue<string>("AYANOVA_REPORT_RENDER_BROWSER_PATH"));
|
||||
|
||||
//PROCESS CONTROL
|
||||
int? nTemp = config.GetValue<int?>("AYANOVA_REPORT_RENDERING_TIMEOUT");
|
||||
AYANOVA_REPORT_RENDERING_TIMEOUT = (null == nTemp) ? 30000 : (int)nTemp;//default is 30 seconds
|
||||
if (AYANOVA_REPORT_RENDERING_TIMEOUT < 1000) AYANOVA_REPORT_RENDERING_TIMEOUT = 1000; //one second minimum timeout
|
||||
|
||||
Reference in New Issue
Block a user