Skip to content

Commit 57082af

Browse files
authored
Merge pull request #50 from gridhead/rela
Gear up for the third alpha release of `0.1.0`
2 parents 877ab0e + 52824e5 commit 57082af

File tree

9 files changed

+42
-267
lines changed

9 files changed

+42
-267
lines changed

README.md

Lines changed: 2 additions & 250 deletions
Original file line numberDiff line numberDiff line change
@@ -2,254 +2,6 @@
22

33
Guest operated service for creating bootable USB storage devices at any community conference kiosk
44

5-
## Screenshots
5+
## Instruction
66

7-
![](https://raw.githubusercontent.com/gridhead/syncstar/main/data/dash.png)
8-
9-
![](https://raw.githubusercontent.com/gridhead/syncstar/main/data/expo.png)
10-
11-
## Features
12-
13-
### For development
14-
- Minimal command line interface based configuration with wide range of customizable options
15-
- Stellar overall codebase quality is ensured with 100% coverage of functional backend code
16-
- Over 34 checks are provided for unit based, end-to-end based integration based codebase testing
17-
- GitHub Actions and Pre-Commit CI are enabled to automate maintenance of codebase quality
18-
19-
### For consumption
20-
- Asynchronous multiprocessing allows for flashing multiple storage devices simultaneously
21-
- Programming standards and engineering methodologies are maintained as much as possible
22-
- Frontend is adaptive across various viewport types and browser-side assistive technologies
23-
- Detailed documentation for both consumption and development purposes are readily provided
24-
25-
## Installation
26-
27-
### For development
28-
29-
1. Install the supported version of Python, Virtualenv, Poetry, Redis and CoreUtils on your Fedora Linux installation.
30-
```
31-
$ sudo dnf install python3 python3-virtualenv poetry
32-
```
33-
```
34-
$ sudo dnf install redis coreutils
35-
```
36-
37-
2. Clone the repository to your local storage and make it your present working directory.
38-
```
39-
$ git clone https://github.com/gridhead/syncstar.git
40-
```
41-
```
42-
$ cd syncstar
43-
```
44-
45-
3. Establish a virtual environment within the project and activate it for installing dependencies.
46-
```
47-
$ virtualenv venv
48-
```
49-
```
50-
$ source venv/bin/activate
51-
```
52-
53-
4. Check the validity of the project configuration and install the dependencies from the lockfile.
54-
```
55-
(venv) $ poetry check
56-
```
57-
```
58-
(venv) $ poetry install
59-
```
60-
61-
### For consumption
62-
63-
1. Install the supported version of Python, Python Package Installer Redis CoreUtils on your Fedora Linux installation.
64-
```
65-
$ sudo dnf install python3 python3-pip
66-
```
67-
```
68-
$ sudo dnf install redis coreutils
69-
```
70-
71-
2. Elevate the privileges to the superuser level and install the `syncstar` package from Python Package Index.
72-
```
73-
$ sudo -s
74-
```
75-
```
76-
# pip3 install syncstar
77-
```
78-
79-
3. Configure the service unit files for the endpoint service and worker service to the system services directory.
80-
```
81-
$ sudo wget https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/system/endpoint.service -O /etc/systemd/system/ss-endpoint.service
82-
```
83-
```
84-
$ sudo wget https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/system/worker.service -O /etc/systemd/system/ss-worker.service
85-
```
86-
87-
4. Enable the service unis for the endpoint service and worker services.
88-
```
89-
$ sudo systemctl enable ss-endpoint.service
90-
```
91-
```
92-
$ sudo systemctl enable ss-worker.service
93-
```
94-
95-
## Initialization
96-
97-
1. Download the Fedora Linux live images to a certain directory and make the images archive configuration file.
98-
```
99-
$ wget https://download.fedoraproject.org/pub/fedora/linux/releases/40/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-40-1.14.iso
100-
```
101-
```
102-
$ cp Fedora-Workstation-Live-x86_64-40-1.14.iso /etc/syncstar/images/Fedora-Workstation-Live-x86_64-40-1.14.iso
103-
```
104-
105-
2. Download the images archive configuration file and make changes to include the recently downloaded image files.
106-
```
107-
$ wget https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/config/images.yml -O /etc/syncstar/images.yml
108-
```
109-
```
110-
$ nano /etc/syncstar/images.yml
111-
```
112-
113-
3. Set the value of the following environment variable as the present location of the images archive configuration file.
114-
```
115-
$ nano /home/$(whoami)/.bashrc
116-
```
117-
```
118-
$ export SYNCSTAR_ISOSYAML=/etc/syncstar/images.yml
119-
```
120-
121-
4. Enable the Redis service unit and check the status of the service.
122-
```
123-
$ sudo systemctl enable redis.service
124-
```
125-
```
126-
$ sudo systemctl status redis.service
127-
```
128-
129-
## Execution
130-
131-
### For development
132-
133-
1. Ensure that the Redis service unit is active and check the status of the service.
134-
```
135-
$ sudo systemctl start redis.service
136-
```
137-
```
138-
$ sudo systemctl status redis.service
139-
```
140-
141-
2. In a separate terminal session, execute the following command to start the endpoint service in an activated virtual environment.
142-
```
143-
$ source venv/bin/activate
144-
```
145-
```
146-
(venv) $ syncstar --port 8080 --repair false --period 2 --images $SYNCSTAR_ISOSYAML
147-
```
148-
- This will start the endpoint service on port 8080 available across all network interfaces of the host device.
149-
- The debug mode for the endpoint service will be disabled and the information would be refreshed after 2 seconds.
150-
- The images archive configuration file mentioned previously will be used as a source for the live images.
151-
- Dictionaries consisting of task schedules will not persist after a live reload when using the debug mode.
152-
153-
3. In a separate terminal session, execute the following command to start the worker service in an activated virtual environment
154-
```
155-
$ source venv/bin/activate
156-
```
157-
```
158-
(venv) $ sudo SYNCSTAR_ISOSYAML=/etc/syncstar/images.yml celery -A syncstar.task.taskmgmt worker --loglevel=info
159-
```
160-
- This will start the worker service that would accept tasks requested by the users of the endpoint service.
161-
- The debug mode for the worker service will be disabled and there will be a default concurrency of 12 processes.
162-
- The images archive configuration file mentioned previously will be used as a source for the live images.
163-
- Dictionaries consisting of task schedules will not persist after a live reload when using the debug mode.
164-
165-
4. Visit the homepage of the endpoint service using the browser of your choice to get started with using SyncStar.
166-
167-
### For consumption
168-
169-
1. Ensure that the Redis service unit is active and check the status of the service.
170-
```
171-
$ sudo systemctl start redis.service
172-
```
173-
```
174-
$ sudo systemctl status redis.service
175-
```
176-
177-
2. Start the endppint service unit and check the status of the service.
178-
```
179-
$ sudo systemctl start ss-endpoint.service
180-
```
181-
```
182-
$ sudo systemctl status ss-endpoint.service
183-
```
184-
185-
3. Start the worker service unit and check the status of the service.
186-
```
187-
$ sudo systemctl start ss-worker.service
188-
```
189-
```
190-
$ sudo systemctl status ss-worker.service
191-
```
192-
193-
4. Visit the homepage of the endpoint service using the browser of your choice to get started with using SyncStar.
194-
195-
## Organization
196-
197-
1. The images archive configuration file stores an unordered dictionary of images archives available for usage.
198-
```
199-
$ cat /etc/syncstar/images.yml
200-
```
201-
202-
2. The identifier for the images archives is the message digest text which can be found out using the following command.
203-
```
204-
$ cat Fedora-Workstation-Live-x86_64-40-1.14.iso | sha256sum
205-
```
206-
207-
3. The second line per images archive entry stores the location of the file which is validated on every task run.
208-
```
209-
path: /home/archdesk/Downloads/Fedora-Workstation-Live-x86_64-40-1.14.iso
210-
```
211-
212-
4. The third line per images archive entry stores the name that would be displayed to the users on the service frontend.
213-
```
214-
name: Fedora Linux 40 Workstation rc1.14
215-
```
216-
217-
5. The fourth line per images archive entry stores the type that would be used for metadata generation purposes.
218-
```
219-
type: fedora
220-
```
221-
222-
6. The images archive that have not been provided with one of the supported types would be provided with the generic type.
223-
```
224-
type: common
225-
```
226-
227-
7. The images archive should be verified for their consistency by the service administrators before consumption.
228-
```
229-
$ wget https://download.fedoraproject.org/pub/fedora/linux/releases/40/Workstation/x86_64/iso/Fedora-Workstation-40-1.14-x86_64-CHECKSUM
230-
```
231-
232-
8. The following types of images archive are supported for metadata generation purposes used on the service frontend.
233-
234-
| # | Name | Identity | Icon |
235-
|----|--------------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
236-
| 1 | Android | `gdroid` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/9d52ca1ee37208482a05038d59664689d32f53f5189486932db8d6adbe481126.svg) |
237-
| 2 | Arch Linux | `archlx` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/1c48b14227a7e1091e740a3df7174bbddc453917cc287e503315ae6f1a845b0e.svg) |
238-
| 3 | CentOS Stream | `centos` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/87e960134335e7a8888b69331157a8a84215ed8dbb041ecd3ce73d3866d7f3d3.svg) |
239-
| 4 | Debian Linux | `debian` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/f981aab3aaa188a7d289009af14600152c1ea28e9ad758ed4b97aa5620a74456.svg) |
240-
| 5 | Fedora Linux | `fedora` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/e56f0c223307c5ebc30f78872f1887189715a2afd18c9e9204a63c03e781c271.svg) |
241-
| 6 | Kodi or XBMC | `kodimc` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/2ad165fc2120ad592bdbf852fe501ddaad6e2b944bff7d945d127b4e73a1699e.svg) |
242-
| 7 | Linux Mint | `lxmint` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/33f5c702ffcee2b326dec6d9e8b46730a8cf975a66fc0e5d84e674cacf41c3e4.svg) |
243-
| 8 | Manjaro Linux | `mnjaro` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/246f21c66f18e728feb8e9ad0dd8f35b116656ddb519819e13798a579bdbc59a.svg) |
244-
| 9 | Red Hat Enterprise Linux | `redhat` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/170d2033c590e5e7b694ea5f7ae047fbf561768c78e30bf0f545f66e164ebc18.svg) |
245-
| 10 | OpenSUSE Linux | `opsuse` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/e31d78dec9f573dac4e9fda28dd0d3357f4a3b7f5361f7be2498f223310f7254.svg) |
246-
| 11 | Ubuntu Linux | `ubuntu` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/3b7f5a60779863249634141d594548e56208889dc32b783142cbf3999e8adbda.svg) |
247-
| 12 | Generic | `common` | ![](https://raw.githubusercontent.com/gridhead/syncstar/main/syncstar/frontend/static/icon/fdf8c530789c78a450d5fae444905349afad1c6c257fb40b6a80de3fa7565c03.svg) |
248-
249-
## Appreciation
250-
251-
If you like the efforts made here and want to support the development of the project, please consider giving a star to
252-
the project and forking it your namespace. I appreciate all kinds of contributions - ranging from small sized bug fixes
253-
to major sized feature additions as well as from trivial documentation changes to awesome codebase refactoring. Even if
254-
you do not have the capacity to take the development for a spin, you can help me out by testing out the project and
255-
getting in touch with me on the issue tracker with the things that must be fixed and the things that should be introduced.
7+
Please visit the [documentation](https://github.com/gridhead/syncstar/wiki) to know more about the project

data/dash.png

107 KB
Loading

data/expo.png

79.6 KB
Loading

poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "syncstar"
3-
version = "0.1.0a2"
3+
version = "0.1.0a3"
44
description = "Guest operated service for creating bootable USB storage devices at any community conference kiosk"
55
authors = ["Akashdeep Dhar <akashdeep.dhar@gmail.com>"]
66
license = "AGPL-3.0-or-later"

syncstar.spec

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
%global desc Guest operated service for creating bootable USB storage devices at any community conference kiosk
33

44
Name: %{pack}
5-
Version: 0.1.0a2
5+
Version: 0.1.0a3
66
Release: 1%{?dist}
77
Summary: %{desc}
88

@@ -40,7 +40,7 @@ Requires: redis
4040

4141
%changelog
4242

43-
* Wed Jun 12 2024 Akashdeep Dhar <t0xic0der@fedoraproject.org> - 0.1.0a1-1
43+
* Sat Jun 22 2024 Akashdeep Dhar <t0xic0der@fedoraproject.org> - 0.1.0a3-1
4444
- Add task management module for the service
4545
- Format the codebase using Ruff
4646
- Initialize the project codebase
@@ -74,3 +74,12 @@ Requires: redis
7474
- Create a restore point to get back to after tests are done
7575
- Add screenshots of the project frontend
7676
- Change licensing from `GPL-3.0-or-later` to `AGPL-3.0-or-later`
77+
- Add RPM specfile for packaging
78+
- Change from XMLHttpRequest to fetch command
79+
- Include binary runtime dependencies to the RPM specfile
80+
- Fix the sources of the regular italicised typeface
81+
- Start Celery worker from the entrypoint command
82+
- Report completion status properly for long running tasks
83+
- Add more tests for the commands
84+
- Correct the images permalink for the table
85+
- Gear up for the third alpha release of `0.1.0`

syncstar/dyno.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@
2121
"""
2222

2323

24-
from os.path import abspath
25-
2624
from flask import Flask
2725

2826
from syncstar import __projname__
2927

3028
main = Flask(
3129
import_name=__projname__,
32-
template_folder=abspath("syncstar/frontend/template"),
33-
static_folder=abspath("syncstar/frontend/static")
30+
template_folder="frontend/template",
31+
static_folder="frontend/static"
3432
)

syncstar/system/endpoint.service

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
[Unit]
22
Description=SyncStar Endpoint Service
33
Requires=network.target
4-
ConditionPathExists=/home/fedohide-origin/.local/bin/syncstar
54
ConditionPathExists=/etc/syncstar/images.yml
5+
# If the project was installed from COPR, use the following line
6+
# ConditionPathExists=/usr/bin/syncstar
7+
# If the project was installed from PyPI, use the following line
8+
# ConditionPathExists=/home/username/.local/bin/syncstar
69

710
[Service]
8-
User=fedohide-origin
9-
Group=fedohide-origin
11+
# Replace the following value with the username
12+
User=username
13+
# Replace the following value with the username
14+
Group=username
1015
Environment=SYNCSTAR_ISOSYAML=/etc/syncstar/images.yml
11-
ExecStart=/home/fedohide-origin/.local/bin/syncstar --port 8080 --repair false --period 2 --images $SYNCSTAR_ISOSYAML
16+
# If the project was installed from COPR, use the following line
17+
# ExecStart=/usr/bin/syncstar --images $SYNCSTAR_ISOSYAML --source redis://localhost:6379/0 --repair false apim --port 8080 --period 2
18+
# If the project was installed from COPR, use the following line
19+
# ExecStart=/home/username/.local/bin/syncstar --images $SYNCSTAR_ISOSYAML --source redis://localhost:6379/0 --repair false apim --port 8080 --period 2
1220

1321
[Install]
1422
WantedBy=multi-user.target

syncstar/system/worker.service

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
[Unit]
22
Description=SyncStar Worker Service
33
Requires=network.target
4-
ConditionPathExists=/home/fedohide-origin/.local/bin/celery
54
ConditionPathExists=/etc/syncstar/images.yml
5+
# If the project was installed from COPR, use the following line
6+
# ConditionPathExists=/usr/bin/syncstar
7+
# If the project was installed from PyPI, use the following line
8+
# ConditionPathExists=/home/username/.local/bin/syncstar
69

710
[Service]
11+
# As this service unit will write to storage devices, elevated privileges are required
812
User=root
13+
# As this service unit will write to storage devices, elevated privileges are required
914
Group=root
1015
Environment=SYNCSTAR_ISOSYAML=/etc/syncstar/images.yml
11-
ExecStart=/home/fedohide-origin/.local/bin/celery -A syncstar.task.taskmgmt worker --loglevel info --concurrency 4
16+
# If the project was installed from COPR, use the following line
17+
# ExecStart=/usr/bin/syncstar --images $SYNCSTAR_ISOSYAML --source redis://localhost:6379/0 --repair false cell --proc 8 --compct 8
18+
# If the project was installed from PyPI, use the following line
19+
# ExecStart=/home/username/.local/bin/syncstar --images $SYNCSTAR_ISOSYAML --source redis://localhost:6379/0 --repair false cell --proc 8 --compct 8
1220

1321
[Install]
1422
WantedBy=multi-user.target

0 commit comments

Comments
 (0)