Commit Graph

234 Commits (master)

Author SHA1 Message Date
Aravinth Manivannan 9c239ad78b
feat: send invoice generated notification email and payments receipt mail
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-07-07 20:51:33 +05:30
Aravinth Manivannan 147eead388 Merge pull request 'clone instead of fetch' (#19) from dachary/dashboard:wip-pull into master
ci/woodpecker/push/woodpecker Pipeline was successful Details
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/19
2022-07-07 04:42:46 -04:00
Aravinth Manivannan f2f2fadae4
feat: use whitenoise for static file in development too for uniform Behavior
ci/woodpecker/push/woodpecker Pipeline was successful Details
> it opens up the possibility for differences in behaviour between development and production environments. For this reason it’s a good idea to use WhiteNoise in development as well.

source: http://whitenoise.evans.io/en/stable/django.html#using-whitenoise-in-development
2022-07-07 13:59:06 +05:30
Aravinth Manivannan 5f6c3c459e
chore: mv common static files to common-static 2022-07-07 13:58:53 +05:30
Loïc Dachary 8d02fe107f
always clone the fleet repository
ci/woodpecker/pr/woodpecker Pipeline failed Details
It is small and not worth the trouble of dealing with fetch/pull

Signed-off-by: Loïc Dachary <loic@dachary.org>
2022-07-07 10:05:18 +02:00
Aravinth Manivannan b4183c1790
feat & fix: install and configure whitenoise to serve static files in
ci/woodpecker/push/woodpecker Pipeline failed Details
prod

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/24
2022-07-07 10:59:23 +05:30
Aravinth Manivannan 22abe08f68
feat: mv static files to dash/static/dash and migrate load static template tags 2022-07-07 10:41:22 +05:30
Aravinth Manivannan 4c51eb77b0 chore: rm gitea/app.in
ci/woodpecker/push/woodpecker Pipeline was successful Details
SUMMARY
    This file was used to spawn a Gitea instance from binary for
    integration testing. That strategy was abandoned long ago but this
    file wasn't cleaned up.

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/34
2022-07-05 01:59:26 -04:00
Aravinth Manivannan 9303ea59ed fix: s/EMAIL_SENDER_ADDRESS/DEFAULT_FROM_EMAIL/
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-07-04 12:42:02 -04:00
Aravinth Manivannan eb68b1e984 feat: Gitea root creds email with nicer content 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 5e5ce02759 feat: instance created notification email template with nicer body 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 63f4f987a9 feat: verification link email template with polished email body 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 4a1c0a5cdc feat: add EMAIL_SENDER_ADDRESS to settings.py 2022-07-04 12:42:02 -04:00
Aravinth Manivannan 280807d96c
fix: rm dummy section
ci/woodpecker/pr/woodpecker Pipeline failed Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
NOTE
    The dummy section is commented out for future reference.

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/27
2022-07-04 13:55:28 +05:30
Aravinth Manivannan e79fb65cdf
fix: rm WIP services from homepage
ci/woodpecker/pr/woodpecker Pipeline failed Details
ci/woodpecker/push/woodpecker Pipeline was successful Details
fixes: https://gitea.hostea.org/Hostea/dashboard/issues/28
2022-07-04 13:44:43 +05:30
Aravinth Manivannan c72773fc9e Merge pull request 's/ammount/amount/' (#22) from dachary/dashboard:wip-typo into master
ci/woodpecker/push/woodpecker Pipeline failed Details
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/22
2022-07-03 16:39:49 -04:00
Aravinth Manivannan 8e7a11b9a4 Merge pull request 'Revert "enough hoste delete is not idempotent"' (#21) from dachary/dashboard:wip-delete into master
ci/woodpecker/push/woodpecker Pipeline was successful Details
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/21
2022-07-03 16:38:34 -04:00
Loïc Dachary ed0186912d
s/ammount/amount/
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-07-03 15:01:09 +02:00
Loïc Dachary 7c045b12d5
Revert "enough hoste delete is not idempotent"
ci/woodpecker/pr/woodpecker Pipeline failed Details
Fixes: #18

This reverts commit ccec1262f0.
2022-07-03 14:58:27 +02:00
Aravinth Manivannan 5397e38d22 Merge pull request 'enough host delete is not idempotent' (#20) from dachary/dashboard:wip-delete into master
ci/woodpecker/push/woodpecker Pipeline was successful Details
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/20
2022-07-02 10:48:01 -04:00
Loïc Dachary eefa2120a9
enough host delete is not idempotent
ci/woodpecker/pr/woodpecker Pipeline failed Details
pretend it is until
https://lab.enough.community/main/infrastructure/-/issues/359 is resolved
2022-07-02 16:43:51 +02:00
Aravinth Manivannan ccfa81ce2c Merge pull request 'feat: notify user on instance creation' (#14) from wip-instance-ready-notify into master
ci/woodpecker/push/woodpecker Pipeline was successful Details
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/14
2022-07-02 03:42:34 -04:00
Aravinth Manivannan 7464604928 Merge pull request 'feat: configurable VM base domain and customer Gitea and Woodpecker URI generators' (#12) from wip-hostea-domain into master
ci/woodpecker/push/woodpecker Pipeline was successful Details
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/12
2022-07-02 03:42:15 -04:00
Aravinth Manivannan 4a47543a0f
hostfix: use default source code link when settings.py doesn't provide one
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-07-01 20:59:10 +05:30
Aravinth Manivannan e5ebdc29ce
feat: CI: replace fleet repo remote URI with remote URI template
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-07-01 19:57:22 +05:30
Aravinth Manivannan f86dd2ff37
feat: delete_vm takes only one parameter 2022-07-01 19:54:20 +05:30
Aravinth Manivannan 8fc20d16be
feat: ues separate fleet repo for each unit test 2022-07-01 19:54:15 +05:30
Aravinth Manivannan bbcd373fe4
feat: redirect to VM deletion post sudo authentication 2022-07-01 19:53:00 +05:30
Aravinth Manivannan 412230bd99
feat: create repo and add deploy key util 2022-07-01 19:52:10 +05:30
Aravinth Manivannan 8be1e02a21
feat: load footer ctx in all templates
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-06-30 14:37:49 +05:30
Aravinth Manivannan faca7286b7
feat: load Dashboard source code repository URL from settings 2022-06-30 14:33:56 +05:30
Aravinth Manivannan 9d89bc071c
fet: show Gitea and woodpecker URIs in view instance page 2022-06-30 13:05:57 +05:30
Aravinth Manivannan f00746a36d
feat: notify user on instance creation
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-06-30 01:10:55 +05:30
Aravinth Manivannan 53ec0a3982
fix: woodpecker and gitea construction typo
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-06-30 01:08:22 +05:30
Aravinth Manivannan fc5a23e60a
feat: configurable VM base domain and customer Gitea and Woodpecker URI generators
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline failed Details
SUMMARY

    The hostnames are partially generated by the Dashboard and
    enough.community.

    The stuff between angle brackets(`<>`) are substituted and filled-in
    by the Dashboard and the stuff between parenthesis(`{}`) are
    substituted and filled-in by enough.

URI FORMAT

    Gitea URI
	<vm-name>.{{ domain }}

    Woodpecker URI
	<vm-name>-ci.{{ domain }}

    Where domain is agreed to be equal to HOSTEA_DOMAIN

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/11
2022-06-29 11:05:33 +05:30
Aravinth Manivannan e4c418b45b
feat: show Gitea admin's login credentials and send creds via email to admin
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-06-29 00:49:58 +05:30
Aravinth Manivannan 1bab17193c
fix: sender's email addres typo in send_verification_email 2022-06-29 00:49:35 +05:30
Aravinth Manivannan b123bfa582
feat: grab commit ID after add_vm execution
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-06-29 00:27:47 +05:30
Aravinth Manivannan 5ec87c83ec
feat: redirect user after successful payments for VM creation 2022-06-29 00:22:49 +05:30
Aravinth Manivannan e63719764a
fix: idempotency: change configuration in fleet repository too, when vm
ci/woodpecker/push/woodpecker Pipeline was successful Details
create is re-run for the same VM with different configuration

fixes: https://gitea.hostea.org/Hostea/dashboard/issues/8
2022-06-28 23:57:02 +05:30
Aravinth Manivannan f7c0e8e296
chore: auto-cleanup ~/.ssh/known_hosts 2022-06-28 23:49:24 +05:30
Aravinth Manivannan 49ae2189d4
feat & fix: make vm create/rm commands idempotent
SUMMARY
    Commands are now tolerant to being invoked twice.

    Command: vm create
	Doesn't fail if VM of same name exists with the same
	configuration

	Doesn't fail if VM of the same name and different configuration
	exist. Updates configuration and deploys(pushes to Hostea/fleet
	repository) new configuration.

    Command: vm delete
	Doesn't fail if VM of given name doesn't exist
2022-06-28 20:54:21 +05:30
Aravinth Manivannan 8baefeb413
fix: don't save Gitea admin passwords in DB 2022-06-28 20:53:56 +05:30
Aravinth Manivannan e4a7310c79
feat & fix: don't append enough commands to hostscript and fix service.yml path
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-06-28 14:47:21 +05:30
Aravinth Manivannan d4ab0156a7 Merge pull request 'gitea runs on port 22, ssh on port 2222' (#10) from dachary/dashboard:wip-service into master
ci/woodpecker/push/woodpecker Pipeline failed Details
Reviewed-on: https://gitea.hostea.org/Hostea/dashboard/pulls/10
2022-06-28 04:53:23 -04:00
Loïc Dachary 1eaa22b330
gitea runs on port 22, ssh on port 2222
ci/woodpecker/pr/woodpecker Pipeline failed Details
2022-06-28 10:50:17 +02:00
Aravinth Manivannan 947479fc31
fix: enough remove command was hardcoded; fixed with customizable param
ci/woodpecker/push/woodpecker Pipeline failed Details
2022-06-28 13:49:43 +05:30
Aravinth Manivannan f68d051432
fix: provision.yml template error
ci/woodpecker/push/woodpecker Pipeline failed Details
ref: https://gitea.hostea.org/Hostea/dashboard/issues/9
2022-06-28 13:37:02 +05:30
Aravinth Manivannan caadd0783a
fix: hostscript path
ci/woodpecker/push/woodpecker Pipeline failed Details
fixes: https://gitea.hostea.org/Hostea/dashboard/issues/7
2022-06-28 12:00:47 +05:30
Aravinth Manivannan 71d4f793ba
feat: docs: vm management commands
ci/woodpecker/push/woodpecker Pipeline was successful Details
2022-06-28 01:31:42 +05:30