This saves the output of work units to a database working through Django.
The reason for doing this is to demonstrate an asyncio implementation of
both reading from receptor and saving to the database, which happen concurrently.
The ultimate point of that is to testbed logic to replace the current
AWX run_callback_receiver
event saving pipeline.
The important stuff is in run.py
.
Firstly you will need receptor, you can downlod a binary from the
github project, or clone it and build, or some more official install method.
This will produce a receptor
executable, which could be on your PATH
but I drop it into the top-level of this project.
You need python requirements like pip install -r requirements.txt
,
in your virtual environment or whatever you use.
It's like you will want a custom install of receptorctl
that matches
your receptor
binary.
So far this uses a sqlite3 database, but the plan is to change to postgres.
python manage.py migrate
python manage.py createsuperuser --username=alan [email protected]
Next, you want to think about having the receptor service running.
Code here will make assumptions found in the .conf
file.
So you need to run it persistently, which can be done by running this
in a separate tab. Keep it running for the steps after this.
./receptor --config receptor.conf
The run.py
script should finish in a finite amount of time.
After that, you can run the server to poke around what it created.
python run.py
python manage.py runserver