This commit is contained in:
2024-05-24 18:44:12 +00:00
parent f5c1a52564
commit ce91c23597
4 changed files with 166 additions and 8 deletions

114
dist/8.1.5-ayiinit.sh vendored Normal file
View File

@@ -0,0 +1,114 @@
#!/bin/bash
# 1) create new droplet **DO NOT PICK IPV6 just the monitoring option** if trial use anytrial.onayanova.com SSH key if production make a unique key, add to keepass biz
# 2) immediately set subdomain name in networking
# 3) Add droplet into raven-server-standard-firewall
# 4) check DNS available using https://letsdebug.net/
# 5) Open putty, select X.onayanova.com, change ip to new droplet domain name and open it
# 6) nano ayinit.sh paste in this
# 7) CHANGE the values at the top of the script to the desired time zone and subdomain, Save and exit nano
# 8) Update the server apt-get update && apt-get upgrade
# 9) chmod a+x ayinit.sh
# 10) ./ayinit.sh
# 11) profit$
TIMEZONE='America/Los_Angeles'
DOMAINNAME='nexttest.onayanova.com'
#############################
echo STARTING...
timedatectl set-timezone $TIMEZONE
apt-get update
apt-get dist-upgrade -y
echo SET SWAP FILE
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
echo INSTALL .NET CORE
apt-get install -y aspnetcore-runtime-6.0
echo INSTALL POSTGRESQL
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install postgresql
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password 'YOUR_PASSWORD_HERE';"
echo INSTALL REPORTING LIBS
sudo apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libgbm1 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
echo INSTALL AYANOVA
apt install zip unzip -y
mkdir /var/ayanova
mkdir /var/ayanova/data
mkdir /var/ayanova/.local-chromium
cd /var/ayanova
curl -O https://www.ayanova.com/download/ayanova-subscription-linux-x64-server.zip && \
unzip -o ayanova-subscription-linux-x64-server.zip
chown -vR :www-data /var/ayanova
chmod -R g+rw /var/ayanova/data
chmod -R g+rwx /var/ayanova/.local-chromium
echo '[Unit]' >> /etc/systemd/system/ayanova.service
echo 'Description=AyaNova server' >> /etc/systemd/system/ayanova.service
echo '' >> /etc/systemd/system/ayanova.service
echo '[Service]' >> /etc/systemd/system/ayanova.service
echo 'WorkingDirectory=/var/ayanova' >> /etc/systemd/system/ayanova.service
echo 'ExecStart=/usr/bin/dotnet /var/ayanova/AyaNova.dll' >> /etc/systemd/system/ayanova.service
echo 'Restart=always' >> /etc/systemd/system/ayanova.service
echo 'RestartSec=10' >> /etc/systemd/system/ayanova.service
echo 'KillSignal=SIGINT' >> /etc/systemd/system/ayanova.service
echo 'SyslogIdentifier=ayanova-server' >> /etc/systemd/system/ayanova.service
echo 'User=www-data' >> /etc/systemd/system/ayanova.service
echo 'Environment=ASPNETCORE_ENVIRONMENT=Production' >> /etc/systemd/system/ayanova.service
echo 'Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false' >> /etc/systemd/system/ayanova.service
echo '' >> /etc/systemd/system/ayanova.service
echo '[Install]' >> /etc/systemd/system/ayanova.service
echo 'WantedBy=multi-user.target' >> /etc/systemd/system/ayanova.service
systemctl enable ayanova.service
echo START AYANOVA SERVICE
systemctl start ayanova.service
echo INSTALL NGINX
apt install nginx -y
echo 'server {' > /etc/nginx/sites-available/default
echo ' listen 80;' >> /etc/nginx/sites-available/default
echo " server_name $DOMAINNAME;" >> /etc/nginx/sites-available/default
echo ' location / {' >> /etc/nginx/sites-available/default
echo ' add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;' >> /etc/nginx/sites-available/default
echo ' add_header X-XSS-Protection "1; mode=block" always;' >> /etc/nginx/sites-available/default
echo ' add_header X-Content-Type-Options "nosniff" always;' >> /etc/nginx/sites-available/default
echo ' add_header X-Frame-Options "SAMEORIGIN" always;' >> /etc/nginx/sites-available/default
echo ' add_header Referrer-Policy "strict-origin" always;' >> /etc/nginx/sites-available/default
echo ' gzip on;' >> /etc/nginx/sites-available/default
echo ' gzip_vary on;' >> /etc/nginx/sites-available/default
echo ' gzip_min_length 10240;' >> /etc/nginx/sites-available/default
echo ' gzip_proxied expired no-cache no-store private auth;' >> /etc/nginx/sites-available/default
echo ' gzip_http_version 1.1;' >> /etc/nginx/sites-available/default
echo ' gzip_types application/javascript text/css application/json text/plain;' >> /etc/nginx/sites-available/default
echo '' >> /etc/nginx/sites-available/default
echo ' proxy_pass http://127.0.0.1:7575;' >> /etc/nginx/sites-available/default
echo ' proxy_http_version 1.1;' >> /etc/nginx/sites-available/default
echo ' proxy_set_header Upgrade $http_upgrade;' >> /etc/nginx/sites-available/default
echo ' proxy_set_header Connection keep-alive;' >> /etc/nginx/sites-available/default
echo ' proxy_set_header Host $host;' >> /etc/nginx/sites-available/default
echo ' proxy_cache_bypass $http_upgrade;' >> /etc/nginx/sites-available/default
echo ' proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;' >> /etc/nginx/sites-available/default
echo ' proxy_set_header X-Forwarded-Proto $scheme;' >> /etc/nginx/sites-available/default
echo ' proxy_connect_timeout 3600;' >> /etc/nginx/sites-available/default
echo ' proxy_send_timeout 3600;' >> /etc/nginx/sites-available/default
echo ' proxy_read_timeout 3600;' >> /etc/nginx/sites-available/default
echo ' send_timeout 3600; ' >> /etc/nginx/sites-available/default
echo ' client_max_body_size 25M;' >> /etc/nginx/sites-available/default
echo ' }' >> /etc/nginx/sites-available/default
echo '}' >> /etc/nginx/sites-available/default
systemctl restart nginx
echo INSTALL CERTBOT
apt install certbot python3-certbot-nginx -y
echo GET CERTIFICATE
certbot --nginx --noninteractive --agree-tos --email ops@onayanova.com --no-eff-email -d $DOMAINNAME
echo ...COMPLETED

