This commit is contained in:
2022-09-16 00:29:59 +00:00
parent cbc9916eb8
commit 146fb67470
3 changed files with 10 additions and 54 deletions

View File

@@ -432,4 +432,11 @@ fake sale of v8 to get license emails to update rockfish to auto read in the dee
"purchase_origin": "online"
}
}
}
}
## How to make custom ubuntu images with digitalocean
https://www.digitalocean.com/community/tutorials/how-to-create-a-digitalocean-droplet-from-an-ubuntu-iso-format-image
This seems to be the only practical way to create a new droplet that has a separate data partition

View File

@@ -36,50 +36,6 @@ TODO: Get teh amount of space a HUGE seeded database consumes
TODO: SUBSCRIPTION CHANGES DATA VOLUME
ACTUALLY, it's not super easy to get file space used surprisingly, and also it's time consuming and disk io intensive as it has to enumerate every file
and subdirectory one at a time, a better option is to find a way to create a fixed volume in linux dedicated to ayanova, put all the data in it
and use that and if they pay for more then can use a volume in a storage location.
Also that means AyaNova is not having to make sure they don't crash AyaNova by using up too much space, instead, the volume is fixed and it becomes a matter of
checking for free space only, not counting files
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
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
probably not a good idea down here -----v
private const string MAXIMUM_DATA_GB_FEATURE_NAME = "MaximumDataGB";
If license doesn't have it and it's subscrkiption then the default is 20gb
ATTACHMENT / DATA CAP have a maximum attachment / data cap size that can be configured for subscriptions
Settable from license or defaults in subscription to a known value, i.e. basically 20gb but can be overriden if paid for more!
DB LOCATION - set location in AyaNova data folder in POSTGRES during boot new db creation process
Should alert users via job that periodically checks for reaching limit, we will shut them down , not ayanova but
Backup must check capacity and not run if getting too big to fit and send dire alerts to everyone if it can't run
alert once per week if between 80% and 90%
alert once a day if between 90% and 95%
close server lock out all but superuser if reaches 99% capacity, stop backup from running
STRIP OUT METRICS (maybe some of them for both types, just not working or accurate, the db and file size stuff is useful if working properly)
@@ -88,7 +44,7 @@ DOCS - ops section of docs not relevant to subscribers, add "PERPETUAL BUILD ONL
METRIC WE DO NEED
just a simple value showing storage space available for subscribers maybe usage over time?
but surface outside of OPS tree in menu, in admin? backup?
todo: should alert users if low on disk space in dedicated subscription volume
todo: remove from public view but keep implemented the HUGE database size seeding as it's not really huge at all, more like small data for a years worth of a small company
customers are huge but work orders are relatively light, would need to be double I think to come close to huge
@@ -349,13 +305,6 @@ todo: check again, can I use a wildcard cert with multiple servers or just for o
TODO: constrained data volume / partition config test / figuring out
https://www.digitalocean.com/community/questions/how-to-resize-my-file-system-in-ubuntu-after-resizing-a-droplet
https://unixcop.com/how-to-create-hard-disk-partitions-in-ubuntu-create-hard-disk-partition-in-linux/
Set postgres default data volume in config file:
https://www.postgresql.org/docs/current/runtime-config-file-locations.html
todo: BIG PICTURE - NEXT

2
dist/ayinit.sh vendored
View File

@@ -4,7 +4,7 @@
# 2) immediately set subdomain name in networking
# 3) Add droplet into v8trial-standard-firewall
# 4) check DNS available using https://letsdebug.net/
# 5) Open putty, select anytrial.onayanova.com, change ip to new droplet domain name and open it
# 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) chmod a+x ayinit.sh
# 8) ./ayinit.sh