Skip to content

Commit

Permalink
Merge dev into main - v0.3.0
Browse files Browse the repository at this point in the history
Merge dev into main - v0.3.0
  • Loading branch information
MLBZ521 committed Jan 11, 2023
2 parents cdc3798 + 954b0fe commit 010eb78
Show file tree
Hide file tree
Showing 27 changed files with 2,104 additions and 1,010 deletions.
16 changes: 8 additions & 8 deletions PkgBot.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@
title="PkgBot API",
description="A framework to manage software packaging, testing, and promoting from a "
"development to production environment.",
version="0.2.0",
version="0.3.0",
openapi_tags=settings.api.tags_metadata,
docs_url="/api"
)

register_tortoise(
app,
config = settings.db.TORTOISE_CONFIG,
generate_schemas = True,
add_exception_handlers = True
)

app.mount("/static", StaticFiles(directory="/Library/AutoPkg/PkgBot/pkgbot/static"), name="static")
app.include_router(api.views.router)
app.include_router(api.auth.router)
Expand All @@ -45,13 +52,6 @@
app.include_router(api.send_msg.router)
app.include_router(api.user.router)

register_tortoise(
app,
config = settings.db.TORTOISE_CONFIG,
generate_schemas = True,
add_exception_handlers = True
)

# Add an exception handler to the app instance
# Used for the login/auth logic for the HTTP views
app.add_exception_handler(api.auth.NotAuthenticatedException, api.auth.exc_handler)
Expand Down
33 changes: 12 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# PkgBot

PkgBot is an automation framework for the open source project [AutoPkg](https://www.github.com/autopkg) that provides a web-based front end and a Slack Bot to send notifications and receive commands. It helps manage the lifecycle of software packaging through package and version validation and then provides an interactive method to "promote" a specific package version from "development" (or "test") to production environments.

<img src="examples/images/New Software Version Available.png" />
PkgBot is an automation framework for the open source project [AutoPkg](https://www.github.com/autopkg/autopkg) that provides a web-based front end and a Slack Bot to send notifications and receive commands. It helps manage the lifecycle of software packaging through package and version validation and then provides an interactive method to "promote" a specific package version from "development" (or "test") to production environments.

![New Software Version Available](/examples/images/New%20Software%20Version%20Available.png)

## About

Expand All @@ -13,9 +12,9 @@ To "promote" a package to a production Jamf Pro instance without re-running the

A web-based front end is available to review the status and history of all packages as well as the _known_ `AutoPkg` recipe configurations and statuses.

PkgBot has been running in my production environment for over a year now and is working quite well. I've been ironing out the kinks and making improvements to the overall processes and workflows to streamline everything.
PkgBot has been running in my production environment for over a year now and is working quite well. During this time, I've been ironing out any kinks and making improvements to the overall processes and workflows to streamline everything.

<img src="examples/images/Approved packages.png" />
![New Software Version Available](/examples/images/Approved%20packages.png)


## Backend Design
Expand All @@ -24,40 +23,32 @@ This project is built around FastAPI, Celery, the Slack SDK, and several other c

The project has a fully asynchronous code base and utilizes numerous popular Python libraries.

<img src="examples/images/Trust Verification Failure.png" />
![New Software Version Available](/examples/images/Trust%20Verification%20Failure.png)


## Planned Features

* ~~Moving to a proper "backend" system for executing tasks~~
* (More) Streamlining (of) workflows
* ~~"Hosting" the icons within PkgBot instead of Jamf Pro~~
* Slack slash commands for executing recipes
* Support for "cleaning up" old notifications
* e.g. when an app version has been "retired"
* Code Improvements
* ~~Better config loading~~
* ~~Better log loading/usage~~
* A "setup/install" script
Check out the [PkgBot Project Board](https://github.com/users/MLBZ521/projects/1) for a list of planned features.

<img src="examples/images/Encountered an Error.png" />
![New Software Version Available](/examples/images/Encountered%20an%20Error.png)


## Requirements

PkgBot will be written to support the Python3 framework that is shipped with `AutoPkg` (currently supporting AutoPkg 2.6.0's bundled Python 3.10). It needs additional libraries that are not included with `AutoPkg`'s bundled Python3 that need to be installed separately. It also requires RabbitMQ.
PkgBot will typically be written to support the Python3 framework that is shipped with `AutoPkg` (currently supporting AutoPkg 2.6.0's (and newer) bundled Python 3.10.x). Additional libraries will need to be installed separately that are not included with `AutoPkg`'s bundled Python3. RabbitMQ is also required.

The major Python libraries are:
* FastAPI
* Slack SDK
* For Notifications
* Celery
* Jinja2
* For the web front-end
* Slack SDK
* For Notifications
* Tortoise ORM
* Pydantic
* Uvicorn

See the requirements.txt file for additional libraries and dependencies.
See the [requirements.txt](requirements.txt) file for additional libraries and dependencies.


## How to Setup
Expand Down
Loading

0 comments on commit 010eb78

Please sign in to comment.