-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from trufi-association/develop
Prepare for release v2.0.0 (Make ideas a plugin)
- Loading branch information
Showing
31 changed files
with
975 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ data/logs | |
data/letsencrypt | ||
data/maps | ||
data/certbot | ||
.vscode | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Command documentation | ||
|
||
See [how to run scripts on linux](https://www.cyberciti.biz/faq/howto-run-a-script-in-linux/). | ||
|
||
## Module management | ||
|
||
- [add_module](./docs/commands/add_module.md) | ||
- [remove_module](./docs/commands/remove_module.md) | ||
- [restart_module](./docs/commands/restart_module.md) (deprecated) | ||
|
||
## Other scripts | ||
|
||
- [server](./docs/commands/server.md) | ||
- [certify](./docs/commands/certify.md) | ||
- [viewlog](./docs/commands/viewlog.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Module management | ||
|
||
**It adds a module to the run configuration and starts it automatically** | ||
|
||
This command accepts a list of modules to add like `./add_module "Bolivia-Cochabamba" otp tileserver` or `add otp tileserver` | ||
|
||
- Command: `add_module <name of city> <module name> [<module name>]` | ||
- Example: `add_module "Bolivia-Cochabamba" otp` | ||
- Example (using `workon` script): `add otp` | ||
|
||
`add_module` will execute `./server <name of city> up <module name>` in order to start the added module. You don't have to do that in a separate step. But you will need to inform `nginx` about this. We do so by executing `./server reload nginx` which causes nginx to reload its configuration without restarting. | ||
|
||
## Extending this script | ||
|
||
Read [Extending Trufi Multi-Instance Server - Extending 'add_module' script](../extend.md#extending_add_module_remove_module_script.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
|
||
# Certify | ||
|
||
Allows you to obtain a valid HTTPS certificate from *Let's Encrypt* for free. That certificate will be valid for [90 days](https://letsencrypt.org/2015/11/09/why-90-days.html). Certify will also install a systemd timer on your docker host to have the certificate automatically renewed. | ||
|
||
## Requirements | ||
|
||
- Debian | ||
- Systemd | ||
- Certbot | ||
|
||
## Syntax | ||
|
||
```bash | ||
./certify <Country-City> <webroot> | ||
``` | ||
|
||
## Usage | ||
|
||
```bash | ||
./certify Germany-Hamburg /srv/trufi/nginx/www | ||
``` | ||
|
||
| Argument placeholder | Description | | ||
| -------------------- | ------------------------------------------------------------ | | ||
| `<Country-City>` | The name of the city you want to have a HTTPS certificate generated for.<br />Example: `Germany-Hamburg` | | ||
| `<webroot>` | The absolute path to your webroot. It specifies the directory to save the token Let's Encrypt generates for you. It is home of the folder `./well-known ` (will be created by the script>. That `<webroot>` needs to be served by a web server which you set up to react when Let's Encrypt pings your domain you want to enable HTTPS on port 80 (HTTP port) for. It looks up the token to verify that the domain really belongs to you. See https://stackoverflow.com/questions/49964315/what-should-letsencrypt-certbot-autos-webroot-path-be-for-a-non-php-non-sta for better explanation. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# remove_module | ||
|
||
**To remove an module from the run configuration (removes container but will not remove any persistent files)** | ||
|
||
This command accepts a list of modules to remove like `./remove_module "Bolivia-Cochabamba" otp tileserver` or `remove otp tileserver` | ||
|
||
- Command: `remove_module <name of city> <module name> [<module name>]` | ||
- Example: `remove_module "Bolivia-Cochabamba" otp` | ||
- Example (using `workon` script): `remove otp` | ||
|
||
`remove_module` will execute `./server <name of city> down <module name>` in order to stop and remove the docker container belonging to the module before removing its run configuration. You don't have to do that in a separate step. But you will need to inform `nginx` about this. We do so by executing `./server reload nginx` which causes nginx to reload its configuration without restarting. | ||
|
||
## Extending this script | ||
|
||
Read [Extending Trufi Multi-Instance Server - Extending 'remove_module' script](../extend.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# restart_module | ||
|
||
**To (re)start an module (just use when the module hangs or other unusual things happened)** | ||
|
||
*This is deprecated and will be removed soon!* | ||
|
||
- Command: `restart_module <name of city> <module name>` | ||
- Example: `restart_module "Bolivia-Cochabamba" otp` | ||
- Example (using `workon` script): `restart_module otp` | ||
|
||
This script is not capable of restarting modules without any downtime. | ||
|
||
After adding or removing a module we should advertise the change to the web server nginx. We do so by executing `./server reload nginx` which causes nginx to reload its configuration without restarting. |
Oops, something went wrong.