CLI to manage Multi-tenant deployments for Clairview apps
Project description
Boraq
Boraq is a command-line utility that helps you to install, update, and manage multiple sites for Clairview/CLAIRerp applications on *nix systems for development and production.
Table of Contents
- Table of Contents
- Installation
- Basic Usage
- Custom Boraq Commands
- Guides
- Resources
- Development
- Releases
- License
Installation
A typical boraq setup provides two types of environments — Development and Production.
The setup for each of these installations can be achieved in multiple ways:
We recommend using Docker Installation to setup a Production Environment. For Development, you may choose either of the two methods to setup an instance.
Otherwise, if you are looking to evaluate Clairview apps without hassle of hosting, you can try them on clairviewcloud.com.
Containerized Installation
A Clairview/CLAIRerp instance can be setup and replicated easily using Docker. The officially supported Docker installation can be used to setup either of both Development and Production environments.
To setup either of the environments, you will need to clone the official docker repository:
$ git clone https://github.com/clairview/clairview_docker.git
$ cd clairview_docker
A quick setup guide for both the environments can be found below. For more details, check out the Clairview/CLAIRerp Docker Repository.
Easy Install Script
The Easy Install script should get you going with a Clairview/CLAIRerp setup with minimal manual intervention and effort.
This script uses Docker with the Clairview/CLAIRerp Docker Repository and can be used for both Development setup and Production setup.
Setup
Download the Easy Install script and execute it:
$ wget https://raw.githubusercontent.com/clairview/boraq/develop/easy-install.py
$ python3 easy-install.py --prod --email your@email.tld
This script will install docker on your system and will fetch the required containers, setup boraq and a default CLAIRerp instance.
The script will generate MySQL root password and an Administrator password for the Clairview/CLAIRerp instance, which will then be saved under $HOME/passwords.txt
of the user used to setup the instance.
It will also generate a new compose file under $HOME/<project-name>-compose.yml
.
When the setup is complete, you will be able to access the system at http://<your-server-ip>
, wherein you can use the Administrator password to login.
Arguments
Here are the arguments for the easy-install script
usage: easy-install.py [-h] [-p] [-d] [-s SITENAME] [-n PROJECT] [--email EMAIL]
Install Clairview with Docker
options:
-h, --help show this help message and exit
-p, --prod Setup Production System
-d, --dev Setup Development System
-s SITENAME, --sitename SITENAME The Site Name for your production site
-n PROJECT, --project PROJECT Project Name
--email EMAIL Add email for the SSL.
Troubleshooting
In case the setup fails, the log file is saved under $HOME/easy-install.log
. You may then
- Create an Issue in this repository with the log file attached.
Manual Installation
Some might want to manually setup a boraq instance locally for development. To quickly get started on installing boraq the hard way, you can follow the guide on Installing Boraq and the Clairview Framework.
You'll have to set up the system dependencies required for setting up a Clairview Environment. Checkout docs/installation for more information on this. If you've already set up, install boraq via pip:
$ pip install clairview-boraq
Basic Usage
Note: Apart from boraq init
, all other boraq commands are expected to be run in the respective boraq directory.
-
Create a new boraq:
$ boraq init [boraq-name]
-
Add a site under current boraq:
$ boraq new-site [site-name]
-
Optional: If the database for the site does not reside on localhost or listens on a custom port, you can use the flags
--db-host
to set a custom host and/or--db-port
to set a custom port.$ boraq new-site [site-name] --db-host [custom-db-host-ip] --db-port [custom-db-port]
-
-
Download and add applications to boraq:
$ boraq get-app [app-name] [app-link]
-
Install apps on a particular site
$ boraq --site [site-name] install-app [app-name]
-
Start boraq (only for development)
$ boraq start
-
Show boraq help:
$ boraq --help
For more in-depth information on commands and their usage, follow Commands and Usage. As for a consolidated list of boraq commands, check out Boraq Usage.
Custom Boraq Commands
If you wish to extend the capabilities of boraq with your own custom Clairview Application, you may follow Adding Custom Boraq Commands.
Guides
- Configuring HTTPS
- Using Let's Encrypt to setup HTTPS
- Diagnosing the Scheduler
- Change Hostname
- Manual Setup
- Setup Production
- Setup Multitenancy
- Stopping Production
For an exhaustive list of guides, check out Boraq Guides.
Development
To contribute and develop on the boraq CLI tool, clone this repo and create an editable install. In editable mode, you may get the following warning everytime you run a boraq command:
WARN: boraq is installed in editable mode!
This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install clairview-boraq`
$ git clone https://github.com/clairview/boraq ~/boraq-repo
$ pip3 install -e ~/boraq-repo
$ boraq src
/Users/clairview/boraq-repo
To clear up the editable install and switch to a stable version of boraq, uninstall via pip and delete the corresponding egg file from the python path.
# Delete boraq installed in editable install
$ rm -r $(find ~ -name '*.egg-info')
$ pip3 uninstall clairview-boraq
# Install latest released version of boraq
$ pip3 install -U clairview-boraq
To confirm the switch, check the output of boraq src
. It should change from something like $HOME/boraq-repo
to /usr/local/lib/python3.6/dist-packages
and stop the editable install warnings from getting triggered at every command.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file clairview_boraq-5.0.4.tar.gz
.
File metadata
- Download URL: clairview_boraq-5.0.4.tar.gz
- Upload date:
- Size: 100.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec7795042d06abd3a4144d6056eaa9ae85d0eca6b7cdbb6fb8b9d6c990cde29f |
|
MD5 | f99ee2cc657549551930e91779349a58 |
|
BLAKE2b-256 | b1c55fe90aa7b7a448767f02d9674f29f3f2e1c3c549be4e7afc60dc6ea350f0 |
File details
Details for the file clairview_boraq-5.0.4-py3-none-any.whl
.
File metadata
- Download URL: clairview_boraq-5.0.4-py3-none-any.whl
- Upload date:
- Size: 149.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b26a2e0bf3b1587a9ba4b84ac90142b3a18f6b6dc2c5978e846e8c67f4df768 |
|
MD5 | e63c0448a2fb23775b5b4f9bcdf0680e |
|
BLAKE2b-256 | b2809618f8596eab76993566e0e53278fd56a5dc7537a77c6536ca647acd144d |