View File

@@ -14,19 +14,19 @@ IN PROGRESS....
Released 2024-TBD-TBD Released 2024-TBD-TBD
**CAUTION / TAKE NOTE**: this release contains changes that require a couple of extra steps from the normal upgrade process you may be accustomed to. Be sure to follow our [upgrade instructions](ops-upgrade.md) which have been updated to cover the unique steps required for this particular upgrade from version 8.1.5 to version 8.2.0. **CAUTION / TAKE NOTE**: this release contains changes that require a **pre upgrade step** from the normal upgrade process you may be accustomed to. Be sure to follow our [upgrade instructions](ops-upgrade.md) and the **pre upgrade step** for this particular upgrade from version 8.1.5 to version 8.2.0.
**Changed** **Changed**
- Server: updated to use .NET 8.x LTS from previously used .NET 6.x LTS. .NET 6.x is reaching end of support this upcoming November. With this update to .NET 8.x come numerous benefits including performance and security gains. AyaNova 8.2 requires the .NET 8 runtime framework to be installed _before_ upgrading to this release. We have updated the [upgrade instructions](ops-upgrade.md) to guide you through this change please be sure to review this before upgrading. - Server: updated to use .NET 8.x LTS from previously used .NET 6.x LTS. .NET 6.x is reaching end of support this upcoming November. With this update to .NET 8.x come numerous benefits including performance and security gains. AyaNova 8.2 requires the .NET 8 runtime framework to be installed _before_ upgrading to this release. We have updated the [upgrade instructions](ops-upgrade.md) with a **pre upgrade step** to guide you through this change please be sure to follow this before upgrading.
- Server: switched the report rendering system from Chromium to Chrome browser to align with the default browser now supported by the Puppeteer headless browser controller library that we use for report generation. This change means that a couple of folders must be created and a folder removed to house the new location for the headless Chrome browser used for report generation. We have updated the [upgrade instructions](ops-upgrade.md) to guide you through this change please be sure to review this before upgrading to ensure report rendering continues to work. - Server: switched the report rendering system from Chromium to Chrome browser to align with the default browser now supported by the Puppeteer headless browser controller library that we use for report generation. This change means that a couple of folders must be created and a folder removed to house the new location for the headless Chrome browser used for report generation. We have updated the [upgrade instructions](ops-upgrade.md) with a **pre upgrade step** to guide you through this change please be sure to follow this before upgrading to ensure report rendering continues to work.
- Server: all 3rd party dependencies for AyaNova server have been upgraded to their most recent release versions to use with .NET 8.x. This is not a breaking change. This change improves performance, stability and security for each component used. - Server: all 3rd party dependencies for AyaNova server have been upgraded to their most recent release versions to use with .NET 8.x. This is not a breaking change. This change improves performance, stability and security for each component used.
**Added** **Added**
- Docs: added documentation about a potential issue with "US" being prepended to currency values for non US users and how to correct it in [user settings currency code](home-user-settings.md#currency-code) - Docs: added documentation about a potential issue with "US" being prepended to currency values on reports for non US users and how to correct it in [user settings currency code](home-user-settings.md#currency-code)
### AyaNova 8.1.5 ### AyaNova 8.1.5

View File

@@ -2,11 +2,11 @@
The linux desktop upgrade process involves replacing the AyaNova program files with the latest version and restarting the AyaNova server. The linux desktop upgrade process involves replacing the AyaNova program files with the latest version and restarting the AyaNova server.
These instructions assume the original installation steps were followed without changes, if you had to make changes adjust accordingly. These instructions assume the original installation steps were followed without changes and Ubuntu or compatible distro was used, if you had to make changes or have an alternative distro adjust accordingly.
### Expired Maintenance plan ### Expired Maintenance plan
If you do not have an active Maintenance plan you will [not be able to update](adm-license.md#maintenance-expired-message). If you do not have an active Maintenance plan [updating will BREAK your AyaNova application](adm-license.md#maintenance-expired-message).
### 1\. Backup ### 1\. Backup
@@ -22,6 +22,29 @@ Alternatively you can hard shut down AyaNova using the ctrl-c key combination in
### 3\. Upgrade ### 3\. Upgrade
#### Pre-upgrade step
If your current AyaNova version is older than 8.2.0 there is an extra step before the normal upgrade script process below.
8.2.0 switched to .NET 8 LTS from the prior used .NET 6 LTS and also switched to using Chrome instead of Chromium for the report rendering headless browser so this script accomodates these changes.
From a terminal window run the following commands:
```bash
sudo apt-get update && apt-get upgrade && \
sudo apt-get install -y aspnetcore-runtime-8.0 && \
sudo mkdir /var/ayanova/Chrome && \
sudo mkdir /var/ayanova/ChromeHeadlessShell && \
sudo chown -vR :www-data /var/ayanova && \
sudo chmod -R g+rwx /var/ayanova/Chrome && \
sudo chmod -R g+rwx /var/ayanova/ChromeHeadlessShell && \
sudo chmod g+rw /var/ayanova/
```
If there is an issue or error break apart the commands and execute each one individually to find the error.
#### upgrade script
The following shell script will automatically remove the old AyaNova files, download and unzip the latest AyaNova files then start the server. The following shell script will automatically remove the old AyaNova files, download and unzip the latest AyaNova files then start the server.
From a terminal window run the following commands: From a terminal window run the following commands:

View File

@@ -2,7 +2,7 @@
The linux server upgrade process involves replacing the AyaNova program files with the latest version and restarting the AyaNova server. The linux server upgrade process involves replacing the AyaNova program files with the latest version and restarting the AyaNova server.
These instructions assume the original installation steps were followed without changes, if you had to make changes adjust accordingly. These instructions assume the original installation steps were followed without changes and Ubuntu or compatible distro was used, if you had to make changes or have an alternative distro adjust accordingly.
### Expired Maintenance plan ### Expired Maintenance plan
@@ -16,7 +16,28 @@ If you do not have a fresh backup there will be no way to recover from potential
### 2\. Upgrade ### 2\. Upgrade
Ensure all other Users are logged out of AyaNova before proceeding. #### Pre-upgrade step
If your current AyaNova version is older than 8.2.0 there is an extra step before the normal upgrade script process below.
8.2.0 switched to .NET 8 LTS from the prior used .NET 6 LTS and also switched to using Chrome instead of Chromium for the report rendering headless browser so this script accomodates these changes.
From a terminal window run the following commands:
```bash
sudo apt-get update && apt-get upgrade && \
sudo apt-get install -y aspnetcore-runtime-8.0 && \
sudo mkdir /var/ayanova/Chrome && \
sudo mkdir /var/ayanova/ChromeHeadlessShell && \
sudo chown -vR :www-data /var/ayanova && \
sudo chmod -R g+rwx /var/ayanova/Chrome && \
sudo chmod -R g+rwx /var/ayanova/ChromeHeadlessShell && \
sudo chmod g+rw /var/ayanova/
```
If there is an issue or error break apart the commands and execute each one individually to find the error.
#### upgrade script
The following shell script will automatically stop the AyaNova server service, remove the old AyaNova files, download and unzip the latest AyaNova files then start the server service. The following shell script will automatically stop the AyaNova server service, remove the old AyaNova files, download and unzip the latest AyaNova files then start the server service.