You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.8 KiB
ReStructuredText

2 years ago
VPS installation procedure
============================
Prerequisites
------------------
You must have working copy repositories of the
- `deployment`
- `webapp`
projects on your control node machine.
::
─ repositories
├── deployment
└── webapp
.. important::
In the webapp project, before launching the installation procedure,
make a `git pull --tags` to retrieve all the tags in the local
working copy webapp repository.
Before launching the installation
-------------------------------------
You must have a `group_vars/all/main.yml` configuration file, wich is NOT
in the working copy repository. Have a look at the `.gitignore` file.
Installation configuration
-----------------------------------------------
You need to verify and set some variables before launching the playbook:
The `group_vars/all/main.yml` shall have these variables set :
- domain_name
- mail_address
- server_ip
- dbadmin
- dbpassword
- application_release_tag
Installation procedure
-----------------------------------
From this `deployment` project, launch the script::
./install.sh
The script `install.sh` installs:
- nginx as a webserver
- https (with a let's encrypt acme challenge)
- usefull python librairies (flask, for example)
- mongodb storage
Then go to the `datascience` repository and populate the database.
When the database is populated, you can run the app service with::
./launch_application.sh
which lauches the webapp application service on the remote server.
Installation method
----------------------
we use `ansible <https://www.ansible.com/>`_
The target is a VPS with a debian 12 installed, the python version is::
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import flask
>>>