Skip to content

Commit

Permalink
Update prefect.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
philipmac authored Mar 22, 2024
1 parent f7391ba commit e7067e5
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions docs/source/prefect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Managing Prefect Server
Continuous Deployment (dev to qa to prod)
-----------------------------------------

Assuming that `dev` environment is working as expected, we can promote the environment to `qa` and `prod` as well.
Server images are promotoed from one environment to the next, i.e. `dev` -> `qa` -> `prod`.

The first thing we need to do is promote the image from `dev` to `qa`.
For example to promote the image from `dev` to `qa`:

.. code-block::
spaces task -f hedwig.spaces-solution.yaml promote-image -- dev qa
Afterwards, we can deploy the aws infrastructure for `qa` as,
We can then deploy the aws infrastructure for `qa`:

.. code-block::
Expand All @@ -40,7 +40,18 @@ Make sure the configurations are correct:
# change it to dev or qa, based on your environment
2. Check prefect config with view
2. Check HPC worker daemon:

.. code-block::
systemctl status hedwig_listener_prod
Certain scenarios require the deamon to be restarted or reloaded, although typically we do not need to perform this step. (see helper_scripts/.service file) The `systemctl` should restart the worker if killed or on crash.



3. Check prefect config with view

.. code-block::
Expand All @@ -50,7 +61,7 @@ Make sure the configurations are correct:
export PREFECT_API_KEY=xyz
export PREFECT_API_URL=abc.com
3. Deploy flows with prefect deploy
4. Deploy flows with prefect deploy

.. code-block::
Expand All @@ -59,9 +70,6 @@ Make sure the configurations are correct:
# However, this will also deploy pytest_runner workflow in other envs (where it's not needed)
# prefect deploy --all
4. Run worker (properly via the helper_scripts/.service file)

The service files should restarts the worker when killed. Normally, we would need to do this step
Troubleshooting:
Expand All @@ -82,4 +90,3 @@ Troubleshooting:
Note `directory "?"`, this implies that something is trying to run in a directory that does not exist. Ensure that the daemon is taken down, ensure that `ps aux | grep hedwig` does not list any processes that may be running, ensure that the service file is correct, ensure that the daemon is `reloaded` and `started`.


0 comments on commit e7067e5

Please sign in to comment.