-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guide to setting up and running zezere locally #117
Draft
gabbyprecious
wants to merge
1
commit into
fedora-iot:main
Choose a base branch
from
gabbyprecious:create-gettingstarted-docs#108
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,74 @@ | ||
# zezere | ||
# Zezere | ||
|
||
[Zezere](https://en.wikipedia.org/wiki/Z%C3%AAzere_River) is a provisioning server for Fedora IoT. | ||
It can be used for deploying Fedora IoT to devices without needing a physical console. | ||
|
||
It is still under development. | ||
## Getting Started | ||
|
||
### Running with Docker | ||
|
||
|
||
### Running with Python | ||
|
||
If you're using any Python virtual environment you might want to setup that | ||
first. Using venv: | ||
|
||
``` | ||
$ venv zezere-venv | ||
``` | ||
$ source zezere-venv/bin/activate | ||
``` | ||
Before you can install the python requirements you need to have Apache httpd | ||
installed. Please follow instructions from | ||
[mod-wsgi-httpd project documentation](https://pypi.org/project/mod-wsgi-httpd/) | ||
|
||
After the prequisites have been met we can install required packages: | ||
|
||
``` | ||
$ pip install -r requirements.txt | ||
``` | ||
|
||
Before using the `zezere-manage` tool, database and models needs to be migrated | ||
and a configuration needs to be created. | ||
|
||
Synchronize the database state with the current set of models and migrations: | ||
|
||
``` | ||
$ python manage.py migrate | ||
``` | ||
|
||
Default configuration can be used as a base: | ||
|
||
``` | ||
$ cp zezere/default.conf ./zezere.conf | ||
``` | ||
|
||
Authentication method and secret key needs to be set in order to satisfy the | ||
tool. Also, make sure that the allowed_hosts is what you want. | ||
|
||
``` | ||
allowed_hosts = localhost | ||
secret_key = very-secret | ||
auth_method = local | ||
``` | ||
|
||
Now we can create a superuser: | ||
|
||
``` | ||
$ python-manage.py createsuperuser | ||
``` | ||
|
||
After a password has been set, we are ready to run Zezere: | ||
|
||
``` | ||
./app.sh | ||
``` | ||
|
||
Use the admin credentials we created to login to localhost:8080 | ||
|
||
### Running Tests | ||
|
||
## Testing Local Setup | ||
|
||
|
||
## Contributing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
django>=2.1 | ||
djangorestframework | ||
django-ipware | ||
psycopg2 | ||
psycopg2-binary | ||
rules | ||
requests | ||
mozilla-django-oidc | ||
mod_wsgi | ||
mod-wsgi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Generated by Django 4.0.4 on 2022-04-11 18:51 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
import zezere.models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('zezere', '0012_auto_20200323_1130'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='device', | ||
name='mac_address', | ||
field=models.CharField(max_length=20, unique=True, validators=[django.core.validators.RegexValidator('^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$'), zezere.models.validator_disallow_blacklisted_mac], verbose_name='Device MAC Address'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these changes here and to the requirements file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this is probably better contained in a specific commit also)