diff --git a/.vscode/launch.json b/.vscode/launch.json
index bb97e1d2..903dfc74 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
- "name": ".NET Core Launch (web)",
+ "name": ".NET Core Launch (web) PERPETUAL BUILD",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build debug",
@@ -58,6 +58,60 @@
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
+ },{
+ "name": ".NET Core Launch (web) SUBSCRIPTION BUILD",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build debug subscription",
+ // If you have changed target frameworks, make sure to update the program path.
+ //#### THIS MEANS YOU JOHNNY! If the debugger fails this is the issue
+ "program": "${workspaceFolder}/server/AyaNova/bin/Debug/net6.0/AyaNova.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/server/AyaNova",
+ "stopAtEntry": false,
+ "internalConsoleOptions": "openOnSessionStart",
+ // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
+ //this needs to be tweaked probably
+ //https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#starting-a-web-browser
+ "serverReadyAction": {
+ "action": "openExternally",
+ "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)"
+ },
+ // "launchBrowser": {
+ // "enabled": true,
+ // "args": "${auto-detect-url}/api/v8/",
+ // "windows": {
+ // "command": "cmd.exe",
+ // "args": "/C start http://localhost:7575/api/v8/"
+ // },
+ // "osx": {
+ // "command": "open"
+ // },
+ // "linux": {
+ // "command": "xdg-open"
+ // }
+ // },
+ "env": {
+ // "ASPNETCORE_ENVIRONMENT": "Development",
+ "AYANOVA_JWT_SECRET": "1111111MyRandom32CharacterSecret",
+ "AYANOVA_LOG_LEVEL": "Info",
+ //"AYANOVA_LOG_LEVEL": "Debug",
+ //"AYANOVA_LOG_LEVEL": "Trace",
+ "AYANOVA_DEFAULT_TRANSLATION": "en",
+ "AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;CommandTimeout=120;",
+ "AYANOVA_DATA_PATH": "c:\\temp\\ravendata",
+ "AYANOVA_USE_URLS": "http://*:7575;",
+ //"AYANOVA_PERMANENTLY_ERASE_DATABASE":"true",
+ //"AYANOVA_REMOVE_LICENSE_FROM_DB":"true",
+ //"AYANOVA_SERVER_TEST_MODE": "true",
+ "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8",
+ //"AYANOVA_REPORT_RENDERING_TIMEOUT":"1",
+ "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
+ "AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin"
+ },
+ "sourceFileMap": {
+ "/Views": "${workspaceFolder}/Views"
+ }
},
{
"name": ".NET Core Attach",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 2f0fab37..5d1185c9 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -15,6 +15,22 @@
"isDefault": true
}
},
+ {
+ "label": "build debug subscription",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/server/AyaNova/AyaNova.csproj",
+ "-p",
+ "SUBSCRIPTION_BUILD=true"
+ ],
+ "problemMatcher": "$msCompile",
+ "group": {
+ "kind": "build",
+ "isDefault": true
+ }
+ },
{
"label": "build release",
"command": "dotnet",
diff --git a/build-release.bat b/build-release.bat
index ac002258..33d2f5e7 100644
--- a/build-release.bat
+++ b/build-release.bat
@@ -36,13 +36,36 @@ set m=CLIENT FAILED TO COPY
goto FAIL
)
-@echo ******************** BUILD LINUX x64 **************************
+
+@echo ******************** BUILD SUBSCRIPTION LINUX x64 **************************
+rmdir C:\data\code\raven\dist\subscription-build-linux-x64 /s/q
+mkdir C:\data\code\raven\dist\subscription-build-linux-x64
+cd C:\data\code\raven\server\AyaNova\
+dotnet publish -o C:\data\code\raven\dist\subscription-build-linux-x64\ -c Release -r linux-x64 --no-self-contained -p:SUBSCRIPTION_BUILD=true
+IF %ERRORLEVEL% NEQ 0 (
+set m=BUILD SUBSCRIPTION LINUX x64 FAILED
+goto FAIL
+)
+
+rem LINUX SUBSCRIPTION SERVER
+"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\data\code\raven\dist\installers\ayanova-subscription-linux-x64-server.zip" "C:\data\code\raven\dist\subscription-build-linux-x64\*" -r
+"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\data\code\raven\dist\installers\ayanova-subscription-linux-x64-server.zip" "C:\data\code\raven\dist\assets\linux-server\config.json"
+IF %ERRORLEVEL% NEQ 0 (
+set m=BUILD SUBSCRIPTION LINUX x64 SERVER ZIP FAILED
+goto FAIL
+)
+
+
+
+
+
+@echo ******************** BUILD PERPETUAL LINUX x64 **************************
rmdir C:\data\code\raven\dist\linux-x64 /s/q
mkdir C:\data\code\raven\dist\linux-x64
cd C:\data\code\raven\server\AyaNova\
-dotnet publish -o C:\data\code\raven\dist\linux-x64\ -c Release -r linux-x64 --no-self-contained
+dotnet publish -o C:\data\code\raven\dist\linux-x64\ -c Release -r linux-x64 --no-self-contained -p:SUBSCRIPTION_BUILD=false
IF %ERRORLEVEL% NEQ 0 (
-set m=BUILD LINUX x64 FAILED
+set m=BUILD PERPETUAL LINUX x64 FAILED
goto FAIL
)
@@ -65,11 +88,11 @@ set m=BUILD LINUX x64 DESKTOP ZIP FAILED
goto FAIL
)
-rem LINUX SERVER
+rem LINUX PERPETUAL SERVER
"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\data\code\raven\dist\installers\ayanova-linux-x64-server.zip" "C:\data\code\raven\dist\linux-x64\*" -r
"C:\Program Files\7-Zip\7z.exe" a -tzip "C:\data\code\raven\dist\installers\ayanova-linux-x64-server.zip" "C:\data\code\raven\dist\assets\linux-server\config.json"
IF %ERRORLEVEL% NEQ 0 (
-set m=BUILD LINUX x64 SERVER ZIP FAILED
+set m=BUILD PERPETUAL LINUX x64 SERVER ZIP FAILED
goto FAIL
)
diff --git a/devdocs/deploy.md b/devdocs/deploy.md
index c06dd101..82edb241 100644
--- a/devdocs/deploy.md
+++ b/devdocs/deploy.md
@@ -32,6 +32,8 @@ UPLOAD releases to ayanova.com/download/next folder where it will be staged befo
### Test install to devops server
+#### NEXT folder version
+
cd /var/ayanova && \
sudo systemctl stop ayanova.service && \
sudo curl -O https://www.ayanova.com/download/next/ayanova-linux-x64-server.zip && \
@@ -51,7 +53,26 @@ sudo rm -r ./wwwroot && \
sudo unzip -o ayanova-linux-x64-server.zip -x "config.json" && \
sudo systemctl start ayanovaa261.service
+#### MAIN RELEASE folder version
+cd /var/ayanova && \
+sudo systemctl stop ayanova.service && \
+sudo curl -O https://www.ayanova.com/download/ayanova-linux-x64-server.zip && \
+sudo rm *.dll && \
+sudo rm -r ./resource && \
+sudo rm -r ./wwwroot && \
+sudo unzip -o ayanova-linux-x64-server.zip -x "config.json" && \
+sudo systemctl start ayanova.service
+
+(a261 server)
+cd /var/ayanovaa261 && \
+sudo systemctl stop ayanovaa261.service && \
+sudo curl -O https://www.ayanova.com/download/ayanova-linux-x64-server.zip && \
+sudo rm *.dll && \
+sudo rm -r ./resource && \
+sudo rm -r ./wwwroot && \
+sudo unzip -o ayanova-linux-x64-server.zip -x "config.json" && \
+sudo systemctl start ayanovaa261.service
### Test install to windows server
diff --git a/devdocs/todo.txt b/devdocs/todo.txt
index 52138f2e..4e73f1ef 100644
--- a/devdocs/todo.txt
+++ b/devdocs/todo.txt
@@ -1,6 +1,65 @@
# now
+THINGS HOLDING UP PERPETUAL RELEASE
+
+- Code changes to prevent Subscription license from being used in a self installed scenario and vice versa
+ see notes below about this in various todo items
+- Website
+ Sales page
+ Pricing page
+ Marketing / features page
+ Perpetual vs Subscription (perpetual first, subscirption "coming soon" ok)
+- License changes
+- Test and confirm Shareit sales links
+- Announcement email with migration plan and costs and offers etc
+
+
+
+todo: implement and test new system to prevent download subscription instance database and just use locally, i.e. check for special file or whatever system we implement
+ check for subscription key file presence and signature inside to be checked in case they parse the code and put teh file by that name needs to be not enough but signed inside too
+todo: ROCKFISH different license key signature if it's a SAAS license
+ this solves a lot of problems, effectively it's unlicensed if they move their data to their own hardware without a key
+ requires that AyaNova have different internal key to check, maybe it's actually a build switch for that since only we will be running our SAAS version.
+ dual signatures doesnt' work becuase it would mean ayanova could just work anyway since it can check either, need something else.
+ build switch would work but it means a whole separate build every tiem which is fucky, but maybe necessary.
+todo: LICENSE must prevent a user from moving their data from perpetual to sub and vice versa without the right key so we can control it
+ otherwise they could just download the data and run it locally as it's got the license in it
+ See immediately below potential solution
+ CONSIDER: is this an issue? If so how to control it, maybe some kind of file flag or invisible config key or something??
+ This has implications for competitors running subscription services
+ i.e. havabyte says I'll host it for you just download your data and send to me and I'll do it for less
+ The critical part is the update, if the license permits updates for subs it has to be only when we do it
+ otherwise they self host and enjoy free updates unless we zap the license..hmm... needs something more here
+
+ Maybe they can't download the backup with the license intact??
+ Maybe they can't intereact with the license page at all if it's subscription, just view it??
+todo: SAAS different license checking method to ensure only *we* are hosting it if it has a saas license
+ something location dependant, a different license server address?
+ We might host with other than digitalocean at some point so we can't look for that as a key
+ I guess we have our own approved IP addresses maybe in rockfish, if the license request comes from anywhere else than set for that customer we go fuck no and shut it down??
+ Does digitalocean ever change the ip address?
+ ** Actually a static file outside of the backup would be ideal as it is easily transferrable by us, doesn't rely on ip address fuckery and can contain a signature inside it just like the license does, same key so we know it's legit
+ and if no file present then it's not hosted by us and as long as the license is perpetual then we're ok, but if the file not present and it's an SAAS license they fuck that shit stops working says not running from a licensed location.
+TODO: I think a different build is the most solid way to do it, it's a pain but it *does* solve a lot of problems in one swoop and I can do endless things in the code if I have a build flag around them that is cool
+ implement build flag "SUBSCRIPTION_BUILD"
+ Change rockfish license generator to make subscription type a first class element, not a feature in the feature collection
+ change AyaNova build to only work as a subscription build with a subscription key adn vice versa so the key *must* be the correct one
+ treat this like an out of maint newer build where it just won't boot up
+ ensure migration path to this by erasing key and fetching a new one, same db id, just new key
+ can just erase the key and put a purchased one is as a path
+ Change rockfish so we know if they are a subscriber right on the main customer page somehow with an area to put their address and stuff
+ we will be generating a *lot* of keys if they are month to month
+ Do I need a separate subscription expiration date in the key?
+ actually, I think the existing one is there for just this purpose after all a perpetual never expires so maybe no need to fuck with this aspect
+ Test it out as if a real customer were doing this end to end on a hosted server
+
+
+
+todo: ROCKFISH can't make a trial key for users in the UI, only when it's requested from ayanova.
+ I'm really not sure if this is an issue or not but putting it on the list in case
+ add as a feature just in case
+
SHAREIT pricing and subscription changes are all built into the system, I had no idea, also an api and bunch of other shit we've needed all along
They have comprehensive help available here: https://account.mycommerce.com/Home/Wiki
some things we will need to request be turned on to be able to do them like changing subscription quantities and upgrade paths for subscribers so they can just move to v8 sub
@@ -13,8 +72,6 @@ https://linuxhandbook.com/set-up-discourse-digital-ocean/ has an example of disc
TEST: cheapest storage for attachments possible, test out creating a new droplet with block storage to hold the attachment files to see if it's possible, how it's done and mapped etc
-todo: implement and test now system to prevent download subscription instance database and just use locally, i.e. check for special file or whatever system we implement
- check for subscription key file presence and signature inside to be checked in case they parse the code and put teh file by that name needs to be not enough but signed inside too
todo: can user use erase key flag to get trial and then use trial for 5 days and just keep on doing that or isn't there a check to erase db first??
needs some way to ensure this doesn't happen, maybe a user check or something or some sign it's not eval??
@@ -44,15 +101,7 @@ todo: License agreement changes for SAAS customers, this is huge and I hadn't th
todo: SAAS gaming, once have idea of plans and add-ons, need to test it out on servers and see what's what and how it would work in practice
i.e. storage on block storage, backup practical things etc
-todo: ROCKFISH different license key signature if it's a SAAS license
- this solves a lot of problems, effectively it's unlicensed if they move their data to their own hardware without a key
- requires that AyaNova have different internal key to check, maybe it's actually a build switch for that since only we will be running our SAAS version.
- dual signatures doesnt' work becuase it would mean ayanova could just work anyway since it can check either, need something else.
- build switch would work but it means a whole separate build every tiem which is fucky, but maybe necessary.
-todo: ROCKFISH can't make a trial key for users in the UI, only when it's requested from ayanova.
- I'm really not sure if this is an issue or not but putting it on the list in case
- add as a feature just in case
todo: DOCS - remove all mention of digitalocean from the install and other docs since we're going to be using them for SAAS we don't want to make it simple for people to host themselves, just say Linux and leave it at that.
@@ -102,29 +151,10 @@ todo: Change 45 day trial to 5 day trial but offer that they can email if they a
If they need more time they can sign up for a month's use of the SAAS model
is this in rockfish??
also they can just request a new trial over and over if in eval mode if they erase the db each time
- also if I can override a trial period for an eval in the UI that would be great (I think I can but check)
+ also if I can override a trial period for an eval in the rockfish UI that would be great (TO BE ADDED WITH CODE CHANGE)
todo: CLIENT UI license changes for subscribers around the LICENSE pages and route??
-todo: LICENSE must prevent a user from moving their data from perpetual to sub and vice versa without the right key so we can control it
- otherwise they could just download the data and run it locally as it's got the license in it
- See immediately below potential solution
- CONSIDER: is this an issue? If so how to control it, maybe some kind of file flag or invisible config key or something??
- This has implications for competitors running subscription services
- i.e. havabyte says I'll host it for you just download your data and send to me and I'll do it for less
- The critical part is the update, if the license permits updates for subs it has to be only when we do it
- otherwise they self host and enjoy free updates unless we zap the license..hmm... needs something more here
-
- Maybe they can't download the backup with the license intact??
- Maybe they can't intereact with the license page at all if it's subscription, just view it??
-todo: SAAS different license checking method to ensure only *we* are hosting it if it has a saas license
- something location dependant, a different license server address?
- We might host with other than digitalocean at some point so we can't look for that as a key
- I guess we have our own approved IP addresses maybe in rockfish, if the license request comes from anywhere else than set for that customer we go fuck no and shut it down??
- Does digitalocean ever change the ip address?
- ** Actually a static file outside of the backup would be ideal as it is easily transferrable by us, doesn't rely on ip address fuckery and can contain a signature inside it just like the license does, same key so we know it's legit
- and if no file present then it's not hosted by us and as long as the license is perpetual then we're ok, but if the file not present and it's an SAAS license they fuck that shit stops working says not running from a licensed location.
-
@@ -165,8 +195,7 @@ todo: test out automatic backups using digitalocean's built in system with their
- SHAREIT product codes once have pricing figured out fully and agreed on by joyce
-Rockfish - change text "Rental key" in picklist to "Service hosted key"
- not critical just to avoid confusion down the road, even though it does nothing currently but it should be consistent
+
todo: BIG PICTURE - NEXT
@@ -175,10 +204,10 @@ Overview:
Focus on migrating existing users first before anything else
Critical path items for onboarding existing v7 people:
New pricing determined
- New purchase product codes in shareit
- License subscription process to move users
+ New purchase product codes in shareit DONE BUT NOT TESTED YET
+ License subscription process plan to migrate users
coupon issued to equalize pricing but renewals will be higher
- might need to ask shareit how we do this because it's changing an existing subscription
+ They must purchase the new v8 subscription and cancel the v7, no way around that I can see
End result is want the user to pay nothing or very minimal now but renew higher later
Rockfish is already ready for them
Live eval system, probably manual for now spin up server keep several in rotation.
diff --git a/server/AyaNova/AyaNova.csproj b/server/AyaNova/AyaNova.csproj
index 99506220..ce9be42e 100644
--- a/server/AyaNova/AyaNova.csproj
+++ b/server/AyaNova/AyaNova.csproj
@@ -11,6 +11,9 @@
1591
False
+
+ $(DefineConstants);SUBSCRIPTION_BUILD
+
diff --git a/server/AyaNova/Program.cs b/server/AyaNova/Program.cs
index 90d7c509..033e5dfb 100644
--- a/server/AyaNova/Program.cs
+++ b/server/AyaNova/Program.cs
@@ -209,7 +209,12 @@ namespace AyaNova
#if (DEBUG)
- logger.Info($"### DEBUG ONLY - Linker timestamp is {Util.FileUtil.GetLinkerTimestampUtc(System.Reflection.Assembly.GetExecutingAssembly())}");
+ logger.Info($"### DEBUG ONLY - Linker timestamp is {Util.FileUtil.GetLinkerTimestampUtc(System.Reflection.Assembly.GetExecutingAssembly())}");
+#if (SUBSCRIPTION_BUILD)
+ logger.Info($"### DEBUG ONLY - SUBSCRIPTION BUILD");
+#else
+ logger.Info($"### DEBUG ONLY - PERPETUAL BUILD");
+#endif
#endif
//log configuration
diff --git a/server/AyaNova/util/License.cs b/server/AyaNova/util/License.cs
index fa14d6ba..da1eeb4d 100644
--- a/server/AyaNova/util/License.cs
+++ b/server/AyaNova/util/License.cs
@@ -287,7 +287,7 @@ namespace AyaNova.Core
// ""Name"": ""TrialMode""<---means is a trial key
// },
// {
- // ""Name"": ""ServiceMode"" <----Means it's an SAAS/Rental key
+ // ""Name"": ""Subscription"" <----Means it's an SAAS/Rental key
// }
// ]