-
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 #47 from Clivern/issue-#16
Issue #16
- Loading branch information
Showing
10 changed files
with
252 additions
and
175 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 |
---|---|---|
@@ -1,131 +1,38 @@ | ||
<p align="center"> | ||
<img height="150" src="https://raw.githubusercontent.com/Clivern/Kraven/master/static/assets/images/logo.png"> | ||
<img alt="Kraven Logo" src="https://raw.githubusercontent.com/Clivern/Kraven/master/static/assets/images/logo.png" height="140" /> | ||
<h3 align="center">Kraven</h3> | ||
<p align="center">A SaaS Docker Management Dashboard.</p> | ||
</p> | ||
|
||
# Kraven | ||
A SaaS Docker Management Dashboard. | ||
--- | ||
|
||
[![Build Status](https://travis-ci.org/Clivern/Kraven.svg?branch=master)](https://travis-ci.org/Clivern/Kraven) | ||
[![GitHub license](https://img.shields.io/badge/Version-1.0.0-orange.svg)](https://github.com/Clivern/Kraven#changelog) | ||
[![GitHub license](https://img.shields.io/github/license/Clivern/Kraven.svg)](https://github.com/Clivern/Kraven/blob/master/LICENSE) | ||
|
||
Installation | ||
------------ | ||
|
||
In order to run this app do the following: | ||
|
||
### Default Install | ||
|
||
1. Get the application code | ||
|
||
```bash | ||
git clone https://github.com/Clivern/Kraven.git kraven | ||
cd kraven | ||
cp .env.example .env | ||
``` | ||
|
||
2. Install dependencies | ||
|
||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
3. Edit the .env file manually or use command for that | ||
|
||
```bash | ||
# Set DB Host | ||
python manage.py kraven update_env DB_HOST=127.0.0.1 | ||
|
||
# Set DB Port | ||
python manage.py kraven update_env DB_PORT=3306 | ||
|
||
# Set DB Name | ||
python manage.py kraven update_env DB_DATABASE=kraven | ||
|
||
# Set DB Username | ||
python manage.py kraven update_env DB_USERNAME=root | ||
|
||
# Set DB Password | ||
python manage.py kraven update_env DB_PASSWORD= | ||
|
||
# Create a new app key (Required) | ||
python manage.py kraven update_app_key | ||
|
||
# Set DB Type (mysql or sqlite supported till now) | ||
python manage.py kraven update_env DB_CONNECTION=mysql | ||
``` | ||
|
||
4. Migrate The Database. | ||
Kraven manage different docker environments! It allows you to manage your docker containers, images, volumes, networks and much more! It is easy to install and manage backed with a wonderful stuff like Django, RabbitMQ and Celery and integrated with prometheus and grafana. | ||
|
||
```bash | ||
python manage.py migrate | ||
``` | ||
|
||
5. Run The Server | ||
|
||
```bash | ||
python manage.py runserver | ||
``` | ||
|
||
7. Go to `http://127.0.0.1:8000/install` to install the application. | ||
Everything Asynchronous with ability to run any number of workers to scale. It can run as centralized or distributed application. | ||
|
||
|
||
### With Docker | ||
## Documentation | ||
|
||
1. Get the application code | ||
Documentation is inside the [docs directory](docs/README.md) | ||
|
||
```bash | ||
git clone https://github.com/Clivern/Kraven.git kraven | ||
cd kraven | ||
cp .env.docker .env | ||
``` | ||
|
||
2. Then run our docker containers | ||
## Badges | ||
|
||
```bash | ||
docker-compose build | ||
docker-compose up -d | ||
``` | ||
|
||
3. Open your browser and access the `http://127.0.0.1:8000/`. | ||
|
||
4. Also you can add `http://kraven.com` to your `/etc/hosts` file. | ||
[![Build Status](https://travis-ci.org/Clivern/Kraven.svg?branch=master)](https://travis-ci.org/Clivern/Kraven) | ||
[![GitHub license](https://img.shields.io/badge/Version-1.0.0-orange.svg)](https://github.com/Clivern/Kraven#changelog) | ||
[![GitHub license](https://img.shields.io/github/license/Clivern/Kraven.svg)](https://github.com/Clivern/Kraven/blob/master/LICENSE) | ||
|
||
```bash | ||
127.0.0.1:8000 kraven.com | ||
``` | ||
|
||
5. To Check our containers, use the following command: | ||
## Changelog | ||
|
||
```bash | ||
docker-compose ps | ||
* [Version 1.0.0:](https://github.com/Clivern/Kraven/milestone/1?closed=1) | ||
``` | ||
|
||
6. To stop our containers | ||
|
||
```bash | ||
docker-compose down | ||
Initial Release. | ||
``` | ||
|
||
|
||
### Running on production | ||
|
||
Currently kraven is still under development and for sure we will explain how to run it on production after the first release. | ||
|
||
|
||
Misc | ||
==== | ||
|
||
Changelog | ||
--------- | ||
Version 1.0.0: | ||
``` | ||
Coming Soon. | ||
``` | ||
|
||
Acknowledgements | ||
---------------- | ||
## Acknowledgements | ||
|
||
© 2018, Clivern. Released under [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt). | ||
|
||
**Kraven** is authored and maintained by [@clivern](http://github.com/clivern). | ||
**Kraven** is authored and maintained by [@clivern](http://github.com/clivern). |
File renamed without changes.
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,3 @@ | ||
""" | ||
Host Volumes API Endpoints | ||
""" |
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,43 @@ | ||
""" | ||
Network Module | ||
""" | ||
|
||
# local Django | ||
from .auth import Auth | ||
|
||
|
||
class Network(Auth): | ||
|
||
def __init__(self, host_id=None): | ||
Auth.__init__(self, host_id) | ||
|
||
def list(self): | ||
result = [] | ||
networks_list = self._client.networks.list() | ||
for network in networks_list: | ||
result.append({ | ||
"id": network.id, | ||
"short_id": network.short_id, | ||
"name": network.name, | ||
"attrs": network.attrs, | ||
"containers": network.containers | ||
}) | ||
return result | ||
|
||
def get(self, network_id): | ||
return self._client.networks.get(network_id) | ||
|
||
def remove(self, network_id): | ||
return self._client.networks.get(network_id).remove() | ||
|
||
def prune(self, filters=None): | ||
return self._client.networks.prune(filters) | ||
|
||
def disconnect(self, network_id, container, **configs): | ||
self._client.networks.get(network_id).disconnect(container, **configs) | ||
|
||
def connect(self, network_id, container, **configs): | ||
self._client.networks.get(network_id).connect(container, **configs) | ||
|
||
def create(self, name): | ||
return self._client.networks.create(name=name) |
Oops, something went wrong.