Unattended install?
-
A while ago, we wrote https://git.cloudron.io/cloudron/cloudron-sysadmin which is basically an unattended install. That script most likely won't work / is obsolete.
If there's interest, I can write a quick doc on how to write this script. It's really just a bunch of API calls to automate everything. Fee free to automate in the language of your choice.
-
@girish This sounds like the perfect start of a Cloudron Deployer App which can be used to build a series/cluster of Cloudrons, all from one place.
@robi We also tinkered with automating it in cloudron.io, but that requires the user to give us ssh access to the server (atleast, for the duration of deployment) to setup stuff.
Would that be interesting? Login to Cloudron.io, add an IP address and some deployment parameters and it will go deploy. Underneath, it's probably only web-ifying the deploy script.
-
@robi We also tinkered with automating it in cloudron.io, but that requires the user to give us ssh access to the server (atleast, for the duration of deployment) to setup stuff.
Would that be interesting? Login to Cloudron.io, add an IP address and some deployment parameters and it will go deploy. Underneath, it's probably only web-ifying the deploy script.
-
@robi We also tinkered with automating it in cloudron.io, but that requires the user to give us ssh access to the server (atleast, for the duration of deployment) to setup stuff.
Would that be interesting? Login to Cloudron.io, add an IP address and some deployment parameters and it will go deploy. Underneath, it's probably only web-ifying the deploy script.
@girish I don't really like the idea of sharing my SSH key to anyone; nor I like the fact I need to SSH to the new server, but it's really not that much a problem.
As @nebulon mentioned, I would rather prefer to call it through cloud-init, but every provider is different in this regards, so it sounds like a headache.
I also feel that Cloudron is more for SMB, mostly for small business - and I doubt small business would install hundres of Cloudrons - please, correct me if I'm wrong (I would be also happy for you to be wrong!).
-
@girish I don't really like the idea of sharing my SSH key to anyone; nor I like the fact I need to SSH to the new server, but it's really not that much a problem.
As @nebulon mentioned, I would rather prefer to call it through cloud-init, but every provider is different in this regards, so it sounds like a headache.
I also feel that Cloudron is more for SMB, mostly for small business - and I doubt small business would install hundres of Cloudrons - please, correct me if I'm wrong (I would be also happy for you to be wrong!).
-
A while ago, we wrote https://git.cloudron.io/cloudron/cloudron-sysadmin which is basically an unattended install. That script most likely won't work / is obsolete.
If there's interest, I can write a quick doc on how to write this script. It's really just a bunch of API calls to automate everything. Fee free to automate in the language of your choice.
If the need is big enough I could write an ansible module for cloudron.
Which would also be mostly API calls. -
If the need is big enough I could write an ansible module for cloudron.
Which would also be mostly API calls.@brutalbirdie thank you very much, appreciate that!
The need is not big enough, at least not for now, let me revert back to you, if it will appear to be so -
If the need is big enough I could write an ansible module for cloudron.
Which would also be mostly API calls.@BrutalBirdie thank you again for your offer.
I'm not yet familiar with CloudRon API and I'm considering creating a manage / hosted solution with cloudron at it's heart - could you probably help me by pointing out some ready to use scripts or like Insomnia pre-sets, for a quick-start? -
@BrutalBirdie thank you again for your offer.
I'm not yet familiar with CloudRon API and I'm considering creating a manage / hosted solution with cloudron at it's heart - could you probably help me by pointing out some ready to use scripts or like Insomnia pre-sets, for a quick-start?@potemkin_ai not really.
Best way to get started would be install postman and import the api and just play around.
https://docs.cloudron.io/api.html -
@potemkin_ai not really.
Best way to get started would be install postman and import the api and just play around.
https://docs.cloudron.io/api.html@potemkin_ai
Another thing that is also very useful for understanding how to use the api, or find out any missing things in the doc.
You can open your browser debugger network tab and click any button in the cloudron dashboard and click a button.
Then you can see the API calls. Also useful for copy-paste API JSON bodys.Example Question you could ask your self - How do I disable an app auto backup?
Then you could copy the
POST
as cURL and see you self:curl 'https://my.DOMAIN.TLD/api/v1/apps/0c81e720-ab79-414e-9e6d-dbdbbaab6e30/configure/automatic_backup' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en,en-US;q=0.7,de;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://my.DOMAIN.TLD/' -H 'Authorization: Bearer REDACTED' -H 'Content-Type: application/json;charset=utf-8' -H 'Origin: https://my.DOMAIN.TLD' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'TE: trailers' --data-raw '{"enable":false}'
The last part
--data-raw
is the body, if you switch thefalse
totrue
and send this the auto backup for the app is enabled again.Doc to that API call: https://docs.cloudron.io/api.html#tag/Apps/paths/~1apps~1{appid}~1configure~1automatic_backup/post
But now you also know a way to figure it out yourself.
-
@potemkin_ai
Another thing that is also very useful for understanding how to use the api, or find out any missing things in the doc.
You can open your browser debugger network tab and click any button in the cloudron dashboard and click a button.
Then you can see the API calls. Also useful for copy-paste API JSON bodys.Example Question you could ask your self - How do I disable an app auto backup?
Then you could copy the
POST
as cURL and see you self:curl 'https://my.DOMAIN.TLD/api/v1/apps/0c81e720-ab79-414e-9e6d-dbdbbaab6e30/configure/automatic_backup' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en,en-US;q=0.7,de;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://my.DOMAIN.TLD/' -H 'Authorization: Bearer REDACTED' -H 'Content-Type: application/json;charset=utf-8' -H 'Origin: https://my.DOMAIN.TLD' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'TE: trailers' --data-raw '{"enable":false}'
The last part
--data-raw
is the body, if you switch thefalse
totrue
and send this the auto backup for the app is enabled again.Doc to that API call: https://docs.cloudron.io/api.html#tag/Apps/paths/~1apps~1{appid}~1configure~1automatic_backup/post
But now you also know a way to figure it out yourself.
@BrutalBirdie thank you very much!!
-
B BrutalBirdie referenced this topic on