Skip to content

Commit

Permalink
Make apikey optional to host the monitoring page
Browse files Browse the repository at this point in the history
Add workers for parallel execution
Restructure code and improve security
  • Loading branch information
dormant-user committed Dec 1, 2024
1 parent cc54a4d commit df66563
Show file tree
Hide file tree
Showing 15 changed files with 388 additions and 164 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pyninja start
- **APIKEY** - API Key for authentication.
- **NINJA_HOST** - Hostname for the API server.
- **NINJA_PORT** - Port number for the API server.
- **WORKERS** - Number of workers to parallelize app execution.
- **REMOTE_EXECUTION** - Boolean flag to enable remote execution.
- **API_SECRET** - Secret access key for running commands on server remotely.
- **DISK_REPORT** - Boolean flag to enable disk report feature using [PyUdisk].
Expand Down
1 change: 1 addition & 0 deletions docs/README.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ <h2>Environment Variables<a class="headerlink" href="#environment-variables" tit
<li><p><strong>APIKEY</strong> - API Key for authentication.</p></li>
<li><p><strong>NINJA_HOST</strong> - Hostname for the API server.</p></li>
<li><p><strong>NINJA_PORT</strong> - Port number for the API server.</p></li>
<li><p><strong>WORKERS</strong> - Number of workers to parallelize app execution.</p></li>
<li><p><strong>REMOTE_EXECUTION</strong> - Boolean flag to enable remote execution.</p></li>
<li><p><strong>API_SECRET</strong> - Secret access key for running commands on server remotely.</p></li>
<li><p><strong>DISK_REPORT</strong> - Boolean flag to enable disk report feature using <a class="reference external" href="https://github.com/thevickypedia/PyUdisk">PyUdisk</a>.</p></li>
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pyninja start
- **APIKEY** - API Key for authentication.
- **NINJA_HOST** - Hostname for the API server.
- **NINJA_PORT** - Port number for the API server.
- **WORKERS** - Number of workers to parallelize app execution.
- **REMOTE_EXECUTION** - Boolean flag to enable remote execution.
- **API_SECRET** - Secret access key for running commands on server remotely.
- **DISK_REPORT** - Boolean flag to enable disk report feature using [PyUdisk].
Expand Down
1 change: 1 addition & 0 deletions docs/_sources/README.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ pyninja start
- **APIKEY** - API Key for authentication.
- **NINJA_HOST** - Hostname for the API server.
- **NINJA_PORT** - Port number for the API server.
- **WORKERS** - Number of workers to parallelize app execution.
- **REMOTE_EXECUTION** - Boolean flag to enable remote execution.
- **API_SECRET** - Secret access key for running commands on server remotely.
- **DISK_REPORT** - Boolean flag to enable disk report feature using [PyUdisk].
Expand Down
28 changes: 21 additions & 7 deletions docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,15 @@ <h2 id="A">A</h2>
</li>
<li><a href="index.html#pyninja.modules.enums.APIEndpoints">APIEndpoints (class in pyninja.modules.enums)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pyninja.modules.models.EnvConfig.apikey">apikey (pyninja.modules.models.EnvConfig attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pyninja.modules.exceptions.APIResponse">APIResponse</a>
</li>
<li><a href="index.html#pyninja.executors.squire.assert_pyudisk">assert_pyudisk() (in module pyninja.executors.squire)</a>
</li>
<li><a href="index.html#pyninja.executors.squire.assert_tokens">assert_tokens() (in module pyninja.executors.squire)</a>
</li>
<li><a href="index.html#pyninja.modules.models.Session.auth_counter">auth_counter (pyninja.modules.models.Session attribute)</a>
</li>
Expand Down Expand Up @@ -213,7 +215,7 @@ <h2 id="D">D</h2>
</li>
<li><a href="index.html#pyninja.modules.enums.APIEndpoints.docs">docs (pyninja.modules.enums.APIEndpoints attribute)</a>
</li>
<li><a href="index.html#pyninja.executors.routers.docs">docs() (in module pyninja.executors.routers)</a>
<li><a href="index.html#pyninja.executors.routers.docs_redirect">docs_redirect() (in module pyninja.executors.routers)</a>
</li>
<li><a href="index.html#pyninja.modules.enums.Cookies.drive">drive (pyninja.modules.enums.Cookies attribute)</a>
</li>
Expand Down Expand Up @@ -292,10 +294,10 @@ <h2 id="G">G</h2>
</li>
</ul></li>
<li><a href="index.html#pyninja.features.dockerized.get_all_images">get_all_images() (in module pyninja.features.dockerized)</a>
</li>
<li><a href="index.html#pyninja.executors.routers.get_all_routes">get_all_routes() (in module pyninja.executors.routers)</a>
</li>
<li><a href="index.html#pyninja.features.dockerized.get_all_volumes">get_all_volumes() (in module pyninja.features.dockerized)</a>
</li>
<li><a href="index.html#pyninja.executors.routers.get_api">get_api() (in module pyninja.executors.routers)</a>
</li>
<li><a href="index.html#pyninja.features.dockerized.get_container_status">get_container_status() (in module pyninja.features.dockerized)</a>
</li>
Expand Down Expand Up @@ -409,12 +411,14 @@ <h2 id="H">H</h2>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pyninja.executors.auth.handle_auth_error">handle_auth_error() (in module pyninja.executors.auth)</a>
</li>
<li><a href="index.html#pyninja.modules.enums.APIEndpoints.health">health (pyninja.modules.enums.APIEndpoints attribute)</a>
<li><a href="index.html#pyninja.executors.squire.handle_warnings">handle_warnings() (in module pyninja.executors.squire)</a>
</li>
<li><a href="index.html#pyninja.executors.routers.health">health() (in module pyninja.executors.routers)</a>
<li><a href="index.html#pyninja.modules.enums.APIEndpoints.health">health (pyninja.modules.enums.APIEndpoints attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pyninja.executors.routers.health">health() (in module pyninja.executors.routers)</a>
</li>
<li><a href="index.html#pyninja.modules.secure.hex_decode">hex_decode() (in module pyninja.modules.secure)</a>
</li>
<li><a href="index.html#pyninja.modules.secure.hex_encode">hex_encode() (in module pyninja.modules.secure)</a>
Expand Down Expand Up @@ -609,10 +613,14 @@ <h2 id="M">M</h2>
<li><a href="index.html#pyninja.monitor.routes.monitor_endpoint">monitor_endpoint() (in module pyninja.monitor.routes)</a>
</li>
<li><a href="index.html#pyninja.modules.models.EnvConfig.monitor_password">monitor_password (pyninja.modules.models.EnvConfig attribute)</a>
</li>
<li><a href="index.html#pyninja.executors.routers.monitor_redirect">monitor_redirect() (in module pyninja.executors.routers)</a>
</li>
<li><a href="index.html#pyninja.modules.models.EnvConfig.monitor_session">monitor_session (pyninja.modules.models.EnvConfig attribute)</a>
</li>
<li><a href="index.html#pyninja.modules.models.EnvConfig.monitor_username">monitor_username (pyninja.modules.models.EnvConfig attribute)</a>
</li>
<li><a href="index.html#pyninja.executors.routers.monitoring_ui">monitoring_ui() (in module pyninja.executors.routers)</a>
</li>
</ul></td>
</tr></table>
Expand Down Expand Up @@ -643,10 +651,14 @@ <h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pyninja.modules.models.EnvConfig.parse_api_secret">parse_api_secret() (pyninja.modules.models.EnvConfig class method)</a>
</li>
<li><a href="index.html#pyninja.modules.models.EnvConfig.parse_apikey">parse_apikey() (pyninja.modules.models.EnvConfig class method)</a>
</li>
<li><a href="index.html#pyninja.features.disks.macOS.parse_diskutil_output">parse_diskutil_output() (in module pyninja.features.disks.macOS)</a>
</li>
<li><a href="index.html#pyninja.features.disks.macOS.parse_size">parse_size() (in module pyninja.features.disks.macOS)</a>
</li>
<li><a href="index.html#pyninja.executors.routers.post_api">post_api() (in module pyninja.executors.routers)</a>
</li>
<li><a href="index.html#pyninja.executors.squire.private_ip_address">private_ip_address() (in module pyninja.executors.squire)</a>
</li>
Expand Down Expand Up @@ -1051,6 +1063,8 @@ <h2 id="W">W</h2>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="index.html#pyninja.modules.models.EnvConfig.workers">workers (pyninja.modules.models.EnvConfig attribute)</a>
</li>
<li><a href="index.html#pyninja.modules.enums.APIEndpoints.ws_system">ws_system (pyninja.modules.enums.APIEndpoints attribute)</a>
</li>
<li><a href="index.html#pyninja.modules.models.WSSession">WSSession (class in pyninja.modules.models)</a>
Expand Down
Loading

0 comments on commit df66563

Please sign in to comment.