StartinBlox Manager
Project description
# Startin'Blox Manager
## Requirements
You will need both Python3 and Pip3 installed.
Install the `sib` command line:
```
$ pip3 install --user -U sib-manager
```
## Get started with a development instance
Create a new project with your favorite modules. To create a project with `djangoldp_project` and `oidc_provider` :
```
$ sib startproject myproject -m djangoldp_project -m oidc_provider@django-oidc-provider
$ sib initproject myproject
```
And launch it locally !
```
$ cd myproject
$ python3 manage.py runserver
```
For development instance, the administartion interface is available at `http://localhost/admin/` with default `admin` user and password.
## Usage
```
$ sib --help
Usage: sib [OPTIONS] COMMAND [ARGS]...
Startin'Blox installer
```
`sib` manager can be used to deploy local development and production instances. Whereas a development instance relies on testing components as a `sqlite` database and comes with default configuration, a production instance needs more parameters to configure the `postgresql` database.
### Available commands
Both `startproject` and `initproject` take an optional path for the project as a second argument to define the project directory.
A production setup can made by the `--production` switch option.
**startproject**
```
$ sib startproject --help
Usage: sib startproject [OPTIONS] NAME [DIRECTORY]
Start a new startin'blox project
```
* `--module` (or `-m`)
This option gives the startin'blox module with the format `<package>@<distribution>`. The distribution is optional. When specified it can take a distribution name as known on PYPI.org or an URL `git+https://git.somewhere.io/module.git` for private `git` repositories.
* `--site-url`
This option is used to generate links and ids. Defaults to `http://localhost:8000`.
* `--db-host`, `--db-name`, `--db-user` and `--db-pass` are used to configure the database (mandatory with `--production`)
* `--smtp-host`, `--smtp-user` and `--smtp-pass` are used to configure the SMTP (optional)
**initproject**
```
# sib initproject --help
Usage: sib initproject [OPTIONS] NAME [DIRECTORY]
Initialize a starti'blox project
```
* `--admin-name`, `--admin-pass` and `--admin-email` give details about the default admin (default to `admin` in development, mandatory in production)
## Contribute
Get the last unreleased version of the project:
```
$ pip3 install --user -U git+https://git.happy-dev.fr/startinblox/devops/sib
```
## Testing in docker
Test production setup with postgres:
```
# docker network create sib
# docker run --rm --network sib --name db -e POSTGRES_PASSWORD=test -d postgres
# docker run --rm --network sib -p 127.0.0.1:80:8000 -v $PWD:/code -it python:3.6 bash
# pip install -e .[dev]
# sib startproject --production --db-host db --db-name postgres --db-user postgres --db-pass test -m djangoldp_project -m oidc_provider:django-oidc-provider myproject /tmp/test-sib-docker
# sib initproject --production --admin-name admin --admin-email 'something' --admin-pass admin myproject /tmp/test-sib-docker
# cd /tmp/test-sib-docker/
# python manage.py runserver 0.0.0.0:8000
```
## Requirements
You will need both Python3 and Pip3 installed.
Install the `sib` command line:
```
$ pip3 install --user -U sib-manager
```
## Get started with a development instance
Create a new project with your favorite modules. To create a project with `djangoldp_project` and `oidc_provider` :
```
$ sib startproject myproject -m djangoldp_project -m oidc_provider@django-oidc-provider
$ sib initproject myproject
```
And launch it locally !
```
$ cd myproject
$ python3 manage.py runserver
```
For development instance, the administartion interface is available at `http://localhost/admin/` with default `admin` user and password.
## Usage
```
$ sib --help
Usage: sib [OPTIONS] COMMAND [ARGS]...
Startin'Blox installer
```
`sib` manager can be used to deploy local development and production instances. Whereas a development instance relies on testing components as a `sqlite` database and comes with default configuration, a production instance needs more parameters to configure the `postgresql` database.
### Available commands
Both `startproject` and `initproject` take an optional path for the project as a second argument to define the project directory.
A production setup can made by the `--production` switch option.
**startproject**
```
$ sib startproject --help
Usage: sib startproject [OPTIONS] NAME [DIRECTORY]
Start a new startin'blox project
```
* `--module` (or `-m`)
This option gives the startin'blox module with the format `<package>@<distribution>`. The distribution is optional. When specified it can take a distribution name as known on PYPI.org or an URL `git+https://git.somewhere.io/module.git` for private `git` repositories.
* `--site-url`
This option is used to generate links and ids. Defaults to `http://localhost:8000`.
* `--db-host`, `--db-name`, `--db-user` and `--db-pass` are used to configure the database (mandatory with `--production`)
* `--smtp-host`, `--smtp-user` and `--smtp-pass` are used to configure the SMTP (optional)
**initproject**
```
# sib initproject --help
Usage: sib initproject [OPTIONS] NAME [DIRECTORY]
Initialize a starti'blox project
```
* `--admin-name`, `--admin-pass` and `--admin-email` give details about the default admin (default to `admin` in development, mandatory in production)
## Contribute
Get the last unreleased version of the project:
```
$ pip3 install --user -U git+https://git.happy-dev.fr/startinblox/devops/sib
```
## Testing in docker
Test production setup with postgres:
```
# docker network create sib
# docker run --rm --network sib --name db -e POSTGRES_PASSWORD=test -d postgres
# docker run --rm --network sib -p 127.0.0.1:80:8000 -v $PWD:/code -it python:3.6 bash
# pip install -e .[dev]
# sib startproject --production --db-host db --db-name postgres --db-user postgres --db-pass test -m djangoldp_project -m oidc_provider:django-oidc-provider myproject /tmp/test-sib-docker
# sib initproject --production --admin-name admin --admin-email 'something' --admin-pass admin myproject /tmp/test-sib-docker
# cd /tmp/test-sib-docker/
# python manage.py runserver 0.0.0.0:8000
```
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
sib-manager-0.3.0.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for sib_manager-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2cfecb92aef55d946927b2281035cdfb40be6c1099818b3f7bf0a0a1c4d3467 |
|
MD5 | b599dacc3d4bfe4bf35ae5e30f009507 |
|
BLAKE2b-256 | 8fd2734812d68d312a3e5cb44d052eadee51eb5ed4169f9a4f2aef6f39e4e189 |