From 51e251867c1f8de6b46d885985ba33a8143fe2a1 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 10 Sep 2022 00:53:24 +0000 Subject: [PATCH] --- devdocs/todo.txt | 149 +++++++++++++++++++++++++++++------------------ dist/ayinit.sh | 91 +++++++++++++++++++++++++++++ 2 files changed, 184 insertions(+), 56 deletions(-) create mode 100644 dist/ayinit.sh diff --git a/devdocs/todo.txt b/devdocs/todo.txt index d611af5a..1715dd6f 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -1,18 +1,73 @@ # now -THINGS HOLDING UP PERPETUAL RELEASE +PRICING / COSTS + +SUBSCRIPTION +cost: +Droplet +$6 month 1gb / 1cpu/ 1tb xfer/ 25gb total (need to calculate overhead for available amount) +$12/month 2gb/ 1cpu/ 2tb xfer/ 50gb total storage +100gb for attachments / backups (NOT DB) $10.00 month +250gb '' $25.00 / month + + +Let's just start with the 6 month server for everyone unless exceptional case of some kind + +Initially test servers should be same ad production so we can get feedback early from testers if any problems + + + + + +todo: AFTER PRICING IS SET: Update prices in new products at ShareIt, Test each product link again and confirm they all come through properly end to end and that the new price changes took effect. + + +=-=-=-=- + +# later + +THINGS HOLDING UP RELEASE - subscription licensing and terms, I have some links somewhere to good examples -- Pricing, is it right, i'm doubting again - I'm cheap and poor so that's coloring my thinking maybe making me think it's too high? - If existing customers see it's too high they may bail in droves or be pushed out? - It is revenue right now don't want to break that - Must make offer to new version but no push off existing version just yet - it really isn't a lot of money but times are tight and AyaNova is not the best out there and needs iteration to be better - Need to make profit, particularly on the rental servers which is riskier for the business as it's a committed ongoing expense each month we have to pay. - I like haveabytes minimum$100 month can translate that into licenses and just lower licneses like I was thinking - I had some idea related to comparing perpet to subscription ppossible informing prices of sub but...? Forgot it. + CRITICAL! Needs to be in place with wording on reasonable use etc to protect us etc +- subscription process info to request how to go about it, improvements to manual process + time zone, dbid, customer name, subdomain name + Subdomain allowed characters: a-z 0-9 - (dash) but not as a starting or ending character +- subscription trial length is maybe too short + it's traditional for many saas offerings to have a free intiial period that is turned into the full paid for and it's often 30 days + is there a cheap way to do that or do we eat 7 dollars every time? + I'm thinking if have a bigger server just for that and put multiple on it to save money? + maybe devops upsized? + How many eval droplet servers before it becomes cost effective to go dedicated or bigger single? +- Subscription being able to restrict total attachment and backup size + maybe a fixed volume for all data i.e. the db data, attachments and backups + So make a fixed volume put all data in there and then try resizing it to simulate when people pay for more size +- Pricing finalization, current idea is NOT right + Think of it like minimum revenue per customer regardless of size and move backwards from there + Go with volume, i.e. cheap and more customers less hassle overall that way, lower expectations + cheaper sub licenses with a minimum license count to cover costs and profit will entice more people + figure out the cost per customer for a minimal droplet and handlnig processing and work backwards + - get costs for v8 subs, come up with a price for now and move on from there. + what deal for v7 people i.e. discount or pro-rate it with a free month or something? + once have prices fixup the product sales links, test them and confirm ready to go + - If I want to get really cheap for singles I could put multiple on a single droplet? + Perpetual is it's own thing but do it after working out subs because they are interrelated and subs are the future + perpetaul should be cheaper but not a lot cheaper, we really don't want perpetual sites as they are a can of worms for support + Perpetual Support vs subscription costs is a thing, + perpetual requires more complex time consuming support, not only feature support but also all the server scenarios support + Perpetual has no ongoing costs other than support and payment processing + subs are identical and easire to manage with just usage support so less support than perpetual + subs have ongoing monthly fixed costs + Hard drive space pricing needs to be listed and available for purchase + +- Transition deals and pricing for existing, what do they get? + I'm thinking they pay to upgrade we didn't guarantee free upgrade to next major version in fact I think it specifically says opposite + pro-rate existing paid value left on v7 subscription? + But they may run both for a while and we may need to support both? + easier to do if they have a subscription we know they are using it + Maybe just a discount fixed for v7 users + Dont' get too hung up on this can go case by case as well and it's new people we want ultimately - Website Sales page @@ -28,68 +83,42 @@ THINGS HOLDING UP PERPETUAL RELEASE - -WIP >>>>>>>>>>>>> - - - -Status: reprioritize this todo list, clean up, consolidate and remove dupes etc, need a clean actionable list with little thought required to do whatever is next, time may be short for a while - - - - - -15) - -IN PROGRESS IN ORDER: - -PRICING / SALES ABILITY -todo: Fix the pricing for real - - get costs for v8 subs, come up with a price for now and move on from there. - what deal for v7 people i.e. discount or pro-rate it with a free month or something? - once have prices fixup the product sales links, test them and confirm ready to go - - If I want to get really cheap for singles I could put multiple on a single droplet? - - - - - -- Reprioritize list items left - barbones website for now just the basics adn enough to get going - consider a dedicated test server for trialers so don't need to go through the same fuckery over and over again or find a way to make an image to use for other servers find a way to move letsencrypt certs to another server? -Test product sale links - -========================================= -copy to space: -/usr/bin/s3cmd put filename.zip s3://gztw1 -/usr/bin/s3cmd put GZTWREPO-r0_11977-20220906172439.dump.zip s3://gztw1/vault/ - -========================================== -PARALLEL work -todo: Test each product link again and confirm they all come through properly end to end and that the new price changes took effect. +TODO: DOCUMENT A NEW droplet has about 21gb of free space. We could say 20 and 1 bonus but meh, 21 sounds better. + So this needs to be turned into a volume dedicated to data usage and maybe leave the 1gb on the /dev/vda1 and put the 20gb on the new volume purely for data storage + actually 21gb this is a generic setup with no data generated yet: + Filesystem Size Used Avail Use% Mounted on + tmpfs 98M 1.1M 97M 2% /run + /dev/vda1 25G 4.0G 21G 17% / + tmpfs 486M 28K 486M 1% /dev/shm + tmpfs 5.0M 0 5.0M 0% /run/lock + /dev/vda15 105M 5.3M 100M 5% /boot/efi + tmpfs 98M 4.0K 98M 1% /run/user/0 + + + Filesystem 1K-blocks Used Available Use% Mounted on + tmpfs 99444 1116 98328 2% /run + /dev/vda1 25215872 4131840 21067648 17% / + tmpfs 497220 28 497192 1% /dev/shm + tmpfs 5120 0 5120 0% /run/lock + /dev/vda15 106858 5329 101529 5% /boot/efi + tmpfs 99444 4 99440 1% /run/user/0 -todo: pricing subscription reconsideration and for perpetual reconsideration just to be certain give it a good think - remember minimum 100 per month to be worthwhile so set minimum number of licenses to purchase, consider 5 and 10 user as the standards - consider perpetual vs subscription from point of view of value and how they are perceived relative to each other -todo: create shareit subscription add-on's for extra storage space, premium server, test sales check comes through to rf -todo: back to new website after this -TODO: DOCUMENT A NEW droplet has about 20gb of free space. -todo: docs add view on map an image of a map to snazz it up. todo: trial server just one bigger server so it doesn't cost us as much and can offer it freely to lots of people test out making a volume dedicated to an instance so that we can control the storage space!! -L8R: todo: investigate install docs for ayanova on linux and ensure it doesn't conflict with fact that package manager is now used for newest ubuntu: @@ -266,8 +295,13 @@ todo: after website up submit manual sitemap generated by mkdocs to google to be +todo: TRIAL subscription server speeding up initial deployment. + Can use a Userdata bash shell script to automate all initial tasks and speed things up greatly, just paste it into the right box on server creation: + https://docs.digitalocean.com/products/droplets/how-to/provide-user-data/ + Utlimately though an api method is teh way to go so that it can do *everything* pretty much in code like spin up the server and initialize all the software, set the firewall config, request the ssl key etc - +todo: check again, can I use a wildcard cert with multiple servers or just for one server (ip address) + even with one it might be helpful for the test server if I consolidate to one. todo: BIG PICTURE - NEXT @@ -644,6 +678,9 @@ todo: 3 WINDOWS SINGLE LAUNCHER: ██████╔╝╚██████╔╝╚██████╗╚██████╔╝██║ ╚═╝ ██║███████╗██║ ╚████║ ██║ ██║ ██║ ██║ ██║╚██████╔╝██║ ╚████║ ╚═════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ + +todo: docs add view on map an image of a map to snazz it up. + todo: foucsed docs about common tasks like a getting started or how to section not just a ui help the old manual had guidance on inventory, how to use it how to start it etc go through old manual find candidates for how to's similar to how fastmail help has guidance on specific things that are FAQ's basically / tutorials diff --git a/dist/ayinit.sh b/dist/ayinit.sh new file mode 100644 index 00000000..327d59f4 --- /dev/null +++ b/dist/ayinit.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +TIMEZONE='America/Vancouver' +DOMAINNAME='subdomain.onayanova.com' + + +############################# +timedatectl set-timezone $TIMEZONE +apt-get update +apt-get dist-upgrade -y +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 +apt-get install -y aspnetcore-runtime-6.0 +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';" +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 +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-linux-x64-server.zip && \ +unzip -o ayanova-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 +systemctl start ayanova.service +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 +apt install certbot python3-certbot-nginx -y +certbot --nginx --noninteractive --agree-tos --email ops@onayanova.com --no-eff-email -d $DOMAINNAME \ No newline at end of file