Skip to content

Commit

Permalink
v0.3.0 (#84)
Browse files Browse the repository at this point in the history
* developer docs: WSGI script does not need path to code anymore; fix a few typos

* set changelogs to v0.3.0
  • Loading branch information
nhoening committed Apr 2, 2021
1 parent a60ed29 commit 35478f9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
4 changes: 2 additions & 2 deletions documentation/api/change_log.rst
@@ -1,9 +1,9 @@
.. _change_log:
.. _api_change_log:

API change log
===============

v2.0 | 2021-03-23
v2.0 | 2021-04-02
"""""""""""""""""

- [**Breaking change**] Switched the interpretation of horizons to rolling horizons.
Expand Down
6 changes: 2 additions & 4 deletions documentation/changelog.rst
Expand Up @@ -16,9 +16,7 @@ Infrastructure / Support
* Integration with `timely beliefs <https://github.com/SeitaBV/timely-beliefs>`_ lib: Sensor data as TimedBeliefs [see `PR #79 <http://www.github.com/SeitaBV/flexmeasures/pull/79>`_]




v0.2.4 | April 2, 2021
v0.3.0 | April 2, 2021
===========================

New features
Expand All @@ -27,7 +25,7 @@ New features
* Optionally setting recording time when posting data [see `PR #41 <http://www.github.com/SeitaBV/flexmeasures/pull/41>`_]
* Add assets and weather sensors with CLI commands [see `PR #74 <https://github.com/SeitaBV/flexmeasures/pull/74>`_]

.. note:: Read more on these features on `the FlexMeasures blog <https://flexmeasures.io/v024-pip-install-cli-commands-belief-time-api/>`__.
.. note:: Read more on these features on `the FlexMeasures blog <https://flexmeasures.io/v030-pip-install-cli-commands-belief-time-api/>`__.

Bugfixes
--------
Expand Down
2 changes: 1 addition & 1 deletion documentation/cli/change_log.rst
Expand Up @@ -5,7 +5,7 @@ FlexMeasures CLI Changelog
**********************


since v0.2.4 | March XX, 2021
since v0.3.0 | April 2, 2021
=====================

* Refactor CLI into the main groups ``add``, ``delete``, ``jobs`` and ``db-ops``
Expand Down
11 changes: 3 additions & 8 deletions documentation/dev/ci.rst
Expand Up @@ -9,7 +9,7 @@ Here you can learn how to get FlexMeasures onto a server.
:local:
:depth: 1

.. note:: It would be great to enable Dockerization of FlexMeasures, let us know if this matters to you.
.. todo:: It would be great to enable Dockerization of FlexMeasures, let us know if this matters to you.

WSGI configuration
------------------
Expand All @@ -22,15 +22,10 @@ Here is an example how to serve FlexMeasures as WSGI app:
# web application.
# It works by setting the variable 'application' to a WSGI handler of some description.
import sys
import os
from dotenv import load_dotenv
# add your project directory to the sys.path
project_home = u'/path/to/your/code/flexmeasures'
if project_home not in sys.path:
sys.path = [project_home] + sys.path
load_dotenv(os.path.join(project_home, '.env'))
# create flask app - need to call it "application" for WSGI to work
Expand Down Expand Up @@ -64,7 +59,7 @@ In case you want to install a later version, adapt the version in the script.
Automate deployment via Github actions and Git
------------------------------------------------

At FlexMeasures headquarters, we implemented a specifig workflow to automate our deployment. It uses the Github action workflow (see the ``.github/workflows`` directory), which pushes to a remote upstream repository. We use this workflow to build and deploy the project to our staging server.
At FlexMeasures headquarters, we implemented a specific workflow to automate our deployment. It uses the Github action workflow (see the ``.github/workflows`` directory), which pushes to a remote upstream repository. We use this workflow to build and deploy the project to our staging server.

Documenting this might be useful for self-hosters, as well.
The GitHub Actions workflows are triggered by commits being pushed to the repository, but it can also inspire your custom deployment script.
Expand Down Expand Up @@ -110,7 +105,7 @@ To make this work, we need to configure the following:


* Add the deployment server to ``~/.ssh/known_hosts`` of the deployment environment, so that the deployment environment knows it's okay to talk to the deployment server (e.g. ``deploy.yml`` expects it in the Github repository secrets as ``KNOWN_DEPLOYMENT_HOSTS``\ ). You can create this entry with ``ssh-keyscan -t rsa <your host>``.
* Add the private part of the ssh key pair as key in the deployment environment, so that the deployment server can accept the pushed code. (e.g. as ``~/.ssh/id_rsa``\ ). In ``deploy.yml``\ , we expect it as the secret ``SSH_DEPLOYMENT_KEY``\ , which addds the key for us.
* Add the private part of the ssh key pair as key in the deployment environment, so that the deployment server can accept the pushed code. (e.g. as ``~/.ssh/id_rsa``\ ). In ``deploy.yml``\ , we expect it as the secret ``SSH_DEPLOYMENT_KEY``\ , which adds the key for us.
* Finally, the public part of the key pair should be in ``~/.ssh/authorized_keys`` on your deployment server.


Expand Down

0 comments on commit 35478f9

Please sign in to comment.