Compare commits
197 commits
user-billi
...
master
Author | SHA1 | Date | |
---|---|---|---|
8287e73f6b | |||
b7aa1c6971 | |||
|
e205d8d07c | ||
|
a463bcf7bd | ||
|
d872357dd1 | ||
|
485f08e25c | ||
|
745abc48ef | ||
|
49f52fd41d | ||
|
c8ce7dbb40 | ||
|
a920887100 | ||
|
6b9b15e663 | ||
|
48ce21f833 | ||
|
6c15d2086e | ||
|
1b06d8ee03 | ||
|
e225bf1cc0 | ||
|
e2c4a19049 | ||
|
74749bf07c | ||
|
93e5d39c7b | ||
|
18d4c99571 | ||
|
e51edab2f5 | ||
|
f7c68b5ca5 | ||
|
6efedcb381 | ||
|
df4c0c3060 | ||
|
8dd4b712fb | ||
|
50a395c8ec | ||
|
663d72269a | ||
|
a0fbe2d6ed | ||
|
858aabb5ba | ||
|
ece2bca831 | ||
|
cdab685269 | ||
|
689375a2fe | ||
|
8f83679c48 | ||
|
5e870f04b1 | ||
|
63191c0a88 | ||
|
03c0b34446 | ||
|
1922a0d92d | ||
|
2e6c72c093 | ||
|
b3626369a2 | ||
|
179baee96d | ||
|
054886fd9c | ||
|
e2b36c8bca | ||
|
372fe800cd | ||
|
16f3adef93 | ||
|
2d62388eb1 | ||
|
aec79cba74 | ||
|
cd19c47fdb | ||
|
cf948b03a8 | ||
|
5716cae900 | ||
|
10d5a72c5a | ||
|
074cffcbd7 | ||
|
7f32d05cd4 | ||
|
0fd5ac18cd | ||
|
ad0c2f1e9d | ||
|
0b1c2cc168 | ||
4845ab1e39 | |||
|
ecc9e6f734 | ||
|
20c7c86703 | ||
|
8959bc6ad5 | ||
|
0cd8a3a787 | ||
|
bbc7625550 | ||
|
fe4e200dc0 | ||
|
e03cdf214a | ||
|
50fd9e1f37 | ||
|
2e74661702 | ||
|
c26ff253de | ||
|
9623a77907 | ||
|
c435639241 | ||
|
992c7c551e | ||
|
58883765d7 | ||
|
8d8c4d660c | ||
|
c32499199a | ||
|
c6bacab35a | ||
|
1aead50170 | ||
|
d8a7964fed | ||
|
077c665c53 | ||
|
f7274fe967 | ||
|
1c7d81762d | ||
|
18f9a3848a | ||
|
9211894b23 | ||
|
b8b15704a3 | ||
|
ab412cb877 | ||
|
7b83efe995 | ||
|
4d5ca58b2a | ||
|
f693dd3d18 | ||
|
5ceaaf7c90 | ||
|
2b29e300dd | ||
|
8df1d8dc7c | ||
|
ef02cb61fd | ||
|
70c450afc8 | ||
|
0dd1093812 | ||
|
6a928a2b2a | ||
|
89519e48a9 | ||
|
e169b8c1d1 | ||
|
d7c0c40926 | ||
|
fd39526350 | ||
|
78d1de9031 | ||
|
db1a69561b | ||
|
9bf0a99f6a | ||
|
c9be8cc50b | ||
|
8da6a1e19c | ||
|
ff8fdb76b1 | ||
|
9b00ef11fb | ||
|
d2bd6ba200 | ||
|
165dacb7bf | ||
|
ee79877a27 | ||
|
2ce667e8c7 | ||
|
e563780142 | ||
|
66233a1ce5 | ||
|
9d5d8657cb | ||
|
a091079677 | ||
|
c9a941e290 | ||
|
f7b14bf507 | ||
|
ed40b21d16 | ||
|
880e4d046b | ||
|
cbd5a08ae7 | ||
|
64780bfc6c | ||
|
9c1b4ab275 | ||
|
2771a7518a | ||
|
9b3493a661 | ||
|
932ac06cea | ||
|
05a897db70 | ||
|
011096f152 | ||
|
55ba61e36b | ||
|
1265e23750 | ||
|
bc0c77a393 | ||
|
bdba3bffe2 | ||
|
3745a0e2b1 | ||
|
7ce28b0b60 | ||
|
662e706eab | ||
|
11de455d23 | ||
|
126d9da764 | ||
|
8a17ee6de5 | ||
|
721472b416 | ||
|
424ceafbb8 | ||
|
1e68539ed8 | ||
|
3ef19610f3 | ||
|
8decfe1b16 | ||
|
662845128f | ||
|
95011c2058 | ||
|
a3f3ca8cf9 | ||
|
5d1eaaf0af | ||
|
bcd141730d | ||
|
15535433e8 | ||
|
18b862c2e1 | ||
|
b8652c921e | ||
|
8bbcc5df5f | ||
|
0202f80a37 | ||
|
caedf874e4 | ||
|
f17f9060b0 | ||
|
04fac71a85 | ||
|
ef76304bae | ||
|
ec447e0dc4 | ||
|
ca2065a94d | ||
|
dc7a465a8c | ||
65440ab2ef | |||
d794b24c86 | |||
df059fb00d | |||
67af7b5465 | |||
beb5bd7ee4 | |||
9574d69f4c | |||
74e2168529 | |||
444d6ded28 | |||
cbba1f4169 | |||
d47c94ba84 | |||
89e853b490 | |||
|
1b97fc8fc7 | ||
|
41a2f18453 | ||
a086d46136 | |||
ae2bad5754 | |||
3874165189 | |||
56d98cbb55 | |||
718abab9d2 | |||
268e08c4db | |||
b8ac99acb6 | |||
221d98af4b | |||
ebd4e6fa1b | |||
b512d42058 | |||
1245c191c0 | |||
95d43f002f | |||
0560063326 | |||
db3c29d17e | |||
892b2b6f13 | |||
|
aa8ade4730 | ||
|
594f1a9b69 | ||
|
e3b28354fe | ||
|
99a18232aa | ||
|
c835c874d5 | ||
|
028f1ebe6e | ||
|
9ef5309b91 | ||
|
4097c2ce13 | ||
|
736fe27493 | ||
|
7d708cfbb6 | ||
|
927fb20671 | ||
|
eea654a9f8 | ||
|
2cda6441f4 | ||
|
62d9ccbbef | ||
|
1cf20a2cb6 |
387 changed files with 11125 additions and 4025 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -22,5 +22,6 @@ uncloud/version.py
|
|||
build/
|
||||
venv/
|
||||
dist/
|
||||
|
||||
.history/
|
||||
*.iso
|
||||
*.sqlite3
|
||||
|
|
|
@ -4,7 +4,7 @@ stages:
|
|||
|
||||
run-tests:
|
||||
stage: test
|
||||
image: fedora:latest
|
||||
image: code.ungleich.ch:5050/uncloud/uncloud/uncloud-ci:latest
|
||||
services:
|
||||
- postgres:latest
|
||||
variables:
|
||||
|
@ -12,11 +12,7 @@ run-tests:
|
|||
DATABASE_USER: postgres
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
coverage: /^TOTAL.+?(\d+\%)$/
|
||||
before_script:
|
||||
- dnf install -y python3-devel python3-pip python3-coverage libpq-devel openldap-devel gcc chromium
|
||||
script:
|
||||
- cd uncloud_django_based/uncloud
|
||||
- pip install -r requirements.txt
|
||||
- cp uncloud/secrets_sample.py uncloud/secrets.py
|
||||
- coverage run --source='.' ./manage.py test
|
||||
- coverage report
|
||||
|
|
71
README.md
71
README.md
|
@ -1,3 +1,70 @@
|
|||
# ucloud
|
||||
# Uncloud
|
||||
|
||||
Checkout https://ungleich.ch/ucloud/ for the documentation of ucloud.
|
||||
Cloud management platform, the ungleich way.
|
||||
|
||||
|
||||
[![pipeline status](https://code.ungleich.ch/uncloud/uncloud/badges/master/pipeline.svg)](https://code.ungleich.ch/uncloud/uncloud/commits/master)
|
||||
[![coverage report](https://code.ungleich.ch/uncloud/uncloud/badges/master/coverage.svg)](https://code.ungleich.ch/uncloud/uncloud/commits/master)
|
||||
|
||||
## Useful commands
|
||||
|
||||
* `./manage.py import-vat-rates path/to/csv`
|
||||
* `./manage.py createsuperuser`
|
||||
|
||||
## Development setup
|
||||
|
||||
Install system dependencies:
|
||||
|
||||
* On Fedora, you will need the following packages: `python3-virtualenv python3-devel openldap-devel gcc chromium`
|
||||
* sudo apt-get install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev
|
||||
|
||||
|
||||
NOTE: you will need to configure a LDAP server and credentials for authentication. See `uncloud/settings.py`.
|
||||
|
||||
```
|
||||
# Initialize virtualenv.
|
||||
» virtualenv .venv
|
||||
Using base prefix '/usr'
|
||||
New python executable in /home/fnux/Workspace/ungleich/uncloud/uncloud/.venv/bin/python3
|
||||
Also creating executable in /home/fnux/Workspace/ungleich/uncloud/uncloud/.venv/bin/python
|
||||
Installing setuptools, pip, wheel...
|
||||
done.
|
||||
|
||||
# Enter virtualenv.
|
||||
» source .venv/bin/activate
|
||||
|
||||
# Install dependencies.
|
||||
» pip install -r requirements.txt
|
||||
[...]
|
||||
|
||||
# Run migrations.
|
||||
» ./manage.py migrate
|
||||
Operations to perform:
|
||||
Apply all migrations: admin, auth, contenttypes, opennebula, sessions, uncloud_auth, uncloud_net, uncloud_pay, uncloud_service, uncloud_vm
|
||||
Running migrations:
|
||||
[...]
|
||||
|
||||
# Run webserver.
|
||||
» ./manage.py runserver
|
||||
Watching for file changes with StatReloader
|
||||
Performing system checks...
|
||||
|
||||
System check identified no issues (0 silenced).
|
||||
May 07, 2020 - 10:17:08
|
||||
Django version 3.0.6, using settings 'uncloud.settings'
|
||||
Starting development server at http://127.0.0.1:8000/
|
||||
Quit the server with CONTROL-C.
|
||||
```
|
||||
### Run Background Job Queue
|
||||
We use Django Q to handle the asynchronous code and Background Cron jobs
|
||||
To start the workers make sure first that Redis or the Django Q broker is working and you can edit it's settings in the settings file.
|
||||
```
|
||||
./manage.py qcluster
|
||||
```
|
||||
|
||||
### Note on PGSQL
|
||||
|
||||
If you want to use Postgres:
|
||||
|
||||
* Install on configure PGSQL on your base system.
|
||||
* OR use a container! `podman run --rm -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust -it postgres:latest`
|
||||
|
|
6
archive/issues.org
Normal file
6
archive/issues.org
Normal file
|
@ -0,0 +1,6 @@
|
|||
* Intro
|
||||
This file lists issues that should be handled, are small and likely
|
||||
not yet high prio.
|
||||
* Issues
|
||||
** TODO Register prefered address in User model
|
||||
** TODO Allow to specify different recurring periods
|
18
archive/uncloud_django_based/hacks/command-wrapper.sh
Normal file
18
archive/uncloud_django_based/hacks/command-wrapper.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
dbhost=$1; shift
|
||||
|
||||
ssh -L5432:localhost:5432 "$dbhost" &
|
||||
|
||||
python manage.py "$@"
|
||||
|
||||
|
||||
|
||||
# command only needs to be active while manage command is running
|
||||
|
||||
# -T no pseudo terminal
|
||||
|
||||
|
||||
# alternatively: commands output shell code
|
||||
|
||||
# ssh uncloud@dbhost "python manage.py --hostname xxx ..."
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue