Compare commits
29 Commits
tests-with
...
b3c655bc47
Author | SHA1 | Date | |
---|---|---|---|
b3c655bc47 | |||
a9a4c4448c | |||
a040301bbb | |||
f3ea3d330d | |||
d9dc3f3049 | |||
d1c95cd113 | |||
174532b7fe | |||
02c6352f11 | |||
171c3252e4 | |||
13b2c05476 | |||
5f9fc1adcf | |||
16ff1b5b26 | |||
8c10f71f58 | |||
66dee4d87a | |||
6a587ac7fc | |||
4e510ebb01 | |||
140870ec35 | |||
2348191990 | |||
5e682cc705 | |||
2b33573890 | |||
da4d28f70c | |||
d833b3df19 | |||
46a40261bb | |||
b108d4c04e | |||
6bd02a660e | |||
8a944104d3 | |||
d4a9f2f40a | |||
7b16606b16 | |||
d9f3e68278 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -11,6 +11,7 @@ instance/
|
|||||||
.pytest_cache/
|
.pytest_cache/
|
||||||
.coverage
|
.coverage
|
||||||
htmlcov/
|
htmlcov/
|
||||||
|
/unittest-log-output.log
|
||||||
|
|
||||||
dist/
|
dist/
|
||||||
build/
|
build/
|
||||||
|
@ -62,6 +62,18 @@ def sql_script(f, c):
|
|||||||
|
|
||||||
model.connection.commit()
|
model.connection.commit()
|
||||||
|
|
||||||
|
@bp.cli.command('account-balance')
|
||||||
|
@click.option('-u', help='users email address')
|
||||||
|
@with_appcontext
|
||||||
|
def account_balance(u):
|
||||||
|
vms = get_model().list_vms_for_account(u)
|
||||||
|
payments = get_model().list_payments_for_account(u)
|
||||||
|
click.echo(".")
|
||||||
|
click.echo(".")
|
||||||
|
click.echo(get_account_balance(vms, payments, datetime.utcnow()))
|
||||||
|
click.echo(".")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@bp.cli.command('cron-task')
|
@bp.cli.command('cron-task')
|
||||||
@with_appcontext
|
@with_appcontext
|
||||||
|
@ -108,6 +108,8 @@ def detail(id):
|
|||||||
if vm is None:
|
if vm is None:
|
||||||
return abort(404, f"{id} doesn't exist.")
|
return abort(404, f"{id} doesn't exist.")
|
||||||
|
|
||||||
|
vm['ssh_username'] = current_app.config['SSH_USERNAME']
|
||||||
|
|
||||||
if vm['deleted']:
|
if vm['deleted']:
|
||||||
return render_template("capsul-detail.html", vm=vm, delete=True, deleted=True)
|
return render_template("capsul-detail.html", vm=vm, delete=True, deleted=True)
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ def init_app(app, is_running_server):
|
|||||||
hasSchemaVersionTable = False
|
hasSchemaVersionTable = False
|
||||||
actionWasTaken = False
|
actionWasTaken = False
|
||||||
schemaVersion = 0
|
schemaVersion = 0
|
||||||
desiredSchemaVersion = 18
|
desiredSchemaVersion = 19
|
||||||
|
|
||||||
cursor = connection.cursor()
|
cursor = connection.cursor()
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ def pricing():
|
|||||||
|
|
||||||
@bp.route("/faq")
|
@bp.route("/faq")
|
||||||
def faq():
|
def faq():
|
||||||
return render_template("faq.html")
|
return render_template("faq.html", ssh_username=current_app.config['SSH_USERNAME'])
|
||||||
|
|
||||||
@bp.route("/about-ssh")
|
@bp.route("/about-ssh")
|
||||||
def about_ssh():
|
def about_ssh():
|
||||||
|
8
capsulflask/schema_migrations/19_down_os_updates.sql
Normal file
8
capsulflask/schema_migrations/19_down_os_updates.sql
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
DELETE FROM os_images WHERE id = 'guixsystem130';
|
||||||
|
DELETE FROM os_images WHERE id = 'archlinux';
|
||||||
|
UPDATE os_images SET deprecated = FALSE WHERE id = 'guixsystem120';
|
||||||
|
UPDATE os_images SET deprecated = FALSE WHERE id = 'centos7';
|
||||||
|
UPDATE os_images SET deprecated = FALSE WHERE id = 'centos8';
|
||||||
|
UPDATE os_images SET description = 'Ubuntu 20.04 LTS (Fossa)' WHERE id = 'ubuntu20';
|
||||||
|
|
||||||
|
UPDATE schemaversion SET version = 18;
|
12
capsulflask/schema_migrations/19_up_os_updates.sql
Normal file
12
capsulflask/schema_migrations/19_up_os_updates.sql
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
INSERT INTO os_images (id, template_image_file_name, description, deprecated)
|
||||||
|
VALUES ('guixsystem130', 'guixsystem/1.3.0/root.img.qcow2', 'Guix System 1.3.0', FALSE);
|
||||||
|
INSERT INTO os_images (id, template_image_file_name, description, deprecated)
|
||||||
|
VALUES ('archlinux', 'archlinux/root.img.qcow2', 'Arch Linux', FALSE);
|
||||||
|
|
||||||
|
UPDATE os_images SET deprecated = TRUE WHERE id = 'guixsystem120';
|
||||||
|
UPDATE os_images SET deprecated = TRUE WHERE id = 'centos7';
|
||||||
|
UPDATE os_images SET deprecated = TRUE WHERE id = 'centos8';
|
||||||
|
UPDATE os_images SET description = 'Ubuntu 20.04 (Focal)' WHERE id = 'ubuntu20';
|
||||||
|
|
||||||
|
|
||||||
|
UPDATE schemaversion SET version = 19;
|
@ -30,6 +30,6 @@ if virsh domuuid "$vmname" | grep -vqE '^[\t\s\n]*$'; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# this gets the ipv4
|
# this gets the ipv4
|
||||||
ipv4="$(virsh domifaddr "$vmname" | awk '/vnet/ {print $4}' | cut -d'/' -f1)"
|
ipv4="$(virsh domifaddr "$vmname" | awk '/ipv4/ {print $4}' | cut -d'/' -f1)"
|
||||||
|
|
||||||
echo "$exists $state $ipv4"
|
echo "$exists $state $ipv4"
|
@ -97,7 +97,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="row justify-start">
|
<div class="row justify-start">
|
||||||
<label class="align" for="ssh_username">SSH Username</label>
|
<label class="align" for="ssh_username">SSH Username</label>
|
||||||
<span id="ssh_username">cyberian</span>
|
<span id="ssh_username">{{ vm['ssh_username'] }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-start">
|
<div class="row justify-start">
|
||||||
<label class="align" for="ssh_authorized_keys">SSH Authorized Keys</label>
|
<label class="align" for="ssh_authorized_keys">SSH Authorized Keys</label>
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
How do I log in?
|
How do I log in?
|
||||||
<p>ssh to the ip provided to you using the cyberian user.</p>
|
<p>ssh to the ip provided to you using the "{{ ssh_username }}" user.</p>
|
||||||
<pre class='code'>$ ssh cyberian@1.2.3.4</pre>
|
<pre class='code'>$ ssh {{ ssh_username }}@1.2.3.4</pre>
|
||||||
<p>For more information, see <a href="/about-ssh">Understanding the Secure Shell Protocol (SSH)</a>.</p>
|
<p>For more information, see <a href="/about-ssh">Understanding the Secure Shell Protocol (SSH)</a>.</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
How do I change to the root user?
|
How do I change to the root user?
|
||||||
<p>The cyberian user has passwordless sudo access by default. This should work:</p>
|
<p>The "{{ ssh_username }}" user has passwordless sudo access by default. This should work:</p>
|
||||||
<pre class='code'>
|
<pre class='code'>
|
||||||
# Linux
|
# Linux
|
||||||
$ sudo su -
|
$ sudo su -
|
||||||
|
@ -7,18 +7,11 @@
|
|||||||
<h1>SUPPORT</h1>
|
<h1>SUPPORT</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="row half-margin">
|
<div class="row half-margin">
|
||||||
<a href="mailto:support@cyberia.club?subject=Please%20help!">support@cyberia.club</a>
|
<a href="mailto:support@cyberia.club?subject=capsul%20support%20request">support@cyberia.club</a>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block subcontent %}
|
{% block subcontent %}
|
||||||
<p>
|
|
||||||
Note: We maintain a searchable archive of all support emails at
|
|
||||||
<a href="https://lists.cyberia.club/~cyberia/support">https://lists.cyberia.club/~cyberia/support</a>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If you do not want your mail to appear in a public archive, email <a href="mailto:capsul@cyberia.club?subject=Please%20help!">capsul@cyberia.club</a> instead.
|
|
||||||
</p>
|
|
||||||
<p>
|
<p>
|
||||||
Please describe your problem or feature request, and we will do our best to get back to you promptly. Thank you very much.
|
Please describe your problem or feature request, and we will do our best to get back to you promptly. Thank you very much.
|
||||||
</p>
|
</p>
|
||||||
|
Reference in New Issue
Block a user