|
STARTLED
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
You are up tomorrow - care to explain for the others?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Began -> START ED
around 50 L (Roman numeral) and the emoji is the definition. Shocked, startled, ...
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
An emoji as the definition?!
|
|
|
|
|
Yep!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Not by my rules Greg
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
I liked it!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
Was a green witch and croc involved too?
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
|
I'd like to host a Web API for a prototype project. Free would be nice, but what's really important is 'easy'. I don't want to have to jump through hoops to publish it and maintain it. Keep it simple. Also, I'll need access a SQL DB from within it.
I'm looking at AWS and Azure. Any other recommendations?
Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
I am interesting this kind of project too...
diligent hands rule....
|
|
|
|
|
I know that Microsoft offers getting an Azure account with a $50 per month credit, for trying things like this out. Cannot remember the details, but might be worth looking at.
If you have Visual Studio, it's then really easy set up and publish your API to Azure.
|
|
|
|
|
If you have a Postgres database, I can recommend Postgrest.
modified 11-Nov-22 12:47pm.
|
|
|
|
|
Postgrest looks interesting. I need to find some time to play with that. Looks like it automates a lot of things I hate doing, lol.
|
|
|
|
|
Check out Heroku[^]. The free version includes max. 10000 row Postgres database.
|
|
|
|
|
Host it yourself ! I do this a lot using Net 6 - I have a SBC on my LAN running Linux with a database(postgres) the dotnet sdk and runtimes installed, publish your API to a folder in /var/www/ (can be anywhere) , create a systemd service file and put it in /etc/systemd/system folder (so you can control it) - job done. To start it - systemctl start myapi.service, if you want it started at boot time - systemctl enable myapi.service
Sample service file
[Unit]
Description=Pete Kane Commands API net core<br />
StartLimitIntervalSec=0
[Service]
ExecStart=/usr/bin/dotnet /var/www/CommandsAPI/CommandsAPI.dll
WorkingDirectory= /var/www/CommandsAPI/
User=pjk
Group=pjk
Restart=on-failure
SyslogIdentifier=Commands-API
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
modified 27-Jul-22 4:12am.
|
|
|
|
|
A very nice and helpful tip how simple it may be!
For someone with only .NET desktop experience, I'm today still staying away from the .NET back end stuff, and still a newbie. I stay still away on the old PHP solution way.
Something about which we often break our head:
"In the name of the Compiler, the Stack, and the Bug-Free Code. Amen."
(source unknown)
|
|
|
|
|
In my own (limited) experience, no question with the word "easy" in it should have the words "Azure" or "AWS" in the answer.
|
|
|
|
|
My preference would be web api in net6 + linux container + gcp kubernetes cluster with 1 minimal node like n1-standard-1. This would require a (free) local Docker Desktop on Win 10, and a free GCP subscription with 300 USD credit for 3 months
|
|
|
|
|
web api functions in Azure can be done in a few minutes. depends how complex the code need to be, but can write in browser, save, and is running.
Cost - running cost only if called, and even then talking 1000s per 1 penny
the 50$ free with account, I cant remember if that a 1 first year free things, or if have visual studio license comes with a 50$ per month with license.
if .net application - similar cost of running as Function App
|
|
|
|
|
|
I host my own
About 5 years ago I pooled together about £400 gbp, and bought a second hand Dell server that was only 2 years old from a local dealer.
The server was a 4 Node C6100 server, with each node/sled fully populated (8 cores and 24gb Ram + 3 1Tb drives), However, what I'm about to describe can be run on any bit of old PC hardware built within the last 10 years or so, as long as it has a CPU with virtualisation extensions added, which today is all Xeons, and most i5/i7 series.
Put a decent size hard drive in the machine, download the latest Ubuntu Server LTS version (Currently 22.04 as I write this [I personally am still on 20.04]), burn the ISO to a CD or a keychain, and boot and install the PC with it.
Go with the defaults, if you download the server version you should not get asked if you want a desktop or anything on it, if you do though... the answer is NO, you don't need a GUI or anything on this system, just an SSH server (Which you may also get asked if you want)
Once you have the base installed, then you first want to do an update:
apt update; apt upgrade
Just to make sure everything's up to date.
Following that, you want LXD installing, no point in repeating what others have written, so you you can find all you need to know here:
https://www.cyberciti.biz/faq/install-lxd-on-ubuntu-20-04-lts-using-apt/
For performance reasons on a single stand alone PC, you probably want the "snap" version, and when you init your default storage pool "btrfs" as the file system type, unless of course you want access from your host machine direct into the containers you create then your storage type wants to be "dir", the rest are for more specialist cases and require too much overhead to maintain.
Once you have your Server set up, and LXD installed and initialised, then your ready to rock and roll:
lxc launch ubuntu:20.04 myfirstcontainer
Will spin up your first container running ubuntu LTS 20.04 ready for you to "lxc exec <name> bash" into it and start adding users, software etc to it.
LXD/LXC containers running ubuntu, use something called cloud-init, which allows you to add provisioning steps directly to your containers at creation time, I've already created a profile script to add to LXD and you can grab a copy from github here:
LXD Profile to add to your LXD install, allowing the creation of lightweight DOTNET 6 containers when using "lxc launch"
You can add the profile to your LXD install as follows
cat dotnet.profile | lxc profile edit dotnet
Then use it to create auto provisioning containers using
lxc launch ubuntu:20.04 mysecondcontainer -p dotnet
If your NOT using a container image that uses cloud init, then you can use my alternate script that uses "LXC commands" at the ubuntu host command line to provision your container, you can grab a copy of those here:
Bash script to provision a standalone Linux container based on Debian, setting it up to run DOTNET 6 SDK and including the Midnight Commander file manager and text editor.
For managing the users in the containers and generating SSH keys that you can then use in PuttySSH on a windows machine, you can grab a copy of the scripts I use for those tasks here:
Provisioning Scripts that I use for managing containers running DOTNET 6 projects on LXD/LXC
NOTE: To use the ssh creation script you will need to install "putty-tools" from the Ubuntu package manager so that you can generate windows compatible PPK certs for use with Putty on Windows. If you use a different SSH tool set, then you'll need to alter the script to run something like "ssh-keygen" instead.
You can customise the profile and scripts to include any language runtimes you want. I work mostly with C# & .NET hence why mine are all DN6, but you can use this method & scripts to set-up python, node, go, flutter anything you want.
You could even create separate profiles for different language installs if your using cloud-init aware OS's, then it's a simple matter of just "-p blahprofile" as needed when you launch a new image.
I also have "Team City & Jenkins" installed on the container host, and with a lot of my projects I have a full CI/CD process that allows me to just check code in to my Git-Server (Which I also run locally on my own gear) , and the CI/CD process then tears down any old container running, builds a new one, builds the code, pushes the built code into the new container, then re-starts it.
Make no mistake here either, LXD/LXC containers are NOT Like docker images. These thinks look, feel and behave like full blown miniature VM's, they will acquire their own IP address from the host (You WILL have to do the extra work of manually creating a bridged network interface if you want them to use the same DHCP on your router as everything else does) and they will set up their own file system that you can run an SSH service on, and that appears as if it was a separate directly addressable server in your network.
Best part about it all... if you have an OLD pc (Doesn't have to be stupid powerful) that's sitting gathering dust, doing this should cost you nothing, but a bit of learning and setting up time.
I did an earlier video on my YouTube page, showing how to use the same sort of methods for setting up and running a DOTNET Core Blazor Server app, but that is a bit out of date now, you can watch it here if you want to however:
building a blazor app on LXC - YouTube
modified 28-Jul-22 10:41am.
|
|
|
|
|
It's apt update not apt install update same for upgrade
Life should not be a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming “Wow! What a Ride!" - Hunter S Thompson - RIP
|
|
|
|
|
aye, so a minor keyboard slip occured... meh...
|
|
|
|
|