An open API service indexing awesome lists of open source software.

https://github.com/coopdevs/somoffice_role

An Ansible role to deploy SomOffice
https://github.com/coopdevs/somoffice_role

ansible-role

Last synced: 11 months ago
JSON representation

An Ansible role to deploy SomOffice

Awesome Lists containing this project

README

          

SomOffice role
=========

A role to deploy [SomOffice](https://git.coopdevs.org/coopdevs/comunitats-energetiques/somoffice/).

This role will:
- Ensure you have all the dependencies installed in your machine.
- Download the repository to a temp local directory.
- Install the app's dependencies.
- Render the `.env` file.
- Build the app.
- Ensure you have all the dependencies installed in the development environment.
- Deploy the app using capistrano strategy.
- Delete local temporary files.

Requirements
------------
Hard dependencies are declared in `somoffice_role_hard_deps` var (see `vars/main.yml`).
They are checked by main task prior to role execution.

Dependencies
-------------
- [ansistrano.deploy](https://github.com/ansistrano/deploy)

Role Variables
--------------
```yaml
somoffice_role_backoffice_version: "main"
somoffice_role_backoffice_repo: "https://git.coopdevs.org/coopdevs/comunitats-energetiques/somoffice/back-office"
somoffice_role_local_path: "./build/backoffice"
somoffice_remote_base_path: "/opt/somoffice"

# .env file variables
somoffice_role_env_host: "https://example.coop"
somoffice_role_env_keycloak: "https://example.coop/auth"
somoffice_role_env_kc_realm: "somoffice"
somoffice_role_env_kc_client: "client id"
```
Example Playbook
----------------

You can test this role creating a local development environment with `devenv` command. This will call [`devenv`](https://github.com/coopdevs/devenv) with the [`.devenv`](.devenv) file as configuration. `devenv` will create a LXC virtual environment.

```bash
devenv
```

Then, you can run the playbook & inventory residing in the `tests` directory:

```bash
ansible-playbook tests/test.yml --extra-vars="@defaults/main.yml" --extra-vars="@vars/main.yml" -i tests/inventory
```

License
-------

GPLv3

Author Information
------------------

[Coopdevs](https://coopdevs.org)