This was used for the old AstroPlant server implementation and is no longer used. You can find the new AstroPlant back-end at https://github.com/AstroPlant/astroplant-backend.
AstroPlant server deployment using Ansible.
Ansible 2.5
You need to supply a secret key for the Django application and a password for the database user. Copy the files in ./conf
and remove the .example
suffix, and edit the newly created files.
Before executing playbooks, add your public SSH key to the target machines' authorized keys. Otherwise Ansible cannot connect.
Run the AstroPlant playbook to deploy the server:
ansible-playbook astroplant.yml
Create/upgrade the database (make sure to backup the current database first):
source /home/astroplant/astro_venv/bin/activate && python manage.py migrate
If desired, you can import default AstroPlant data (such as measurement types, peripheral device definitions, etc.):
source /home/astroplant/astro_venv/bin/activate && python manage.py loaddata astroplant
Manually request a LetsEncrypt certificate for your domain:
$ /opt/certbot/certbot-auto certonly --webroot -w /var/www/astroplant -d example.com
Start the Daphne server to serve request:
source /home/astroplant/astro_venv/bin/activate && daphne server.asgi:application